From b732ef5c36fdfa2b527bc78c4ebb0b499a005d1f Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 7 Jul 2026 16:23:15 -0400 Subject: [PATCH 01/53] SWI-11658 Switch to OpenAPI Generator SDK --- .gitignore | 21 +- .gitkeep | 4 - .openapi-generator-ignore | 23 + .openapi-generator/FILES | 648 ++ .openapi-generator/VERSION | 1 + .php-cs-fixer.dist.php | 29 + .phplint.yml | 11 + .travis.yml | 12 + LICENSE | 28 - README.md | 467 +- bandwidth.yml | 9896 +++++++++++++++++ composer.json | 47 +- docs/Api/CallsApi.md | 399 + docs/Api/ConferencesApi.md | 704 ++ docs/Api/EndpointsApi.md | 388 + docs/Api/MFAApi.md | 232 + docs/Api/MediaApi.md | 311 + docs/Api/MessagesApi.md | 209 + docs/Api/MultiChannelApi.md | 82 + docs/Api/PhoneNumberLookupApi.md | 232 + docs/Api/RecordingsApi.md | 776 ++ docs/Api/StatisticsApi.md | 80 + docs/Api/TollFreeVerificationApi.md | 675 ++ docs/Api/TranscriptionsApi.md | 235 + docs/Model/AccountStatistics.md | 10 + docs/Model/AdditionalDenialReason.md | 11 + docs/Model/Address.md | 15 + docs/Model/AnswerCallback.md | 22 + docs/Model/AsyncLookupRequest.md | 9 + docs/Model/BlockedWebhook.md | 14 + docs/Model/BridgeCompleteCallback.md | 24 + docs/Model/BridgeTargetCompleteCallback.md | 21 + docs/Model/BrtcError.md | 13 + docs/Model/BrtcErrorResponse.md | 11 + docs/Model/BrtcErrorSource.md | 12 + docs/Model/BrtcLink.md | 11 + docs/Model/BusinessEntityTypeEnum.md | 8 + docs/Model/BusinessRegistrationTypeEnum.md | 8 + docs/Model/CallDirectionEnum.md | 8 + docs/Model/CallRecordingMetadata.md | 27 + docs/Model/CallState.md | 26 + docs/Model/CallStateEnum.md | 8 + docs/Model/CallTranscription.md | 12 + .../CallTranscriptionDetectedLanguageEnum.md | 8 + docs/Model/CallTranscriptionMetadata.md | 11 + docs/Model/CallTranscriptionResponse.md | 12 + docs/Model/CallTranscriptionTrackEnum.md | 8 + docs/Model/Callback.md | 16 + docs/Model/CallbackMethodEnum.md | 8 + docs/Model/CardWidthEnum.md | 8 + docs/Model/CodeRequest.md | 14 + docs/Model/CompletedLookupStatusEnum.md | 8 + docs/Model/Conference.md | 16 + docs/Model/ConferenceCompletedCallback.md | 13 + docs/Model/ConferenceCreatedCallback.md | 13 + docs/Model/ConferenceMember.md | 14 + docs/Model/ConferenceMemberExitCallback.md | 16 + docs/Model/ConferenceMemberJoinCallback.md | 16 + .../ConferenceRecordingAvailableCallback.md | 22 + docs/Model/ConferenceRecordingMetadata.md | 20 + docs/Model/ConferenceRedirectCallback.md | 13 + docs/Model/ConferenceStateEnum.md | 8 + docs/Model/Contact.md | 12 + docs/Model/CreateAsyncBulkLookupResponse.md | 11 + .../CreateAsyncBulkLookupResponseData.md | 10 + docs/Model/CreateCall.md | 29 + docs/Model/CreateCallResponse.md | 29 + docs/Model/CreateEndpointRequestBase.md | 13 + docs/Model/CreateEndpointResponse.md | 11 + docs/Model/CreateEndpointResponseData.md | 16 + docs/Model/CreateMessageRequestError.md | 11 + .../CreateMultiChannelMessageResponse.md | 11 + docs/Model/CreateSyncLookupResponse.md | 11 + docs/Model/CreateSyncLookupResponseData.md | 11 + docs/Model/CreateWebRtcConnectionRequest.md | 14 + docs/Model/DeactivationEventEnum.md | 8 + docs/Model/Device.md | 12 + docs/Model/DeviceStatusEnum.md | 8 + docs/Model/DisconnectCallback.md | 25 + docs/Model/Diversion.md | 15 + docs/Model/DtmfCallback.md | 25 + docs/Model/Endpoint.md | 15 + docs/Model/EndpointDirectionEnum.md | 8 + docs/Model/EndpointEvent.md | 17 + docs/Model/EndpointEventTypeEnum.md | 8 + docs/Model/EndpointResponse.md | 11 + docs/Model/EndpointStatusEnum.md | 8 + docs/Model/EndpointTypeEnum.md | 8 + docs/Model/Endpoints.md | 14 + docs/Model/ErrorObject.md | 11 + docs/Model/ErrorSource.md | 12 + docs/Model/FailureWebhook.md | 14 + docs/Model/FieldError.md | 10 + docs/Model/FileFormatEnum.md | 8 + docs/Model/GatherCallback.md | 26 + docs/Model/GetAsyncBulkLookupResponse.md | 11 + docs/Model/GetAsyncBulkLookupResponseData.md | 11 + docs/Model/InProgressLookupStatusEnum.md | 8 + docs/Model/InboundCallback.md | 14 + docs/Model/InboundCallbackMessage.md | 24 + docs/Model/InboundCallbackTypeEnum.md | 8 + docs/Model/InitiateCallback.md | 21 + docs/Model/LatestMessageDeliveryStatusEnum.md | 8 + docs/Model/LineTypeEnum.md | 8 + docs/Model/Link.md | 10 + docs/Model/LinkSchema.md | 11 + docs/Model/LinksObject.md | 12 + docs/Model/ListEndpointsResponse.md | 12 + docs/Model/ListMessageDirectionEnum.md | 8 + docs/Model/ListMessageItem.md | 31 + docs/Model/LookupErrorResponse.md | 11 + docs/Model/LookupErrorSchema.md | 12 + docs/Model/LookupErrorSchemaMeta.md | 11 + docs/Model/LookupResult.md | 20 + .../Model/MachineDetectionCompleteCallback.md | 22 + docs/Model/MachineDetectionConfiguration.md | 23 + docs/Model/MachineDetectionModeEnum.md | 8 + docs/Model/MachineDetectionResult.md | 10 + docs/Model/Media.md | 11 + docs/Model/Message.md | 21 + docs/Model/MessageDirectionEnum.md | 8 + docs/Model/MessageRequest.md | 16 + docs/Model/MessageStatusEnum.md | 8 + docs/Model/MessageTypeEnum.md | 8 + docs/Model/MessagesList.md | 11 + docs/Model/MessagingCodeResponse.md | 9 + docs/Model/MessagingRequestError.md | 10 + docs/Model/MfaForbiddenRequestError.md | 9 + docs/Model/MfaRequestError.md | 10 + docs/Model/MfaUnauthorizedRequestError.md | 9 + docs/Model/MmsMessageContent.md | 10 + docs/Model/MmsMessageContentFile.md | 9 + docs/Model/MultiChannelAction.md | 22 + docs/Model/MultiChannelActionCalendarEvent.md | 15 + .../Model/MultiChannelChannelListMMSObject.md | 12 + ...ultiChannelChannelListMMSResponseObject.md | 13 + .../MultiChannelChannelListObjectBase.md | 11 + .../MultiChannelChannelListOwnerObject.md | 9 + .../Model/MultiChannelChannelListRBMObject.md | 12 + ...ChannelChannelListRBMObjectAllOfContent.md | 16 + ...ultiChannelChannelListRBMResponseObject.md | 13 + .../MultiChannelChannelListRequestObject.md | 12 + .../MultiChannelChannelListResponseObject.md | 13 + .../Model/MultiChannelChannelListSMSObject.md | 12 + ...ultiChannelChannelListSMSResponseObject.md | 13 + docs/Model/MultiChannelError.md | 11 + docs/Model/MultiChannelMessageChannelEnum.md | 8 + docs/Model/MultiChannelMessageContent.md | 10 + docs/Model/MultiChannelMessageRequest.md | 13 + docs/Model/MultiChannelMessageResponseData.md | 16 + docs/Model/OptInWorkflow.md | 11 + docs/Model/Page.md | 12 + docs/Model/PageInfo.md | 12 + docs/Model/PriorityEnum.md | 8 + docs/Model/ProductTypeEnum.md | 8 + docs/Model/RbmActionBase.md | 11 + docs/Model/RbmActionDial.md | 12 + docs/Model/RbmActionOpenUrl.md | 14 + docs/Model/RbmActionTypeEnum.md | 8 + docs/Model/RbmActionViewLocation.md | 14 + docs/Model/RbmCardContent.md | 12 + docs/Model/RbmCardContentMedia.md | 11 + docs/Model/RbmLocationResponse.md | 10 + docs/Model/RbmMediaHeightEnum.md | 8 + docs/Model/RbmMessageCarouselCard.md | 11 + docs/Model/RbmMessageContentFile.md | 10 + docs/Model/RbmMessageContentRichCard.md | 14 + docs/Model/RbmMessageContentText.md | 10 + docs/Model/RbmMessageMedia.md | 10 + docs/Model/RbmOpenUrlEnum.md | 8 + docs/Model/RbmStandaloneCard.md | 12 + docs/Model/RbmSuggestionResponse.md | 11 + docs/Model/RbmWebViewEnum.md | 8 + docs/Model/RecordingAvailableCallback.md | 30 + docs/Model/RecordingCompleteCallback.md | 30 + docs/Model/RecordingStateEnum.md | 8 + docs/Model/RecordingTranscriptionClip.md | 13 + docs/Model/RecordingTranscriptionMetadata.md | 12 + docs/Model/RecordingTranscriptions.md | 10 + docs/Model/RedirectCallback.md | 24 + docs/Model/RedirectMethodEnum.md | 8 + docs/Model/SipConnectionMetadata.md | 12 + docs/Model/SipCredentials.md | 10 + docs/Model/SmsMessageContent.md | 9 + docs/Model/StandaloneCardOrientationEnum.md | 8 + docs/Model/StatusCallback.md | 16 + docs/Model/StatusCallbackMessage.md | 21 + docs/Model/StatusCallbackTypeEnum.md | 8 + docs/Model/StirShaken.md | 11 + docs/Model/SyncLookupRequest.md | 10 + docs/Model/TelephoneNumber.md | 9 + docs/Model/TfvBasicAuthentication.md | 10 + docs/Model/TfvCallbackStatusEnum.md | 8 + docs/Model/TfvError.md | 11 + docs/Model/TfvStatus.md | 21 + docs/Model/TfvStatusEnum.md | 8 + docs/Model/TfvSubmissionInfo.md | 24 + docs/Model/TfvSubmissionWrapper.md | 9 + docs/Model/ThumbnailAlignmentEnum.md | 8 + docs/Model/TranscribeRecording.md | 15 + docs/Model/Transcription.md | 11 + docs/Model/TranscriptionAvailableCallback.md | 29 + docs/Model/TransferAnswerCallback.md | 23 + docs/Model/TransferCompleteCallback.md | 26 + docs/Model/TransferDisconnectCallback.md | 28 + docs/Model/UpdateCall.md | 18 + docs/Model/UpdateCallRecording.md | 9 + docs/Model/UpdateConference.md | 17 + docs/Model/UpdateConferenceMember.md | 11 + docs/Model/VerificationDenialWebhook.md | 18 + docs/Model/VerificationRequest.md | 28 + docs/Model/VerificationUpdateRequest.md | 27 + docs/Model/VerificationWebhook.md | 12 + docs/Model/VerifyCodeRequest.md | 12 + docs/Model/VerifyCodeResponse.md | 9 + docs/Model/VoiceApiError.md | 11 + docs/Model/VoiceCodeResponse.md | 9 + docs/Model/WebhookSubscription.md | 15 + .../WebhookSubscriptionBasicAuthentication.md | 10 + docs/Model/WebhookSubscriptionError.md | 11 + .../Model/WebhookSubscriptionRequestSchema.md | 11 + docs/Model/WebhookSubscriptionTypeEnum.md | 8 + docs/Model/WebhookSubscriptionsListBody.md | 11 + git_push.sh | 57 + openapi-config.yml | 2 + openapitools.json | 7 + phpunit.xml | 18 - phpunit.xml.dist | 18 + src/APIException.php | 123 +- src/APIHelper.php | 172 - src/Api/CallsApi.php | 2651 +++++ src/Api/ConferencesApi.php | 4601 ++++++++ src/Api/EndpointsApi.php | 2551 +++++ src/Api/MFAApi.php | 1512 +++ src/Api/MediaApi.php | 2064 ++++ src/Api/MessagesApi.php | 1703 +++ src/Api/MultiChannelApi.php | 680 ++ src/Api/PhoneNumberLookupApi.php | 1373 +++ src/Api/RecordingsApi.php | 4930 ++++++++ src/Api/StatisticsApi.php | 656 ++ src/Api/TollFreeVerificationApi.php | 4221 +++++++ src/Api/TranscriptionsApi.php | 1624 +++ src/BandwidthClient.php | 89 - src/Configuration.php | 631 +- src/Controllers/BaseController.php | 141 - src/Environments.php | 24 - src/FormDataProcessor.php | 241 + src/HeaderSelector.php | 244 + src/Http/ApiResponse.php | 72 - src/Http/HttpCallBack.php | 95 - src/Http/HttpContext.php | 55 - src/Http/HttpMethod.php | 21 - src/Http/HttpRequest.php | 125 - src/Http/HttpResponse.php | 72 - src/Messaging/Controllers/APIController.php | 615 - .../Exceptions/MessagingException.php | 46 - src/Messaging/MessagingClient.php | 37 - .../Models/BandwidthCallbackMessage.php | 81 - src/Messaging/Models/BandwidthMessage.php | 134 - src/Messaging/Models/BandwidthMessageItem.php | 161 - .../Models/BandwidthMessagesList.php | 58 - src/Messaging/Models/DeferredResult.php | 49 - src/Messaging/Models/Media.php | 57 - src/Messaging/Models/MessageRequest.php | 95 - src/Messaging/Models/PageInfo.php | 65 - src/Messaging/Models/PriorityEnum.php | 25 - src/Messaging/Models/Tag.php | 49 - src/Model/AccountStatistics.php | 418 + src/Model/AdditionalDenialReason.php | 461 + src/Model/Address.php | 712 ++ src/Model/AnswerCallback.php | 855 ++ src/Model/AsyncLookupRequest.php | 389 + src/Model/BlockedWebhook.php | 576 + src/Model/BridgeCompleteCallback.php | 930 ++ src/Model/BridgeTargetCompleteCallback.php | 814 ++ src/Model/BrtcError.php | 526 + src/Model/BrtcErrorResponse.php | 468 + src/Model/BrtcErrorSource.php | 486 + src/Model/BrtcLink.php | 452 + src/Model/BusinessEntityTypeEnum.php | 52 + src/Model/BusinessRegistrationTypeEnum.php | 78 + src/Model/CallDirectionEnum.php | 46 + src/Model/CallRecordingMetadata.php | 1010 ++ src/Model/CallState.php | 1032 ++ src/Model/CallStateEnum.php | 46 + src/Model/CallTranscription.php | 502 + .../CallTranscriptionDetectedLanguageEnum.php | 48 + src/Model/CallTranscriptionMetadata.php | 452 + src/Model/CallTranscriptionResponse.php | 486 + src/Model/CallTranscriptionTrackEnum.php | 46 + src/Model/Callback.php | 649 ++ src/Model/CallbackMethodEnum.php | 46 + src/Model/CardWidthEnum.php | 45 + src/Model/CodeRequest.php | 633 ++ src/Model/CompletedLookupStatusEnum.php | 47 + src/Model/Conference.php | 657 ++ src/Model/ConferenceCompletedCallback.php | 528 + src/Model/ConferenceCreatedCallback.php | 528 + src/Model/ConferenceMember.php | 561 + src/Model/ConferenceMemberExitCallback.php | 630 ++ src/Model/ConferenceMemberJoinCallback.php | 630 ++ .../ConferenceRecordingAvailableCallback.php | 841 ++ src/Model/ConferenceRecordingMetadata.php | 765 ++ src/Model/ConferenceRedirectCallback.php | 528 + src/Model/ConferenceStateEnum.php | 46 + src/Model/Contact.php | 565 + src/Model/CreateAsyncBulkLookupResponse.php | 452 + .../CreateAsyncBulkLookupResponseData.php | 419 + src/Model/CreateCall.php | 1308 +++ src/Model/CreateCallResponse.php | 1207 ++ src/Model/CreateEndpointRequestBase.php | 528 + src/Model/CreateEndpointResponse.php | 461 + src/Model/CreateEndpointResponseData.php | 642 ++ src/Model/CreateMessageRequestError.php | 458 + .../CreateMultiChannelMessageResponse.php | 452 + src/Model/CreateSyncLookupResponse.php | 452 + src/Model/CreateSyncLookupResponseData.php | 453 + src/Model/CreateWebRtcConnectionRequest.php | 562 + src/Model/DeactivationEventEnum.php | 44 + src/Model/Device.php | 497 + src/Model/DeviceStatusEnum.php | 45 + src/Model/DisconnectCallback.php | 964 ++ src/Model/Diversion.php | 588 + src/Model/DtmfCallback.php | 950 ++ src/Model/Endpoint.php | 605 + src/Model/EndpointDirectionEnum.php | 47 + src/Model/EndpointEvent.php | 680 ++ src/Model/EndpointEventTypeEnum.php | 45 + src/Model/EndpointResponse.php | 461 + src/Model/EndpointStatusEnum.php | 45 + src/Model/EndpointTypeEnum.php | 43 + src/Model/Endpoints.php | 571 + src/Model/ErrorObject.php | 461 + src/Model/ErrorSource.php | 487 + src/Model/FailureWebhook.php | 576 + src/Model/FieldError.php | 418 + src/Model/FileFormatEnum.php | 46 + src/Model/GatherCallback.php | 984 ++ src/Model/GetAsyncBulkLookupResponse.php | 452 + src/Model/GetAsyncBulkLookupResponseData.php | 453 + src/Model/InProgressLookupStatusEnum.php | 49 + src/Model/InboundCallback.php | 570 + src/Model/InboundCallbackMessage.php | 920 ++ src/Model/InboundCallbackTypeEnum.php | 48 + src/Model/InitiateCallback.php | 801 ++ src/Model/LatestMessageDeliveryStatusEnum.php | 50 + src/Model/LineTypeEnum.php | 49 + src/Model/Link.php | 418 + src/Model/LinkSchema.php | 452 + src/Model/LinksObject.php | 486 + src/Model/ListEndpointsResponse.php | 495 + src/Model/ListMessageDirectionEnum.php | 46 + src/Model/ListMessageItem.php | 1216 ++ src/Model/LookupErrorResponse.php | 452 + src/Model/LookupErrorSchema.php | 495 + src/Model/LookupErrorSchemaMeta.php | 452 + src/Model/LookupResult.php | 759 ++ .../MachineDetectionCompleteCallback.php | 855 ++ src/Model/MachineDetectionConfiguration.php | 1007 ++ src/Model/MachineDetectionModeEnum.php | 46 + src/Model/MachineDetectionResult.php | 419 + src/Model/Media.php | 452 + src/Model/Message.php | 796 ++ src/Model/MessageDirectionEnum.php | 46 + src/Model/MessageRequest.php | 641 ++ src/Model/MessageStatusEnum.php | 58 + src/Model/MessageTypeEnum.php | 48 + src/Model/MessagesList.php | 452 + src/Model/MessagingCodeResponse.php | 384 + src/Model/MessagingRequestError.php | 424 + src/Model/MfaForbiddenRequestError.php | 384 + src/Model/MfaRequestError.php | 418 + src/Model/MfaUnauthorizedRequestError.php | 384 + src/Model/MmsMessageContent.php | 426 + src/Model/MmsMessageContentFile.php | 395 + src/Model/ModelInterface.php | 112 + src/Model/MultiChannelAction.php | 913 ++ src/Model/MultiChannelActionCalendarEvent.php | 638 ++ .../MultiChannelChannelListMMSObject.php | 498 + ...ltiChannelChannelListMMSResponseObject.php | 535 + .../MultiChannelChannelListObjectBase.php | 461 + .../MultiChannelChannelListOwnerObject.php | 387 + .../MultiChannelChannelListRBMObject.php | 498 + ...hannelChannelListRBMObjectAllOfContent.php | 672 ++ ...ltiChannelChannelListRBMResponseObject.php | 535 + .../MultiChannelChannelListRequestObject.php | 504 + .../MultiChannelChannelListResponseObject.php | 541 + .../MultiChannelChannelListSMSObject.php | 498 + ...ltiChannelChannelListSMSResponseObject.php | 535 + src/Model/MultiChannelError.php | 459 + src/Model/MultiChannelMessageChannelEnum.php | 48 + src/Model/MultiChannelMessageContent.php | 419 + src/Model/MultiChannelMessageRequest.php | 535 + src/Model/MultiChannelMessageResponseData.php | 648 ++ src/Model/OptInWorkflow.php | 495 + src/Model/Page.php | 525 + src/Model/PageInfo.php | 486 + src/Model/PriorityEnum.php | 46 + src/Model/ProductTypeEnum.php | 60 + src/Model/RbmActionBase.php | 477 + src/Model/RbmActionDial.php | 514 + src/Model/RbmActionOpenUrl.php | 590 + src/Model/RbmActionTypeEnum.php | 53 + src/Model/RbmActionViewLocation.php | 593 + src/Model/RbmCardContent.php | 511 + src/Model/RbmCardContentMedia.php | 474 + src/Model/RbmLocationResponse.php | 418 + src/Model/RbmMediaHeightEnum.php | 48 + src/Model/RbmMessageCarouselCard.php | 481 + src/Model/RbmMessageContentFile.php | 437 + src/Model/RbmMessageContentRichCard.php | 589 + src/Model/RbmMessageContentText.php | 437 + src/Model/RbmMessageMedia.php | 429 + src/Model/RbmOpenUrlEnum.php | 46 + src/Model/RbmStandaloneCard.php | 500 + src/Model/RbmSuggestionResponse.php | 467 + src/Model/RbmWebViewEnum.php | 48 + src/Model/RecordingAvailableCallback.php | 1120 ++ src/Model/RecordingCompleteCallback.php | 1127 ++ src/Model/RecordingStateEnum.php | 46 + src/Model/RecordingTranscriptionClip.php | 536 + src/Model/RecordingTranscriptionMetadata.php | 487 + src/Model/RecordingTranscriptions.php | 418 + src/Model/RedirectCallback.php | 916 ++ src/Model/RedirectMethodEnum.php | 46 + src/Model/SipConnectionMetadata.php | 486 + src/Model/SipCredentials.php | 418 + src/Model/SmsMessageContent.php | 395 + src/Model/StandaloneCardOrientationEnum.php | 45 + src/Model/StatusCallback.php | 638 ++ src/Model/StatusCallbackMessage.php | 819 ++ src/Model/StatusCallbackTypeEnum.php | 52 + src/Model/StirShaken.php | 452 + src/Model/SyncLookupRequest.php | 432 + src/Model/TelephoneNumber.php | 384 + src/Model/TfvBasicAuthentication.php | 440 + src/Model/TfvCallbackStatusEnum.php | 45 + src/Model/TfvError.php | 453 + src/Model/TfvStatus.php | 850 ++ src/Model/TfvStatusEnum.php | 47 + src/Model/TfvSubmissionInfo.php | 1052 ++ src/Model/TfvSubmissionWrapper.php | 384 + src/Model/ThumbnailAlignmentEnum.php | 46 + src/Model/TranscribeRecording.php | 662 ++ src/Model/Transcription.php | 452 + src/Model/TranscriptionAvailableCallback.php | 1086 ++ src/Model/TransferAnswerCallback.php | 882 ++ src/Model/TransferCompleteCallback.php | 998 ++ src/Model/TransferDisconnectCallback.php | 1066 ++ src/Model/UpdateCall.php | 800 ++ src/Model/UpdateCallRecording.php | 387 + src/Model/UpdateConference.php | 751 ++ src/Model/UpdateConferenceMember.php | 459 + src/Model/VerificationDenialWebhook.php | 712 ++ src/Model/VerificationRequest.php | 1267 +++ src/Model/VerificationUpdateRequest.php | 1212 ++ src/Model/VerificationWebhook.php | 508 + src/Model/VerifyCodeRequest.php | 535 + src/Model/VerifyCodeResponse.php | 384 + src/Model/VoiceApiError.php | 459 + src/Model/VoiceCodeResponse.php | 384 + src/Model/WebhookSubscription.php | 621 ++ ...WebhookSubscriptionBasicAuthentication.php | 441 + src/Model/WebhookSubscriptionError.php | 452 + .../WebhookSubscriptionRequestSchema.php | 513 + src/Model/WebhookSubscriptionTypeEnum.php | 45 + src/Model/WebhookSubscriptionsListBody.php | 456 + .../Controllers/MFAController.php | 320 - .../Exceptions/ErrorWithRequestException.php | 44 - .../Exceptions/ForbiddenRequestException.php | 39 - .../UnauthorizedRequestException.php | 38 - .../Models/TwoFactorCodeRequestSchema.php | 91 - .../Models/TwoFactorMessagingResponse.php | 41 - .../Models/TwoFactorVerifyCodeResponse.php | 41 - .../Models/TwoFactorVerifyRequestSchema.php | 84 - .../Models/TwoFactorVoiceResponse.php | 41 - src/MultiFactorAuth/MultiFactorAuthClient.php | 37 - src/ObjectSerializer.php | 601 + .../Controllers/APIController.php | 353 - .../AccountsTnlookup400ErrorException.php | 38 - .../Models/CreateAsyncBulkResponse.php | 52 - .../Models/CreateAsyncBulkResponseData.php | 44 - .../Models/CreateLookupRequest.php | 38 - src/PhoneNumberLookup/Models/Error.php | 60 - src/PhoneNumberLookup/Models/ErrorMeta.php | 52 - src/PhoneNumberLookup/Models/Link.php | 52 - .../Models/LookupResponse.php | 52 - .../Models/LookupResponseData.php | 53 - src/PhoneNumberLookup/Models/LookupResult.php | 119 - .../PhoneNumberLookupClient.php | 37 - src/Servers.php | 44 - src/Utils/DateTimeHelper.php | 300 - src/Voice/Bxml/Bridge.php | 273 - src/Voice/Bxml/Bxml.php | 54 - src/Voice/Bxml/Conference.php | 273 - src/Voice/Bxml/CustomParam.php | 60 - src/Voice/Bxml/Forward.php | 114 - src/Voice/Bxml/Gather.php | 329 - src/Voice/Bxml/Hangup.php | 23 - src/Voice/Bxml/Pause.php | 42 - src/Voice/Bxml/PauseRecording.php | 23 - src/Voice/Bxml/PhoneNumber.php | 237 - src/Voice/Bxml/PlayAudio.php | 75 - src/Voice/Bxml/Record.php | 376 - src/Voice/Bxml/Redirect.php | 186 - src/Voice/Bxml/Response.php | 59 - src/Voice/Bxml/ResumeRecording.php | 23 - src/Voice/Bxml/Ring.php | 64 - src/Voice/Bxml/SendDtmf.php | 75 - src/Voice/Bxml/SipUri.php | 255 - src/Voice/Bxml/SpeakSentence.php | 93 - src/Voice/Bxml/StartGather.php | 116 - src/Voice/Bxml/StartRecording.php | 236 - src/Voice/Bxml/StartStream.php | 168 - src/Voice/Bxml/StartTranscription.php | 206 - src/Voice/Bxml/StopGather.php | 23 - src/Voice/Bxml/StopRecording.php | 23 - src/Voice/Bxml/StopStream.php | 42 - src/Voice/Bxml/StopTranscription.php | 42 - src/Voice/Bxml/StreamParam.php | 60 - src/Voice/Bxml/Tag.php | 39 - src/Voice/Bxml/Transfer.php | 308 - src/Voice/Bxml/Verb.php | 28 - src/Voice/Controllers/APIController.php | 2517 ----- src/Voice/Exceptions/ApiErrorException.php | 50 - src/Voice/Models/AnswerFallbackMethodEnum.php | 24 - src/Voice/Models/AnswerMethodEnum.php | 24 - src/Voice/Models/CallCallback.php | 274 - src/Voice/Models/CallRecordingMetadata.php | 187 - src/Voice/Models/CallState.php | 199 - src/Voice/Models/CallbackMethodEnum.php | 24 - src/Voice/Models/ConferenceCallback.php | 170 - .../Models/ConferenceEventMethodEnum.php | 24 - src/Voice/Models/ConferenceMemberState.php | 83 - .../Models/ConferenceRecordingMetadata.php | 131 - src/Voice/Models/ConferenceState.php | 107 - src/Voice/Models/CreateCallRequest.php | 192 - src/Voice/Models/CreateCallResponse.php | 215 - src/Voice/Models/DirectionEnum.php | 24 - src/Voice/Models/DisconnectMethodEnum.php | 24 - src/Voice/Models/Diversion.php | 65 - src/Voice/Models/FallbackMethodEnum.php | 24 - src/Voice/Models/FileFormatEnum.php | 24 - .../Models/MachineDetectionConfiguration.php | 164 - src/Voice/Models/ModeEnum.php | 26 - .../Models/ModifyCallRecordingRequest.php | 42 - src/Voice/Models/ModifyCallRequest.php | 119 - src/Voice/Models/ModifyConferenceRequest.php | 105 - .../Models/RedirectFallbackMethodEnum.php | 24 - src/Voice/Models/RedirectMethodEnum.php | 24 - src/Voice/Models/State1Enum.php | 29 - src/Voice/Models/StateEnum.php | 24 - src/Voice/Models/StatusEnum.php | 24 - .../Models/TranscribeRecordingRequest.php | 89 - src/Voice/Models/Transcript.php | 49 - src/Voice/Models/Transcription.php | 65 - src/Voice/Models/TranscriptionMetadata.php | 67 - src/Voice/Models/TranscriptionResponse.php | 42 - src/Voice/VoiceClient.php | 37 - src/WebRtc/Controllers/APIController.php | 931 -- src/WebRtc/Exceptions/ErrorException.php | 46 - .../Models/AccountsParticipantsResponse.php | 51 - src/WebRtc/Models/DeviceApiVersionEnum.php | 24 - src/WebRtc/Models/Participant.php | 100 - src/WebRtc/Models/ParticipantSubscription.php | 42 - src/WebRtc/Models/PublishPermissionEnum.php | 24 - src/WebRtc/Models/Session.php | 49 - src/WebRtc/Models/Subscriptions.php | 54 - src/WebRtc/Utils/WebRtcTransfer.php | 33 - src/WebRtc/WebRtcClient.php | 37 - tests/Api/CallsApiTest.php | 132 + tests/Api/ConferencesApiTest.php | 180 + tests/Api/EndpointsApiTest.php | 132 + tests/Api/MFAApiTest.php | 108 + tests/Api/MediaApiTest.php | 120 + tests/Api/MessagesApiTest.php | 96 + tests/Api/MultiChannelApiTest.php | 84 + tests/Api/PhoneNumberLookupApiTest.php | 108 + tests/Api/RecordingsApiTest.php | 192 + tests/Api/StatisticsApiTest.php | 84 + tests/Api/TollFreeVerificationApiTest.php | 180 + tests/Api/TranscriptionsApiTest.php | 108 + tests/ApiTest.php | 254 - tests/BxmlTest.php | 543 - tests/Model/AccountStatisticsTest.php | 98 + tests/Model/AdditionalDenialReasonTest.php | 107 + tests/Model/AddressTest.php | 143 + tests/Model/AnswerCallbackTest.php | 206 + tests/Model/AsyncLookupRequestTest.php | 89 + tests/Model/BlockedWebhookTest.php | 134 + tests/Model/BridgeCompleteCallbackTest.php | 224 + .../BridgeTargetCompleteCallbackTest.php | 197 + tests/Model/BrtcErrorResponseTest.php | 107 + tests/Model/BrtcErrorSourceTest.php | 116 + tests/Model/BrtcErrorTest.php | 125 + tests/Model/BrtcLinkTest.php | 107 + tests/Model/BusinessEntityTypeEnumTest.php | 80 + .../BusinessRegistrationTypeEnumTest.php | 80 + tests/Model/CallDirectionEnumTest.php | 80 + tests/Model/CallRecordingMetadataTest.php | 251 + tests/Model/CallStateEnumTest.php | 80 + tests/Model/CallStateTest.php | 242 + ...lTranscriptionDetectedLanguageEnumTest.php | 80 + tests/Model/CallTranscriptionMetadataTest.php | 107 + tests/Model/CallTranscriptionResponseTest.php | 116 + tests/Model/CallTranscriptionTest.php | 116 + .../Model/CallTranscriptionTrackEnumTest.php | 80 + tests/Model/CallbackMethodEnumTest.php | 80 + tests/Model/CallbackTest.php | 152 + tests/Model/CardWidthEnumTest.php | 80 + tests/Model/CodeRequestTest.php | 134 + tests/Model/CompletedLookupStatusEnumTest.php | 80 + .../Model/ConferenceCompletedCallbackTest.php | 125 + tests/Model/ConferenceCreatedCallbackTest.php | 125 + .../ConferenceMemberExitCallbackTest.php | 152 + .../ConferenceMemberJoinCallbackTest.php | 152 + tests/Model/ConferenceMemberTest.php | 134 + ...nferenceRecordingAvailableCallbackTest.php | 206 + .../Model/ConferenceRecordingMetadataTest.php | 188 + .../Model/ConferenceRedirectCallbackTest.php | 125 + tests/Model/ConferenceStateEnumTest.php | 80 + tests/Model/ConferenceTest.php | 152 + tests/Model/ContactTest.php | 116 + .../CreateAsyncBulkLookupResponseDataTest.php | 98 + .../CreateAsyncBulkLookupResponseTest.php | 107 + tests/Model/CreateCallResponseTest.php | 269 + tests/Model/CreateCallTest.php | 269 + tests/Model/CreateEndpointRequestBaseTest.php | 125 + .../Model/CreateEndpointResponseDataTest.php | 152 + tests/Model/CreateEndpointResponseTest.php | 107 + tests/Model/CreateMessageRequestErrorTest.php | 107 + .../CreateMultiChannelMessageResponseTest.php | 107 + .../CreateSyncLookupResponseDataTest.php | 107 + tests/Model/CreateSyncLookupResponseTest.php | 107 + .../CreateWebRtcConnectionRequestTest.php | 134 + tests/Model/DeactivationEventEnumTest.php | 80 + tests/Model/DeviceStatusEnumTest.php | 80 + tests/Model/DeviceTest.php | 116 + tests/Model/DisconnectCallbackTest.php | 233 + tests/Model/DiversionTest.php | 143 + tests/Model/DtmfCallbackTest.php | 233 + tests/Model/EndpointDirectionEnumTest.php | 80 + tests/Model/EndpointEventTest.php | 161 + tests/Model/EndpointEventTypeEnumTest.php | 80 + tests/Model/EndpointResponseTest.php | 107 + tests/Model/EndpointStatusEnumTest.php | 80 + tests/Model/EndpointTest.php | 143 + tests/Model/EndpointTypeEnumTest.php | 80 + tests/Model/EndpointsTest.php | 134 + tests/Model/ErrorObjectTest.php | 107 + tests/Model/ErrorSourceTest.php | 116 + tests/Model/FailureWebhookTest.php | 134 + tests/Model/FieldErrorTest.php | 98 + tests/Model/FileFormatEnumTest.php | 80 + tests/Model/GatherCallbackTest.php | 242 + .../GetAsyncBulkLookupResponseDataTest.php | 107 + .../Model/GetAsyncBulkLookupResponseTest.php | 107 + .../Model/InProgressLookupStatusEnumTest.php | 80 + tests/Model/InboundCallbackMessageTest.php | 224 + tests/Model/InboundCallbackTest.php | 134 + tests/Model/InboundCallbackTypeEnumTest.php | 80 + tests/Model/InitiateCallbackTest.php | 197 + .../LatestMessageDeliveryStatusEnumTest.php | 80 + tests/Model/LineTypeEnumTest.php | 80 + tests/Model/LinkSchemaTest.php | 107 + tests/Model/LinkTest.php | 98 + tests/Model/LinksObjectTest.php | 116 + tests/Model/ListEndpointsResponseTest.php | 116 + tests/Model/ListMessageDirectionEnumTest.php | 80 + tests/Model/ListMessageItemTest.php | 287 + tests/Model/LookupErrorResponseTest.php | 107 + tests/Model/LookupErrorSchemaMetaTest.php | 107 + tests/Model/LookupErrorSchemaTest.php | 116 + tests/Model/LookupResultTest.php | 188 + .../MachineDetectionCompleteCallbackTest.php | 206 + .../MachineDetectionConfigurationTest.php | 215 + tests/Model/MachineDetectionModeEnumTest.php | 80 + tests/Model/MachineDetectionResultTest.php | 98 + tests/Model/MediaTest.php | 107 + tests/Model/MessageDirectionEnumTest.php | 80 + tests/Model/MessageRequestTest.php | 152 + tests/Model/MessageStatusEnumTest.php | 80 + tests/Model/MessageTest.php | 197 + tests/Model/MessageTypeEnumTest.php | 80 + tests/Model/MessagesListTest.php | 107 + tests/Model/MessagingCodeResponseTest.php | 89 + tests/Model/MessagingRequestErrorTest.php | 98 + tests/Model/MfaForbiddenRequestErrorTest.php | 89 + tests/Model/MfaRequestErrorTest.php | 98 + .../Model/MfaUnauthorizedRequestErrorTest.php | 89 + tests/Model/MmsMessageContentFileTest.php | 89 + tests/Model/MmsMessageContentTest.php | 98 + .../MultiChannelActionCalendarEventTest.php | 143 + tests/Model/MultiChannelActionTest.php | 206 + .../MultiChannelChannelListMMSObjectTest.php | 116 + ...hannelChannelListMMSResponseObjectTest.php | 125 + .../MultiChannelChannelListObjectBaseTest.php | 107 + ...MultiChannelChannelListOwnerObjectTest.php | 89 + ...elChannelListRBMObjectAllOfContentTest.php | 152 + .../MultiChannelChannelListRBMObjectTest.php | 116 + ...hannelChannelListRBMResponseObjectTest.php | 125 + ...ltiChannelChannelListRequestObjectTest.php | 116 + ...tiChannelChannelListResponseObjectTest.php | 125 + .../MultiChannelChannelListSMSObjectTest.php | 116 + ...hannelChannelListSMSResponseObjectTest.php | 125 + tests/Model/MultiChannelErrorTest.php | 107 + .../MultiChannelMessageChannelEnumTest.php | 80 + .../Model/MultiChannelMessageContentTest.php | 98 + .../Model/MultiChannelMessageRequestTest.php | 125 + .../MultiChannelMessageResponseDataTest.php | 152 + tests/Model/OptInWorkflowTest.php | 107 + tests/Model/PageInfoTest.php | 116 + tests/Model/PageTest.php | 116 + tests/Model/PriorityEnumTest.php | 80 + tests/Model/ProductTypeEnumTest.php | 80 + tests/Model/RbmActionBaseTest.php | 107 + tests/Model/RbmActionDialTest.php | 116 + tests/Model/RbmActionOpenUrlTest.php | 134 + tests/Model/RbmActionTypeEnumTest.php | 80 + tests/Model/RbmActionViewLocationTest.php | 134 + tests/Model/RbmCardContentMediaTest.php | 107 + tests/Model/RbmCardContentTest.php | 116 + tests/Model/RbmLocationResponseTest.php | 98 + tests/Model/RbmMediaHeightEnumTest.php | 80 + tests/Model/RbmMessageCarouselCardTest.php | 107 + tests/Model/RbmMessageContentFileTest.php | 98 + tests/Model/RbmMessageContentRichCardTest.php | 134 + tests/Model/RbmMessageContentTextTest.php | 98 + tests/Model/RbmMessageMediaTest.php | 98 + tests/Model/RbmOpenUrlEnumTest.php | 80 + tests/Model/RbmStandaloneCardTest.php | 116 + tests/Model/RbmSuggestionResponseTest.php | 107 + tests/Model/RbmWebViewEnumTest.php | 80 + .../Model/RecordingAvailableCallbackTest.php | 278 + tests/Model/RecordingCompleteCallbackTest.php | 278 + tests/Model/RecordingStateEnumTest.php | 80 + .../Model/RecordingTranscriptionClipTest.php | 125 + .../RecordingTranscriptionMetadataTest.php | 116 + tests/Model/RecordingTranscriptionsTest.php | 98 + tests/Model/RedirectCallbackTest.php | 224 + tests/Model/RedirectMethodEnumTest.php | 80 + tests/Model/SipConnectionMetadataTest.php | 116 + tests/Model/SipCredentialsTest.php | 98 + tests/Model/SmsMessageContentTest.php | 89 + .../StandaloneCardOrientationEnumTest.php | 80 + tests/Model/StatusCallbackMessageTest.php | 197 + tests/Model/StatusCallbackTest.php | 152 + tests/Model/StatusCallbackTypeEnumTest.php | 80 + tests/Model/StirShakenTest.php | 107 + tests/Model/SyncLookupRequestTest.php | 98 + tests/Model/TelephoneNumberTest.php | 89 + tests/Model/TfvBasicAuthenticationTest.php | 98 + tests/Model/TfvCallbackStatusEnumTest.php | 80 + tests/Model/TfvErrorTest.php | 107 + tests/Model/TfvStatusEnumTest.php | 80 + tests/Model/TfvStatusTest.php | 197 + tests/Model/TfvSubmissionInfoTest.php | 224 + tests/Model/TfvSubmissionWrapperTest.php | 89 + tests/Model/ThumbnailAlignmentEnumTest.php | 80 + tests/Model/TranscribeRecordingTest.php | 143 + .../TranscriptionAvailableCallbackTest.php | 269 + tests/Model/TranscriptionTest.php | 107 + tests/Model/TransferAnswerCallbackTest.php | 215 + tests/Model/TransferCompleteCallbackTest.php | 242 + .../Model/TransferDisconnectCallbackTest.php | 260 + tests/Model/UpdateCallRecordingTest.php | 89 + tests/Model/UpdateCallTest.php | 170 + tests/Model/UpdateConferenceMemberTest.php | 107 + tests/Model/UpdateConferenceTest.php | 161 + tests/Model/VerificationDenialWebhookTest.php | 170 + tests/Model/VerificationRequestTest.php | 260 + tests/Model/VerificationUpdateRequestTest.php | 251 + tests/Model/VerificationWebhookTest.php | 116 + tests/Model/VerifyCodeRequestTest.php | 116 + tests/Model/VerifyCodeResponseTest.php | 89 + tests/Model/VoiceApiErrorTest.php | 107 + tests/Model/VoiceCodeResponseTest.php | 89 + ...ookSubscriptionBasicAuthenticationTest.php | 98 + tests/Model/WebhookSubscriptionErrorTest.php | 107 + .../WebhookSubscriptionRequestSchemaTest.php | 107 + tests/Model/WebhookSubscriptionTest.php | 143 + .../Model/WebhookSubscriptionTypeEnumTest.php | 80 + .../WebhookSubscriptionsListBodyTest.php | 107 + tests/WebRtcBxmlTest.php | 26 - 784 files changed, 171627 insertions(+), 16345 deletions(-) delete mode 100644 .gitkeep create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/FILES create mode 100644 .openapi-generator/VERSION create mode 100644 .php-cs-fixer.dist.php create mode 100644 .phplint.yml create mode 100644 .travis.yml delete mode 100644 LICENSE create mode 100644 bandwidth.yml create mode 100644 docs/Api/CallsApi.md create mode 100644 docs/Api/ConferencesApi.md create mode 100644 docs/Api/EndpointsApi.md create mode 100644 docs/Api/MFAApi.md create mode 100644 docs/Api/MediaApi.md create mode 100644 docs/Api/MessagesApi.md create mode 100644 docs/Api/MultiChannelApi.md create mode 100644 docs/Api/PhoneNumberLookupApi.md create mode 100644 docs/Api/RecordingsApi.md create mode 100644 docs/Api/StatisticsApi.md create mode 100644 docs/Api/TollFreeVerificationApi.md create mode 100644 docs/Api/TranscriptionsApi.md create mode 100644 docs/Model/AccountStatistics.md create mode 100644 docs/Model/AdditionalDenialReason.md create mode 100644 docs/Model/Address.md create mode 100644 docs/Model/AnswerCallback.md create mode 100644 docs/Model/AsyncLookupRequest.md create mode 100644 docs/Model/BlockedWebhook.md create mode 100644 docs/Model/BridgeCompleteCallback.md create mode 100644 docs/Model/BridgeTargetCompleteCallback.md create mode 100644 docs/Model/BrtcError.md create mode 100644 docs/Model/BrtcErrorResponse.md create mode 100644 docs/Model/BrtcErrorSource.md create mode 100644 docs/Model/BrtcLink.md create mode 100644 docs/Model/BusinessEntityTypeEnum.md create mode 100644 docs/Model/BusinessRegistrationTypeEnum.md create mode 100644 docs/Model/CallDirectionEnum.md create mode 100644 docs/Model/CallRecordingMetadata.md create mode 100644 docs/Model/CallState.md create mode 100644 docs/Model/CallStateEnum.md create mode 100644 docs/Model/CallTranscription.md create mode 100644 docs/Model/CallTranscriptionDetectedLanguageEnum.md create mode 100644 docs/Model/CallTranscriptionMetadata.md create mode 100644 docs/Model/CallTranscriptionResponse.md create mode 100644 docs/Model/CallTranscriptionTrackEnum.md create mode 100644 docs/Model/Callback.md create mode 100644 docs/Model/CallbackMethodEnum.md create mode 100644 docs/Model/CardWidthEnum.md create mode 100644 docs/Model/CodeRequest.md create mode 100644 docs/Model/CompletedLookupStatusEnum.md create mode 100644 docs/Model/Conference.md create mode 100644 docs/Model/ConferenceCompletedCallback.md create mode 100644 docs/Model/ConferenceCreatedCallback.md create mode 100644 docs/Model/ConferenceMember.md create mode 100644 docs/Model/ConferenceMemberExitCallback.md create mode 100644 docs/Model/ConferenceMemberJoinCallback.md create mode 100644 docs/Model/ConferenceRecordingAvailableCallback.md create mode 100644 docs/Model/ConferenceRecordingMetadata.md create mode 100644 docs/Model/ConferenceRedirectCallback.md create mode 100644 docs/Model/ConferenceStateEnum.md create mode 100644 docs/Model/Contact.md create mode 100644 docs/Model/CreateAsyncBulkLookupResponse.md create mode 100644 docs/Model/CreateAsyncBulkLookupResponseData.md create mode 100644 docs/Model/CreateCall.md create mode 100644 docs/Model/CreateCallResponse.md create mode 100644 docs/Model/CreateEndpointRequestBase.md create mode 100644 docs/Model/CreateEndpointResponse.md create mode 100644 docs/Model/CreateEndpointResponseData.md create mode 100644 docs/Model/CreateMessageRequestError.md create mode 100644 docs/Model/CreateMultiChannelMessageResponse.md create mode 100644 docs/Model/CreateSyncLookupResponse.md create mode 100644 docs/Model/CreateSyncLookupResponseData.md create mode 100644 docs/Model/CreateWebRtcConnectionRequest.md create mode 100644 docs/Model/DeactivationEventEnum.md create mode 100644 docs/Model/Device.md create mode 100644 docs/Model/DeviceStatusEnum.md create mode 100644 docs/Model/DisconnectCallback.md create mode 100644 docs/Model/Diversion.md create mode 100644 docs/Model/DtmfCallback.md create mode 100644 docs/Model/Endpoint.md create mode 100644 docs/Model/EndpointDirectionEnum.md create mode 100644 docs/Model/EndpointEvent.md create mode 100644 docs/Model/EndpointEventTypeEnum.md create mode 100644 docs/Model/EndpointResponse.md create mode 100644 docs/Model/EndpointStatusEnum.md create mode 100644 docs/Model/EndpointTypeEnum.md create mode 100644 docs/Model/Endpoints.md create mode 100644 docs/Model/ErrorObject.md create mode 100644 docs/Model/ErrorSource.md create mode 100644 docs/Model/FailureWebhook.md create mode 100644 docs/Model/FieldError.md create mode 100644 docs/Model/FileFormatEnum.md create mode 100644 docs/Model/GatherCallback.md create mode 100644 docs/Model/GetAsyncBulkLookupResponse.md create mode 100644 docs/Model/GetAsyncBulkLookupResponseData.md create mode 100644 docs/Model/InProgressLookupStatusEnum.md create mode 100644 docs/Model/InboundCallback.md create mode 100644 docs/Model/InboundCallbackMessage.md create mode 100644 docs/Model/InboundCallbackTypeEnum.md create mode 100644 docs/Model/InitiateCallback.md create mode 100644 docs/Model/LatestMessageDeliveryStatusEnum.md create mode 100644 docs/Model/LineTypeEnum.md create mode 100644 docs/Model/Link.md create mode 100644 docs/Model/LinkSchema.md create mode 100644 docs/Model/LinksObject.md create mode 100644 docs/Model/ListEndpointsResponse.md create mode 100644 docs/Model/ListMessageDirectionEnum.md create mode 100644 docs/Model/ListMessageItem.md create mode 100644 docs/Model/LookupErrorResponse.md create mode 100644 docs/Model/LookupErrorSchema.md create mode 100644 docs/Model/LookupErrorSchemaMeta.md create mode 100644 docs/Model/LookupResult.md create mode 100644 docs/Model/MachineDetectionCompleteCallback.md create mode 100644 docs/Model/MachineDetectionConfiguration.md create mode 100644 docs/Model/MachineDetectionModeEnum.md create mode 100644 docs/Model/MachineDetectionResult.md create mode 100644 docs/Model/Media.md create mode 100644 docs/Model/Message.md create mode 100644 docs/Model/MessageDirectionEnum.md create mode 100644 docs/Model/MessageRequest.md create mode 100644 docs/Model/MessageStatusEnum.md create mode 100644 docs/Model/MessageTypeEnum.md create mode 100644 docs/Model/MessagesList.md create mode 100644 docs/Model/MessagingCodeResponse.md create mode 100644 docs/Model/MessagingRequestError.md create mode 100644 docs/Model/MfaForbiddenRequestError.md create mode 100644 docs/Model/MfaRequestError.md create mode 100644 docs/Model/MfaUnauthorizedRequestError.md create mode 100644 docs/Model/MmsMessageContent.md create mode 100644 docs/Model/MmsMessageContentFile.md create mode 100644 docs/Model/MultiChannelAction.md create mode 100644 docs/Model/MultiChannelActionCalendarEvent.md create mode 100644 docs/Model/MultiChannelChannelListMMSObject.md create mode 100644 docs/Model/MultiChannelChannelListMMSResponseObject.md create mode 100644 docs/Model/MultiChannelChannelListObjectBase.md create mode 100644 docs/Model/MultiChannelChannelListOwnerObject.md create mode 100644 docs/Model/MultiChannelChannelListRBMObject.md create mode 100644 docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md create mode 100644 docs/Model/MultiChannelChannelListRBMResponseObject.md create mode 100644 docs/Model/MultiChannelChannelListRequestObject.md create mode 100644 docs/Model/MultiChannelChannelListResponseObject.md create mode 100644 docs/Model/MultiChannelChannelListSMSObject.md create mode 100644 docs/Model/MultiChannelChannelListSMSResponseObject.md create mode 100644 docs/Model/MultiChannelError.md create mode 100644 docs/Model/MultiChannelMessageChannelEnum.md create mode 100644 docs/Model/MultiChannelMessageContent.md create mode 100644 docs/Model/MultiChannelMessageRequest.md create mode 100644 docs/Model/MultiChannelMessageResponseData.md create mode 100644 docs/Model/OptInWorkflow.md create mode 100644 docs/Model/Page.md create mode 100644 docs/Model/PageInfo.md create mode 100644 docs/Model/PriorityEnum.md create mode 100644 docs/Model/ProductTypeEnum.md create mode 100644 docs/Model/RbmActionBase.md create mode 100644 docs/Model/RbmActionDial.md create mode 100644 docs/Model/RbmActionOpenUrl.md create mode 100644 docs/Model/RbmActionTypeEnum.md create mode 100644 docs/Model/RbmActionViewLocation.md create mode 100644 docs/Model/RbmCardContent.md create mode 100644 docs/Model/RbmCardContentMedia.md create mode 100644 docs/Model/RbmLocationResponse.md create mode 100644 docs/Model/RbmMediaHeightEnum.md create mode 100644 docs/Model/RbmMessageCarouselCard.md create mode 100644 docs/Model/RbmMessageContentFile.md create mode 100644 docs/Model/RbmMessageContentRichCard.md create mode 100644 docs/Model/RbmMessageContentText.md create mode 100644 docs/Model/RbmMessageMedia.md create mode 100644 docs/Model/RbmOpenUrlEnum.md create mode 100644 docs/Model/RbmStandaloneCard.md create mode 100644 docs/Model/RbmSuggestionResponse.md create mode 100644 docs/Model/RbmWebViewEnum.md create mode 100644 docs/Model/RecordingAvailableCallback.md create mode 100644 docs/Model/RecordingCompleteCallback.md create mode 100644 docs/Model/RecordingStateEnum.md create mode 100644 docs/Model/RecordingTranscriptionClip.md create mode 100644 docs/Model/RecordingTranscriptionMetadata.md create mode 100644 docs/Model/RecordingTranscriptions.md create mode 100644 docs/Model/RedirectCallback.md create mode 100644 docs/Model/RedirectMethodEnum.md create mode 100644 docs/Model/SipConnectionMetadata.md create mode 100644 docs/Model/SipCredentials.md create mode 100644 docs/Model/SmsMessageContent.md create mode 100644 docs/Model/StandaloneCardOrientationEnum.md create mode 100644 docs/Model/StatusCallback.md create mode 100644 docs/Model/StatusCallbackMessage.md create mode 100644 docs/Model/StatusCallbackTypeEnum.md create mode 100644 docs/Model/StirShaken.md create mode 100644 docs/Model/SyncLookupRequest.md create mode 100644 docs/Model/TelephoneNumber.md create mode 100644 docs/Model/TfvBasicAuthentication.md create mode 100644 docs/Model/TfvCallbackStatusEnum.md create mode 100644 docs/Model/TfvError.md create mode 100644 docs/Model/TfvStatus.md create mode 100644 docs/Model/TfvStatusEnum.md create mode 100644 docs/Model/TfvSubmissionInfo.md create mode 100644 docs/Model/TfvSubmissionWrapper.md create mode 100644 docs/Model/ThumbnailAlignmentEnum.md create mode 100644 docs/Model/TranscribeRecording.md create mode 100644 docs/Model/Transcription.md create mode 100644 docs/Model/TranscriptionAvailableCallback.md create mode 100644 docs/Model/TransferAnswerCallback.md create mode 100644 docs/Model/TransferCompleteCallback.md create mode 100644 docs/Model/TransferDisconnectCallback.md create mode 100644 docs/Model/UpdateCall.md create mode 100644 docs/Model/UpdateCallRecording.md create mode 100644 docs/Model/UpdateConference.md create mode 100644 docs/Model/UpdateConferenceMember.md create mode 100644 docs/Model/VerificationDenialWebhook.md create mode 100644 docs/Model/VerificationRequest.md create mode 100644 docs/Model/VerificationUpdateRequest.md create mode 100644 docs/Model/VerificationWebhook.md create mode 100644 docs/Model/VerifyCodeRequest.md create mode 100644 docs/Model/VerifyCodeResponse.md create mode 100644 docs/Model/VoiceApiError.md create mode 100644 docs/Model/VoiceCodeResponse.md create mode 100644 docs/Model/WebhookSubscription.md create mode 100644 docs/Model/WebhookSubscriptionBasicAuthentication.md create mode 100644 docs/Model/WebhookSubscriptionError.md create mode 100644 docs/Model/WebhookSubscriptionRequestSchema.md create mode 100644 docs/Model/WebhookSubscriptionTypeEnum.md create mode 100644 docs/Model/WebhookSubscriptionsListBody.md create mode 100644 git_push.sh create mode 100644 openapi-config.yml create mode 100644 openapitools.json delete mode 100644 phpunit.xml create mode 100644 phpunit.xml.dist delete mode 100644 src/APIHelper.php create mode 100644 src/Api/CallsApi.php create mode 100644 src/Api/ConferencesApi.php create mode 100644 src/Api/EndpointsApi.php create mode 100644 src/Api/MFAApi.php create mode 100644 src/Api/MediaApi.php create mode 100644 src/Api/MessagesApi.php create mode 100644 src/Api/MultiChannelApi.php create mode 100644 src/Api/PhoneNumberLookupApi.php create mode 100644 src/Api/RecordingsApi.php create mode 100644 src/Api/StatisticsApi.php create mode 100644 src/Api/TollFreeVerificationApi.php create mode 100644 src/Api/TranscriptionsApi.php delete mode 100644 src/BandwidthClient.php delete mode 100644 src/Controllers/BaseController.php delete mode 100644 src/Environments.php create mode 100644 src/FormDataProcessor.php create mode 100644 src/HeaderSelector.php delete mode 100644 src/Http/ApiResponse.php delete mode 100644 src/Http/HttpCallBack.php delete mode 100644 src/Http/HttpContext.php delete mode 100644 src/Http/HttpMethod.php delete mode 100644 src/Http/HttpRequest.php delete mode 100644 src/Http/HttpResponse.php delete mode 100644 src/Messaging/Controllers/APIController.php delete mode 100644 src/Messaging/Exceptions/MessagingException.php delete mode 100644 src/Messaging/MessagingClient.php delete mode 100644 src/Messaging/Models/BandwidthCallbackMessage.php delete mode 100644 src/Messaging/Models/BandwidthMessage.php delete mode 100644 src/Messaging/Models/BandwidthMessageItem.php delete mode 100644 src/Messaging/Models/BandwidthMessagesList.php delete mode 100644 src/Messaging/Models/DeferredResult.php delete mode 100644 src/Messaging/Models/Media.php delete mode 100644 src/Messaging/Models/MessageRequest.php delete mode 100644 src/Messaging/Models/PageInfo.php delete mode 100644 src/Messaging/Models/PriorityEnum.php delete mode 100644 src/Messaging/Models/Tag.php create mode 100644 src/Model/AccountStatistics.php create mode 100644 src/Model/AdditionalDenialReason.php create mode 100644 src/Model/Address.php create mode 100644 src/Model/AnswerCallback.php create mode 100644 src/Model/AsyncLookupRequest.php create mode 100644 src/Model/BlockedWebhook.php create mode 100644 src/Model/BridgeCompleteCallback.php create mode 100644 src/Model/BridgeTargetCompleteCallback.php create mode 100644 src/Model/BrtcError.php create mode 100644 src/Model/BrtcErrorResponse.php create mode 100644 src/Model/BrtcErrorSource.php create mode 100644 src/Model/BrtcLink.php create mode 100644 src/Model/BusinessEntityTypeEnum.php create mode 100644 src/Model/BusinessRegistrationTypeEnum.php create mode 100644 src/Model/CallDirectionEnum.php create mode 100644 src/Model/CallRecordingMetadata.php create mode 100644 src/Model/CallState.php create mode 100644 src/Model/CallStateEnum.php create mode 100644 src/Model/CallTranscription.php create mode 100644 src/Model/CallTranscriptionDetectedLanguageEnum.php create mode 100644 src/Model/CallTranscriptionMetadata.php create mode 100644 src/Model/CallTranscriptionResponse.php create mode 100644 src/Model/CallTranscriptionTrackEnum.php create mode 100644 src/Model/Callback.php create mode 100644 src/Model/CallbackMethodEnum.php create mode 100644 src/Model/CardWidthEnum.php create mode 100644 src/Model/CodeRequest.php create mode 100644 src/Model/CompletedLookupStatusEnum.php create mode 100644 src/Model/Conference.php create mode 100644 src/Model/ConferenceCompletedCallback.php create mode 100644 src/Model/ConferenceCreatedCallback.php create mode 100644 src/Model/ConferenceMember.php create mode 100644 src/Model/ConferenceMemberExitCallback.php create mode 100644 src/Model/ConferenceMemberJoinCallback.php create mode 100644 src/Model/ConferenceRecordingAvailableCallback.php create mode 100644 src/Model/ConferenceRecordingMetadata.php create mode 100644 src/Model/ConferenceRedirectCallback.php create mode 100644 src/Model/ConferenceStateEnum.php create mode 100644 src/Model/Contact.php create mode 100644 src/Model/CreateAsyncBulkLookupResponse.php create mode 100644 src/Model/CreateAsyncBulkLookupResponseData.php create mode 100644 src/Model/CreateCall.php create mode 100644 src/Model/CreateCallResponse.php create mode 100644 src/Model/CreateEndpointRequestBase.php create mode 100644 src/Model/CreateEndpointResponse.php create mode 100644 src/Model/CreateEndpointResponseData.php create mode 100644 src/Model/CreateMessageRequestError.php create mode 100644 src/Model/CreateMultiChannelMessageResponse.php create mode 100644 src/Model/CreateSyncLookupResponse.php create mode 100644 src/Model/CreateSyncLookupResponseData.php create mode 100644 src/Model/CreateWebRtcConnectionRequest.php create mode 100644 src/Model/DeactivationEventEnum.php create mode 100644 src/Model/Device.php create mode 100644 src/Model/DeviceStatusEnum.php create mode 100644 src/Model/DisconnectCallback.php create mode 100644 src/Model/Diversion.php create mode 100644 src/Model/DtmfCallback.php create mode 100644 src/Model/Endpoint.php create mode 100644 src/Model/EndpointDirectionEnum.php create mode 100644 src/Model/EndpointEvent.php create mode 100644 src/Model/EndpointEventTypeEnum.php create mode 100644 src/Model/EndpointResponse.php create mode 100644 src/Model/EndpointStatusEnum.php create mode 100644 src/Model/EndpointTypeEnum.php create mode 100644 src/Model/Endpoints.php create mode 100644 src/Model/ErrorObject.php create mode 100644 src/Model/ErrorSource.php create mode 100644 src/Model/FailureWebhook.php create mode 100644 src/Model/FieldError.php create mode 100644 src/Model/FileFormatEnum.php create mode 100644 src/Model/GatherCallback.php create mode 100644 src/Model/GetAsyncBulkLookupResponse.php create mode 100644 src/Model/GetAsyncBulkLookupResponseData.php create mode 100644 src/Model/InProgressLookupStatusEnum.php create mode 100644 src/Model/InboundCallback.php create mode 100644 src/Model/InboundCallbackMessage.php create mode 100644 src/Model/InboundCallbackTypeEnum.php create mode 100644 src/Model/InitiateCallback.php create mode 100644 src/Model/LatestMessageDeliveryStatusEnum.php create mode 100644 src/Model/LineTypeEnum.php create mode 100644 src/Model/Link.php create mode 100644 src/Model/LinkSchema.php create mode 100644 src/Model/LinksObject.php create mode 100644 src/Model/ListEndpointsResponse.php create mode 100644 src/Model/ListMessageDirectionEnum.php create mode 100644 src/Model/ListMessageItem.php create mode 100644 src/Model/LookupErrorResponse.php create mode 100644 src/Model/LookupErrorSchema.php create mode 100644 src/Model/LookupErrorSchemaMeta.php create mode 100644 src/Model/LookupResult.php create mode 100644 src/Model/MachineDetectionCompleteCallback.php create mode 100644 src/Model/MachineDetectionConfiguration.php create mode 100644 src/Model/MachineDetectionModeEnum.php create mode 100644 src/Model/MachineDetectionResult.php create mode 100644 src/Model/Media.php create mode 100644 src/Model/Message.php create mode 100644 src/Model/MessageDirectionEnum.php create mode 100644 src/Model/MessageRequest.php create mode 100644 src/Model/MessageStatusEnum.php create mode 100644 src/Model/MessageTypeEnum.php create mode 100644 src/Model/MessagesList.php create mode 100644 src/Model/MessagingCodeResponse.php create mode 100644 src/Model/MessagingRequestError.php create mode 100644 src/Model/MfaForbiddenRequestError.php create mode 100644 src/Model/MfaRequestError.php create mode 100644 src/Model/MfaUnauthorizedRequestError.php create mode 100644 src/Model/MmsMessageContent.php create mode 100644 src/Model/MmsMessageContentFile.php create mode 100644 src/Model/ModelInterface.php create mode 100644 src/Model/MultiChannelAction.php create mode 100644 src/Model/MultiChannelActionCalendarEvent.php create mode 100644 src/Model/MultiChannelChannelListMMSObject.php create mode 100644 src/Model/MultiChannelChannelListMMSResponseObject.php create mode 100644 src/Model/MultiChannelChannelListObjectBase.php create mode 100644 src/Model/MultiChannelChannelListOwnerObject.php create mode 100644 src/Model/MultiChannelChannelListRBMObject.php create mode 100644 src/Model/MultiChannelChannelListRBMObjectAllOfContent.php create mode 100644 src/Model/MultiChannelChannelListRBMResponseObject.php create mode 100644 src/Model/MultiChannelChannelListRequestObject.php create mode 100644 src/Model/MultiChannelChannelListResponseObject.php create mode 100644 src/Model/MultiChannelChannelListSMSObject.php create mode 100644 src/Model/MultiChannelChannelListSMSResponseObject.php create mode 100644 src/Model/MultiChannelError.php create mode 100644 src/Model/MultiChannelMessageChannelEnum.php create mode 100644 src/Model/MultiChannelMessageContent.php create mode 100644 src/Model/MultiChannelMessageRequest.php create mode 100644 src/Model/MultiChannelMessageResponseData.php create mode 100644 src/Model/OptInWorkflow.php create mode 100644 src/Model/Page.php create mode 100644 src/Model/PageInfo.php create mode 100644 src/Model/PriorityEnum.php create mode 100644 src/Model/ProductTypeEnum.php create mode 100644 src/Model/RbmActionBase.php create mode 100644 src/Model/RbmActionDial.php create mode 100644 src/Model/RbmActionOpenUrl.php create mode 100644 src/Model/RbmActionTypeEnum.php create mode 100644 src/Model/RbmActionViewLocation.php create mode 100644 src/Model/RbmCardContent.php create mode 100644 src/Model/RbmCardContentMedia.php create mode 100644 src/Model/RbmLocationResponse.php create mode 100644 src/Model/RbmMediaHeightEnum.php create mode 100644 src/Model/RbmMessageCarouselCard.php create mode 100644 src/Model/RbmMessageContentFile.php create mode 100644 src/Model/RbmMessageContentRichCard.php create mode 100644 src/Model/RbmMessageContentText.php create mode 100644 src/Model/RbmMessageMedia.php create mode 100644 src/Model/RbmOpenUrlEnum.php create mode 100644 src/Model/RbmStandaloneCard.php create mode 100644 src/Model/RbmSuggestionResponse.php create mode 100644 src/Model/RbmWebViewEnum.php create mode 100644 src/Model/RecordingAvailableCallback.php create mode 100644 src/Model/RecordingCompleteCallback.php create mode 100644 src/Model/RecordingStateEnum.php create mode 100644 src/Model/RecordingTranscriptionClip.php create mode 100644 src/Model/RecordingTranscriptionMetadata.php create mode 100644 src/Model/RecordingTranscriptions.php create mode 100644 src/Model/RedirectCallback.php create mode 100644 src/Model/RedirectMethodEnum.php create mode 100644 src/Model/SipConnectionMetadata.php create mode 100644 src/Model/SipCredentials.php create mode 100644 src/Model/SmsMessageContent.php create mode 100644 src/Model/StandaloneCardOrientationEnum.php create mode 100644 src/Model/StatusCallback.php create mode 100644 src/Model/StatusCallbackMessage.php create mode 100644 src/Model/StatusCallbackTypeEnum.php create mode 100644 src/Model/StirShaken.php create mode 100644 src/Model/SyncLookupRequest.php create mode 100644 src/Model/TelephoneNumber.php create mode 100644 src/Model/TfvBasicAuthentication.php create mode 100644 src/Model/TfvCallbackStatusEnum.php create mode 100644 src/Model/TfvError.php create mode 100644 src/Model/TfvStatus.php create mode 100644 src/Model/TfvStatusEnum.php create mode 100644 src/Model/TfvSubmissionInfo.php create mode 100644 src/Model/TfvSubmissionWrapper.php create mode 100644 src/Model/ThumbnailAlignmentEnum.php create mode 100644 src/Model/TranscribeRecording.php create mode 100644 src/Model/Transcription.php create mode 100644 src/Model/TranscriptionAvailableCallback.php create mode 100644 src/Model/TransferAnswerCallback.php create mode 100644 src/Model/TransferCompleteCallback.php create mode 100644 src/Model/TransferDisconnectCallback.php create mode 100644 src/Model/UpdateCall.php create mode 100644 src/Model/UpdateCallRecording.php create mode 100644 src/Model/UpdateConference.php create mode 100644 src/Model/UpdateConferenceMember.php create mode 100644 src/Model/VerificationDenialWebhook.php create mode 100644 src/Model/VerificationRequest.php create mode 100644 src/Model/VerificationUpdateRequest.php create mode 100644 src/Model/VerificationWebhook.php create mode 100644 src/Model/VerifyCodeRequest.php create mode 100644 src/Model/VerifyCodeResponse.php create mode 100644 src/Model/VoiceApiError.php create mode 100644 src/Model/VoiceCodeResponse.php create mode 100644 src/Model/WebhookSubscription.php create mode 100644 src/Model/WebhookSubscriptionBasicAuthentication.php create mode 100644 src/Model/WebhookSubscriptionError.php create mode 100644 src/Model/WebhookSubscriptionRequestSchema.php create mode 100644 src/Model/WebhookSubscriptionTypeEnum.php create mode 100644 src/Model/WebhookSubscriptionsListBody.php delete mode 100644 src/MultiFactorAuth/Controllers/MFAController.php delete mode 100644 src/MultiFactorAuth/Exceptions/ErrorWithRequestException.php delete mode 100644 src/MultiFactorAuth/Exceptions/ForbiddenRequestException.php delete mode 100644 src/MultiFactorAuth/Exceptions/UnauthorizedRequestException.php delete mode 100644 src/MultiFactorAuth/Models/TwoFactorCodeRequestSchema.php delete mode 100644 src/MultiFactorAuth/Models/TwoFactorMessagingResponse.php delete mode 100644 src/MultiFactorAuth/Models/TwoFactorVerifyCodeResponse.php delete mode 100644 src/MultiFactorAuth/Models/TwoFactorVerifyRequestSchema.php delete mode 100644 src/MultiFactorAuth/Models/TwoFactorVoiceResponse.php delete mode 100644 src/MultiFactorAuth/MultiFactorAuthClient.php create mode 100644 src/ObjectSerializer.php delete mode 100644 src/PhoneNumberLookup/Controllers/APIController.php delete mode 100644 src/PhoneNumberLookup/Exceptions/AccountsTnlookup400ErrorException.php delete mode 100644 src/PhoneNumberLookup/Models/CreateAsyncBulkResponse.php delete mode 100644 src/PhoneNumberLookup/Models/CreateAsyncBulkResponseData.php delete mode 100644 src/PhoneNumberLookup/Models/CreateLookupRequest.php delete mode 100644 src/PhoneNumberLookup/Models/Error.php delete mode 100644 src/PhoneNumberLookup/Models/ErrorMeta.php delete mode 100644 src/PhoneNumberLookup/Models/Link.php delete mode 100644 src/PhoneNumberLookup/Models/LookupResponse.php delete mode 100644 src/PhoneNumberLookup/Models/LookupResponseData.php delete mode 100644 src/PhoneNumberLookup/Models/LookupResult.php delete mode 100644 src/PhoneNumberLookup/PhoneNumberLookupClient.php delete mode 100644 src/Servers.php delete mode 100644 src/Utils/DateTimeHelper.php delete mode 100644 src/Voice/Bxml/Bridge.php delete mode 100644 src/Voice/Bxml/Bxml.php delete mode 100644 src/Voice/Bxml/Conference.php delete mode 100644 src/Voice/Bxml/CustomParam.php delete mode 100644 src/Voice/Bxml/Forward.php delete mode 100644 src/Voice/Bxml/Gather.php delete mode 100644 src/Voice/Bxml/Hangup.php delete mode 100644 src/Voice/Bxml/Pause.php delete mode 100644 src/Voice/Bxml/PauseRecording.php delete mode 100644 src/Voice/Bxml/PhoneNumber.php delete mode 100644 src/Voice/Bxml/PlayAudio.php delete mode 100644 src/Voice/Bxml/Record.php delete mode 100644 src/Voice/Bxml/Redirect.php delete mode 100644 src/Voice/Bxml/Response.php delete mode 100644 src/Voice/Bxml/ResumeRecording.php delete mode 100644 src/Voice/Bxml/Ring.php delete mode 100644 src/Voice/Bxml/SendDtmf.php delete mode 100644 src/Voice/Bxml/SipUri.php delete mode 100644 src/Voice/Bxml/SpeakSentence.php delete mode 100644 src/Voice/Bxml/StartGather.php delete mode 100644 src/Voice/Bxml/StartRecording.php delete mode 100644 src/Voice/Bxml/StartStream.php delete mode 100644 src/Voice/Bxml/StartTranscription.php delete mode 100644 src/Voice/Bxml/StopGather.php delete mode 100644 src/Voice/Bxml/StopRecording.php delete mode 100644 src/Voice/Bxml/StopStream.php delete mode 100644 src/Voice/Bxml/StopTranscription.php delete mode 100644 src/Voice/Bxml/StreamParam.php delete mode 100644 src/Voice/Bxml/Tag.php delete mode 100644 src/Voice/Bxml/Transfer.php delete mode 100644 src/Voice/Bxml/Verb.php delete mode 100644 src/Voice/Controllers/APIController.php delete mode 100644 src/Voice/Exceptions/ApiErrorException.php delete mode 100644 src/Voice/Models/AnswerFallbackMethodEnum.php delete mode 100644 src/Voice/Models/AnswerMethodEnum.php delete mode 100644 src/Voice/Models/CallCallback.php delete mode 100644 src/Voice/Models/CallRecordingMetadata.php delete mode 100644 src/Voice/Models/CallState.php delete mode 100644 src/Voice/Models/CallbackMethodEnum.php delete mode 100644 src/Voice/Models/ConferenceCallback.php delete mode 100644 src/Voice/Models/ConferenceEventMethodEnum.php delete mode 100644 src/Voice/Models/ConferenceMemberState.php delete mode 100644 src/Voice/Models/ConferenceRecordingMetadata.php delete mode 100644 src/Voice/Models/ConferenceState.php delete mode 100644 src/Voice/Models/CreateCallRequest.php delete mode 100644 src/Voice/Models/CreateCallResponse.php delete mode 100644 src/Voice/Models/DirectionEnum.php delete mode 100644 src/Voice/Models/DisconnectMethodEnum.php delete mode 100644 src/Voice/Models/Diversion.php delete mode 100644 src/Voice/Models/FallbackMethodEnum.php delete mode 100644 src/Voice/Models/FileFormatEnum.php delete mode 100644 src/Voice/Models/MachineDetectionConfiguration.php delete mode 100644 src/Voice/Models/ModeEnum.php delete mode 100644 src/Voice/Models/ModifyCallRecordingRequest.php delete mode 100644 src/Voice/Models/ModifyCallRequest.php delete mode 100644 src/Voice/Models/ModifyConferenceRequest.php delete mode 100644 src/Voice/Models/RedirectFallbackMethodEnum.php delete mode 100644 src/Voice/Models/RedirectMethodEnum.php delete mode 100644 src/Voice/Models/State1Enum.php delete mode 100644 src/Voice/Models/StateEnum.php delete mode 100644 src/Voice/Models/StatusEnum.php delete mode 100644 src/Voice/Models/TranscribeRecordingRequest.php delete mode 100644 src/Voice/Models/Transcript.php delete mode 100644 src/Voice/Models/Transcription.php delete mode 100644 src/Voice/Models/TranscriptionMetadata.php delete mode 100644 src/Voice/Models/TranscriptionResponse.php delete mode 100644 src/Voice/VoiceClient.php delete mode 100644 src/WebRtc/Controllers/APIController.php delete mode 100644 src/WebRtc/Exceptions/ErrorException.php delete mode 100644 src/WebRtc/Models/AccountsParticipantsResponse.php delete mode 100644 src/WebRtc/Models/DeviceApiVersionEnum.php delete mode 100644 src/WebRtc/Models/Participant.php delete mode 100644 src/WebRtc/Models/ParticipantSubscription.php delete mode 100644 src/WebRtc/Models/PublishPermissionEnum.php delete mode 100644 src/WebRtc/Models/Session.php delete mode 100644 src/WebRtc/Models/Subscriptions.php delete mode 100644 src/WebRtc/Utils/WebRtcTransfer.php delete mode 100644 src/WebRtc/WebRtcClient.php create mode 100644 tests/Api/CallsApiTest.php create mode 100644 tests/Api/ConferencesApiTest.php create mode 100644 tests/Api/EndpointsApiTest.php create mode 100644 tests/Api/MFAApiTest.php create mode 100644 tests/Api/MediaApiTest.php create mode 100644 tests/Api/MessagesApiTest.php create mode 100644 tests/Api/MultiChannelApiTest.php create mode 100644 tests/Api/PhoneNumberLookupApiTest.php create mode 100644 tests/Api/RecordingsApiTest.php create mode 100644 tests/Api/StatisticsApiTest.php create mode 100644 tests/Api/TollFreeVerificationApiTest.php create mode 100644 tests/Api/TranscriptionsApiTest.php delete mode 100644 tests/ApiTest.php delete mode 100644 tests/BxmlTest.php create mode 100644 tests/Model/AccountStatisticsTest.php create mode 100644 tests/Model/AdditionalDenialReasonTest.php create mode 100644 tests/Model/AddressTest.php create mode 100644 tests/Model/AnswerCallbackTest.php create mode 100644 tests/Model/AsyncLookupRequestTest.php create mode 100644 tests/Model/BlockedWebhookTest.php create mode 100644 tests/Model/BridgeCompleteCallbackTest.php create mode 100644 tests/Model/BridgeTargetCompleteCallbackTest.php create mode 100644 tests/Model/BrtcErrorResponseTest.php create mode 100644 tests/Model/BrtcErrorSourceTest.php create mode 100644 tests/Model/BrtcErrorTest.php create mode 100644 tests/Model/BrtcLinkTest.php create mode 100644 tests/Model/BusinessEntityTypeEnumTest.php create mode 100644 tests/Model/BusinessRegistrationTypeEnumTest.php create mode 100644 tests/Model/CallDirectionEnumTest.php create mode 100644 tests/Model/CallRecordingMetadataTest.php create mode 100644 tests/Model/CallStateEnumTest.php create mode 100644 tests/Model/CallStateTest.php create mode 100644 tests/Model/CallTranscriptionDetectedLanguageEnumTest.php create mode 100644 tests/Model/CallTranscriptionMetadataTest.php create mode 100644 tests/Model/CallTranscriptionResponseTest.php create mode 100644 tests/Model/CallTranscriptionTest.php create mode 100644 tests/Model/CallTranscriptionTrackEnumTest.php create mode 100644 tests/Model/CallbackMethodEnumTest.php create mode 100644 tests/Model/CallbackTest.php create mode 100644 tests/Model/CardWidthEnumTest.php create mode 100644 tests/Model/CodeRequestTest.php create mode 100644 tests/Model/CompletedLookupStatusEnumTest.php create mode 100644 tests/Model/ConferenceCompletedCallbackTest.php create mode 100644 tests/Model/ConferenceCreatedCallbackTest.php create mode 100644 tests/Model/ConferenceMemberExitCallbackTest.php create mode 100644 tests/Model/ConferenceMemberJoinCallbackTest.php create mode 100644 tests/Model/ConferenceMemberTest.php create mode 100644 tests/Model/ConferenceRecordingAvailableCallbackTest.php create mode 100644 tests/Model/ConferenceRecordingMetadataTest.php create mode 100644 tests/Model/ConferenceRedirectCallbackTest.php create mode 100644 tests/Model/ConferenceStateEnumTest.php create mode 100644 tests/Model/ConferenceTest.php create mode 100644 tests/Model/ContactTest.php create mode 100644 tests/Model/CreateAsyncBulkLookupResponseDataTest.php create mode 100644 tests/Model/CreateAsyncBulkLookupResponseTest.php create mode 100644 tests/Model/CreateCallResponseTest.php create mode 100644 tests/Model/CreateCallTest.php create mode 100644 tests/Model/CreateEndpointRequestBaseTest.php create mode 100644 tests/Model/CreateEndpointResponseDataTest.php create mode 100644 tests/Model/CreateEndpointResponseTest.php create mode 100644 tests/Model/CreateMessageRequestErrorTest.php create mode 100644 tests/Model/CreateMultiChannelMessageResponseTest.php create mode 100644 tests/Model/CreateSyncLookupResponseDataTest.php create mode 100644 tests/Model/CreateSyncLookupResponseTest.php create mode 100644 tests/Model/CreateWebRtcConnectionRequestTest.php create mode 100644 tests/Model/DeactivationEventEnumTest.php create mode 100644 tests/Model/DeviceStatusEnumTest.php create mode 100644 tests/Model/DeviceTest.php create mode 100644 tests/Model/DisconnectCallbackTest.php create mode 100644 tests/Model/DiversionTest.php create mode 100644 tests/Model/DtmfCallbackTest.php create mode 100644 tests/Model/EndpointDirectionEnumTest.php create mode 100644 tests/Model/EndpointEventTest.php create mode 100644 tests/Model/EndpointEventTypeEnumTest.php create mode 100644 tests/Model/EndpointResponseTest.php create mode 100644 tests/Model/EndpointStatusEnumTest.php create mode 100644 tests/Model/EndpointTest.php create mode 100644 tests/Model/EndpointTypeEnumTest.php create mode 100644 tests/Model/EndpointsTest.php create mode 100644 tests/Model/ErrorObjectTest.php create mode 100644 tests/Model/ErrorSourceTest.php create mode 100644 tests/Model/FailureWebhookTest.php create mode 100644 tests/Model/FieldErrorTest.php create mode 100644 tests/Model/FileFormatEnumTest.php create mode 100644 tests/Model/GatherCallbackTest.php create mode 100644 tests/Model/GetAsyncBulkLookupResponseDataTest.php create mode 100644 tests/Model/GetAsyncBulkLookupResponseTest.php create mode 100644 tests/Model/InProgressLookupStatusEnumTest.php create mode 100644 tests/Model/InboundCallbackMessageTest.php create mode 100644 tests/Model/InboundCallbackTest.php create mode 100644 tests/Model/InboundCallbackTypeEnumTest.php create mode 100644 tests/Model/InitiateCallbackTest.php create mode 100644 tests/Model/LatestMessageDeliveryStatusEnumTest.php create mode 100644 tests/Model/LineTypeEnumTest.php create mode 100644 tests/Model/LinkSchemaTest.php create mode 100644 tests/Model/LinkTest.php create mode 100644 tests/Model/LinksObjectTest.php create mode 100644 tests/Model/ListEndpointsResponseTest.php create mode 100644 tests/Model/ListMessageDirectionEnumTest.php create mode 100644 tests/Model/ListMessageItemTest.php create mode 100644 tests/Model/LookupErrorResponseTest.php create mode 100644 tests/Model/LookupErrorSchemaMetaTest.php create mode 100644 tests/Model/LookupErrorSchemaTest.php create mode 100644 tests/Model/LookupResultTest.php create mode 100644 tests/Model/MachineDetectionCompleteCallbackTest.php create mode 100644 tests/Model/MachineDetectionConfigurationTest.php create mode 100644 tests/Model/MachineDetectionModeEnumTest.php create mode 100644 tests/Model/MachineDetectionResultTest.php create mode 100644 tests/Model/MediaTest.php create mode 100644 tests/Model/MessageDirectionEnumTest.php create mode 100644 tests/Model/MessageRequestTest.php create mode 100644 tests/Model/MessageStatusEnumTest.php create mode 100644 tests/Model/MessageTest.php create mode 100644 tests/Model/MessageTypeEnumTest.php create mode 100644 tests/Model/MessagesListTest.php create mode 100644 tests/Model/MessagingCodeResponseTest.php create mode 100644 tests/Model/MessagingRequestErrorTest.php create mode 100644 tests/Model/MfaForbiddenRequestErrorTest.php create mode 100644 tests/Model/MfaRequestErrorTest.php create mode 100644 tests/Model/MfaUnauthorizedRequestErrorTest.php create mode 100644 tests/Model/MmsMessageContentFileTest.php create mode 100644 tests/Model/MmsMessageContentTest.php create mode 100644 tests/Model/MultiChannelActionCalendarEventTest.php create mode 100644 tests/Model/MultiChannelActionTest.php create mode 100644 tests/Model/MultiChannelChannelListMMSObjectTest.php create mode 100644 tests/Model/MultiChannelChannelListMMSResponseObjectTest.php create mode 100644 tests/Model/MultiChannelChannelListObjectBaseTest.php create mode 100644 tests/Model/MultiChannelChannelListOwnerObjectTest.php create mode 100644 tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php create mode 100644 tests/Model/MultiChannelChannelListRBMObjectTest.php create mode 100644 tests/Model/MultiChannelChannelListRBMResponseObjectTest.php create mode 100644 tests/Model/MultiChannelChannelListRequestObjectTest.php create mode 100644 tests/Model/MultiChannelChannelListResponseObjectTest.php create mode 100644 tests/Model/MultiChannelChannelListSMSObjectTest.php create mode 100644 tests/Model/MultiChannelChannelListSMSResponseObjectTest.php create mode 100644 tests/Model/MultiChannelErrorTest.php create mode 100644 tests/Model/MultiChannelMessageChannelEnumTest.php create mode 100644 tests/Model/MultiChannelMessageContentTest.php create mode 100644 tests/Model/MultiChannelMessageRequestTest.php create mode 100644 tests/Model/MultiChannelMessageResponseDataTest.php create mode 100644 tests/Model/OptInWorkflowTest.php create mode 100644 tests/Model/PageInfoTest.php create mode 100644 tests/Model/PageTest.php create mode 100644 tests/Model/PriorityEnumTest.php create mode 100644 tests/Model/ProductTypeEnumTest.php create mode 100644 tests/Model/RbmActionBaseTest.php create mode 100644 tests/Model/RbmActionDialTest.php create mode 100644 tests/Model/RbmActionOpenUrlTest.php create mode 100644 tests/Model/RbmActionTypeEnumTest.php create mode 100644 tests/Model/RbmActionViewLocationTest.php create mode 100644 tests/Model/RbmCardContentMediaTest.php create mode 100644 tests/Model/RbmCardContentTest.php create mode 100644 tests/Model/RbmLocationResponseTest.php create mode 100644 tests/Model/RbmMediaHeightEnumTest.php create mode 100644 tests/Model/RbmMessageCarouselCardTest.php create mode 100644 tests/Model/RbmMessageContentFileTest.php create mode 100644 tests/Model/RbmMessageContentRichCardTest.php create mode 100644 tests/Model/RbmMessageContentTextTest.php create mode 100644 tests/Model/RbmMessageMediaTest.php create mode 100644 tests/Model/RbmOpenUrlEnumTest.php create mode 100644 tests/Model/RbmStandaloneCardTest.php create mode 100644 tests/Model/RbmSuggestionResponseTest.php create mode 100644 tests/Model/RbmWebViewEnumTest.php create mode 100644 tests/Model/RecordingAvailableCallbackTest.php create mode 100644 tests/Model/RecordingCompleteCallbackTest.php create mode 100644 tests/Model/RecordingStateEnumTest.php create mode 100644 tests/Model/RecordingTranscriptionClipTest.php create mode 100644 tests/Model/RecordingTranscriptionMetadataTest.php create mode 100644 tests/Model/RecordingTranscriptionsTest.php create mode 100644 tests/Model/RedirectCallbackTest.php create mode 100644 tests/Model/RedirectMethodEnumTest.php create mode 100644 tests/Model/SipConnectionMetadataTest.php create mode 100644 tests/Model/SipCredentialsTest.php create mode 100644 tests/Model/SmsMessageContentTest.php create mode 100644 tests/Model/StandaloneCardOrientationEnumTest.php create mode 100644 tests/Model/StatusCallbackMessageTest.php create mode 100644 tests/Model/StatusCallbackTest.php create mode 100644 tests/Model/StatusCallbackTypeEnumTest.php create mode 100644 tests/Model/StirShakenTest.php create mode 100644 tests/Model/SyncLookupRequestTest.php create mode 100644 tests/Model/TelephoneNumberTest.php create mode 100644 tests/Model/TfvBasicAuthenticationTest.php create mode 100644 tests/Model/TfvCallbackStatusEnumTest.php create mode 100644 tests/Model/TfvErrorTest.php create mode 100644 tests/Model/TfvStatusEnumTest.php create mode 100644 tests/Model/TfvStatusTest.php create mode 100644 tests/Model/TfvSubmissionInfoTest.php create mode 100644 tests/Model/TfvSubmissionWrapperTest.php create mode 100644 tests/Model/ThumbnailAlignmentEnumTest.php create mode 100644 tests/Model/TranscribeRecordingTest.php create mode 100644 tests/Model/TranscriptionAvailableCallbackTest.php create mode 100644 tests/Model/TranscriptionTest.php create mode 100644 tests/Model/TransferAnswerCallbackTest.php create mode 100644 tests/Model/TransferCompleteCallbackTest.php create mode 100644 tests/Model/TransferDisconnectCallbackTest.php create mode 100644 tests/Model/UpdateCallRecordingTest.php create mode 100644 tests/Model/UpdateCallTest.php create mode 100644 tests/Model/UpdateConferenceMemberTest.php create mode 100644 tests/Model/UpdateConferenceTest.php create mode 100644 tests/Model/VerificationDenialWebhookTest.php create mode 100644 tests/Model/VerificationRequestTest.php create mode 100644 tests/Model/VerificationUpdateRequestTest.php create mode 100644 tests/Model/VerificationWebhookTest.php create mode 100644 tests/Model/VerifyCodeRequestTest.php create mode 100644 tests/Model/VerifyCodeResponseTest.php create mode 100644 tests/Model/VoiceApiErrorTest.php create mode 100644 tests/Model/VoiceCodeResponseTest.php create mode 100644 tests/Model/WebhookSubscriptionBasicAuthenticationTest.php create mode 100644 tests/Model/WebhookSubscriptionErrorTest.php create mode 100644 tests/Model/WebhookSubscriptionRequestSchemaTest.php create mode 100644 tests/Model/WebhookSubscriptionTest.php create mode 100644 tests/Model/WebhookSubscriptionTypeEnumTest.php create mode 100644 tests/Model/WebhookSubscriptionsListBodyTest.php delete mode 100644 tests/WebRtcBxmlTest.php diff --git a/.gitignore b/.gitignore index 8cb8bd37..cc2a4bdc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,19 @@ -# PHP Dev Resources -vendor +# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore + +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +# makes sense since it's a library(client SDK) and not a project composer.lock + +# php-cs-fixer cache +.php_cs.cache +.php-cs-fixer.cache + +# PHPUnit cache .phpunit.result.cache -composer.phar -.idea + +# PHPLint cache +build/phplint.cache diff --git a/.gitkeep b/.gitkeep deleted file mode 100644 index 3d865cb1..00000000 --- a/.gitkeep +++ /dev/null @@ -1,4 +0,0 @@ -README.md -src/Voice/Bxml/* -src/WebRtc/Utils/* -tests/* diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 00000000..f866c6ff --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,648 @@ +.gitignore +.openapi-generator-ignore +.php-cs-fixer.dist.php +.phplint.yml +.travis.yml +README.md +composer.json +docs/Api/CallsApi.md +docs/Api/ConferencesApi.md +docs/Api/EndpointsApi.md +docs/Api/MFAApi.md +docs/Api/MediaApi.md +docs/Api/MessagesApi.md +docs/Api/MultiChannelApi.md +docs/Api/PhoneNumberLookupApi.md +docs/Api/RecordingsApi.md +docs/Api/StatisticsApi.md +docs/Api/TollFreeVerificationApi.md +docs/Api/TranscriptionsApi.md +docs/Model/AccountStatistics.md +docs/Model/AdditionalDenialReason.md +docs/Model/Address.md +docs/Model/AnswerCallback.md +docs/Model/AsyncLookupRequest.md +docs/Model/BlockedWebhook.md +docs/Model/BridgeCompleteCallback.md +docs/Model/BridgeTargetCompleteCallback.md +docs/Model/BrtcError.md +docs/Model/BrtcErrorResponse.md +docs/Model/BrtcErrorSource.md +docs/Model/BrtcLink.md +docs/Model/BusinessEntityTypeEnum.md +docs/Model/BusinessRegistrationTypeEnum.md +docs/Model/CallDirectionEnum.md +docs/Model/CallRecordingMetadata.md +docs/Model/CallState.md +docs/Model/CallStateEnum.md +docs/Model/CallTranscription.md +docs/Model/CallTranscriptionDetectedLanguageEnum.md +docs/Model/CallTranscriptionMetadata.md +docs/Model/CallTranscriptionResponse.md +docs/Model/CallTranscriptionTrackEnum.md +docs/Model/Callback.md +docs/Model/CallbackMethodEnum.md +docs/Model/CardWidthEnum.md +docs/Model/CodeRequest.md +docs/Model/CompletedLookupStatusEnum.md +docs/Model/Conference.md +docs/Model/ConferenceCompletedCallback.md +docs/Model/ConferenceCreatedCallback.md +docs/Model/ConferenceMember.md +docs/Model/ConferenceMemberExitCallback.md +docs/Model/ConferenceMemberJoinCallback.md +docs/Model/ConferenceRecordingAvailableCallback.md +docs/Model/ConferenceRecordingMetadata.md +docs/Model/ConferenceRedirectCallback.md +docs/Model/ConferenceStateEnum.md +docs/Model/Contact.md +docs/Model/CreateAsyncBulkLookupResponse.md +docs/Model/CreateAsyncBulkLookupResponseData.md +docs/Model/CreateCall.md +docs/Model/CreateCallResponse.md +docs/Model/CreateEndpointRequestBase.md +docs/Model/CreateEndpointResponse.md +docs/Model/CreateEndpointResponseData.md +docs/Model/CreateMessageRequestError.md +docs/Model/CreateMultiChannelMessageResponse.md +docs/Model/CreateSyncLookupResponse.md +docs/Model/CreateSyncLookupResponseData.md +docs/Model/CreateWebRtcConnectionRequest.md +docs/Model/DeactivationEventEnum.md +docs/Model/Device.md +docs/Model/DeviceStatusEnum.md +docs/Model/DisconnectCallback.md +docs/Model/Diversion.md +docs/Model/DtmfCallback.md +docs/Model/Endpoint.md +docs/Model/EndpointDirectionEnum.md +docs/Model/EndpointEvent.md +docs/Model/EndpointEventTypeEnum.md +docs/Model/EndpointResponse.md +docs/Model/EndpointStatusEnum.md +docs/Model/EndpointTypeEnum.md +docs/Model/Endpoints.md +docs/Model/ErrorObject.md +docs/Model/ErrorSource.md +docs/Model/FailureWebhook.md +docs/Model/FieldError.md +docs/Model/FileFormatEnum.md +docs/Model/GatherCallback.md +docs/Model/GetAsyncBulkLookupResponse.md +docs/Model/GetAsyncBulkLookupResponseData.md +docs/Model/InProgressLookupStatusEnum.md +docs/Model/InboundCallback.md +docs/Model/InboundCallbackMessage.md +docs/Model/InboundCallbackTypeEnum.md +docs/Model/InitiateCallback.md +docs/Model/LatestMessageDeliveryStatusEnum.md +docs/Model/LineTypeEnum.md +docs/Model/Link.md +docs/Model/LinkSchema.md +docs/Model/LinksObject.md +docs/Model/ListEndpointsResponse.md +docs/Model/ListMessageDirectionEnum.md +docs/Model/ListMessageItem.md +docs/Model/LookupErrorResponse.md +docs/Model/LookupErrorSchema.md +docs/Model/LookupErrorSchemaMeta.md +docs/Model/LookupResult.md +docs/Model/MachineDetectionCompleteCallback.md +docs/Model/MachineDetectionConfiguration.md +docs/Model/MachineDetectionModeEnum.md +docs/Model/MachineDetectionResult.md +docs/Model/Media.md +docs/Model/Message.md +docs/Model/MessageDirectionEnum.md +docs/Model/MessageRequest.md +docs/Model/MessageStatusEnum.md +docs/Model/MessageTypeEnum.md +docs/Model/MessagesList.md +docs/Model/MessagingCodeResponse.md +docs/Model/MessagingRequestError.md +docs/Model/MfaForbiddenRequestError.md +docs/Model/MfaRequestError.md +docs/Model/MfaUnauthorizedRequestError.md +docs/Model/MmsMessageContent.md +docs/Model/MmsMessageContentFile.md +docs/Model/MultiChannelAction.md +docs/Model/MultiChannelActionCalendarEvent.md +docs/Model/MultiChannelChannelListMMSObject.md +docs/Model/MultiChannelChannelListMMSResponseObject.md +docs/Model/MultiChannelChannelListObjectBase.md +docs/Model/MultiChannelChannelListOwnerObject.md +docs/Model/MultiChannelChannelListRBMObject.md +docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md +docs/Model/MultiChannelChannelListRBMResponseObject.md +docs/Model/MultiChannelChannelListRequestObject.md +docs/Model/MultiChannelChannelListResponseObject.md +docs/Model/MultiChannelChannelListSMSObject.md +docs/Model/MultiChannelChannelListSMSResponseObject.md +docs/Model/MultiChannelError.md +docs/Model/MultiChannelMessageChannelEnum.md +docs/Model/MultiChannelMessageContent.md +docs/Model/MultiChannelMessageRequest.md +docs/Model/MultiChannelMessageResponseData.md +docs/Model/OptInWorkflow.md +docs/Model/Page.md +docs/Model/PageInfo.md +docs/Model/PriorityEnum.md +docs/Model/ProductTypeEnum.md +docs/Model/RbmActionBase.md +docs/Model/RbmActionDial.md +docs/Model/RbmActionOpenUrl.md +docs/Model/RbmActionTypeEnum.md +docs/Model/RbmActionViewLocation.md +docs/Model/RbmCardContent.md +docs/Model/RbmCardContentMedia.md +docs/Model/RbmLocationResponse.md +docs/Model/RbmMediaHeightEnum.md +docs/Model/RbmMessageCarouselCard.md +docs/Model/RbmMessageContentFile.md +docs/Model/RbmMessageContentRichCard.md +docs/Model/RbmMessageContentText.md +docs/Model/RbmMessageMedia.md +docs/Model/RbmOpenUrlEnum.md +docs/Model/RbmStandaloneCard.md +docs/Model/RbmSuggestionResponse.md +docs/Model/RbmWebViewEnum.md +docs/Model/RecordingAvailableCallback.md +docs/Model/RecordingCompleteCallback.md +docs/Model/RecordingStateEnum.md +docs/Model/RecordingTranscriptionClip.md +docs/Model/RecordingTranscriptionMetadata.md +docs/Model/RecordingTranscriptions.md +docs/Model/RedirectCallback.md +docs/Model/RedirectMethodEnum.md +docs/Model/SipConnectionMetadata.md +docs/Model/SipCredentials.md +docs/Model/SmsMessageContent.md +docs/Model/StandaloneCardOrientationEnum.md +docs/Model/StatusCallback.md +docs/Model/StatusCallbackMessage.md +docs/Model/StatusCallbackTypeEnum.md +docs/Model/StirShaken.md +docs/Model/SyncLookupRequest.md +docs/Model/TelephoneNumber.md +docs/Model/TfvBasicAuthentication.md +docs/Model/TfvCallbackStatusEnum.md +docs/Model/TfvError.md +docs/Model/TfvStatus.md +docs/Model/TfvStatusEnum.md +docs/Model/TfvSubmissionInfo.md +docs/Model/TfvSubmissionWrapper.md +docs/Model/ThumbnailAlignmentEnum.md +docs/Model/TranscribeRecording.md +docs/Model/Transcription.md +docs/Model/TranscriptionAvailableCallback.md +docs/Model/TransferAnswerCallback.md +docs/Model/TransferCompleteCallback.md +docs/Model/TransferDisconnectCallback.md +docs/Model/UpdateCall.md +docs/Model/UpdateCallRecording.md +docs/Model/UpdateConference.md +docs/Model/UpdateConferenceMember.md +docs/Model/VerificationDenialWebhook.md +docs/Model/VerificationRequest.md +docs/Model/VerificationUpdateRequest.md +docs/Model/VerificationWebhook.md +docs/Model/VerifyCodeRequest.md +docs/Model/VerifyCodeResponse.md +docs/Model/VoiceApiError.md +docs/Model/VoiceCodeResponse.md +docs/Model/WebhookSubscription.md +docs/Model/WebhookSubscriptionBasicAuthentication.md +docs/Model/WebhookSubscriptionError.md +docs/Model/WebhookSubscriptionRequestSchema.md +docs/Model/WebhookSubscriptionTypeEnum.md +docs/Model/WebhookSubscriptionsListBody.md +git_push.sh +phpunit.xml.dist +src/Api/CallsApi.php +src/Api/ConferencesApi.php +src/Api/EndpointsApi.php +src/Api/MFAApi.php +src/Api/MediaApi.php +src/Api/MessagesApi.php +src/Api/MultiChannelApi.php +src/Api/PhoneNumberLookupApi.php +src/Api/RecordingsApi.php +src/Api/StatisticsApi.php +src/Api/TollFreeVerificationApi.php +src/Api/TranscriptionsApi.php +src/ApiException.php +src/Configuration.php +src/FormDataProcessor.php +src/HeaderSelector.php +src/Model/AccountStatistics.php +src/Model/AdditionalDenialReason.php +src/Model/Address.php +src/Model/AnswerCallback.php +src/Model/AsyncLookupRequest.php +src/Model/BlockedWebhook.php +src/Model/BridgeCompleteCallback.php +src/Model/BridgeTargetCompleteCallback.php +src/Model/BrtcError.php +src/Model/BrtcErrorResponse.php +src/Model/BrtcErrorSource.php +src/Model/BrtcLink.php +src/Model/BusinessEntityTypeEnum.php +src/Model/BusinessRegistrationTypeEnum.php +src/Model/CallDirectionEnum.php +src/Model/CallRecordingMetadata.php +src/Model/CallState.php +src/Model/CallStateEnum.php +src/Model/CallTranscription.php +src/Model/CallTranscriptionDetectedLanguageEnum.php +src/Model/CallTranscriptionMetadata.php +src/Model/CallTranscriptionResponse.php +src/Model/CallTranscriptionTrackEnum.php +src/Model/Callback.php +src/Model/CallbackMethodEnum.php +src/Model/CardWidthEnum.php +src/Model/CodeRequest.php +src/Model/CompletedLookupStatusEnum.php +src/Model/Conference.php +src/Model/ConferenceCompletedCallback.php +src/Model/ConferenceCreatedCallback.php +src/Model/ConferenceMember.php +src/Model/ConferenceMemberExitCallback.php +src/Model/ConferenceMemberJoinCallback.php +src/Model/ConferenceRecordingAvailableCallback.php +src/Model/ConferenceRecordingMetadata.php +src/Model/ConferenceRedirectCallback.php +src/Model/ConferenceStateEnum.php +src/Model/Contact.php +src/Model/CreateAsyncBulkLookupResponse.php +src/Model/CreateAsyncBulkLookupResponseData.php +src/Model/CreateCall.php +src/Model/CreateCallResponse.php +src/Model/CreateEndpointRequestBase.php +src/Model/CreateEndpointResponse.php +src/Model/CreateEndpointResponseData.php +src/Model/CreateMessageRequestError.php +src/Model/CreateMultiChannelMessageResponse.php +src/Model/CreateSyncLookupResponse.php +src/Model/CreateSyncLookupResponseData.php +src/Model/CreateWebRtcConnectionRequest.php +src/Model/DeactivationEventEnum.php +src/Model/Device.php +src/Model/DeviceStatusEnum.php +src/Model/DisconnectCallback.php +src/Model/Diversion.php +src/Model/DtmfCallback.php +src/Model/Endpoint.php +src/Model/EndpointDirectionEnum.php +src/Model/EndpointEvent.php +src/Model/EndpointEventTypeEnum.php +src/Model/EndpointResponse.php +src/Model/EndpointStatusEnum.php +src/Model/EndpointTypeEnum.php +src/Model/Endpoints.php +src/Model/ErrorObject.php +src/Model/ErrorSource.php +src/Model/FailureWebhook.php +src/Model/FieldError.php +src/Model/FileFormatEnum.php +src/Model/GatherCallback.php +src/Model/GetAsyncBulkLookupResponse.php +src/Model/GetAsyncBulkLookupResponseData.php +src/Model/InProgressLookupStatusEnum.php +src/Model/InboundCallback.php +src/Model/InboundCallbackMessage.php +src/Model/InboundCallbackTypeEnum.php +src/Model/InitiateCallback.php +src/Model/LatestMessageDeliveryStatusEnum.php +src/Model/LineTypeEnum.php +src/Model/Link.php +src/Model/LinkSchema.php +src/Model/LinksObject.php +src/Model/ListEndpointsResponse.php +src/Model/ListMessageDirectionEnum.php +src/Model/ListMessageItem.php +src/Model/LookupErrorResponse.php +src/Model/LookupErrorSchema.php +src/Model/LookupErrorSchemaMeta.php +src/Model/LookupResult.php +src/Model/MachineDetectionCompleteCallback.php +src/Model/MachineDetectionConfiguration.php +src/Model/MachineDetectionModeEnum.php +src/Model/MachineDetectionResult.php +src/Model/Media.php +src/Model/Message.php +src/Model/MessageDirectionEnum.php +src/Model/MessageRequest.php +src/Model/MessageStatusEnum.php +src/Model/MessageTypeEnum.php +src/Model/MessagesList.php +src/Model/MessagingCodeResponse.php +src/Model/MessagingRequestError.php +src/Model/MfaForbiddenRequestError.php +src/Model/MfaRequestError.php +src/Model/MfaUnauthorizedRequestError.php +src/Model/MmsMessageContent.php +src/Model/MmsMessageContentFile.php +src/Model/ModelInterface.php +src/Model/MultiChannelAction.php +src/Model/MultiChannelActionCalendarEvent.php +src/Model/MultiChannelChannelListMMSObject.php +src/Model/MultiChannelChannelListMMSResponseObject.php +src/Model/MultiChannelChannelListObjectBase.php +src/Model/MultiChannelChannelListOwnerObject.php +src/Model/MultiChannelChannelListRBMObject.php +src/Model/MultiChannelChannelListRBMObjectAllOfContent.php +src/Model/MultiChannelChannelListRBMResponseObject.php +src/Model/MultiChannelChannelListRequestObject.php +src/Model/MultiChannelChannelListResponseObject.php +src/Model/MultiChannelChannelListSMSObject.php +src/Model/MultiChannelChannelListSMSResponseObject.php +src/Model/MultiChannelError.php +src/Model/MultiChannelMessageChannelEnum.php +src/Model/MultiChannelMessageContent.php +src/Model/MultiChannelMessageRequest.php +src/Model/MultiChannelMessageResponseData.php +src/Model/OptInWorkflow.php +src/Model/Page.php +src/Model/PageInfo.php +src/Model/PriorityEnum.php +src/Model/ProductTypeEnum.php +src/Model/RbmActionBase.php +src/Model/RbmActionDial.php +src/Model/RbmActionOpenUrl.php +src/Model/RbmActionTypeEnum.php +src/Model/RbmActionViewLocation.php +src/Model/RbmCardContent.php +src/Model/RbmCardContentMedia.php +src/Model/RbmLocationResponse.php +src/Model/RbmMediaHeightEnum.php +src/Model/RbmMessageCarouselCard.php +src/Model/RbmMessageContentFile.php +src/Model/RbmMessageContentRichCard.php +src/Model/RbmMessageContentText.php +src/Model/RbmMessageMedia.php +src/Model/RbmOpenUrlEnum.php +src/Model/RbmStandaloneCard.php +src/Model/RbmSuggestionResponse.php +src/Model/RbmWebViewEnum.php +src/Model/RecordingAvailableCallback.php +src/Model/RecordingCompleteCallback.php +src/Model/RecordingStateEnum.php +src/Model/RecordingTranscriptionClip.php +src/Model/RecordingTranscriptionMetadata.php +src/Model/RecordingTranscriptions.php +src/Model/RedirectCallback.php +src/Model/RedirectMethodEnum.php +src/Model/SipConnectionMetadata.php +src/Model/SipCredentials.php +src/Model/SmsMessageContent.php +src/Model/StandaloneCardOrientationEnum.php +src/Model/StatusCallback.php +src/Model/StatusCallbackMessage.php +src/Model/StatusCallbackTypeEnum.php +src/Model/StirShaken.php +src/Model/SyncLookupRequest.php +src/Model/TelephoneNumber.php +src/Model/TfvBasicAuthentication.php +src/Model/TfvCallbackStatusEnum.php +src/Model/TfvError.php +src/Model/TfvStatus.php +src/Model/TfvStatusEnum.php +src/Model/TfvSubmissionInfo.php +src/Model/TfvSubmissionWrapper.php +src/Model/ThumbnailAlignmentEnum.php +src/Model/TranscribeRecording.php +src/Model/Transcription.php +src/Model/TranscriptionAvailableCallback.php +src/Model/TransferAnswerCallback.php +src/Model/TransferCompleteCallback.php +src/Model/TransferDisconnectCallback.php +src/Model/UpdateCall.php +src/Model/UpdateCallRecording.php +src/Model/UpdateConference.php +src/Model/UpdateConferenceMember.php +src/Model/VerificationDenialWebhook.php +src/Model/VerificationRequest.php +src/Model/VerificationUpdateRequest.php +src/Model/VerificationWebhook.php +src/Model/VerifyCodeRequest.php +src/Model/VerifyCodeResponse.php +src/Model/VoiceApiError.php +src/Model/VoiceCodeResponse.php +src/Model/WebhookSubscription.php +src/Model/WebhookSubscriptionBasicAuthentication.php +src/Model/WebhookSubscriptionError.php +src/Model/WebhookSubscriptionRequestSchema.php +src/Model/WebhookSubscriptionTypeEnum.php +src/Model/WebhookSubscriptionsListBody.php +src/ObjectSerializer.php +tests/Api/CallsApiTest.php +tests/Api/ConferencesApiTest.php +tests/Api/EndpointsApiTest.php +tests/Api/MFAApiTest.php +tests/Api/MediaApiTest.php +tests/Api/MessagesApiTest.php +tests/Api/MultiChannelApiTest.php +tests/Api/PhoneNumberLookupApiTest.php +tests/Api/RecordingsApiTest.php +tests/Api/StatisticsApiTest.php +tests/Api/TollFreeVerificationApiTest.php +tests/Api/TranscriptionsApiTest.php +tests/Model/AccountStatisticsTest.php +tests/Model/AdditionalDenialReasonTest.php +tests/Model/AddressTest.php +tests/Model/AnswerCallbackTest.php +tests/Model/AsyncLookupRequestTest.php +tests/Model/BlockedWebhookTest.php +tests/Model/BridgeCompleteCallbackTest.php +tests/Model/BridgeTargetCompleteCallbackTest.php +tests/Model/BrtcErrorResponseTest.php +tests/Model/BrtcErrorSourceTest.php +tests/Model/BrtcErrorTest.php +tests/Model/BrtcLinkTest.php +tests/Model/BusinessEntityTypeEnumTest.php +tests/Model/BusinessRegistrationTypeEnumTest.php +tests/Model/CallDirectionEnumTest.php +tests/Model/CallRecordingMetadataTest.php +tests/Model/CallStateEnumTest.php +tests/Model/CallStateTest.php +tests/Model/CallTranscriptionDetectedLanguageEnumTest.php +tests/Model/CallTranscriptionMetadataTest.php +tests/Model/CallTranscriptionResponseTest.php +tests/Model/CallTranscriptionTest.php +tests/Model/CallTranscriptionTrackEnumTest.php +tests/Model/CallbackMethodEnumTest.php +tests/Model/CallbackTest.php +tests/Model/CardWidthEnumTest.php +tests/Model/CodeRequestTest.php +tests/Model/CompletedLookupStatusEnumTest.php +tests/Model/ConferenceCompletedCallbackTest.php +tests/Model/ConferenceCreatedCallbackTest.php +tests/Model/ConferenceMemberExitCallbackTest.php +tests/Model/ConferenceMemberJoinCallbackTest.php +tests/Model/ConferenceMemberTest.php +tests/Model/ConferenceRecordingAvailableCallbackTest.php +tests/Model/ConferenceRecordingMetadataTest.php +tests/Model/ConferenceRedirectCallbackTest.php +tests/Model/ConferenceStateEnumTest.php +tests/Model/ConferenceTest.php +tests/Model/ContactTest.php +tests/Model/CreateAsyncBulkLookupResponseDataTest.php +tests/Model/CreateAsyncBulkLookupResponseTest.php +tests/Model/CreateCallResponseTest.php +tests/Model/CreateCallTest.php +tests/Model/CreateEndpointRequestBaseTest.php +tests/Model/CreateEndpointResponseDataTest.php +tests/Model/CreateEndpointResponseTest.php +tests/Model/CreateMessageRequestErrorTest.php +tests/Model/CreateMultiChannelMessageResponseTest.php +tests/Model/CreateSyncLookupResponseDataTest.php +tests/Model/CreateSyncLookupResponseTest.php +tests/Model/CreateWebRtcConnectionRequestTest.php +tests/Model/DeactivationEventEnumTest.php +tests/Model/DeviceStatusEnumTest.php +tests/Model/DeviceTest.php +tests/Model/DisconnectCallbackTest.php +tests/Model/DiversionTest.php +tests/Model/DtmfCallbackTest.php +tests/Model/EndpointDirectionEnumTest.php +tests/Model/EndpointEventTest.php +tests/Model/EndpointEventTypeEnumTest.php +tests/Model/EndpointResponseTest.php +tests/Model/EndpointStatusEnumTest.php +tests/Model/EndpointTest.php +tests/Model/EndpointTypeEnumTest.php +tests/Model/EndpointsTest.php +tests/Model/ErrorObjectTest.php +tests/Model/ErrorSourceTest.php +tests/Model/FailureWebhookTest.php +tests/Model/FieldErrorTest.php +tests/Model/FileFormatEnumTest.php +tests/Model/GatherCallbackTest.php +tests/Model/GetAsyncBulkLookupResponseDataTest.php +tests/Model/GetAsyncBulkLookupResponseTest.php +tests/Model/InProgressLookupStatusEnumTest.php +tests/Model/InboundCallbackMessageTest.php +tests/Model/InboundCallbackTest.php +tests/Model/InboundCallbackTypeEnumTest.php +tests/Model/InitiateCallbackTest.php +tests/Model/LatestMessageDeliveryStatusEnumTest.php +tests/Model/LineTypeEnumTest.php +tests/Model/LinkSchemaTest.php +tests/Model/LinkTest.php +tests/Model/LinksObjectTest.php +tests/Model/ListEndpointsResponseTest.php +tests/Model/ListMessageDirectionEnumTest.php +tests/Model/ListMessageItemTest.php +tests/Model/LookupErrorResponseTest.php +tests/Model/LookupErrorSchemaMetaTest.php +tests/Model/LookupErrorSchemaTest.php +tests/Model/LookupResultTest.php +tests/Model/MachineDetectionCompleteCallbackTest.php +tests/Model/MachineDetectionConfigurationTest.php +tests/Model/MachineDetectionModeEnumTest.php +tests/Model/MachineDetectionResultTest.php +tests/Model/MediaTest.php +tests/Model/MessageDirectionEnumTest.php +tests/Model/MessageRequestTest.php +tests/Model/MessageStatusEnumTest.php +tests/Model/MessageTest.php +tests/Model/MessageTypeEnumTest.php +tests/Model/MessagesListTest.php +tests/Model/MessagingCodeResponseTest.php +tests/Model/MessagingRequestErrorTest.php +tests/Model/MfaForbiddenRequestErrorTest.php +tests/Model/MfaRequestErrorTest.php +tests/Model/MfaUnauthorizedRequestErrorTest.php +tests/Model/MmsMessageContentFileTest.php +tests/Model/MmsMessageContentTest.php +tests/Model/MultiChannelActionCalendarEventTest.php +tests/Model/MultiChannelActionTest.php +tests/Model/MultiChannelChannelListMMSObjectTest.php +tests/Model/MultiChannelChannelListMMSResponseObjectTest.php +tests/Model/MultiChannelChannelListObjectBaseTest.php +tests/Model/MultiChannelChannelListOwnerObjectTest.php +tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php +tests/Model/MultiChannelChannelListRBMObjectTest.php +tests/Model/MultiChannelChannelListRBMResponseObjectTest.php +tests/Model/MultiChannelChannelListRequestObjectTest.php +tests/Model/MultiChannelChannelListResponseObjectTest.php +tests/Model/MultiChannelChannelListSMSObjectTest.php +tests/Model/MultiChannelChannelListSMSResponseObjectTest.php +tests/Model/MultiChannelErrorTest.php +tests/Model/MultiChannelMessageChannelEnumTest.php +tests/Model/MultiChannelMessageContentTest.php +tests/Model/MultiChannelMessageRequestTest.php +tests/Model/MultiChannelMessageResponseDataTest.php +tests/Model/OptInWorkflowTest.php +tests/Model/PageInfoTest.php +tests/Model/PageTest.php +tests/Model/PriorityEnumTest.php +tests/Model/ProductTypeEnumTest.php +tests/Model/RbmActionBaseTest.php +tests/Model/RbmActionDialTest.php +tests/Model/RbmActionOpenUrlTest.php +tests/Model/RbmActionTypeEnumTest.php +tests/Model/RbmActionViewLocationTest.php +tests/Model/RbmCardContentMediaTest.php +tests/Model/RbmCardContentTest.php +tests/Model/RbmLocationResponseTest.php +tests/Model/RbmMediaHeightEnumTest.php +tests/Model/RbmMessageCarouselCardTest.php +tests/Model/RbmMessageContentFileTest.php +tests/Model/RbmMessageContentRichCardTest.php +tests/Model/RbmMessageContentTextTest.php +tests/Model/RbmMessageMediaTest.php +tests/Model/RbmOpenUrlEnumTest.php +tests/Model/RbmStandaloneCardTest.php +tests/Model/RbmSuggestionResponseTest.php +tests/Model/RbmWebViewEnumTest.php +tests/Model/RecordingAvailableCallbackTest.php +tests/Model/RecordingCompleteCallbackTest.php +tests/Model/RecordingStateEnumTest.php +tests/Model/RecordingTranscriptionClipTest.php +tests/Model/RecordingTranscriptionMetadataTest.php +tests/Model/RecordingTranscriptionsTest.php +tests/Model/RedirectCallbackTest.php +tests/Model/RedirectMethodEnumTest.php +tests/Model/SipConnectionMetadataTest.php +tests/Model/SipCredentialsTest.php +tests/Model/SmsMessageContentTest.php +tests/Model/StandaloneCardOrientationEnumTest.php +tests/Model/StatusCallbackMessageTest.php +tests/Model/StatusCallbackTest.php +tests/Model/StatusCallbackTypeEnumTest.php +tests/Model/StirShakenTest.php +tests/Model/SyncLookupRequestTest.php +tests/Model/TelephoneNumberTest.php +tests/Model/TfvBasicAuthenticationTest.php +tests/Model/TfvCallbackStatusEnumTest.php +tests/Model/TfvErrorTest.php +tests/Model/TfvStatusEnumTest.php +tests/Model/TfvStatusTest.php +tests/Model/TfvSubmissionInfoTest.php +tests/Model/TfvSubmissionWrapperTest.php +tests/Model/ThumbnailAlignmentEnumTest.php +tests/Model/TranscribeRecordingTest.php +tests/Model/TranscriptionAvailableCallbackTest.php +tests/Model/TranscriptionTest.php +tests/Model/TransferAnswerCallbackTest.php +tests/Model/TransferCompleteCallbackTest.php +tests/Model/TransferDisconnectCallbackTest.php +tests/Model/UpdateCallRecordingTest.php +tests/Model/UpdateCallTest.php +tests/Model/UpdateConferenceMemberTest.php +tests/Model/UpdateConferenceTest.php +tests/Model/VerificationDenialWebhookTest.php +tests/Model/VerificationRequestTest.php +tests/Model/VerificationUpdateRequestTest.php +tests/Model/VerificationWebhookTest.php +tests/Model/VerifyCodeRequestTest.php +tests/Model/VerifyCodeResponseTest.php +tests/Model/VoiceApiErrorTest.php +tests/Model/VoiceCodeResponseTest.php +tests/Model/WebhookSubscriptionBasicAuthenticationTest.php +tests/Model/WebhookSubscriptionErrorTest.php +tests/Model/WebhookSubscriptionRequestSchemaTest.php +tests/Model/WebhookSubscriptionTest.php +tests/Model/WebhookSubscriptionTypeEnumTest.php +tests/Model/WebhookSubscriptionsListBodyTest.php diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 00000000..14d6b5dc --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.23.0 diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php new file mode 100644 index 00000000..af9cf39f --- /dev/null +++ b/.php-cs-fixer.dist.php @@ -0,0 +1,29 @@ +in(__DIR__) + ->exclude('vendor') + ->exclude('test') + ->exclude('tests') +; + +$config = new PhpCsFixer\Config(); +return $config->setRules([ + '@PSR12' => true, + 'phpdoc_order' => true, + 'array_syntax' => [ 'syntax' => 'short' ], + 'strict_comparison' => true, + 'strict_param' => true, + 'no_trailing_whitespace' => false, + 'no_trailing_whitespace_in_comment' => false, + 'braces' => false, + 'single_blank_line_at_eof' => false, + 'blank_line_after_namespace' => false, + 'no_leading_import_slash' => false, + ]) + ->setFinder($finder) +; diff --git a/.phplint.yml b/.phplint.yml new file mode 100644 index 00000000..ef4be48f --- /dev/null +++ b/.phplint.yml @@ -0,0 +1,11 @@ +path: + - ./src + - ./tests +jobs: 10 +extensions: + - php +exclude: + - vendor +warning: true +memory-limit: -1 +no-cache: true diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..707be2a1 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +language: php +# Jammy Jellyfish environment has preinstalled PHP 8.1 +# Focal Fossa doesn't fit since it contains preinstalled PHP 7.4 only +# https://docs.travis-ci.com/user/reference/jammy/#php-support +dist: jammy +os: + - linux +php: + - 8.1 + - 8.2 +before_install: "composer install" +script: "vendor/bin/phpunit" diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 749af7fb..00000000 --- a/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -License: -======== -The MIT License (MIT) -http://opensource.org/licenses/MIT - -Copyright (c) 2014 - 2020 APIMATIC Limited - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Trade Mark: -========== -APIMATIC is a trade mark for APIMATIC Limited \ No newline at end of file diff --git a/README.md b/README.md index c3dbb359..23e02463 100644 --- a/README.md +++ b/README.md @@ -1,161 +1,376 @@ -# Bandwidth PHP SDK +# Bandwidth -[![Test](https://github.com/Bandwidth/php-sdk/actions/workflows/test.yml/badge.svg)](https://github.com/Bandwidth/php-sdk/actions/workflows/test.yml) +Bandwidth's Communication APIs -| **OS** | **PHP** | -|:------------:|:-----------------------:| -| Windows 2022 | 8.0, 8.1, 8.2, 8.3, 8.4 | -| Windows 2025 | 8.0, 8.1, 8.2, 8.3, 8.4 | -| Ubuntu 22.04 | 8.0, 8.1, 8.2, 8.3, 8.4 | -| Ubuntu 24.04 | 8.0, 8.1, 8.2, 8.3, 8.4 | +For more information, please visit [https://dev.bandwidth.com](https://dev.bandwidth.com). -## Getting Started +## Installation & Usage -### Installation +### Requirements -``` -composer require bandwidth/sdk -``` +PHP 8.1 and later. -### Initialize +### Composer -```php +To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`: -require "vendor/autoload.php"; - -$config = new BandwidthLib\Configuration( - array( - 'messagingBasicAuthUserName' => 'username', - 'messagingBasicAuthPassword' => 'password', - 'voiceBasicAuthUserName' => 'username', - 'voiceBasicAuthPassword' => 'password', - 'twoFactorAuthBasicAuthUserName' => 'username', - 'twoFactorAuthBasicAuthPassword' => 'password', - 'webRtcBasicAuthUserName' => 'username', - 'webRtcBasicAuthPassword' => 'password' - ) -); -$client = new BandwidthLib\BandwidthClient($config); -$accountId = "12345"; -``` - -### Create A Phone Call - -```php - -$voiceClient = $client->getVoice()->getClient(); - -$body = new BandwidthLib\Voice\Models\CreateCallRequest(); -$body->from = "+15554443333"; -$body->to = "+15554442222"; -$body->answerUrl = "https://test.com"; -$body->applicationId = "3-d-4-b-5"; - -try { - $response = $voiceClient->createCall($voiceAccountId, $body); - print_r($response); -} catch (Exception $e) { - print_r($e); +```json +{ + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + } + ], + "require": { + "GIT_USER_ID/GIT_REPO_ID": "*@dev" + } } ``` -### Send A Text Message - -```php +Then run `composer install` -$messagingClient = $client->getMessaging()->getClient(); +### Manual Installation -$body = new BandwidthLib\Messaging\Models\MessageRequest(); -$body->from = "+12345678901"; -$body->to = array("+12345678902"); -$body->applicationId = "1234-ce-4567-de"; -$body->text = "Greetings!"; - -try { - $response = $messagingClient->createMessage($messagingAccountId, $body); - print_r($response); -} catch (Exception $e) { - print_r($e); -} -``` - -### Create BXML +Download the files and include `autoload.php`: ```php - -$speakSentence = BandwidthLib\Voice\Bxml\SpeakSentence::make("Hello!") - ->voice("susan") - ->locale("en_US") - ->gender("female"); -$response = BandwidthLib\Voice\Bxml\Response::make() - ->addVerb($speakSentence); -echo $response->toBxml(); +getTwoFactorAuth()->getMFA(); - -$body = new BandwidthLib\TwoFactorAuth\Models\TwoFactorCodeRequestSchema(); -$body->from = "+15554443333"; -$body->to = "+15553334444"; -$body->applicationId = "3-a-b-d"; -$body->scope = "scope"; -$body->digits = 6; -$body->message = "Your temporary {NAME} {SCOPE} code is {CODE}"; -$mfaClient->createVoiceTwoFactor($accountId, $body); - -$body = new BandwidthLib\TwoFactorAuth\Models\TwoFactorVerifyRequestSchema(); -$body->from = "+15554443333"; -$body->to = "+15553334444"; -$body->applicationId = "3-a-b-d"; -$body->scope = "scope"; -$body->code = "123456"; -$body->digits = 6; -$body->expirationTimeInMinutes = 3; - -$response = $mfaClient->createVerifyTwoFactor($accountId, $body); -echo $response->getResult()->valid; -``` +```php +getWebRtc()->getClient(); +// Configure HTTP basic authorization: Basic +$config = OpenAPI\Client\Configuration::getDefaultConfiguration() + ->setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); -$createSessionBody = new BandwidthLib\WebRtc\Models\Session(); -$createSessionBody->tag = 'new-session'; +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$createSessionResponse = $webRtcClient->createSession($accountId, $createSessionBody); -$sessionId = $createSessionResponse->getResult()->id; -$createParticipantBody = new BandwidthLib\WebRtc\Models\Participant(); -$createParticipantBody->callbackUrl = 'https://sample.com'; -$createParticipantBody->publishPermissions = array( - BandwidthLib\WebRtc\Models\PublishPermissionEnum::AUDIO, - BandwidthLib\WebRtc\Models\PublishPermissionEnum::VIDEO +$apiInstance = new OpenAPI\Client\Api\CallsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config ); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$create_call = new \OpenAPI\Client\Model\CreateCall(); // \OpenAPI\Client\Model\CreateCall | JSON object containing information to create an outbound call -$body = new BandwidthLib\WebRtc\Models\Subscriptions(); -$body->sessionId = "1234-abcd"; - -$createParticipantResponse = $webRtcClient->createParticipant($accountId, $createParticipantBody); -$participantId = $createParticipantResponse->getResult()->participant->id; +try { + $result = $apiInstance->createCall($account_id, $create_call); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CallsApi->createCall: ', $e->getMessage(), PHP_EOL; +} -$webRtcClient->addParticipantToSession($accountId, $sessionId, $participantId, $body); ``` -## Supported PHP Versions +## API Endpoints + +All URIs are relative to *http://localhost* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CallsApi* | [**createCall**](docs/Api/CallsApi.md#createcall) | **POST** /accounts/{accountId}/calls | Create Call +*CallsApi* | [**getCallState**](docs/Api/CallsApi.md#getcallstate) | **GET** /accounts/{accountId}/calls/{callId} | Get Call State Information +*CallsApi* | [**listCalls**](docs/Api/CallsApi.md#listcalls) | **GET** /accounts/{accountId}/calls | Get Calls +*CallsApi* | [**updateCall**](docs/Api/CallsApi.md#updatecall) | **POST** /accounts/{accountId}/calls/{callId} | Update Call +*CallsApi* | [**updateCallBxml**](docs/Api/CallsApi.md#updatecallbxml) | **PUT** /accounts/{accountId}/calls/{callId}/bxml | Update Call BXML +*ConferencesApi* | [**downloadConferenceRecording**](docs/Api/ConferencesApi.md#downloadconferencerecording) | **GET** /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media | Download Conference Recording +*ConferencesApi* | [**getConference**](docs/Api/ConferencesApi.md#getconference) | **GET** /accounts/{accountId}/conferences/{conferenceId} | Get Conference Information +*ConferencesApi* | [**getConferenceMember**](docs/Api/ConferencesApi.md#getconferencemember) | **GET** /accounts/{accountId}/conferences/{conferenceId}/members/{memberId} | Get Conference Member +*ConferencesApi* | [**getConferenceRecording**](docs/Api/ConferencesApi.md#getconferencerecording) | **GET** /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId} | Get Conference Recording Information +*ConferencesApi* | [**listConferenceRecordings**](docs/Api/ConferencesApi.md#listconferencerecordings) | **GET** /accounts/{accountId}/conferences/{conferenceId}/recordings | Get Conference Recordings +*ConferencesApi* | [**listConferences**](docs/Api/ConferencesApi.md#listconferences) | **GET** /accounts/{accountId}/conferences | Get Conferences +*ConferencesApi* | [**updateConference**](docs/Api/ConferencesApi.md#updateconference) | **POST** /accounts/{accountId}/conferences/{conferenceId} | Update Conference +*ConferencesApi* | [**updateConferenceBxml**](docs/Api/ConferencesApi.md#updateconferencebxml) | **PUT** /accounts/{accountId}/conferences/{conferenceId}/bxml | Update Conference BXML +*ConferencesApi* | [**updateConferenceMember**](docs/Api/ConferencesApi.md#updateconferencemember) | **PUT** /accounts/{accountId}/conferences/{conferenceId}/members/{memberId} | Update Conference Member +*EndpointsApi* | [**createEndpoint**](docs/Api/EndpointsApi.md#createendpoint) | **POST** /accounts/{accountId}/endpoints | Create Endpoint +*EndpointsApi* | [**deleteEndpoint**](docs/Api/EndpointsApi.md#deleteendpoint) | **DELETE** /accounts/{accountId}/endpoints/{endpointId} | Delete Endpoint +*EndpointsApi* | [**getEndpoint**](docs/Api/EndpointsApi.md#getendpoint) | **GET** /accounts/{accountId}/endpoints/{endpointId} | Get Endpoint +*EndpointsApi* | [**listEndpoints**](docs/Api/EndpointsApi.md#listendpoints) | **GET** /accounts/{accountId}/endpoints | List Endpoints +*EndpointsApi* | [**updateEndpointBxml**](docs/Api/EndpointsApi.md#updateendpointbxml) | **PUT** /accounts/{accountId}/endpoints/{endpointId}/bxml | Update Endpoint BXML +*MFAApi* | [**generateMessagingCode**](docs/Api/MFAApi.md#generatemessagingcode) | **POST** /accounts/{accountId}/code/messaging | Messaging Authentication Code +*MFAApi* | [**generateVoiceCode**](docs/Api/MFAApi.md#generatevoicecode) | **POST** /accounts/{accountId}/code/voice | Voice Authentication Code +*MFAApi* | [**verifyCode**](docs/Api/MFAApi.md#verifycode) | **POST** /accounts/{accountId}/code/verify | Verify Authentication Code +*MediaApi* | [**deleteMedia**](docs/Api/MediaApi.md#deletemedia) | **DELETE** /users/{accountId}/media/{mediaId} | Delete Media +*MediaApi* | [**getMedia**](docs/Api/MediaApi.md#getmedia) | **GET** /users/{accountId}/media/{mediaId} | Get Media +*MediaApi* | [**listMedia**](docs/Api/MediaApi.md#listmedia) | **GET** /users/{accountId}/media | List Media +*MediaApi* | [**uploadMedia**](docs/Api/MediaApi.md#uploadmedia) | **PUT** /users/{accountId}/media/{mediaId} | Upload Media +*MessagesApi* | [**createMessage**](docs/Api/MessagesApi.md#createmessage) | **POST** /users/{accountId}/messages | Create Message +*MessagesApi* | [**listMessages**](docs/Api/MessagesApi.md#listmessages) | **GET** /users/{accountId}/messages | List Messages +*MultiChannelApi* | [**createMultiChannelMessage**](docs/Api/MultiChannelApi.md#createmultichannelmessage) | **POST** /users/{accountId}/messages/multiChannel | Create Multi-Channel Message +*PhoneNumberLookupApi* | [**createAsyncBulkLookup**](docs/Api/PhoneNumberLookupApi.md#createasyncbulklookup) | **POST** /accounts/{accountId}/phoneNumberLookup/bulk | Create Asynchronous Bulk Number Lookup +*PhoneNumberLookupApi* | [**createSyncLookup**](docs/Api/PhoneNumberLookupApi.md#createsynclookup) | **POST** /accounts/{accountId}/phoneNumberLookup | Create Synchronous Number Lookup +*PhoneNumberLookupApi* | [**getAsyncBulkLookup**](docs/Api/PhoneNumberLookupApi.md#getasyncbulklookup) | **GET** /accounts/{accountId}/phoneNumberLookup/bulk/{requestId} | Get Asynchronous Bulk Number Lookup +*RecordingsApi* | [**deleteRecording**](docs/Api/RecordingsApi.md#deleterecording) | **DELETE** /accounts/{accountId}/calls/{callId}/recordings/{recordingId} | Delete Recording +*RecordingsApi* | [**deleteRecordingMedia**](docs/Api/RecordingsApi.md#deleterecordingmedia) | **DELETE** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media | Delete Recording Media +*RecordingsApi* | [**deleteRecordingTranscription**](docs/Api/RecordingsApi.md#deleterecordingtranscription) | **DELETE** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Delete Transcription +*RecordingsApi* | [**downloadCallRecording**](docs/Api/RecordingsApi.md#downloadcallrecording) | **GET** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media | Download Recording +*RecordingsApi* | [**getCallRecording**](docs/Api/RecordingsApi.md#getcallrecording) | **GET** /accounts/{accountId}/calls/{callId}/recordings/{recordingId} | Get Call Recording +*RecordingsApi* | [**getRecordingTranscription**](docs/Api/RecordingsApi.md#getrecordingtranscription) | **GET** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Get Transcription +*RecordingsApi* | [**listAccountCallRecordings**](docs/Api/RecordingsApi.md#listaccountcallrecordings) | **GET** /accounts/{accountId}/recordings | Get Call Recordings +*RecordingsApi* | [**listCallRecordings**](docs/Api/RecordingsApi.md#listcallrecordings) | **GET** /accounts/{accountId}/calls/{callId}/recordings | List Call Recordings +*RecordingsApi* | [**transcribeCallRecording**](docs/Api/RecordingsApi.md#transcribecallrecording) | **POST** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Create Transcription Request +*RecordingsApi* | [**updateCallRecordingState**](docs/Api/RecordingsApi.md#updatecallrecordingstate) | **PUT** /accounts/{accountId}/calls/{callId}/recording | Update Recording +*StatisticsApi* | [**getStatistics**](docs/Api/StatisticsApi.md#getstatistics) | **GET** /accounts/{accountId}/statistics | Get Account Statistics +*TollFreeVerificationApi* | [**createWebhookSubscription**](docs/Api/TollFreeVerificationApi.md#createwebhooksubscription) | **POST** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions | Create Webhook Subscription +*TollFreeVerificationApi* | [**deleteVerificationRequest**](docs/Api/TollFreeVerificationApi.md#deleteverificationrequest) | **DELETE** /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Delete a Toll-Free Verification Submission +*TollFreeVerificationApi* | [**deleteWebhookSubscription**](docs/Api/TollFreeVerificationApi.md#deletewebhooksubscription) | **DELETE** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id} | Delete Webhook Subscription +*TollFreeVerificationApi* | [**getTollFreeVerificationStatus**](docs/Api/TollFreeVerificationApi.md#gettollfreeverificationstatus) | **GET** /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Get Toll-Free Verification Status +*TollFreeVerificationApi* | [**listTollFreeUseCases**](docs/Api/TollFreeVerificationApi.md#listtollfreeusecases) | **GET** /tollFreeVerification/useCases | List Toll-Free Use Cases +*TollFreeVerificationApi* | [**listWebhookSubscriptions**](docs/Api/TollFreeVerificationApi.md#listwebhooksubscriptions) | **GET** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions | List Webhook Subscriptions +*TollFreeVerificationApi* | [**requestTollFreeVerification**](docs/Api/TollFreeVerificationApi.md#requesttollfreeverification) | **POST** /accounts/{accountId}/tollFreeVerification | Request Toll-Free Verification +*TollFreeVerificationApi* | [**updateTollFreeVerificationRequest**](docs/Api/TollFreeVerificationApi.md#updatetollfreeverificationrequest) | **PUT** /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Update Toll-Free Verification Request +*TollFreeVerificationApi* | [**updateWebhookSubscription**](docs/Api/TollFreeVerificationApi.md#updatewebhooksubscription) | **PUT** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id} | Update Webhook Subscription +*TranscriptionsApi* | [**deleteRealTimeTranscription**](docs/Api/TranscriptionsApi.md#deleterealtimetranscription) | **DELETE** /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId} | Delete Real-time Transcription +*TranscriptionsApi* | [**getRealTimeTranscription**](docs/Api/TranscriptionsApi.md#getrealtimetranscription) | **GET** /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId} | Get Real-time Transcription +*TranscriptionsApi* | [**listRealTimeTranscriptions**](docs/Api/TranscriptionsApi.md#listrealtimetranscriptions) | **GET** /accounts/{accountId}/calls/{callId}/transcriptions | List Real-time Transcriptions + +## Models + +- [AccountStatistics](docs/Model/AccountStatistics.md) +- [AdditionalDenialReason](docs/Model/AdditionalDenialReason.md) +- [Address](docs/Model/Address.md) +- [AnswerCallback](docs/Model/AnswerCallback.md) +- [AsyncLookupRequest](docs/Model/AsyncLookupRequest.md) +- [BlockedWebhook](docs/Model/BlockedWebhook.md) +- [BridgeCompleteCallback](docs/Model/BridgeCompleteCallback.md) +- [BridgeTargetCompleteCallback](docs/Model/BridgeTargetCompleteCallback.md) +- [BrtcError](docs/Model/BrtcError.md) +- [BrtcErrorResponse](docs/Model/BrtcErrorResponse.md) +- [BrtcErrorSource](docs/Model/BrtcErrorSource.md) +- [BrtcLink](docs/Model/BrtcLink.md) +- [BusinessEntityTypeEnum](docs/Model/BusinessEntityTypeEnum.md) +- [BusinessRegistrationTypeEnum](docs/Model/BusinessRegistrationTypeEnum.md) +- [CallDirectionEnum](docs/Model/CallDirectionEnum.md) +- [CallRecordingMetadata](docs/Model/CallRecordingMetadata.md) +- [CallState](docs/Model/CallState.md) +- [CallStateEnum](docs/Model/CallStateEnum.md) +- [CallTranscription](docs/Model/CallTranscription.md) +- [CallTranscriptionDetectedLanguageEnum](docs/Model/CallTranscriptionDetectedLanguageEnum.md) +- [CallTranscriptionMetadata](docs/Model/CallTranscriptionMetadata.md) +- [CallTranscriptionResponse](docs/Model/CallTranscriptionResponse.md) +- [CallTranscriptionTrackEnum](docs/Model/CallTranscriptionTrackEnum.md) +- [Callback](docs/Model/Callback.md) +- [CallbackMethodEnum](docs/Model/CallbackMethodEnum.md) +- [CardWidthEnum](docs/Model/CardWidthEnum.md) +- [CodeRequest](docs/Model/CodeRequest.md) +- [CompletedLookupStatusEnum](docs/Model/CompletedLookupStatusEnum.md) +- [Conference](docs/Model/Conference.md) +- [ConferenceCompletedCallback](docs/Model/ConferenceCompletedCallback.md) +- [ConferenceCreatedCallback](docs/Model/ConferenceCreatedCallback.md) +- [ConferenceMember](docs/Model/ConferenceMember.md) +- [ConferenceMemberExitCallback](docs/Model/ConferenceMemberExitCallback.md) +- [ConferenceMemberJoinCallback](docs/Model/ConferenceMemberJoinCallback.md) +- [ConferenceRecordingAvailableCallback](docs/Model/ConferenceRecordingAvailableCallback.md) +- [ConferenceRecordingMetadata](docs/Model/ConferenceRecordingMetadata.md) +- [ConferenceRedirectCallback](docs/Model/ConferenceRedirectCallback.md) +- [ConferenceStateEnum](docs/Model/ConferenceStateEnum.md) +- [Contact](docs/Model/Contact.md) +- [CreateAsyncBulkLookupResponse](docs/Model/CreateAsyncBulkLookupResponse.md) +- [CreateAsyncBulkLookupResponseData](docs/Model/CreateAsyncBulkLookupResponseData.md) +- [CreateCall](docs/Model/CreateCall.md) +- [CreateCallResponse](docs/Model/CreateCallResponse.md) +- [CreateEndpointRequestBase](docs/Model/CreateEndpointRequestBase.md) +- [CreateEndpointResponse](docs/Model/CreateEndpointResponse.md) +- [CreateEndpointResponseData](docs/Model/CreateEndpointResponseData.md) +- [CreateMessageRequestError](docs/Model/CreateMessageRequestError.md) +- [CreateMultiChannelMessageResponse](docs/Model/CreateMultiChannelMessageResponse.md) +- [CreateSyncLookupResponse](docs/Model/CreateSyncLookupResponse.md) +- [CreateSyncLookupResponseData](docs/Model/CreateSyncLookupResponseData.md) +- [CreateWebRtcConnectionRequest](docs/Model/CreateWebRtcConnectionRequest.md) +- [DeactivationEventEnum](docs/Model/DeactivationEventEnum.md) +- [Device](docs/Model/Device.md) +- [DeviceStatusEnum](docs/Model/DeviceStatusEnum.md) +- [DisconnectCallback](docs/Model/DisconnectCallback.md) +- [Diversion](docs/Model/Diversion.md) +- [DtmfCallback](docs/Model/DtmfCallback.md) +- [Endpoint](docs/Model/Endpoint.md) +- [EndpointDirectionEnum](docs/Model/EndpointDirectionEnum.md) +- [EndpointEvent](docs/Model/EndpointEvent.md) +- [EndpointEventTypeEnum](docs/Model/EndpointEventTypeEnum.md) +- [EndpointResponse](docs/Model/EndpointResponse.md) +- [EndpointStatusEnum](docs/Model/EndpointStatusEnum.md) +- [EndpointTypeEnum](docs/Model/EndpointTypeEnum.md) +- [Endpoints](docs/Model/Endpoints.md) +- [ErrorObject](docs/Model/ErrorObject.md) +- [ErrorSource](docs/Model/ErrorSource.md) +- [FailureWebhook](docs/Model/FailureWebhook.md) +- [FieldError](docs/Model/FieldError.md) +- [FileFormatEnum](docs/Model/FileFormatEnum.md) +- [GatherCallback](docs/Model/GatherCallback.md) +- [GetAsyncBulkLookupResponse](docs/Model/GetAsyncBulkLookupResponse.md) +- [GetAsyncBulkLookupResponseData](docs/Model/GetAsyncBulkLookupResponseData.md) +- [InProgressLookupStatusEnum](docs/Model/InProgressLookupStatusEnum.md) +- [InboundCallback](docs/Model/InboundCallback.md) +- [InboundCallbackMessage](docs/Model/InboundCallbackMessage.md) +- [InboundCallbackTypeEnum](docs/Model/InboundCallbackTypeEnum.md) +- [InitiateCallback](docs/Model/InitiateCallback.md) +- [LatestMessageDeliveryStatusEnum](docs/Model/LatestMessageDeliveryStatusEnum.md) +- [LineTypeEnum](docs/Model/LineTypeEnum.md) +- [Link](docs/Model/Link.md) +- [LinkSchema](docs/Model/LinkSchema.md) +- [LinksObject](docs/Model/LinksObject.md) +- [ListEndpointsResponse](docs/Model/ListEndpointsResponse.md) +- [ListMessageDirectionEnum](docs/Model/ListMessageDirectionEnum.md) +- [ListMessageItem](docs/Model/ListMessageItem.md) +- [LookupErrorResponse](docs/Model/LookupErrorResponse.md) +- [LookupErrorSchema](docs/Model/LookupErrorSchema.md) +- [LookupErrorSchemaMeta](docs/Model/LookupErrorSchemaMeta.md) +- [LookupResult](docs/Model/LookupResult.md) +- [MachineDetectionCompleteCallback](docs/Model/MachineDetectionCompleteCallback.md) +- [MachineDetectionConfiguration](docs/Model/MachineDetectionConfiguration.md) +- [MachineDetectionModeEnum](docs/Model/MachineDetectionModeEnum.md) +- [MachineDetectionResult](docs/Model/MachineDetectionResult.md) +- [Media](docs/Model/Media.md) +- [Message](docs/Model/Message.md) +- [MessageDirectionEnum](docs/Model/MessageDirectionEnum.md) +- [MessageRequest](docs/Model/MessageRequest.md) +- [MessageStatusEnum](docs/Model/MessageStatusEnum.md) +- [MessageTypeEnum](docs/Model/MessageTypeEnum.md) +- [MessagesList](docs/Model/MessagesList.md) +- [MessagingCodeResponse](docs/Model/MessagingCodeResponse.md) +- [MessagingRequestError](docs/Model/MessagingRequestError.md) +- [MfaForbiddenRequestError](docs/Model/MfaForbiddenRequestError.md) +- [MfaRequestError](docs/Model/MfaRequestError.md) +- [MfaUnauthorizedRequestError](docs/Model/MfaUnauthorizedRequestError.md) +- [MmsMessageContent](docs/Model/MmsMessageContent.md) +- [MmsMessageContentFile](docs/Model/MmsMessageContentFile.md) +- [MultiChannelAction](docs/Model/MultiChannelAction.md) +- [MultiChannelActionCalendarEvent](docs/Model/MultiChannelActionCalendarEvent.md) +- [MultiChannelChannelListMMSObject](docs/Model/MultiChannelChannelListMMSObject.md) +- [MultiChannelChannelListMMSResponseObject](docs/Model/MultiChannelChannelListMMSResponseObject.md) +- [MultiChannelChannelListObjectBase](docs/Model/MultiChannelChannelListObjectBase.md) +- [MultiChannelChannelListOwnerObject](docs/Model/MultiChannelChannelListOwnerObject.md) +- [MultiChannelChannelListRBMObject](docs/Model/MultiChannelChannelListRBMObject.md) +- [MultiChannelChannelListRBMObjectAllOfContent](docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md) +- [MultiChannelChannelListRBMResponseObject](docs/Model/MultiChannelChannelListRBMResponseObject.md) +- [MultiChannelChannelListRequestObject](docs/Model/MultiChannelChannelListRequestObject.md) +- [MultiChannelChannelListResponseObject](docs/Model/MultiChannelChannelListResponseObject.md) +- [MultiChannelChannelListSMSObject](docs/Model/MultiChannelChannelListSMSObject.md) +- [MultiChannelChannelListSMSResponseObject](docs/Model/MultiChannelChannelListSMSResponseObject.md) +- [MultiChannelError](docs/Model/MultiChannelError.md) +- [MultiChannelMessageChannelEnum](docs/Model/MultiChannelMessageChannelEnum.md) +- [MultiChannelMessageContent](docs/Model/MultiChannelMessageContent.md) +- [MultiChannelMessageRequest](docs/Model/MultiChannelMessageRequest.md) +- [MultiChannelMessageResponseData](docs/Model/MultiChannelMessageResponseData.md) +- [OptInWorkflow](docs/Model/OptInWorkflow.md) +- [Page](docs/Model/Page.md) +- [PageInfo](docs/Model/PageInfo.md) +- [PriorityEnum](docs/Model/PriorityEnum.md) +- [ProductTypeEnum](docs/Model/ProductTypeEnum.md) +- [RbmActionBase](docs/Model/RbmActionBase.md) +- [RbmActionDial](docs/Model/RbmActionDial.md) +- [RbmActionOpenUrl](docs/Model/RbmActionOpenUrl.md) +- [RbmActionTypeEnum](docs/Model/RbmActionTypeEnum.md) +- [RbmActionViewLocation](docs/Model/RbmActionViewLocation.md) +- [RbmCardContent](docs/Model/RbmCardContent.md) +- [RbmCardContentMedia](docs/Model/RbmCardContentMedia.md) +- [RbmLocationResponse](docs/Model/RbmLocationResponse.md) +- [RbmMediaHeightEnum](docs/Model/RbmMediaHeightEnum.md) +- [RbmMessageCarouselCard](docs/Model/RbmMessageCarouselCard.md) +- [RbmMessageContentFile](docs/Model/RbmMessageContentFile.md) +- [RbmMessageContentRichCard](docs/Model/RbmMessageContentRichCard.md) +- [RbmMessageContentText](docs/Model/RbmMessageContentText.md) +- [RbmMessageMedia](docs/Model/RbmMessageMedia.md) +- [RbmOpenUrlEnum](docs/Model/RbmOpenUrlEnum.md) +- [RbmStandaloneCard](docs/Model/RbmStandaloneCard.md) +- [RbmSuggestionResponse](docs/Model/RbmSuggestionResponse.md) +- [RbmWebViewEnum](docs/Model/RbmWebViewEnum.md) +- [RecordingAvailableCallback](docs/Model/RecordingAvailableCallback.md) +- [RecordingCompleteCallback](docs/Model/RecordingCompleteCallback.md) +- [RecordingStateEnum](docs/Model/RecordingStateEnum.md) +- [RecordingTranscriptionClip](docs/Model/RecordingTranscriptionClip.md) +- [RecordingTranscriptionMetadata](docs/Model/RecordingTranscriptionMetadata.md) +- [RecordingTranscriptions](docs/Model/RecordingTranscriptions.md) +- [RedirectCallback](docs/Model/RedirectCallback.md) +- [RedirectMethodEnum](docs/Model/RedirectMethodEnum.md) +- [SipConnectionMetadata](docs/Model/SipConnectionMetadata.md) +- [SipCredentials](docs/Model/SipCredentials.md) +- [SmsMessageContent](docs/Model/SmsMessageContent.md) +- [StandaloneCardOrientationEnum](docs/Model/StandaloneCardOrientationEnum.md) +- [StatusCallback](docs/Model/StatusCallback.md) +- [StatusCallbackMessage](docs/Model/StatusCallbackMessage.md) +- [StatusCallbackTypeEnum](docs/Model/StatusCallbackTypeEnum.md) +- [StirShaken](docs/Model/StirShaken.md) +- [SyncLookupRequest](docs/Model/SyncLookupRequest.md) +- [TelephoneNumber](docs/Model/TelephoneNumber.md) +- [TfvBasicAuthentication](docs/Model/TfvBasicAuthentication.md) +- [TfvCallbackStatusEnum](docs/Model/TfvCallbackStatusEnum.md) +- [TfvError](docs/Model/TfvError.md) +- [TfvStatus](docs/Model/TfvStatus.md) +- [TfvStatusEnum](docs/Model/TfvStatusEnum.md) +- [TfvSubmissionInfo](docs/Model/TfvSubmissionInfo.md) +- [TfvSubmissionWrapper](docs/Model/TfvSubmissionWrapper.md) +- [ThumbnailAlignmentEnum](docs/Model/ThumbnailAlignmentEnum.md) +- [TranscribeRecording](docs/Model/TranscribeRecording.md) +- [Transcription](docs/Model/Transcription.md) +- [TranscriptionAvailableCallback](docs/Model/TranscriptionAvailableCallback.md) +- [TransferAnswerCallback](docs/Model/TransferAnswerCallback.md) +- [TransferCompleteCallback](docs/Model/TransferCompleteCallback.md) +- [TransferDisconnectCallback](docs/Model/TransferDisconnectCallback.md) +- [UpdateCall](docs/Model/UpdateCall.md) +- [UpdateCallRecording](docs/Model/UpdateCallRecording.md) +- [UpdateConference](docs/Model/UpdateConference.md) +- [UpdateConferenceMember](docs/Model/UpdateConferenceMember.md) +- [VerificationDenialWebhook](docs/Model/VerificationDenialWebhook.md) +- [VerificationRequest](docs/Model/VerificationRequest.md) +- [VerificationUpdateRequest](docs/Model/VerificationUpdateRequest.md) +- [VerificationWebhook](docs/Model/VerificationWebhook.md) +- [VerifyCodeRequest](docs/Model/VerifyCodeRequest.md) +- [VerifyCodeResponse](docs/Model/VerifyCodeResponse.md) +- [VoiceApiError](docs/Model/VoiceApiError.md) +- [VoiceCodeResponse](docs/Model/VoiceCodeResponse.md) +- [WebhookSubscription](docs/Model/WebhookSubscription.md) +- [WebhookSubscriptionBasicAuthentication](docs/Model/WebhookSubscriptionBasicAuthentication.md) +- [WebhookSubscriptionError](docs/Model/WebhookSubscriptionError.md) +- [WebhookSubscriptionRequestSchema](docs/Model/WebhookSubscriptionRequestSchema.md) +- [WebhookSubscriptionTypeEnum](docs/Model/WebhookSubscriptionTypeEnum.md) +- [WebhookSubscriptionsListBody](docs/Model/WebhookSubscriptionsListBody.md) + +## Authorization + +### Basic + +- **Type**: HTTP basic authentication + + +### OAuth2 + +- **Type**: `OAuth` +- **Flow**: `application` +- **Authorization URL**: `` +- **Scopes**: N/A + +## Tests + +To run the tests, use: + +```bash +composer install +vendor/bin/phpunit +``` -This package can be used with PHP >= 7.2 +## Author -## Documentation +letstalk@bandwidth.com -Documentation for this package can be found at [https://dev.bandwidth.com/sdks/php/](https://dev.bandwidth.com/sdks/php/) +## About this package -## Credentials +This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -Information for credentials for this package can be found at https://dev.bandwidth.com/guides/accountCredentials.html +- API version: `1.0.0` + - Generator version: `7.23.0` +- Build package: `org.openapitools.codegen.languages.PhpNextgenClientCodegen` diff --git a/bandwidth.yml b/bandwidth.yml new file mode 100644 index 00000000..52ceffd4 --- /dev/null +++ b/bandwidth.yml @@ -0,0 +1,9896 @@ +openapi: 3.0.3 +info: + title: Bandwidth + description: Bandwidth's Communication APIs + contact: + name: Bandwidth + url: https://dev.bandwidth.com + email: letstalk@bandwidth.com + version: 1.0.0 +security: + - Basic: [] + - OAuth2: [] +tags: + - name: Messages + - name: Media + - name: Multi-Channel + - name: Calls + - name: Conferences + - name: Recordings + - name: Statistics + - name: Transcriptions + - name: MFA + - name: Phone Number Lookup + - name: Toll-Free Verification + - name: Endpoints +paths: + /users/{accountId}/media: + get: + summary: List Media + description: Gets a list of your media files. No query parameters are supported. + operationId: listMedia + tags: + - Media + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/continuationToken' + responses: + '200': + $ref: '#/components/responses/listMediaResponse' + '400': + $ref: '#/components/responses/messagingBadRequestError' + '401': + $ref: '#/components/responses/messagingUnauthorizedError' + '403': + $ref: '#/components/responses/messagingForbiddenError' + '404': + $ref: '#/components/responses/messagingNotFoundError' + '406': + $ref: '#/components/responses/messagingNotAcceptableError' + '415': + $ref: '#/components/responses/messagingInvalidMediaTypeError' + '429': + $ref: '#/components/responses/messagingTooManyRequestsError' + '500': + $ref: '#/components/responses/messagingInternalServerError' + servers: &ref_0 + - url: https://messaging.bandwidth.com/api/v2 + description: Production + /users/{accountId}/media/{mediaId}: + get: + summary: Get Media + description: Downloads a media file you previously uploaded. + operationId: getMedia + tags: + - Media + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/mediaId' + responses: + '200': + $ref: '#/components/responses/getMediaResponse' + '400': + $ref: '#/components/responses/messagingBadRequestError' + '401': + $ref: '#/components/responses/messagingUnauthorizedError' + '403': + $ref: '#/components/responses/messagingForbiddenError' + '404': + $ref: '#/components/responses/messagingNotFoundError' + '406': + $ref: '#/components/responses/messagingNotAcceptableError' + '415': + $ref: '#/components/responses/messagingInvalidMediaTypeError' + '429': + $ref: '#/components/responses/messagingTooManyRequestsError' + '500': + $ref: '#/components/responses/messagingInternalServerError' + put: + summary: Upload Media + description: >- + Upload a file. You may add headers to the request in order to provide + some control to your media file. + + + If a file is uploaded with the same name as a file that already exists + under this account, the previous file will be overwritten. + + + A list of supported media types can be found at [Bandwidth + Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported). + operationId: uploadMedia + tags: + - Media + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/mediaId' + - $ref: '#/components/parameters/contentType' + - $ref: '#/components/parameters/cacheControl' + requestBody: + $ref: '#/components/requestBodies/uploadMediaRequest' + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/messagingBadRequestError' + '401': + $ref: '#/components/responses/messagingUnauthorizedError' + '403': + $ref: '#/components/responses/messagingForbiddenError' + '404': + $ref: '#/components/responses/messagingNotFoundError' + '406': + $ref: '#/components/responses/messagingNotAcceptableError' + '415': + $ref: '#/components/responses/messagingInvalidMediaTypeError' + '429': + $ref: '#/components/responses/messagingTooManyRequestsError' + '500': + $ref: '#/components/responses/messagingInternalServerError' + delete: + summary: Delete Media + description: |- + Deletes a media file from Bandwidth API server. Make sure you don't have + any application scripts still using the media before you delete. + + If you accidentally delete a media file you can immediately upload a new + file with the same name. + operationId: deleteMedia + tags: + - Media + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/mediaId' + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/messagingBadRequestError' + '401': + $ref: '#/components/responses/messagingUnauthorizedError' + '403': + $ref: '#/components/responses/messagingForbiddenError' + '404': + $ref: '#/components/responses/messagingNotFoundError' + '406': + $ref: '#/components/responses/messagingNotAcceptableError' + '415': + $ref: '#/components/responses/messagingInvalidMediaTypeError' + '429': + $ref: '#/components/responses/messagingTooManyRequestsError' + '500': + $ref: '#/components/responses/messagingInternalServerError' + servers: *ref_0 + /users/{accountId}/messages: + get: + summary: List Messages + description: > + Returns a list of messages based on query parameters. + + + **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 + minutes per Source IP address. Exceeding the limit returns HTTP 429 with + a `Retry-After` header. + operationId: listMessages + tags: + - Messages + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/messageId' + - $ref: '#/components/parameters/sourceTn' + - $ref: '#/components/parameters/destinationTn' + - $ref: '#/components/parameters/messageStatus' + - $ref: '#/components/parameters/messageDirection' + - $ref: '#/components/parameters/carrierName' + - $ref: '#/components/parameters/messageType' + - $ref: '#/components/parameters/errorCode' + - $ref: '#/components/parameters/fromDateTime' + - $ref: '#/components/parameters/toDateTime' + - $ref: '#/components/parameters/campaignId' + - $ref: '#/components/parameters/fromBwLatency' + - $ref: '#/components/parameters/bwQueued' + - $ref: '#/components/parameters/product' + - $ref: '#/components/parameters/location' + - $ref: '#/components/parameters/carrierQueued' + - $ref: '#/components/parameters/fromCarrierLatency' + - $ref: '#/components/parameters/callingNumberCountryA3' + - $ref: '#/components/parameters/calledNumberCountryA3' + - $ref: '#/components/parameters/fromSegmentCount' + - $ref: '#/components/parameters/toSegmentCount' + - $ref: '#/components/parameters/fromMessageSize' + - $ref: '#/components/parameters/toMessageSize' + - $ref: '#/components/parameters/sort' + - $ref: '#/components/parameters/pageToken' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/limitTotalCount' + responses: + '200': + $ref: '#/components/responses/listMessagesResponse' + '400': + $ref: '#/components/responses/messagingBadRequestError' + '401': + $ref: '#/components/responses/messagingUnauthorizedError' + '403': + $ref: '#/components/responses/messagingForbiddenError' + '404': + $ref: '#/components/responses/messagingNotFoundError' + '405': + $ref: '#/components/responses/messagingMethodNotAllowedError' + '415': + $ref: '#/components/responses/messagingInvalidMediaTypeError' + '429': + $ref: '#/components/responses/listMessagesTooManyRequestsError' + '500': + $ref: '#/components/responses/messagingInternalServerError' + post: + summary: Create Message + description: >- + Endpoint for sending text messages and picture messages using V2 + messaging. + operationId: createMessage + tags: + - Messages + parameters: + - $ref: '#/components/parameters/accountId' + requestBody: + $ref: '#/components/requestBodies/createMessageRequest' + responses: + '202': + $ref: '#/components/responses/createMessageResponse' + '400': + $ref: '#/components/responses/createMessageBadRequestError' + '401': + $ref: '#/components/responses/messagingUnauthorizedError' + '403': + $ref: '#/components/responses/messagingForbiddenError' + '404': + $ref: '#/components/responses/messagingNotFoundError' + '405': + $ref: '#/components/responses/messagingMethodNotAllowedError' + '406': + $ref: '#/components/responses/messagingNotAcceptableError' + '415': + $ref: '#/components/responses/messagingInvalidMediaTypeError' + '429': + $ref: '#/components/responses/messagingTooManyRequestsError' + '500': + $ref: '#/components/responses/messagingInternalServerError' + callbacks: + statusCallback: + $ref: '#/components/callbacks/statusCallback' + servers: *ref_0 + /users/{accountId}/messages/multiChannel: + post: + summary: Create Multi-Channel Message + description: Endpoint for sending Multi-Channel messages. + operationId: createMultiChannelMessage + parameters: + - $ref: '#/components/parameters/accountId' + tags: + - Multi-Channel + requestBody: + $ref: '#/components/requestBodies/createMultiChannelMessageRequest' + responses: + '202': + $ref: '#/components/responses/createMultiChannelMessageResponse' + '400': + $ref: '#/components/responses/multiChannelBadRequestError' + '401': + $ref: '#/components/responses/multiChannelUnauthorizedError' + '403': + $ref: '#/components/responses/multiChannelForbiddenError' + '404': + $ref: '#/components/responses/multiChannelNotFoundError' + '405': + $ref: '#/components/responses/multiChannelMethodNotAllowedError' + '406': + $ref: '#/components/responses/multiChannelNotAcceptableError' + '415': + $ref: '#/components/responses/multiChannelInvalidMediaTypeError' + '429': + $ref: '#/components/responses/multiChannelTooManyRequestsError' + '500': + $ref: '#/components/responses/multiChannelInternalServerError' + callbacks: + statusCallback: + $ref: '#/components/callbacks/statusCallback' + x-badges: + - name: Beta + color: '#076EA8' + servers: *ref_0 + /accounts/{accountId}/calls: + post: + tags: + - Calls + summary: Create Call + description: >- + Creates an outbound phone call. + + + All calls are initially queued. Your outbound calls will initiated at a + specific dequeueing rate, enabling your application to "fire and forget" + when creating calls. Queued calls may not be modified until they are + dequeued and placed, but may be removed from your queue on demand. + + + Please note: Calls submitted to your queue will be placed + approximately in order, but exact ordering is not guaranteed. + operationId: createCall + parameters: + - $ref: '#/components/parameters/accountId' + requestBody: + $ref: '#/components/requestBodies/createCallRequest' + responses: + '201': + $ref: '#/components/responses/createCallResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + get: + tags: + - Calls + summary: Get Calls + description: >- + Returns a max of 10000 calls, sorted by `createdTime` from oldest to + newest. + + + **NOTE:** If the number of calls in the account is bigger than + `pageSize`, a `Link` header (with format `<{url}>; rel="next"`) will be + returned in the response. The url can be used to retrieve the next page + of call records. + + Also, call information is kept for 7 days after the calls are hung up. + If you attempt to retrieve information for a call that is older than 7 + days, you will get an empty array [] in response. + operationId: listCalls + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/to' + - $ref: '#/components/parameters/from' + - $ref: '#/components/parameters/minStartTimeCalls' + - $ref: '#/components/parameters/maxStartTimeCalls' + - $ref: '#/components/parameters/disconnectCause' + - $ref: '#/components/parameters/pageSizeCalls' + - $ref: '#/components/parameters/pageToken1' + responses: + '200': + $ref: '#/components/responses/listCallsResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: &ref_1 + - url: https://voice.bandwidth.com/api/v2 + description: Production + /accounts/{accountId}/calls/{callId}: + get: + tags: + - Calls + summary: Get Call State Information + description: >- + Retrieve the current state of a specific call. This information is + near-realtime, so it may take a few minutes for your call to be + accessible using this endpoint. + + + **Note**: Call information is kept for 7 days after the calls are hung + up. If you attempt to retrieve information for a call that is older than + 7 days, you will get an HTTP 404 response. + operationId: getCallState + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + responses: + '200': + $ref: '#/components/responses/getCallStateResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + post: + tags: + - Calls + summary: Update Call + description: >- + Interrupts and redirects a call to a different URL that should return a + BXML document. + operationId: updateCall + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + requestBody: + $ref: '#/components/requestBodies/updateCallRequest' + responses: + '200': + $ref: '#/components/responses/updateCallResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '409': + $ref: '#/components/responses/voiceConflictError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/calls/{callId}/bxml: + put: + tags: + - Calls + summary: Update Call BXML + description: Interrupts and replaces an active call's BXML document. + operationId: updateCallBxml + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + requestBody: + $ref: '#/components/requestBodies/updateCallBxmlRequest' + responses: + '204': + description: Call BXML was successfully replaced. + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '409': + $ref: '#/components/responses/voiceConflictError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/conferences: + get: + tags: + - Conferences + summary: Get Conferences + description: >- + Returns a max of 1000 conferences, sorted by `createdTime` from oldest + to newest. + + + **NOTE:** If the number of conferences in the account is bigger than + `pageSize`, a `Link` header (with format `<{url}>; rel="next"`) will be + returned in the response. The url can be used to retrieve the next page + of conference records. + operationId: listConferences + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/name' + - $ref: '#/components/parameters/minCreatedTime' + - $ref: '#/components/parameters/maxCreatedTime' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/pageToken1' + responses: + '200': + $ref: '#/components/responses/listConferencesResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/conferences/{conferenceId}: + get: + tags: + - Conferences + summary: Get Conference Information + description: Returns information about the specified conference. + operationId: getConference + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/conferenceId' + responses: + '200': + $ref: '#/components/responses/getConferenceResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + post: + tags: + - Conferences + summary: Update Conference + description: Update the conference state. + operationId: updateConference + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/conferenceId' + requestBody: + $ref: '#/components/requestBodies/updateConferenceRequest' + responses: + '204': + description: Conference was successfully modified. + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/conferences/{conferenceId}/bxml: + put: + tags: + - Conferences + summary: Update Conference BXML + description: Update the conference BXML document. + operationId: updateConferenceBxml + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/conferenceId' + requestBody: + $ref: '#/components/requestBodies/updateConferenceBxmlRequest' + responses: + '204': + description: Conference successfully modified. + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/conferences/{conferenceId}/members/{memberId}: + get: + tags: + - Conferences + summary: Get Conference Member + description: Returns information about the specified conference member. + operationId: getConferenceMember + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/conferenceId' + - $ref: '#/components/parameters/memberId' + responses: + '200': + $ref: '#/components/responses/getConferenceMemberResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + put: + tags: + - Conferences + summary: Update Conference Member + description: Updates settings for a particular conference member. + operationId: updateConferenceMember + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/conferenceId' + - $ref: '#/components/parameters/memberId' + requestBody: + $ref: '#/components/requestBodies/updateConferenceMemberRequest' + responses: + '204': + description: Conference member was successfully modified. + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/conferences/{conferenceId}/recordings: + get: + tags: + - Conferences + summary: Get Conference Recordings + description: >- + Returns a (potentially empty) list of metadata for the recordings that + took place during the specified conference. + operationId: listConferenceRecordings + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/conferenceId' + responses: + '200': + $ref: '#/components/responses/listConferenceRecordingsResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}: + get: + tags: + - Conferences + summary: Get Conference Recording Information + description: Returns metadata for the specified recording. + operationId: getConferenceRecording + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/conferenceId' + - $ref: '#/components/parameters/recordingId' + responses: + '200': + $ref: '#/components/responses/getConferenceRecordingResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media: + get: + tags: + - Conferences + summary: Download Conference Recording + description: Downloads the specified recording file. + operationId: downloadConferenceRecording + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/conferenceId' + - $ref: '#/components/parameters/recordingId' + responses: + '200': + $ref: '#/components/responses/downloadRecordingMediaResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/recordings: + get: + tags: + - Recordings + summary: Get Call Recordings + description: >- + Returns a list of metadata for the recordings associated with the + + specified account. The list can be filtered by the optional from, to, + minStartTime, + + and maxStartTime arguments. The list is capped at 1000 entries and may + be + + empty if no recordings match the specified criteria. + operationId: listAccountCallRecordings + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/to' + - $ref: '#/components/parameters/from' + - $ref: '#/components/parameters/minStartTime' + - $ref: '#/components/parameters/maxStartTime' + responses: + '200': + $ref: '#/components/responses/listCallRecordingsResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/calls/{callId}/recording: + put: + tags: + - Recordings + summary: Update Recording + description: Pause or resume a recording on an active phone call. + operationId: updateCallRecordingState + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + requestBody: + $ref: '#/components/requestBodies/updateCallRecordingRequest' + responses: + '200': + $ref: '#/components/responses/updateRecordingResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/calls/{callId}/recordings: + get: + tags: + - Recordings + summary: List Call Recordings + description: |- + Returns a (potentially empty) list of metadata for the recordings + that took place during the specified call. + operationId: listCallRecordings + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + responses: + '200': + $ref: '#/components/responses/listCallRecordingsResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/calls/{callId}/recordings/{recordingId}: + get: + tags: + - Recordings + summary: Get Call Recording + description: Returns metadata for the specified recording. + operationId: getCallRecording + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + - $ref: '#/components/parameters/recordingId' + responses: + '200': + $ref: '#/components/responses/getCallRecordingResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + delete: + tags: + - Recordings + summary: Delete Recording + description: >- + Delete the recording information, media and transcription. + + + Note: After the deletion is requested and a `204` is returned, neither + the recording metadata nor the actual media nor its transcription will + be accessible anymore. However, the media of the specified recording is + not deleted immediately. This deletion process, while transparent and + irreversible, can take an additional 24 to 48 hours. + operationId: deleteRecording + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + - $ref: '#/components/parameters/recordingId' + responses: + '204': + description: Recording was deleted. + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media: + get: + tags: + - Recordings + summary: Download Recording + description: Downloads the specified recording. + operationId: downloadCallRecording + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + - $ref: '#/components/parameters/recordingId' + responses: + '200': + $ref: '#/components/responses/downloadRecordingMediaResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + delete: + tags: + - Recordings + summary: Delete Recording Media + description: Deletes the specified recording's media. + operationId: deleteRecordingMedia + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + - $ref: '#/components/parameters/recordingId' + responses: + '204': + description: The recording media was successfully deleted. + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription: + get: + tags: + - Recordings + summary: Get Transcription + description: >- + Downloads the specified transcription. + + If the recording was multi-channel, then there will be 2 transcripts. + + The caller/called party transcript will be the first item while + [``](/docs/voice/bxml/playAudio) and + [``](/docs/voice/bxml/speakSentence) transcript will be + the second item. + + During a [``](/docs/voice/bxml/transfer) the A-leg transcript + will be the first item while the B-leg transcript will be the second + item. + operationId: getRecordingTranscription + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + - $ref: '#/components/parameters/recordingId' + responses: + '200': + $ref: '#/components/responses/getRecordingTranscriptionResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + post: + tags: + - Recordings + summary: Create Transcription Request + description: >- + Generate the transcription for a specific recording. Transcription + + can succeed only for recordings of length greater than 500 milliseconds + and + + less than 4 hours. + operationId: transcribeCallRecording + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + - $ref: '#/components/parameters/recordingId' + requestBody: + $ref: '#/components/requestBodies/transcribeRecordingRequest' + responses: + '204': + description: Transcription was successfully requested. + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + delete: + tags: + - Recordings + summary: Delete Transcription + description: >- + Deletes the specified recording's transcription. + + + Note: After the deletion is requested and a `204` is returned, the + transcription will not be accessible anymore. However, it is not deleted + immediately. This deletion process, while transparent and irreversible, + can take an additional 24 to 48 hours. + operationId: deleteRecordingTranscription + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + - $ref: '#/components/parameters/recordingId' + responses: + '204': + description: The transcription was successfully deleted. + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/statistics: + get: + tags: + - Statistics + summary: Get Account Statistics + description: Returns details about the current state of the account. + operationId: getStatistics + parameters: + - $ref: '#/components/parameters/accountId' + responses: + '200': + $ref: '#/components/responses/getStatisticsResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/calls/{callId}/transcriptions: + get: + tags: + - Transcriptions + summary: List Real-time Transcriptions + description: >- + List the transcriptions created on this call via + [startTranscription](/docs/voice/bxml/startTranscription). + operationId: listRealTimeTranscriptions + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + responses: + '200': + $ref: '#/components/responses/listTranscriptionsResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}: + get: + tags: + - Transcriptions + summary: Get Real-time Transcription + description: >- + Retrieve the specified transcription that was created on this call via + [startTranscription](/docs/voice/bxml/startTranscription). + operationId: getRealTimeTranscription + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + - $ref: '#/components/parameters/transcriptionId' + responses: + '200': + $ref: '#/components/responses/getCallTranscriptionResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + delete: + tags: + - Transcriptions + summary: Delete Real-time Transcription + description: >- + Delete the specified transcription that was created on this call via + [startTranscription](/docs/voice/bxml/startTranscription). + + + Note: After the deletion is requested and a `200` is returned, the + transcription will not be accessible anymore. However, it is not deleted + immediately. This deletion process, while transparent and irreversible, + can take an additional 24 to 48 hours. + operationId: deleteRealTimeTranscription + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/callId' + - $ref: '#/components/parameters/transcriptionId' + responses: + '200': + $ref: '#/components/responses/deleteCallTranscriptionResponse' + '400': + $ref: '#/components/responses/voiceBadRequestError' + '401': + $ref: '#/components/responses/voiceUnauthorizedError' + '403': + $ref: '#/components/responses/voiceForbiddenError' + '404': + $ref: '#/components/responses/voiceNotFoundError' + '405': + $ref: '#/components/responses/voiceNotAllowedError' + '415': + $ref: '#/components/responses/voiceUnsupportedMediaTypeError' + '429': + $ref: '#/components/responses/voiceTooManyRequestsError' + '500': + $ref: '#/components/responses/voiceInternalServerError' + servers: *ref_1 + /accounts/{accountId}/code/voice: + post: + tags: + - MFA + summary: Voice Authentication Code + description: Send an MFA Code via a phone call. + operationId: generateVoiceCode + parameters: + - $ref: '#/components/parameters/accountId' + requestBody: + $ref: '#/components/requestBodies/codeRequest' + responses: + '200': + $ref: '#/components/responses/voiceCodeResponse' + '400': + $ref: '#/components/responses/mfaBadRequestError' + '401': + $ref: '#/components/responses/mfaUnauthorizedError' + '403': + $ref: '#/components/responses/mfaForbiddenError' + '500': + $ref: '#/components/responses/mfaInternalServerError' + servers: &ref_2 + - url: https://mfa.bandwidth.com/api/v1 + description: Production + /accounts/{accountId}/code/messaging: + post: + tags: + - MFA + summary: Messaging Authentication Code + description: Send an MFA code via text message (SMS). + operationId: generateMessagingCode + parameters: + - $ref: '#/components/parameters/accountId' + requestBody: + $ref: '#/components/requestBodies/codeRequest' + responses: + '200': + $ref: '#/components/responses/messagingCodeResponse' + '400': + $ref: '#/components/responses/mfaBadRequestError' + '401': + $ref: '#/components/responses/mfaUnauthorizedError' + '403': + $ref: '#/components/responses/mfaForbiddenError' + '500': + $ref: '#/components/responses/mfaInternalServerError' + servers: *ref_2 + /accounts/{accountId}/code/verify: + post: + tags: + - MFA + summary: Verify Authentication Code + description: Verify a previously sent MFA code. + operationId: verifyCode + parameters: + - $ref: '#/components/parameters/accountId' + requestBody: + $ref: '#/components/requestBodies/codeVerify' + responses: + '200': + $ref: '#/components/responses/verifyCodeResponse' + '400': + $ref: '#/components/responses/mfaBadRequestError' + '401': + $ref: '#/components/responses/mfaUnauthorizedError' + '403': + $ref: '#/components/responses/mfaForbiddenError' + '429': + $ref: '#/components/responses/mfaTooManyRequestsError' + '500': + $ref: '#/components/responses/mfaInternalServerError' + servers: *ref_2 + /accounts/{accountId}/phoneNumberLookup: + post: + summary: Create Synchronous Number Lookup + description: >- + Creates a synchronous phone number lookup request. Maximum of 100 + telephone numbers per request. + operationId: createSyncLookup + tags: + - Phone Number Lookup + parameters: + - $ref: '#/components/parameters/accountId1' + requestBody: + $ref: '#/components/requestBodies/createSyncLookupRequest' + responses: + '200': + $ref: '#/components/responses/createSyncLookupResponse' + default: + $ref: '#/components/responses/tnLookupDefaultResponse' + servers: &ref_3 + - url: https://api.bandwidth.com/v2 + description: Production + /accounts/{accountId}/phoneNumberLookup/bulk: + post: + summary: Create Asynchronous Bulk Number Lookup + description: >- + Creates an asynchronous bulk phone number lookup request. Maximum of + 15,000 telephone numbers per request. Use the [Get Asynchronous Bulk + Number Lookup](#tag/Phone-Number-Lookup/operation/getAsyncBulkLookup) + endpoint to check the status of the request and view the results. + operationId: createAsyncBulkLookup + tags: + - Phone Number Lookup + parameters: + - $ref: '#/components/parameters/accountId1' + requestBody: + $ref: '#/components/requestBodies/createAsyncBulkLookupRequest' + responses: + '202': + $ref: '#/components/responses/createAsyncBulkLookupResponse' + default: + $ref: '#/components/responses/tnLookupDefaultResponse' + servers: *ref_3 + /accounts/{accountId}/phoneNumberLookup/bulk/{requestId}: + get: + summary: Get Asynchronous Bulk Number Lookup + description: >- + Get an existing [Asynchronous Bulk Number + Lookup](#tag/Phone-Number-Lookup/operation/createAsyncBulkLookup). Use + this endpoint to check the status of the request and view the results. + operationId: getAsyncBulkLookup + tags: + - Phone Number Lookup + parameters: + - $ref: '#/components/parameters/accountId1' + - $ref: '#/components/parameters/requestId' + responses: + '200': + $ref: '#/components/responses/getAsyncBulkLookupResponse' + default: + $ref: '#/components/responses/tnLookupDefaultResponse' + servers: *ref_3 + /accounts/{accountId}/tollFreeVerification: + post: + tags: + - Toll-Free Verification + summary: Request Toll-Free Verification + description: Submit a request for verification of a toll-free phone number. + operationId: requestTollFreeVerification + parameters: + - $ref: '#/components/parameters/accountId' + requestBody: + $ref: '#/components/requestBodies/requestTollFreeVerificationRequest' + responses: + '202': + description: Accepted + '400': + $ref: '#/components/responses/tfvPostBadRequestResponse' + '401': + $ref: '#/components/responses/tfvUnauthorizedResponse' + '403': + $ref: '#/components/responses/tfvForbiddenResponse' + '405': + $ref: '#/components/responses/tfvNotAllowedResponse' + '429': + $ref: '#/components/responses/tfvTooManyRequestsResponse' + '500': + $ref: '#/components/responses/tfvServerErrorResponse' + '503': + $ref: '#/components/responses/tfvServiceUnavailableResponse' + callbacks: + tfVerificationStatus: + $ref: '#/components/callbacks/tfVerificationStatus' + servers: &ref_4 + - url: https://api.bandwidth.com/api/v2 + description: Production + /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification: + get: + tags: + - Toll-Free Verification + summary: Get Toll-Free Verification Status + description: >- + Gets the verification status for a phone number that is provisioned to + your account. + + Submission information will be appended to the response if it is + available. + operationId: getTollFreeVerificationStatus + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/tfPhoneNumberPathParam' + responses: + '200': + $ref: '#/components/responses/getTollFreeVerificationStatusResponse' + '400': + $ref: '#/components/responses/tfvBadRequestResponse' + '401': + $ref: '#/components/responses/tfvUnauthorizedResponse' + '403': + $ref: '#/components/responses/tfvForbiddenResponse' + '404': + $ref: '#/components/responses/tfvNotFoundResponse' + '405': + $ref: '#/components/responses/tfvNotAllowedResponse' + '429': + $ref: '#/components/responses/tfvTooManyRequestsResponse' + '500': + $ref: '#/components/responses/tfvServerErrorResponse' + '503': + $ref: '#/components/responses/tfvServiceUnavailableResponse' + put: + tags: + - Toll-Free Verification + summary: Update Toll-Free Verification Request + description: >- + Updates a toll-free verification request. + + Submissions are only eligible for resubmission for 7 days within being + processed and if resubmission is allowed (resubmitAllowed field is + true). + operationId: updateTollFreeVerificationRequest + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/tfPhoneNumberPathParam' + requestBody: + $ref: '#/components/requestBodies/updateTollFreeVerificationRequestRequest' + responses: + '202': + $ref: '#/components/responses/verifyPutResponse' + '400': + $ref: '#/components/responses/tfvPostBadRequestResponse' + '401': + $ref: '#/components/responses/tfvUnauthorizedResponse' + '403': + $ref: '#/components/responses/tfvForbiddenResponse' + '405': + $ref: '#/components/responses/tfvNotAllowedResponse' + '429': + $ref: '#/components/responses/tfvTooManyRequestsResponse' + '500': + $ref: '#/components/responses/tfvServerErrorResponse' + '503': + $ref: '#/components/responses/tfvServiceUnavailableResponse' + callbacks: + tfVerificationStatus: + $ref: '#/components/callbacks/tfVerificationStatus' + delete: + description: Delete a toll-free verification submission for a toll-free number. + operationId: deleteVerificationRequest + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/tfPhoneNumberPathParam' + responses: + '204': + $ref: '#/components/responses/noContentResponse' + '400': + $ref: '#/components/responses/tfvBadRequestResponse' + '401': + $ref: '#/components/responses/tfvUnauthorizedResponse' + '403': + $ref: '#/components/responses/tfvForbiddenResponse' + '404': + $ref: '#/components/responses/tfvNotFoundResponse' + '405': + $ref: '#/components/responses/tfvNotAllowedResponse' + '429': + $ref: '#/components/responses/tfvTooManyRequestsResponse' + '500': + $ref: '#/components/responses/tfvServerErrorResponse' + '503': + $ref: '#/components/responses/tfvServiceUnavailableResponse' + summary: Delete a Toll-Free Verification Submission + tags: + - Toll-Free Verification + servers: *ref_4 + /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions: + get: + tags: + - Toll-Free Verification + summary: List Webhook Subscriptions + description: >- + Lists all webhook subscriptions that are registered to receive status + updates for the toll-free verification requests submitted under this + account (password will not be returned through this API + + If `basicAuthentication` is defined, the `password` property of that + object will be null). + operationId: listWebhookSubscriptions + parameters: + - $ref: '#/components/parameters/accountId' + responses: + '200': + $ref: '#/components/responses/listWebhookSubscriptionsResponse' + '400': + $ref: '#/components/responses/tfvPostBadRequestResponse' + '401': + $ref: '#/components/responses/tfvUnauthorizedResponse' + '403': + $ref: '#/components/responses/tfvForbiddenResponse' + '405': + $ref: '#/components/responses/tfvNotAllowedResponse' + '429': + $ref: '#/components/responses/tfvTooManyRequestsResponse' + '500': + $ref: '#/components/responses/tfvServerErrorResponse' + '503': + $ref: '#/components/responses/tfvServiceUnavailableResponse' + post: + tags: + - Toll-Free Verification + summary: Create Webhook Subscription + description: >- + Create a new webhook subscription (this webhook will be called for every + update on every submission). + + In addition to a `callbackUrl`, this subscription can provide optional + HTTP basic authentication credentials (a username and a password). + + The returned subscription object will contain an ID that can be used to + modify or delete the subscription at a later time. + operationId: createWebhookSubscription + parameters: + - $ref: '#/components/parameters/accountId' + requestBody: + $ref: '#/components/requestBodies/webhookSubscriptionRequest' + responses: + '201': + $ref: '#/components/responses/createWebhookSubscriptionResponse' + '400': + $ref: '#/components/responses/tfvBadRequestResponse' + '401': + $ref: '#/components/responses/tfvUnauthorizedResponse' + '403': + $ref: '#/components/responses/tfvForbiddenResponse' + '404': + $ref: '#/components/responses/tfvNotFoundResponse' + '405': + $ref: '#/components/responses/tfvNotAllowedResponse' + '429': + $ref: '#/components/responses/tfvTooManyRequestsResponse' + '500': + $ref: '#/components/responses/tfvServerErrorResponse' + '503': + $ref: '#/components/responses/tfvServiceUnavailableResponse' + servers: *ref_4 + /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}: + delete: + tags: + - Toll-Free Verification + summary: Delete Webhook Subscription + description: Delete a webhook subscription by ID. + operationId: deleteWebhookSubscription + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/webhookSubscriptionIdPathParam' + responses: + '204': + $ref: '#/components/responses/noContentResponse' + '400': + $ref: '#/components/responses/tfvBadRequestResponse' + '401': + $ref: '#/components/responses/tfvUnauthorizedResponse' + '403': + $ref: '#/components/responses/tfvForbiddenResponse' + '404': + $ref: '#/components/responses/tfvNotFoundResponse' + '405': + $ref: '#/components/responses/tfvNotAllowedResponse' + '429': + $ref: '#/components/responses/tfvTooManyRequestsResponse' + '500': + $ref: '#/components/responses/tfvServerErrorResponse' + '503': + $ref: '#/components/responses/tfvServiceUnavailableResponse' + put: + tags: + - Toll-Free Verification + summary: Update Webhook Subscription + description: >- + Update an existing webhook subscription (`callbackUrl` and + `basicAuthentication` can be updated). + operationId: updateWebhookSubscription + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/webhookSubscriptionIdPathParam' + requestBody: + $ref: '#/components/requestBodies/webhookSubscriptionRequest' + responses: + '200': + $ref: '#/components/responses/updateWebhookSubscriptionResponse' + '400': + $ref: '#/components/responses/tfvBadRequestResponse' + '401': + $ref: '#/components/responses/tfvUnauthorizedResponse' + '403': + $ref: '#/components/responses/tfvForbiddenResponse' + '404': + $ref: '#/components/responses/tfvNotFoundResponse' + '405': + $ref: '#/components/responses/tfvNotAllowedResponse' + '429': + $ref: '#/components/responses/tfvTooManyRequestsResponse' + '500': + $ref: '#/components/responses/tfvServerErrorResponse' + '503': + $ref: '#/components/responses/tfvServiceUnavailableResponse' + servers: *ref_4 + /tollFreeVerification/useCases: + get: + tags: + - Toll-Free Verification + summary: List Toll-Free Use Cases + description: Lists valid toll-free use cases. + operationId: listTollFreeUseCases + responses: + '200': + $ref: '#/components/responses/listTollFreeUseCasesResponse' + '400': + $ref: '#/components/responses/tfvBadRequestResponse' + '401': + $ref: '#/components/responses/tfvUnauthorizedResponse' + '403': + $ref: '#/components/responses/tfvForbiddenResponse' + '404': + $ref: '#/components/responses/tfvNotFoundResponse' + '405': + $ref: '#/components/responses/tfvNotAllowedResponse' + '429': + $ref: '#/components/responses/tfvTooManyRequestsResponse' + '500': + $ref: '#/components/responses/tfvServerErrorResponse' + '503': + $ref: '#/components/responses/tfvServiceUnavailableResponse' + servers: *ref_4 + /accounts/{accountId}/endpoints: + get: + tags: + - Endpoints + summary: List Endpoints + description: Returns a list of endpoints associated with the specified account. + operationId: listEndpoints + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/endpointType' + - $ref: '#/components/parameters/endpointStatus' + - $ref: '#/components/parameters/afterCursor' + - $ref: '#/components/parameters/limit1' + responses: + '200': + $ref: '#/components/responses/listEndpointsResponse' + '400': + $ref: '#/components/responses/badRequestErrorResponse' + '401': + $ref: '#/components/responses/unauthorizedErrorResponse' + '403': + $ref: '#/components/responses/forbiddenErrorResponse' + '404': + $ref: '#/components/responses/notFoundErrorResponse' + '405': + $ref: '#/components/responses/methodNotAllowedErrorResponse' + '415': + $ref: '#/components/responses/unsupportedMediaTypeErrorResponse' + '429': + $ref: '#/components/responses/tooManyRequestsErrorResponse' + '500': + $ref: '#/components/responses/serviceUnavailableErrorResponse' + post: + tags: + - Endpoints + summary: Create Endpoint + description: Creates a new Endpoint for the specified account. + operationId: createEndpoint + parameters: + - $ref: '#/components/parameters/accountId' + requestBody: + $ref: '#/components/requestBodies/createEndpointRequest' + responses: + '201': + $ref: '#/components/responses/createEndpointResponse' + '400': + $ref: '#/components/responses/badRequestErrorResponse' + '401': + $ref: '#/components/responses/unauthorizedErrorResponse' + '403': + $ref: '#/components/responses/forbiddenErrorResponse' + '404': + $ref: '#/components/responses/notFoundErrorResponse' + '405': + $ref: '#/components/responses/methodNotAllowedErrorResponse' + '415': + $ref: '#/components/responses/unsupportedMediaTypeErrorResponse' + '429': + $ref: '#/components/responses/tooManyRequestsErrorResponse' + '500': + $ref: '#/components/responses/serviceUnavailableErrorResponse' + callbacks: + endpointEventCallback: + $ref: '#/components/callbacks/endpointEvent' + servers: &ref_5 + - url: https://api.bandwidth.com/v2 + description: Production + /accounts/{accountId}/endpoints/{endpointId}: + get: + tags: + - Endpoints + summary: Get Endpoint + description: Returns information about the specified endpoint. + operationId: getEndpoint + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/endpointId' + responses: + '200': + $ref: '#/components/responses/getEndpointResponse' + '400': + $ref: '#/components/responses/badRequestErrorResponse' + '401': + $ref: '#/components/responses/unauthorizedErrorResponse' + '403': + $ref: '#/components/responses/forbiddenErrorResponse' + '404': + $ref: '#/components/responses/notFoundErrorResponse' + '405': + $ref: '#/components/responses/methodNotAllowedErrorResponse' + '415': + $ref: '#/components/responses/unsupportedMediaTypeErrorResponse' + '429': + $ref: '#/components/responses/tooManyRequestsErrorResponse' + '500': + $ref: '#/components/responses/serviceUnavailableErrorResponse' + delete: + tags: + - Endpoints + summary: Delete Endpoint + description: >- + Deletes the specified endpoint. If the endpoint is actively streaming + media, the media stream will be terminated. + operationId: deleteEndpoint + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/endpointId' + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/badRequestErrorResponse' + '401': + $ref: '#/components/responses/unauthorizedErrorResponse' + '403': + $ref: '#/components/responses/forbiddenErrorResponse' + '404': + $ref: '#/components/responses/notFoundErrorResponse' + '405': + $ref: '#/components/responses/methodNotAllowedErrorResponse' + '415': + $ref: '#/components/responses/unsupportedMediaTypeErrorResponse' + '429': + $ref: '#/components/responses/tooManyRequestsErrorResponse' + '500': + $ref: '#/components/responses/serviceUnavailableErrorResponse' + servers: *ref_5 + /accounts/{accountId}/endpoints/{endpointId}/bxml: + put: + tags: + - Endpoints + summary: Update Endpoint BXML + description: Updates the BXML for the specified endpoint. + operationId: updateEndpointBxml + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/endpointId' + requestBody: + $ref: '#/components/requestBodies/updateEndpointBxmlRequest' + responses: + '204': + description: No Content + '400': + $ref: '#/components/responses/badRequestErrorResponse' + '401': + $ref: '#/components/responses/unauthorizedErrorResponse' + '403': + $ref: '#/components/responses/forbiddenErrorResponse' + '404': + $ref: '#/components/responses/notFoundErrorResponse' + '405': + $ref: '#/components/responses/methodNotAllowedErrorResponse' + '415': + $ref: '#/components/responses/unsupportedMediaTypeErrorResponse' + '429': + $ref: '#/components/responses/tooManyRequestsErrorResponse' + '500': + $ref: '#/components/responses/serviceUnavailableErrorResponse' + servers: *ref_5 +components: + schemas: + applicationId: + type: string + description: >- + The ID of the Application your from number or senderId is associated + with in the Bandwidth App. + example: 93de2206-9669-4e07-948d-329f4b722ee2 + priorityEnum: + type: string + description: >- + Specifies the message's sending priority with respect to other messages + in your account. For best results and optimal throughput, reserve the + 'high' priority setting for critical messages only. + enum: + - default + - high + example: default + messageStatusEnum: + type: string + description: >- + The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED + DELIVERED ACCEPTED UNDELIVERED. + enum: + - RECEIVED + - QUEUED + - SENDING + - SENT + - FAILED + - DELIVERED + - ACCEPTED + - UNDELIVERED + example: RECEIVED + listMessageDirectionEnum: + type: string + description: The direction of the message. One of INBOUND OUTBOUND. + enum: + - INBOUND + - OUTBOUND + example: INBOUND + messageDirectionEnum: + type: string + description: The direction of the message. One of in out. + enum: + - in + - out + example: in + messageTypeEnum: + type: string + description: The type of message. Either SMS or MMS. + enum: + - sms + - mms + - rcs + example: sms + productTypeEnum: + type: string + description: The type of product associated with the message. + enum: + - LOCAL_A2P + - P2P + - SHORT_CODE_REACH + - TOLL_FREE + - HOSTED_SHORT_CODE + - ALPHA_NUMERIC + - RBM_MEDIA + - RBM_RICH + - RBM_CONVERSATIONAL + example: P2P + fieldError: + type: object + properties: + fieldName: + type: string + description: The name of the field that contains the error + example: from + description: + type: string + description: The error associated with the field + example: >- + '+invalid' must be replaced with a valid E164 formatted telephone + number + messagesList: + title: MessagesList + type: object + properties: + totalCount: + type: integer + description: >- + The total number of messages matched by the search. When the request + has limitTotalCount set to true this value is limited to 10,000. + example: 100 + pageInfo: + $ref: '#/components/schemas/pageInfo' + messages: + type: array + items: + $ref: '#/components/schemas/listMessageItem' + listMessageItem: + title: listMessageItem + type: object + properties: + messageId: + type: string + description: The message id + example: 1589228074636lm4k2je7j7jklbn2 + accountId: + type: string + description: The account id associated with this message. + example: '9900000' + sourceTn: + type: string + description: The source phone number of the message. + example: '+15554443333' + destinationTn: + type: string + description: The recipient phone number of the message. + example: '+15554442222' + messageStatus: + $ref: '#/components/schemas/messageStatusEnum' + messageDirection: + $ref: '#/components/schemas/listMessageDirectionEnum' + messageType: + $ref: '#/components/schemas/messageTypeEnum' + segmentCount: + $ref: '#/components/schemas/segmentCount' + errorCode: + type: integer + description: The numeric error code of the message. + example: 9902 + receiveTime: + type: string + format: date-time + description: The ISO 8601 datetime of the message. + example: 2020-04-07T14:03:07.000Z + carrierName: + type: string + nullable: true + description: >- + The name of the carrier. Not currently supported for MMS coming + soon. + example: other + messageSize: + type: integer + description: The size of the message including message content and headers. + nullable: true + example: 27 + messageLength: + type: integer + description: The length of the message content. + example: 18 + attachmentCount: + type: integer + description: The number of attachments the message has. + nullable: true + example: 1 + recipientCount: + type: integer + description: The number of recipients the message has. + nullable: true + example: 1 + campaignClass: + type: string + description: The campaign class of the message if it has one. + nullable: true + example: T + campaignId: + type: string + description: The campaign ID of the message if it has one. + nullable: true + example: CJEUMDK + bwLatency: + type: integer + description: >- + The Bandwidth latency of the message in seconds. Only available for + accounts with the Advanced Quality Metrics feature enabled. + nullable: true + example: 20 + carrierLatency: + type: integer + description: >- + The carrier latency of the message in seconds. Only available for + OUTBOUND messages from accounts with the Advanced Quality Metrics + feature enabled. + nullable: true + example: 20 + callingNumberCountryA3: + type: string + description: The A3 country code of the calling number. + nullable: true + example: USA + calledNumberCountryA3: + type: string + description: The A3 country code of the called number. + nullable: true + example: USA + product: + type: string + description: The messaging product associated with the message. + nullable: true + example: P2P + location: + type: string + description: The location ID associated with this message. + nullable: true + example: 123ID + pageInfo: + title: PageInfo + type: object + properties: + prevPage: + type: string + description: The link to the previous page for pagination. + example: >- + https://messaging.bandwidth.com/api/v2/users/accountId/messages?messageStatus=DLR_EXPIRED&nextPage=DLAPE902 + nextPage: + type: string + description: The link to the next page for pagination. + example: >- + https://messaging.bandwidth.com/api/v2/users/accountId/messages?messageStatus=DLR_EXPIRED&prevPage=GL83PD3C + prevPageToken: + type: string + description: The isolated pagination token for the previous page. + example: DLAPE902 + nextPageToken: + type: string + description: The isolated pagination token for the next page. + example: GL83PD3C + messagingRequestError: + title: MessagingRequestError + type: object + properties: + type: + type: string + description: + type: string + required: + - type + - description + createMessageRequestError: + title: CreateMessageRequestError + type: object + properties: + type: + type: string + description: + type: string + fieldErrors: + type: array + items: + $ref: '#/components/schemas/fieldError' + required: + - type + - description + id: + type: string + description: The ID of the message. + example: 1589228074636lm4k2je7j7jklbn2 + media: + title: Media + type: object + properties: + content: + type: string + contentLength: + type: integer + example: 1024 + mediaName: + type: string + example: image.png + segmentCount: + type: integer + description: >- + The number of segments the user's message is broken into before sending + over carrier networks. + example: 1 + tag: + title: Tag + type: string + description: >- + A custom string that will be included in callback events of the message. + Max 1024 characters. + example: custom string + expiration: + type: string + format: date-time + description: >- + A string with the date/time value that the message will automatically + expire by. This must be a valid RFC-3339 value, e.g., + 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time + in the future. + example: '2021-02-01T11:29:18-05:00' + carrierName: + type: string + description: >- + The name of the Authorized Message Provider (AMP) that handled this + message. + + In the US, this is the carrier that the message was sent to. + + This field is present only when this account feature has been enabled. + example: AT&T + message: + title: Message + type: object + properties: + id: + type: string + description: The id of the message. + example: 1589228074636lm4k2je7j7jklbn2 + owner: + type: string + description: The Bandwidth phone number associated with the message. + example: '+15554443333' + applicationId: + $ref: '#/components/schemas/applicationId' + time: + type: string + format: date-time + description: The datetime stamp of the message in ISO 8601 + example: 2024-12-02T20:15:57.278Z + segmentCount: + $ref: '#/components/schemas/segmentCount' + direction: + $ref: '#/components/schemas/messageDirectionEnum' + to: + uniqueItems: true + type: array + items: + type: string + description: The phone number recipients of the message. + example: + - '+15552223333' + from: + type: string + description: The phone number the message was sent from. + example: '+15553332222' + media: + uniqueItems: true + type: array + items: + type: string + description: >- + The list of media URLs sent in the message. Including a `filename` + field in the `Content-Disposition` header of the media linked with a + URL will set the displayed file name. This is a best practice to + ensure that your media has a readable file name. + example: + - https://dev.bandwidth.com/images/bandwidth-logo.png + text: + type: string + description: The contents of the message. + example: Hello world + tag: + $ref: '#/components/schemas/tag' + priority: + $ref: '#/components/schemas/priorityEnum' + expiration: + $ref: '#/components/schemas/expiration' + messageRequest: + title: MessageRequest + type: object + required: + - applicationId + - to + - from + properties: + applicationId: + $ref: '#/components/schemas/applicationId' + to: + uniqueItems: true + type: array + description: The phone number(s) the message should be sent to in E164 format. + example: + - '+15554443333' + - '+15552223333' + items: + type: string + from: + type: string + description: >- + Either an alphanumeric sender ID or the sender's Bandwidth phone + number in E.164 format, which must be hosted within Bandwidth and + linked to the account that is generating the message. + + Alphanumeric Sender IDs can contain up to 11 characters, upper-case + letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, + plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must + contain at least one letter. + example: '+15551113333' + text: + $ref: '#/components/schemas/messageText' + media: + $ref: '#/components/schemas/messageMedia' + tag: + $ref: '#/components/schemas/tag' + priority: + $ref: '#/components/schemas/priorityEnum' + expiration: + $ref: '#/components/schemas/expiration' + messageText: + type: string + description: The contents of the text message. Must be 2048 characters or less. + maxLength: 2048 + example: Hello world + messageMedia: + type: array + items: + type: string + format: uri + maxLength: 4096 + description: |- + A list of URLs to include as media attachments as part of the message. + Each URL can be at most 4096 characters. + example: + - https://dev.bandwidth.com/images/bandwidth-logo.png + - https://dev.bandwidth.com/images/github_logo.png + createMultiChannelMessageResponse: + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/link' + example: [] + data: + $ref: '#/components/schemas/multiChannelMessageResponseData' + errors: + type: array + items: + $ref: '#/components/schemas/errorObject' + example: [] + multiChannelError: + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/link' + example: [] + data: + type: object + nullable: true + example: null + errors: + type: array + items: + $ref: '#/components/schemas/errorObject' + link: + type: object + properties: + rel: + type: string + href: + type: string + errorObject: + type: object + properties: + type: + description: A concise summary of the error used for categorization. + type: string + description: + description: A detailed explanation of the error. + type: string + source: + $ref: '#/components/schemas/errorSource' + required: + - type + - description + - source + errorSource: + title: Error Source + type: object + description: Specifies relevant sources of the error, if any. + properties: + parameter: + type: string + description: The relevant URI query parameter causing the error + field: + type: string + description: The request body field that led to the error + header: + type: string + description: The header field that contributed to the error + reference: + type: string + description: A resource ID or path linked to the error + multiChannelMessageChannelEnum: + description: The channel of the multi-channel message. + type: string + enum: + - RBM + - SMS + - MMS + example: RBM + multiChannelSenderId: + type: string + description: The sender ID of the message. This could be an alphanumeric sender ID. + example: BandwidthRBM + multiChannelDestination: + type: string + description: The phone number the message should be sent to in E164 format. + example: '+15552223333' + multiChannelDestinations: + uniqueItems: true + type: array + description: The destination phone number(s) of the message, in E164 format. + example: + - '+15554443333' + items: + type: string + rbmMessageContentText: + title: RBM Text + type: object + properties: + text: + type: string + description: >- + The text associated with the message. Must be 3270 characters or + less + maxLength: 3270 + example: Hello world + suggestions: + $ref: '#/components/schemas/multiChannelFullActions' + required: + - text + rbmMediaHeightEnum: + type: string + description: The height of the media. + enum: + - SHORT + - MEDIUM + - TALL + example: SHORT + rbmMessageContentFile: + title: RBM Rich Media File + type: object + properties: + fileUrl: + type: string + format: uri + description: The URL of the media file. 100MB is the maximum file size. + example: https://dev.bandwidth.com/images/bandwidth-logo.png + maxLength: 1000 + thumbnailUrl: + type: string + format: uri + description: The URL of the thumbnail image. Applies only to video file media. + example: https://dev.bandwidth.com/images/bandwidth-logo.png + maxLength: 1000 + required: + - fileUrl + mmsMessageContentFile: + title: MMS Media File + type: object + properties: + fileUrl: + type: string + format: uri + description: >- + The URL of a media attachment. + + + For MMS, the API limits file size to 3.5MB. Specific carriers and + channels may have a smaller limit that could cause a large file to + fail, see more at [Bandwidth + Support](https://www.bandwidth.com/support/en/articles/12823216-what-are-the-mms-file-size-limits) + for more details. + example: https://dev.bandwidth.com/images/bandwidth-logo.png + maxLength: 1000 + required: + - fileUrl + rbmMessageMedia: + title: RBM Media + type: object + properties: + media: + type: array + items: + $ref: '#/components/schemas/rbmMessageContentFile' + suggestions: + $ref: '#/components/schemas/multiChannelFullActions' + required: + - media + rbmCardContent: + type: object + description: Must contain at least one of title, description, or media to be valid. + properties: + title: + type: string + description: The title of the card. Must be 200 characters or less. + maxLength: 200 + example: Bandwidth + description: + type: string + description: The description of the card. Must be 2000 characters or less. + maxLength: 2000 + example: Bandwidth is a communications platform as a service (CPaaS) company. + media: + allOf: + - $ref: '#/components/schemas/rbmMessageContentFile' + - type: object + properties: + height: + $ref: '#/components/schemas/rbmMediaHeightEnum' + required: + - height + suggestions: + description: >- + An array of suggested actions for the recipient that will be + displayed on the rich card. + type: array + items: + $ref: '#/components/schemas/multiChannelAction' + maxItems: 4 + rbmStandaloneCard: + title: Standalone Card + type: object + properties: + orientation: + $ref: '#/components/schemas/standaloneCardOrientationEnum' + thumbnailImageAlignment: + $ref: '#/components/schemas/thumbnailAlignmentEnum' + cardContent: + $ref: '#/components/schemas/rbmCardContent' + suggestions: + $ref: '#/components/schemas/multiChannelFullActions' + required: + - orientation + - cardContent + standaloneCardOrientationEnum: + type: string + enum: + - HORIZONTAL + - VERTICAL + example: VERTICAL + thumbnailAlignmentEnum: + type: string + description: >- + The alignment of the thumbnail image in the card. Required when + orientation is HORIZONTAL. + enum: + - LEFT + - RIGHT + example: LEFT + rbmMessageCarouselCard: + title: Carousel + type: object + properties: + cardWidth: + $ref: '#/components/schemas/cardWidthEnum' + cardContents: + type: array + items: + $ref: '#/components/schemas/rbmCardContent' + minItems: 2 + maxItems: 10 + suggestions: + $ref: '#/components/schemas/multiChannelFullActions' + required: + - cardContents + - cardWidth + cardWidthEnum: + type: string + enum: + - SMALL + - MEDIUM + example: SMALL + smsMessageContent: + title: SMS Text + type: object + properties: + text: + $ref: '#/components/schemas/messageText' + required: + - text + mmsMessageContent: + title: MMS Message + type: object + properties: + text: + $ref: '#/components/schemas/messageText' + media: + type: array + items: + $ref: '#/components/schemas/mmsMessageContentFile' + rbmMessageContentRichCard: + title: RBM Rich Card + oneOf: + - $ref: '#/components/schemas/rbmStandaloneCard' + - $ref: '#/components/schemas/rbmMessageCarouselCard' + rbmActionTypeEnum: + type: string + enum: + - REPLY + - DIAL_PHONE + - SHOW_LOCATION + - CREATE_CALENDAR_EVENT + - OPEN_URL + - REQUEST_LOCATION + example: REPLY + rbmOpenUrlEnum: + type: string + 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. + + - `WEBVIEW` Opens the URL in an in-app WebView. + enum: + - BROWSER + - WEBVIEW + example: WEBVIEW + rbmWebViewEnum: + type: string + description: >- + Defines the layout of the WebView on a mobile device. It must be defined + + when application is set to `WEBVIEW` and must not be set when + application + + is set to `BROWSER`. + + - `FULL` WebView takes the full screen. + + - `HALF` WebView takes half of the screen. + + - `TALL` WebView takes three-quarters of the screen. + enum: + - FULL + - HALF + - TALL + rbmActionText: + title: Text + type: string + description: Displayed text for user to click + maxLength: 25 + example: Hello world + rbmActionPostbackData: + title: Post Back Data + type: string + format: byte + description: Base64 payload the customer receives when the reply is clicked. + maxLength: 2048 + example: SGVsbG8gd29ybGQ= + rbmActionBase: + type: object + properties: + type: + $ref: '#/components/schemas/rbmActionTypeEnum' + text: + $ref: '#/components/schemas/rbmActionText' + postbackData: + $ref: '#/components/schemas/rbmActionPostbackData' + required: + - text + - postbackData + - type + rbmActionDial: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - title: Dial Phone + type: object + properties: + phoneNumber: + type: string + description: The phone number to dial. Must be E164 format. + example: '+15552223333' + required: + - phoneNumber + rbmActionViewLocation: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - title: Show Location + type: object + properties: + latitude: + type: string + format: double + description: >- + The latitude of the location. Must be in range [-90.000000, + 90.000000]. + example: '37.7749' + longitude: + type: string + format: double + description: >- + The longitude of the location. Must be in range [-180.000000, + 180.000000]. + example: '-122.4194' + label: + type: string + description: The label of the location. + example: San Francisco + maxLength: 100 + required: + - latitude + - longitude + multiChannelActionCalendarEvent: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - title: Calendar Event + type: object + properties: + title: + type: string + description: The title of the event. + example: Meeting with John + maxLength: 100 + startTime: + type: string + format: date-time + description: >- + The start time of the event. Must be a valid RFC-3339 value, + e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. + example: 2022-09-14T18:20:16.000Z + endTime: + type: string + format: date-time + description: >- + The end time of the event. Must be a valid RFC-3339 value, e.g., + 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. + example: 2022-09-14T18:20:16.000Z + description: + type: string + description: The description of the event. + example: Discuss the new project + maxLength: 500 + required: + - title + - startTime + - endTime + rbmActionOpenUrl: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - title: Open URL + type: object + properties: + url: + type: string + format: uri + description: The URL to open in browser. Must use http:// or https:// scheme. + example: https://dev.bandwidth.com + maxLength: 2048 + application: + $ref: '#/components/schemas/rbmOpenUrlEnum' + webviewViewMode: + $ref: '#/components/schemas/rbmWebViewEnum' + required: + - url + multiChannelFullActions: + type: array + description: An array of suggested actions for the recipient. + items: + $ref: '#/components/schemas/multiChannelAction' + maxItems: 11 + multiChannelAction: + anyOf: + - $ref: '#/components/schemas/rbmActionBase' + - $ref: '#/components/schemas/rbmActionDial' + - $ref: '#/components/schemas/rbmActionViewLocation' + - $ref: '#/components/schemas/multiChannelActionCalendarEvent' + - $ref: '#/components/schemas/rbmActionOpenUrl' + discriminator: + propertyName: type + mapping: + REPLY: '#/components/schemas/rbmActionBase' + DIAL_PHONE: '#/components/schemas/rbmActionDial' + SHOW_LOCATION: '#/components/schemas/rbmActionViewLocation' + CREATE_CALENDAR_EVENT: '#/components/schemas/multiChannelActionCalendarEvent' + OPEN_URL: '#/components/schemas/rbmActionOpenUrl' + REQUEST_LOCATION: '#/components/schemas/rbmActionBase' + multiChannelChannelListObjectBase: + type: object + properties: + from: + $ref: '#/components/schemas/multiChannelSenderId' + applicationId: + $ref: '#/components/schemas/applicationId' + channel: + $ref: '#/components/schemas/multiChannelMessageChannelEnum' + required: + - from + - applicationId + - channel + multiChannelChannelListRBMObject: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListObjectBase' + - type: object + properties: + content: + description: The content of the message. + oneOf: + - $ref: '#/components/schemas/rbmMessageContentText' + - $ref: '#/components/schemas/rbmMessageMedia' + - $ref: '#/components/schemas/rbmMessageContentRichCard' + required: + - content + multiChannelChannelListSMSObject: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListObjectBase' + - type: object + properties: + content: + $ref: '#/components/schemas/smsMessageContent' + required: + - content + multiChannelChannelListMMSObject: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListObjectBase' + - type: object + properties: + content: + $ref: '#/components/schemas/mmsMessageContent' + required: + - content + multiChannelChannelListRBMResponseObject: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListRBMObject' + - $ref: '#/components/schemas/multiChannelChannelListOwnerObject' + multiChannelChannelListSMSResponseObject: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListSMSObject' + - $ref: '#/components/schemas/multiChannelChannelListOwnerObject' + multiChannelChannelListMMSResponseObject: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListMMSObject' + - $ref: '#/components/schemas/multiChannelChannelListOwnerObject' + multiChannelChannelListRequestObject: + anyOf: + - $ref: '#/components/schemas/multiChannelChannelListRBMObject' + - $ref: '#/components/schemas/multiChannelChannelListSMSObject' + - $ref: '#/components/schemas/multiChannelChannelListMMSObject' + discriminator: + propertyName: channel + mapping: + RBM: '#/components/schemas/multiChannelChannelListRBMObject' + SMS: '#/components/schemas/multiChannelChannelListSMSObject' + MMS: '#/components/schemas/multiChannelChannelListMMSObject' + multiChannelChannelListOwnerObject: + type: object + properties: + owner: + type: string + description: >- + The Bandwidth senderId associated with the message. Identical to + 'from'. + required: + - owner + multiChannelChannelListResponseObject: + anyOf: + - $ref: '#/components/schemas/multiChannelChannelListRBMResponseObject' + - $ref: '#/components/schemas/multiChannelChannelListSMSResponseObject' + - $ref: '#/components/schemas/multiChannelChannelListMMSResponseObject' + discriminator: + propertyName: channel + mapping: + RBM: '#/components/schemas/multiChannelChannelListRBMResponseObject' + SMS: '#/components/schemas/multiChannelChannelListSMSResponseObject' + MMS: '#/components/schemas/multiChannelChannelListMMSResponseObject' + multiChannelMessageRequest: + description: Multi-Channel Message Request + type: object + properties: + to: + $ref: '#/components/schemas/multiChannelDestination' + channelList: + type: array + description: >- + A list of message bodies. The messages will be attempted in the + order they are listed. Once a message sends successfully, the others + will be ignored. + items: + $ref: '#/components/schemas/multiChannelChannelListRequestObject' + maxItems: 4 + tag: + $ref: '#/components/schemas/tag' + priority: + $ref: '#/components/schemas/priorityEnum' + expiration: + $ref: '#/components/schemas/expiration' + required: + - to + - channelList + multiChannelMessageResponseData: + description: The data returned in a multichannel message response. + type: object + properties: + id: + $ref: '#/components/schemas/id' + time: + description: The time the message was received by the Bandwidth API. + type: string + format: date-time + example: 2025-01-01T18:20:16.000Z + direction: + $ref: '#/components/schemas/messageDirectionEnum' + to: + $ref: '#/components/schemas/multiChannelDestinations' + channelList: + type: array + description: >- + A list of message bodies. The messages will be attempted in the + order they are listed. Once a message sends successfully, the others + will be ignored. + items: + $ref: '#/components/schemas/multiChannelChannelListResponseObject' + maxItems: 4 + tag: + $ref: '#/components/schemas/tag' + priority: + $ref: '#/components/schemas/priorityEnum' + expiration: + $ref: '#/components/schemas/expiration' + required: + - id + - time + - direction + - to + - channelList + multiChannelMessageContent: + description: The structure of the content field of a multichannel message. + type: object + properties: + text: + type: string + media: + $ref: '#/components/schemas/rbmMessageContentFile' + rbmSuggestionResponse: + type: object + properties: + text: + type: string + description: The text associated with the suggestion response. + example: Yes, I would like to proceed + postbackData: + $ref: '#/components/schemas/rbmActionPostbackData' + pairedMessageId: + type: string + nullable: true + description: Corresponding parent message ID (MT). + example: 1752697342534u24xerqdukke523x + rbmLocationResponse: + type: object + properties: + latitude: + type: string + format: double + description: The latitude of the client's location. + example: '37.7749' + longitude: + type: string + format: double + description: The longitude of the client's location. + example: '-122.4194' + callback: + description: >- + Callbacks are divided into two types based on direction of the related + message: + + - `statusCallback` indicates status of an outbound MT SMS, MMS, or RBM + message. + + - `inboundCallback` indicates an inbound MO message or a multichannel + message client's response to a suggestion or location request. + type: object + oneOf: + - $ref: '#/components/schemas/statusCallback' + - $ref: '#/components/schemas/inboundCallback' + discriminator: + propertyName: type + mapping: + message-sending: '#/components/schemas/statusCallback' + message-sent: '#/components/schemas/statusCallback' + message-delivered: '#/components/schemas/statusCallback' + message-failed: '#/components/schemas/statusCallback' + message-read: '#/components/schemas/statusCallback' + message-received: '#/components/schemas/inboundCallback' + requested-location-response: '#/components/schemas/inboundCallback' + suggestion-response: '#/components/schemas/inboundCallback' + statusCallback: + type: object + description: >- + Represents a status callback for an outbound MT SMS or MMS or RBM + message. + properties: + time: + type: string + format: date-time + example: 2024-12-02T20:15:57.278Z + eventTime: + type: string + description: >- + Represents the time at which the message was read, for + `message-read` callbacks. + format: date-time + example: 2024-12-02T20:15:58.278Z + type: + $ref: '#/components/schemas/statusCallbackTypeEnum' + to: + type: string + description: >- + The destination phone number the message was sent to. + + For status callbacks, this the the Bandwidth user's client phone + number. + example: '+15552223333' + description: + type: string + description: A detailed description of the event described by the callback. + example: Message delivered to handset. + message: + $ref: '#/components/schemas/statusCallbackMessage' + errorCode: + type: integer + description: Optional error code, applicable only when type is `message-failed`. + example: 4405 + carrierName: + $ref: '#/components/schemas/carrierName' + required: + - time + - type + - to + - description + - message + inboundCallback: + type: object + description: Represents an inbound callback. + properties: + time: + type: string + format: date-time + example: 2024-12-02T20:15:57.278Z + type: + $ref: '#/components/schemas/inboundCallbackTypeEnum' + to: + type: string + description: > + The destination phone number the message was sent to. + + For inbound callbacks, this is the Bandwidth number or alphanumeric + identifier that received the message. + example: '+15552223333' + description: + type: string + description: A detailed description of the event described by the callback. + example: Incoming message received + message: + $ref: '#/components/schemas/inboundCallbackMessage' + carrierName: + $ref: '#/components/schemas/carrierName' + required: + - time + - type + - to + - description + - message + statusCallbackTypeEnum: + type: string + description: >- + The possible status callbacks when sending an MT SMS or MMS or RBM + message: + + - `message-sending` indicates that Bandwidth is sending the message to + the upstream provider. + + - `message-sent` indicates that the message has left the Bandwidth + network and is in transit to the provider. + + - `message-delivered` indicates that the message was successfully + delivered to handset. + + - `message-failed` indicates that the message could not be sent to the + intended recipient. + + - `message-read` indicates that the RBM message was read by the + recipient. + enum: + - message-sending + - message-sent + - message-delivered + - message-failed + - message-read + example: message-delivered + inboundCallbackTypeEnum: + type: string + description: >- + The possible inbound callback types originating from MO messages or + multichannel message client responses: + + - `message-received` indicates an MO message from a Bandwidth user's + client to a Bandwidth number. + + - `requested-location-response` indicates a response to a location + request sent by the Bandwidth user's client after receiving an RBM + message. + + - `suggestion-response` indicates a response to a suggestion sent by the + Bandwidth user's client after receiving an RBM message. + enum: + - message-received + - requested-location-response + - suggestion-response + example: message-received + statusCallbackMessage: + description: Message payload schema within a callback + type: object + properties: + id: + type: string + description: A unique identifier of the message. + example: 1661365814859loidf7mcwd4qacn7 + owner: + type: string + description: >- + The Bandwidth phone number or alphanumeric identifier associated + with the message. + example: '+15553332222' + applicationId: + $ref: '#/components/schemas/applicationId' + time: + type: string + format: date-time + example: 2024-12-02T20:15:57.666Z + segmentCount: + $ref: '#/components/schemas/segmentCount' + direction: + $ref: '#/components/schemas/messageDirectionEnum' + to: + description: The phone number recipients of the message. + uniqueItems: true + type: array + items: + type: string + example: + - '+15552223333' + from: + type: string + description: >- + The Bandwidth phone number or alphanumeric identifier the message + was sent from. + example: '+15553332222' + text: + type: string + example: Hello world + tag: + $ref: '#/components/schemas/tag' + media: + type: array + description: Optional media, not applicable for sms + items: + type: string + format: uri + example: + - https://dev.bandwidth.com/images/bandwidth-logo.png + - https://dev.bandwidth.com/images/github_logo.png + priority: + $ref: '#/components/schemas/priorityEnum' + channel: + $ref: '#/components/schemas/multiChannelMessageChannelEnum' + required: + - id + - owner + - applicationId + - time + - segmentCount + - direction + - to + - from + inboundCallbackMessage: + allOf: + - $ref: '#/components/schemas/statusCallbackMessage' + - type: object + properties: + content: + $ref: '#/components/schemas/multiChannelMessageContent' + suggestionResponse: + $ref: '#/components/schemas/rbmSuggestionResponse' + locationResponse: + $ref: '#/components/schemas/rbmLocationResponse' + required: + - id + - owner + - applicationId + - time + - segmentCount + - direction + - to + - from + callbackMethodEnum: + type: string + nullable: true + default: POST + enum: + - GET + - POST + description: >- + The HTTP method to use to deliver the callback. GET or POST. Default + value is POST. + example: POST + redirectMethodEnum: + type: string + nullable: true + default: POST + enum: + - GET + - POST + description: >- + The HTTP method to use for the request to `redirectUrl`. GET + + or POST. Default value is POST.

Not allowed if `state` is + `completed`. + example: POST + recordingStateEnum: + type: string + enum: + - paused + - recording + description: |- + The recording state. Possible values: + + `paused` to pause an active recording + + `recording` to resume a paused recording + example: paused + callDirectionEnum: + type: string + enum: + - inbound + - outbound + description: The direction of the call. + example: inbound + fileFormatEnum: + type: string + enum: + - mp3 + - wav + description: The format that the recording is stored in. + example: wav + callStateEnum: + nullable: true + type: string + default: active + enum: + - active + - completed + description: >- + The call state. Possible values:
`active` to redirect the + + call (default)
`completed` to hang up the call if it is answered, + cancel + + it if it is an unanswered outbound call, or reject it if it an + unanswered + + inbound call + example: completed + conferenceStateEnum: + nullable: true + type: string + default: active + enum: + - active + - completed + description: >- + Setting the conference state to `completed` ends the conference and + ejects all members. + example: completed + machineDetectionModeEnum: + type: string + default: async + enum: + - sync + - async + description: >- + The machine detection mode. If set to 'async', the detection + + result will be sent in a 'machineDetectionComplete' callback. If set to + + 'sync', the 'answer' callback will wait for the machine detection to + complete + + and will include its result. + example: async + callTranscriptionDetectedLanguageEnum: + type: string + enum: + - en-US + - es-US + - fr-FR + description: The detected language for this transcription. + example: en-US + callTranscriptionTrackEnum: + type: string + enum: + - inbound + - outbound + description: Which `track` this transcription is derived from. + example: inbound + createCall: + type: object + required: + - answerUrl + - applicationId + - from + - to + properties: + to: + type: string + description: >- + The destination to call (must be an E.164 formatted number + + (e.g. `+15555551212`) or a SIP URI (e.g. + `sip:user@server.example`)). + example: '+19195551234' + from: + type: string + description: >- + A Bandwidth phone number on your account the call should come + + from (must be in E.164 format, like `+15555551212`) even if + `privacy` is set to true. + example: '+15555551212' + privacy: + nullable: true + type: boolean + description: >- + Hide the calling number. The `displayName` field can be used to + customize the displayed name. + example: false + displayName: + nullable: true + type: string + description: >- + The caller display name to use when the call is created. + + May not exceed 256 characters nor contain control characters such as + new lines. + + If `privacy` is true, only the following values are valid: + `Restricted`, `Anonymous`, `Private`, or `Unavailable`. + maxLength: 256 + example: John Doe + uui: + nullable: true + type: string + example: >- + eyJhbGciOiJIUzI1NiJ9.WyJoaSJd.-znkjYyCkgz4djmHUPSXl9YrJ6Nix_XvmlwKGFh5ERM;encoding=jwt,aGVsbG8gd29ybGQ;encoding=base64 + description: >- + A comma-separated list of 'User-To-User' headers to be sent + + in the INVITE when calling a SIP URI. Each value must end with an + 'encoding' + + parameter as described in RFC + + 7433. Only 'jwt', 'base64' and 'hex' encodings are allowed. The + entire value + + cannot exceed 350 characters, including parameters and separators. + applicationId: + type: string + description: The id of the application associated with the `from` number. + example: 1234-qwer-5679-tyui + answerUrl: + type: string + format: uri + description: >- + The full URL to send the Answer + + event to when the called party answers. This endpoint should return + the + + first BXML document to be executed in + the + + call. + + + Must use `https` if specifying `username` and `password`. + maxLength: 2048 + example: https://www.myCallbackServer.example/webhooks/answer + answerMethod: + $ref: '#/components/schemas/callbackMethodEnum' + username: + type: string + nullable: true + description: Basic auth username. + maxLength: 1024 + example: mySecretUsername + password: + type: string + nullable: true + description: Basic auth password. + maxLength: 1024 + example: mySecretPassword1! + answerFallbackUrl: + nullable: true + type: string + format: uri + description: >- + A fallback url which, if provided, will be used to retry the + + `answer` webhook delivery in case `answerUrl` fails to respond + + + Must use `https` if specifying `fallbackUsername` and + `fallbackPassword`. + maxLength: 2048 + example: https://www.myFallbackServer.example/webhooks/answer + answerFallbackMethod: + $ref: '#/components/schemas/callbackMethodEnum' + fallbackUsername: + type: string + nullable: true + description: Basic auth username. + maxLength: 1024 + example: mySecretUsername + fallbackPassword: + type: string + nullable: true + description: Basic auth password. + maxLength: 1024 + example: mySecretPassword1! + disconnectUrl: + nullable: true + type: string + format: uri + description: >- + The URL to send the Disconnect event to when + the call ends. This event does not expect a BXML response. + maxLength: 2048 + example: https://www.myCallbackServer.example/webhooks/disconnect + disconnectMethod: + $ref: '#/components/schemas/callbackMethodEnum' + callTimeout: + nullable: true + type: number + format: double + description: >- + The timeout (in seconds) for the callee to answer the call + + after it starts ringing. If the call does not start ringing within + 30s, + + the call will be cancelled regardless of this value. Can be any + numeric + + value (including decimals) between 1 and 300. + minimum: 1 + maximum: 300 + default: 30 + example: 30 + callbackTimeout: + nullable: true + type: number + format: double + description: >- + 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. + minimum: 1 + maximum: 25 + default: 15 + example: 15 + machineDetection: + $ref: '#/components/schemas/machineDetectionConfiguration' + priority: + nullable: true + type: integer + minimum: 1 + maximum: 5 + default: 5 + description: >- + 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. + example: 5 + tag: + nullable: true + type: string + description: >- + A custom string that will be sent with all webhooks for this + + call unless overwritten by a future `` + + verb or `tag` attribute on another verb, or cleared. + + + May be cleared by setting `tag=""` + + + Max length 4096 characters. + maxLength: 4096 + example: arbitrary text here + createCallResponse: + type: object + required: + - accountId + - answerMethod + - answerUrl + - applicationId + - callId + - callUrl + - disconnectMethod + - from + - to + properties: + applicationId: + type: string + example: 04e88489-df02-4e34-a0ee-27a91849555f + description: The id of the application associated with the `from` number. + accountId: + type: string + example: '9900000' + description: The bandwidth account ID associated with the call. + callId: + type: string + example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + description: Programmable Voice API Call ID. + to: + type: string + example: '+19195551234' + description: Recipient of the outgoing call. + from: + type: string + example: '+19195554321' + description: Phone number that created the outbound call. + enqueuedTime: + nullable: true + type: string + format: date-time + description: The time at which the call was accepted into the queue. + example: '2022-06-16T13:15:07.160Z' + callUrl: + type: string + format: uri + example: >- + https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + description: The URL to update this call's state. + callTimeout: + type: number + format: double + example: 30 + description: >- + The timeout (in seconds) for the callee to answer the call after it + starts ringing. + callbackTimeout: + type: number + format: double + example: 15 + description: >- + This is the timeout (in seconds) to use when delivering webhooks for + the call. + tag: + nullable: true + type: string + example: My custom tag value + description: Custom tag value. + answerMethod: + $ref: '#/components/schemas/callbackMethodEnum' + answerUrl: + type: string + format: uri + example: https://myServer.example/bandwidth/webhooks/answer + description: URL to deliver the `answer` event webhook. + answerFallbackMethod: + $ref: '#/components/schemas/callbackMethodEnum' + answerFallbackUrl: + nullable: true + type: string + format: uri + example: https://myFallbackServer.example/bandwidth/webhooks/answer + description: Fallback URL to deliver the `answer` event webhook. + disconnectMethod: + $ref: '#/components/schemas/callbackMethodEnum' + disconnectUrl: + nullable: true + type: string + format: uri + example: https://myServer.example/bandwidth/webhooks/disconnect + description: URL to deliver the `disconnect` event webhook. + username: + type: string + nullable: true + description: Basic auth username. + maxLength: 1024 + example: mySecretUsername + password: + type: string + nullable: true + description: Basic auth password. + maxLength: 1024 + example: mySecretPassword1! + fallbackUsername: + type: string + nullable: true + description: Basic auth username. + maxLength: 1024 + example: mySecretUsername + fallbackPassword: + type: string + nullable: true + description: Basic auth password. + maxLength: 1024 + example: mySecretPassword1! + priority: + nullable: true + type: integer + example: 5 + description: The priority of this call over other calls from your account. + callState: + type: object + properties: + applicationId: + type: string + description: The application id associated with the call. + example: 04e88489-df02-4e34-a0ee-27a91849555f + accountId: + type: string + description: The account id associated with the call. + example: '9900000' + callId: + type: string + description: The programmable voice API call ID. + example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + parentCallId: + nullable: true + type: string + description: >- + The A-leg call id, set only if this call is the B-leg of a + [``](/docs/voice/bxml/transfer). + example: c-25ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + to: + type: string + description: >- + The phone number that received the call, in E.164 format (e.g. + +15555555555), or if the call was to a SIP URI, the SIP URI. + example: '+19195551234' + from: + type: string + description: >- + The phone number that made the call, in E.164 format (e.g. + +15555555555). + example: '+19195554321' + direction: + $ref: '#/components/schemas/callDirectionEnum' + state: + description: >- + The current state of the call. Current possible values are + + `queued`, `initiated`, `answered` and `disconnected`. Additional + states + + may be added in the future, so your application must be tolerant of + unknown + + values. + type: string + example: disconnected + stirShaken: + nullable: true + type: object + description: >- + For inbound calls, the Bandwidth STIR/SHAKEN implementation will + verify the information provided in the inbound invite request + `Identity` header. + + The verification status is stored in the call state `stirShaken` + property as follows. + + + | Property | Description | + + |:------------------|:------------| + + | verstat | (optional) The verification status indicating whether + the verification was successful or not. Possible values are + `TN-Validation-Passed` or `TN-Validation-Failed`. | + + | attestationIndicator | (optional) The attestation level verified + by Bandwidth. Possible values are `A` (full), `B` (partial) or `C` + (gateway). | + + | originatingId | (optional) A unique origination identifier. | + + + Note that these are common properties but that the `stirShaken` + object is free form and can contain other key-value pairs. + + + More information: [Understanding + STIR/SHAKEN](https://www.bandwidth.com/regulations/stir-shaken). + additionalProperties: + type: string + example: + verstat: TN-Validation-Passed + attestationIndicator: A + originatingId: abc123 + identity: + nullable: true + type: string + description: >- + The value of the `Identity` header from the inbound invite + + request. Only present for inbound calls and if the account is + configured + + to forward this header. + example: >- + eyJhbGciOiJFUzI1NiIsInBwdCI6InNoYWtlbiIsInR5cCI6InBhc3Nwb3J0IiwieDV1IjoiaHR0cHM6Ly9idy1zaGFrZW4tY2VydC1wdWIuczMuYW1hem9uYXdzLmNvbS9iYW5kd2lkdGgtc2hha2VuLWNlcnRfMjAyMzA3MTYucGVtIn0.eyJhdHRlc3QiOiJBIiwiZGVzdCI6eyJ0biI6WyIxOTg0MjgyMDI4MCJdfSwiaWF0IjoxNjU2NTM0MzM2LCJvcmlnIjp7InRuIjoiMTkxOTQ0NDI2ODMifSwib3JpZ2lkIjoiNDk0NTlhOGEtNDJmNi0zNTFjLTkzNjEtYWRmNTdhOWUwOGNhIn0.56un9sRw_uH-sbJvnUsqdevlVxbOVjn8MVlGTlBMicjaZuRRwxfiNp-C9zYCMKTTCbc-QdYPN05F61XNVN4D3w;info=;alg=ES256;ppt=shaken + enqueuedTime: + nullable: true + type: string + format: date-time + description: The time this call was placed in queue. + example: '2022-06-16T13:15:07.160Z' + startTime: + nullable: true + type: string + format: date-time + description: >- + The time the call was initiated, in ISO 8601 format. `null` if the + call is still in your queue. + example: '2022-06-16T13:15:07.160Z' + answerTime: + nullable: true + type: string + format: date-time + description: >- + Populated once the call has been answered, with the time in ISO 8601 + format. + example: '2022-06-16T13:15:18.126Z' + endTime: + nullable: true + type: string + format: date-time + description: Populated once the call has ended, with the time in ISO 8601 format. + example: '2022-06-16T13:15:18.314Z' + disconnectCause: + nullable: true + type: string + description: >- + | Cause | Description | + + |:------|:------------| + + | `hangup`| One party hung up the call, a + [``](../../bxml/verbs/hangup.md) verb was executed, or there + was no more BXML to execute; it indicates that the call ended + normally. | + + | `busy` | Callee was busy. | + + | `timeout` | Call wasn't answered before the `callTimeout` was + reached. | + + | `cancel` | Call was cancelled by its originator while it was + ringing. | + + | `rejected` | Call was rejected by the callee. | + + | `callback-error` | BXML callback couldn't be delivered to your + callback server. | + + | `invalid-bxml` | Invalid BXML was returned in response to a + callback. | + + | `application-error` | An unsupported action was tried on the call, + e.g. trying to play a .ogg audio. | + + | `account-limit` | Account rate limits were reached. | + + | `node-capacity-exceeded` | System maximum capacity was reached. | + + | `error` | Some error not described in any of the other causes + happened on the call. | + + | `unknown` | Unknown error happened on the call. | + + + Note: This list is not exhaustive and other values can appear in the + future. + errorMessage: + nullable: true + type: string + description: >- + Populated only if the call ended with an error, with text explaining + the reason. + example: null + errorId: + nullable: true + type: string + description: >- + Populated only if the call ended with an error, with a Bandwidth + internal id that references the error event. + example: null + lastUpdate: + type: string + format: date-time + description: The last time the call had a state update, in ISO 8601 format. + example: '2022-06-16T13:15:18.314Z' + updateCall: + type: object + properties: + state: + $ref: '#/components/schemas/callStateEnum' + redirectUrl: + description: |- + The URL to send the [Redirect](/docs/voice/bxml/redirect) event + to which will provide new BXML. + + Required if `state` is `active`. + + Not allowed if `state` is `completed`. + nullable: true + type: string + format: uri + example: https://myServer.example/bandwidth/webhooks/redirect + redirectMethod: + $ref: '#/components/schemas/redirectMethodEnum' + username: + type: string + nullable: true + description: Basic auth username. + maxLength: 1024 + example: mySecretUsername + password: + type: string + nullable: true + description: Basic auth password. + maxLength: 1024 + example: mySecretPassword1! + redirectFallbackUrl: + nullable: true + type: string + format: uri + description: |- + A fallback url which, if provided, will be used to retry the + redirect callback delivery in case `redirectUrl` fails to respond. + example: https://myFallbackServer.example/bandwidth/webhooks/redirect + redirectFallbackMethod: + $ref: '#/components/schemas/redirectMethodEnum' + fallbackUsername: + type: string + nullable: true + description: Basic auth username. + maxLength: 1024 + example: mySecretUsername + fallbackPassword: + type: string + nullable: true + description: Basic auth password. + maxLength: 1024 + example: mySecretPassword1! + tag: + nullable: true + type: string + description: >- + A custom string that will be sent with this and all future + + callbacks unless overwritten by a future `tag` attribute or + [``](/docs/voice/bxml/tag) + + verb, or cleared. + + + May be cleared by setting `tag=""`. + + + Max length 4096 characters. + + + Not allowed if `state` is `completed`. + maxLength: 4096 + example: My Custom Tag + updateCallRecording: + type: object + required: + - state + properties: + state: + $ref: '#/components/schemas/recordingStateEnum' + accountStatistics: + type: object + properties: + currentCallQueueSize: + type: integer + description: The number of calls currently enqueued. + example: 0 + maxCallQueueSize: + type: integer + description: >- + The maximum size of the queue before outgoing calls start being + rejected. + example: 900 + callRecordingMetadata: + type: object + properties: + applicationId: + $ref: '#/components/schemas/applicationId1' + accountId: + $ref: '#/components/schemas/accountId' + callId: + $ref: '#/components/schemas/callId' + parentCallId: + $ref: '#/components/schemas/parentCallId' + recordingId: + $ref: '#/components/schemas/recordingId' + to: + $ref: '#/components/schemas/to' + from: + $ref: '#/components/schemas/from' + transferCallerId: + $ref: '#/components/schemas/transferCallerId' + transferTo: + $ref: '#/components/schemas/transferTo' + duration: + $ref: '#/components/schemas/duration' + direction: + $ref: '#/components/schemas/callDirectionEnum' + channels: + $ref: '#/components/schemas/channels' + startTime: + $ref: '#/components/schemas/startTime' + endTime: + $ref: '#/components/schemas/endTime' + fileFormat: + $ref: '#/components/schemas/fileFormatEnum' + status: + $ref: '#/components/schemas/status' + mediaUrl: + $ref: '#/components/schemas/mediaUrl' + transcription: + $ref: '#/components/schemas/recordingTranscriptionMetadata' + recordingName: + $ref: '#/components/schemas/recordingName' + conference: + type: object + properties: + id: + type: string + description: The Bandwidth-generated conference ID. + example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 + name: + type: string + description: The name of the conference, as specified by your application. + example: my-conference-name + createdTime: + type: string + format: date-time + description: The time the conference was initiated, in ISO 8601 format. + example: '2022-06-17T22:19:40.375Z' + completedTime: + nullable: true + type: string + format: date-time + description: The time the conference was terminated, in ISO 8601 format. + example: '2022-06-17T22:20:00.000Z' + conferenceEventUrl: + nullable: true + type: string + format: uri + description: The URL to send the conference-related events. + example: https://myServer.example/bandwidth/webhooks/conferenceEvent + conferenceEventMethod: + $ref: '#/components/schemas/callbackMethodEnum' + tag: + nullable: true + type: string + description: >- + The custom string attached to the conference that will be sent with + callbacks. + example: my custom tag + activeMembers: + type: array + nullable: true + items: + $ref: '#/components/schemas/conferenceMember' + description: >- + A list of active members of the conference. Omitted if this + + is a response to the [Get Conferences + endpoint](/apis/voice#tag/Conferences/operation/listConferences). + updateConference: + type: object + properties: + status: + $ref: '#/components/schemas/conferenceStateEnum' + redirectUrl: + nullable: true + type: string + format: uri + description: >- + The URL to send the + [conferenceRedirect](/docs/voice/webhooks/conferenceRedirect) + + event which will provide new BXML. Not allowed if `state` is + `completed`, + + but required if `state` is `active`. + example: https://myServer.example/bandwidth/webhooks/conferenceRedirect + redirectMethod: + $ref: '#/components/schemas/redirectMethodEnum' + username: + type: string + nullable: true + description: Basic auth username. + maxLength: 1024 + example: mySecretUsername + password: + type: string + nullable: true + description: Basic auth password. + maxLength: 1024 + example: mySecretPassword1! + redirectFallbackUrl: + nullable: true + type: string + format: uri + description: >- + A fallback url which, if provided, will be used to retry the + + `conferenceRedirect` webhook delivery in case `redirectUrl` fails to + respond. Not + + allowed if `state` is `completed`. + example: >- + https://myFallbackServer.example/bandwidth/webhooks/conferenceRedirect + redirectFallbackMethod: + $ref: '#/components/schemas/redirectMethodEnum' + fallbackUsername: + type: string + nullable: true + description: Basic auth username. + maxLength: 1024 + example: mySecretUsername + fallbackPassword: + type: string + nullable: true + description: Basic auth password. + maxLength: 1024 + example: mySecretPassword1! + conferenceMember: + type: object + properties: + callId: + $ref: '#/components/schemas/callId' + conferenceId: + $ref: '#/components/schemas/conferenceId' + memberUrl: + type: string + format: uri + description: >- + A URL that may be used to retrieve information about or update + + the state of this conference member. This is the URL of this + member's + + [Get Conference + Member](/apis/voice-apis/voice/#tag/Conferences/operation/getConferenceMember) + endpoint + + and [Modify Conference + Member](/apis/voice-apis/voice/#tag/Conferences/operation/updateConferenceMember) + + endpoint. + example: >- + https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9/members/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + mute: + type: boolean + description: >- + Whether or not this member is currently muted. Members who are muted + are still able to hear other participants. + + + If used in a PUT request, updates this member's mute status. Has no + effect if omitted. + example: false + hold: + type: boolean + description: >- + Whether or not this member is currently on hold. Members who are on + hold are not able to hear or speak in the conference. + + + If used in a PUT request, updates this member's hold status. Has no + effect if omitted. + example: false + callIdsToCoach: + nullable: true + type: array + items: + type: string + description: >- + If this member had a value set for `callIdsToCoach` in its + [Conference](/docs/voice/bxml/conference) verb or this list was + added with a previous PUT request to modify the member, this is that + list of calls. + + + If present in a PUT request, modifies the calls that this member is + coaching. Has no effect if omitted. See the documentation for the + [Conference](/docs/voice/bxml/conference) verb for more details + about coaching. + + Note that this will not add the matching calls to the conference; + each call must individually execute a Conference verb to join. + example: + - c-25ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + updateConferenceMember: + type: object + properties: + mute: + type: boolean + description: >- + Whether or not this member is currently muted. Members who are muted + are still able to hear other participants. + + + Updates this member's mute status. Has no effect if omitted. + example: false + hold: + type: boolean + description: >- + Whether or not this member is currently on hold. Members who are on + hold are not able to hear or speak in the conference. + + + Updates this member's hold status. Has no effect if omitted. + example: false + callIdsToCoach: + nullable: true + type: array + items: + type: string + description: >- + If this member had a value set for `callIdsToCoach` in its + [Conference](/docs/voice/bxml/conference) verb or this list was + added with a previous PUT request to modify the member, this is that + list of calls. + + + Modifies the calls that this member is coaching. Has no effect if + omitted. See the documentation for the + [Conference](/docs/voice/bxml/conference) verb for more details + about coaching. + + + Note that this will not add the matching calls to the conference; + each call must individually execute a Conference verb to join. + example: + - c-25ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + conferenceRecordingMetadata: + type: object + properties: + accountId: + $ref: '#/components/schemas/accountId' + conferenceId: + $ref: '#/components/schemas/conferenceId' + name: + $ref: '#/components/schemas/name' + recordingId: + $ref: '#/components/schemas/recordingId' + duration: + $ref: '#/components/schemas/duration' + channels: + $ref: '#/components/schemas/channels' + startTime: + $ref: '#/components/schemas/startTime' + endTime: + $ref: '#/components/schemas/endTime' + fileFormat: + $ref: '#/components/schemas/fileFormatEnum' + status: + $ref: '#/components/schemas/status' + mediaUrl: + $ref: '#/components/schemas/mediaUrl' + recordingName: + $ref: '#/components/schemas/recordingName' + machineDetectionConfiguration: + type: object + description: >- + The machine detection request used to perform machine detection on the + call. Currently, there is an issue where decimal values are not getting + processed correctly. Please use whole number values. We are working to + resolve this issue. Please contact Bandwidth Support if you need more + information. + properties: + mode: + $ref: '#/components/schemas/machineDetectionModeEnum' + detectionTimeout: + nullable: true + type: number + format: double + description: >- + The timeout used for the whole operation, in seconds. If no + + result is determined in this period, a callback with a `timeout` + result + + is sent. + default: 15 + example: 15 + silenceTimeout: + nullable: true + type: number + format: double + description: >- + If no speech is detected in this period, a callback with a 'silence' + result is sent. + default: 10 + example: 10 + speechThreshold: + nullable: true + type: number + format: double + description: >- + When speech has ended and a result couldn't be determined based + + on the audio content itself, this value is used to determine if the + speaker + + is a machine based on the speech duration. If the length of the + speech + + detected is greater than or equal to this threshold, the result will + be + + 'answering-machine'. If the length of speech detected is below this + threshold, + + the result will be 'human'. + default: 10 + example: 10 + speechEndThreshold: + nullable: true + type: number + format: double + description: >- + Amount of silence (in seconds) before assuming the callee has + finished speaking. + default: 5 + example: 5 + machineSpeechEndThreshold: + nullable: true + type: number + format: double + description: >- + When an answering machine is detected, the amount of silence (in + seconds) before assuming the message has finished playing. + + If not provided it will default to the speechEndThreshold value. + example: 5 + delayResult: + nullable: true + type: boolean + description: >- + If set to 'true' and if an answering machine is detected, the + + 'answering-machine' callback will be delayed until the machine is + done + + speaking, or an end of message tone is detected, or until the + 'detectionTimeout' is exceeded. If false, the 'answering-machine' + + result is sent immediately. + default: false + example: false + callbackUrl: + nullable: true + description: >- + The URL to send the 'machineDetectionComplete' webhook when the + detection is completed. Only for 'async' mode. + type: string + format: uri + maxLength: 2048 + example: https://myServer.example/bandwidth/webhooks/machineDetectionComplete + callbackMethod: + $ref: '#/components/schemas/callbackMethodEnum' + username: + type: string + nullable: true + description: Basic auth username. + maxLength: 1024 + example: mySecretUsername + password: + type: string + nullable: true + description: Basic auth password. + maxLength: 1024 + example: mySecretPassword1! + fallbackUrl: + nullable: true + type: string + format: uri + description: >- + A fallback URL which, if provided, will be used to retry the + + machine detection complete webhook delivery in case `callbackUrl` + fails + + to respond + maxLength: 2048 + example: >- + https://myFallbackServer.example/bandwidth/webhooks/machineDetectionComplete + fallbackMethod: + $ref: '#/components/schemas/callbackMethodEnum' + fallbackUsername: + type: string + nullable: true + description: Basic auth username. + maxLength: 1024 + example: mySecretUsername + fallbackPassword: + type: string + nullable: true + description: Basic auth password. + maxLength: 1024 + example: mySecretPassword1! + transcribeRecording: + type: object + properties: + callbackUrl: + type: string + format: uri + description: >- + The URL to send the + [TranscriptionAvailable](/docs/voice/webhooks/transcriptionAvailable) + + event to. You should not include sensitive or + personally-identifiable + + information in the callbackUrl field! Always use the proper username + and + + password fields for authorization. + example: https://myServer.example/bandwidth/webhooks/transcriptionAvailable + callbackMethod: + $ref: '#/components/schemas/callbackMethodEnum' + username: + type: string + nullable: true + description: Basic auth username. + maxLength: 1024 + example: mySecretUsername + password: + type: string + nullable: true + description: Basic auth password. + maxLength: 1024 + example: mySecretPassword1! + tag: + $ref: '#/components/schemas/tag1' + callbackTimeout: + nullable: true + type: number + format: double + minimum: 1 + maximum: 25 + default: 15 + description: >- + This is the timeout (in seconds) to use when delivering the + + webhook to `callbackUrl`. Can be any numeric value (including + decimals) + + between 1 and 25. + example: 5.5 + detectLanguage: + type: boolean + nullable: true + description: >- + A boolean value to indicate that the recording may not be in + English, and the transcription service will need to detect the + dominant language the recording is in and transcribe accordingly. + Current supported languages are English, French, and Spanish. + default: false + example: true + recordingTranscriptions: + type: object + properties: + transcripts: + type: array + items: + $ref: '#/components/schemas/transcription' + clips: + type: array + description: >- + A list of individual speech clips with speaker, timing, and + confidence information. + items: + $ref: '#/components/schemas/recordingTranscriptionClip' + example: + transcripts: + - speaker: 0 + text: Hi, is Thursday at two still good for you? Perfect, talk soon. + confidence: 0.96 + - speaker: 1 + text: Yes, that works great. See you then! Sounds good, bye! + confidence: 0.97 + clips: + - speaker: 0 + text: Hi, is Thursday at two still good for you? + confidence: 0.97 + startTimeSeconds: 0.4 + endTimeSeconds: 3.1 + - speaker: 1 + text: Yes, that works great. See you then! + confidence: 0.95 + startTimeSeconds: 3.8 + endTimeSeconds: 6.2 + - speaker: 0 + text: Perfect, talk soon. + confidence: 0.94 + startTimeSeconds: 6.9 + endTimeSeconds: 8.1 + - speaker: 1 + text: Sounds good, bye! + confidence: 0.98 + startTimeSeconds: 8.5 + endTimeSeconds: 9.7 + recordingTranscriptionClip: + type: object + properties: + speaker: + type: integer + description: Zero-based index identifying the speaker. + example: 0 + text: + type: string + description: The transcribed text of this clip. + example: Hi there, thanks for calling! + confidence: + type: number + format: double + minimum: 0 + maximum: 1 + description: >- + How confident the transcription engine was in transcribing this clip + (from `0.0` to `1.0`). + example: 0.85 + startTimeSeconds: + type: number + format: double + description: The start time of this clip within the recording, in seconds. + example: 2.3 + endTimeSeconds: + type: number + format: double + description: The end time of this clip within the recording, in seconds. + example: 3.1 + callTranscriptionMetadataList: + type: array + items: + $ref: '#/components/schemas/callTranscriptionMetadata' + example: + - transcriptionId: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b + transcriptionName: live_transcription + transcriptionUrl: >- + https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-fef240ff-5cfc9091-8069-4863-a8c0-a4dcbbf1f1a4/transcriptions/t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b + callTranscriptionMetadata: + type: object + properties: + transcriptionId: + type: string + description: The programmable voice API transcription ID. + example: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b + transcriptionName: + type: string + description: >- + The programmable voice API transcription name. This name could be + provided by the user when creating the transcription. + example: live_transcription + transcriptionUrl: + type: string + description: >- + A URL that may be used to retrieve the transcription itself. This + points to the + + [Get Call + Transcription](/apis/voice-apis/voice/#tag/Transcriptions/operation/getRealTimeTranscription) + endpoint. + example: >- + https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-fef240ff-5cfc9091-8069-4863-a8c0-a4dcbbf1f1a4/transcriptions/t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b + callTranscriptionResponse: + type: object + properties: + accountId: + type: string + description: The user account associated with the call. + example: '9900000' + callId: + type: string + description: The call id associated with the event. + example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + transcriptionId: + type: string + description: The programmable voice API transcription ID. + example: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b + tracks: + type: array + items: + $ref: '#/components/schemas/callTranscription' + example: + - detectedLanguage: en-US + track: inbound + transcript: Hello World! This is an example. + confidence: 0.9 + callTranscription: + type: object + properties: + detectedLanguage: + $ref: '#/components/schemas/callTranscriptionDetectedLanguageEnum' + track: + $ref: '#/components/schemas/callTranscriptionTrackEnum' + transcript: + type: string + description: The transcription itself. + example: Hello World! This is an example. + confidence: + type: number + format: double + minimum: 0 + maximum: 1 + description: >- + How confident the transcription engine was in transcribing the + associated audio (from `0` to `1`). + example: 0.9 + recordingTranscriptionMetadata: + nullable: true + type: object + description: If the recording was transcribed, metadata about the transcription + properties: + id: + type: string + description: The unique transcription ID + example: t-387bd648-18f3-4823-9d16-746bca0003c9 + status: + $ref: '#/components/schemas/status' + completedTime: + type: string + format: date-time + description: The time that the transcription was completed + example: '2022-06-13T18:46:29.715Z' + url: + type: string + format: uri + description: The URL of the [transcription](#operation/getCallTranscription) + example: >- + https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/recordings/r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/transcription + voiceApiError: + type: object + properties: + type: + type: string + description: + type: string + id: + nullable: true + type: string + answerCallback: + type: object + description: >- + The Answer event is sent to the answerUrl specified in the createCall + request when an outbound call is answered. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + callUrl: + $ref: '#/components/schemas/callUrl' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + tag: + $ref: '#/components/schemas/tag1' + machineDetectionResult: + $ref: '#/components/schemas/machineDetectionResult' + bridgeCompleteCallback: + type: object + description: >- + If the target call leaves the , then this callback is sent to + the bridgeCompleteUrl, and the BXML returned in it is executed on the + call. If this webhook is sent, the Bridge Target Complete webhook is NOT + sent. This callback is also sent if any problem occurs that prevents the + calls to be bridged. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + callUrl: + $ref: '#/components/schemas/callUrl' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + tag: + $ref: '#/components/schemas/tag1' + cause: + $ref: '#/components/schemas/cause' + errorMessage: + $ref: '#/components/schemas/errorMessage' + errorId: + $ref: '#/components/schemas/errorId' + bridgeTargetCompleteCallback: + type: object + description: >- + If the originating call leaves the , then this callback is sent + to the bridgeTargetCompleteUrl, and the BXML returned in it is executed + on the target call. If this webhook is sent, the Bridge Complete webhook + is NOT sent. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + callUrl: + $ref: '#/components/schemas/callUrl' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + tag: + $ref: '#/components/schemas/tag1' + conferenceCreatedCallback: + type: object + description: >- + The Conference Created event is fired whenever a new conference that + specified a callbackUrl is created. The response may be either empty or + a BXML document. Only the following verbs are valid for conferences: + PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, + ResumeRecording. Audio verbs will be heard by all members of the + conference. Recordings capture audio from all members who are not muted + or on hold, as well as any audio verbs that are played into the + conference. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + conferenceId: + $ref: '#/components/schemas/conferenceId' + name: + $ref: '#/components/schemas/name' + tag: + $ref: '#/components/schemas/tag1' + conferenceRedirectCallback: + type: object + description: >- + The Conference Redirect event is fired whenever an existing conference + is modified via a POST request made to the /conferences/{conferenceId} + endpoint. The response may be either empty or a BXML document. Only the + following verbs are valid for conferences: PlayAudio, SpeakSentence, + StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio + verbs will be heard by all members of the conference. Recordings capture + audio from all members who are not muted or on hold, as well as any + audio verbs that are played into the conference. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + conferenceId: + $ref: '#/components/schemas/conferenceId' + name: + $ref: '#/components/schemas/name' + tag: + $ref: '#/components/schemas/tag1' + conferenceMemberJoinCallback: + type: object + description: >- + The Conference Member Join event is fired whenever a caller joins a + conference that specified a callbackUrl. The response may be either + empty or a BXML document. Only the following verbs are valid for + conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, + PauseRecording, ResumeRecording. Audio verbs will be heard by all + members of the conference. Recordings capture audio from all members who + are not muted or on hold, as well as any audio verbs that are played + into the conference. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + conferenceId: + $ref: '#/components/schemas/conferenceId' + name: + $ref: '#/components/schemas/name' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + callId: + $ref: '#/components/schemas/callId' + tag: + $ref: '#/components/schemas/tag1' + conferenceMemberExitCallback: + type: object + description: >- + The Conference Member Exit event is fired whenever a caller exits a + conference that specified a callbackUrl. The response may be either + empty or a BXML document. Only the following verbs are valid for + conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, + PauseRecording, ResumeRecording. Audio verbs will be heard by all + members of the conference. Recordings capture audio from all members who + are not muted or on hold, as well as any audio verbs that are played + into the conference. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + conferenceId: + $ref: '#/components/schemas/conferenceId' + name: + $ref: '#/components/schemas/name' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + callId: + $ref: '#/components/schemas/callId' + tag: + $ref: '#/components/schemas/tag1' + conferenceCompletedCallback: + type: object + description: >- + The Conference Completed event is fired when the last member leaves the + conference. The response to this event may not contain BXML. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + conferenceId: + $ref: '#/components/schemas/conferenceId' + name: + $ref: '#/components/schemas/name' + tag: + $ref: '#/components/schemas/tag1' + conferenceRecordingAvailableCallback: + type: object + description: >- + The Conference Recording Available event is sent after a conference + recording has been processed. It indicates that the recording is + available for download. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + conferenceId: + $ref: '#/components/schemas/conferenceId' + name: + $ref: '#/components/schemas/name' + accountId: + $ref: '#/components/schemas/accountId' + recordingId: + $ref: '#/components/schemas/recordingId' + channels: + $ref: '#/components/schemas/channels' + startTime: + $ref: '#/components/schemas/startTime' + endTime: + $ref: '#/components/schemas/endTime' + duration: + $ref: '#/components/schemas/duration' + fileFormat: + $ref: '#/components/schemas/fileFormatEnum' + mediaUrl: + $ref: '#/components/schemas/mediaUrl' + tag: + $ref: '#/components/schemas/tag1' + status: + $ref: '#/components/schemas/status' + disconnectCallback: + type: object + description: The Disconnect event is fired when a call ends, for any reason. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + callId: + $ref: '#/components/schemas/callId' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callUrl: + $ref: '#/components/schemas/callUrl' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + endTime: + $ref: '#/components/schemas/endTime' + cause: + $ref: '#/components/schemas/cause' + errorMessage: + $ref: '#/components/schemas/errorMessage' + errorId: + $ref: '#/components/schemas/errorId' + tag: + $ref: '#/components/schemas/tag1' + dtmfCallback: + type: object + description: >- + The DTMF event is sent for every digit detected after a + verb is executed. You may not respond to this event with BXML. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + callId: + $ref: '#/components/schemas/callId' + direction: + $ref: '#/components/schemas/callDirectionEnum' + digit: + $ref: '#/components/schemas/digit' + callUrl: + $ref: '#/components/schemas/callUrl' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + parentCallId: + $ref: '#/components/schemas/parentCallId' + transferCallerId: + $ref: '#/components/schemas/transferCallerId' + transferTo: + $ref: '#/components/schemas/transferTo' + tag: + $ref: '#/components/schemas/tag1' + gatherCallback: + type: object + description: >- + The gather event is sent after a verb is executed. Its purpose + is to report the gathered digits to the calling application. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + digits: + $ref: '#/components/schemas/digits' + callUrl: + $ref: '#/components/schemas/callUrl' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + parentCallId: + $ref: '#/components/schemas/parentCallId' + terminatingDigit: + $ref: '#/components/schemas/terminatingDigit' + transferCallerId: + $ref: '#/components/schemas/transferCallerId' + transferTo: + $ref: '#/components/schemas/transferTo' + tag: + $ref: '#/components/schemas/tag1' + initiateCallback: + type: object + description: >- + The Initiate event is fired when an inbound call is received for a + Telephone Number on your Account. It is sent to the URL specified in the + application associated with the location (sip-peer) that the called + telephone number belongs to. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + callUrl: + $ref: '#/components/schemas/callUrl' + startTime: + $ref: '#/components/schemas/startTime' + diversion: + $ref: '#/components/schemas/diversion' + stirShaken: + $ref: '#/components/schemas/stirShaken' + uui: + $ref: '#/components/schemas/uui' + machineDetectionCompleteCallback: + type: object + description: >- + This event is sent to the url informed when requesting a machine + detection operation. It contains the machine detection operation result, + which can be: human, answering-machine, silence, timeout, error. This + event is not sent when sync answering machine detection mode is chosen. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + callUrl: + $ref: '#/components/schemas/callUrl' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + tag: + $ref: '#/components/schemas/tag1' + machineDetectionResult: + $ref: '#/components/schemas/machineDetectionResult' + recordingCompleteCallback: + type: object + description: >- + The Record Complete event is sent after a verb has executed if + the call is still active. The BXML returned by this callback is executed + next. When the recording is available for download, a Recording + Available event will be sent. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + callUrl: + $ref: '#/components/schemas/callUrl' + parentCallId: + $ref: '#/components/schemas/parentCallId' + recordingId: + $ref: '#/components/schemas/recordingId' + mediaUrl: + $ref: '#/components/schemas/mediaUrl' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + endTime: + $ref: '#/components/schemas/endTime' + duration: + $ref: '#/components/schemas/duration' + fileFormat: + $ref: '#/components/schemas/fileFormatEnum' + channels: + $ref: '#/components/schemas/channels' + tag: + $ref: '#/components/schemas/tag1' + transferCallerId: + $ref: '#/components/schemas/transferCallerId' + transferTo: + $ref: '#/components/schemas/transferTo' + recordingAvailableCallback: + type: object + description: >- + The Recording Available event is sent after a recording has been + processed. It indicates that the recording is available for download. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + callUrl: + $ref: '#/components/schemas/callUrl' + parentCallId: + $ref: '#/components/schemas/parentCallId' + recordingId: + $ref: '#/components/schemas/recordingId' + mediaUrl: + $ref: '#/components/schemas/mediaUrl' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + endTime: + $ref: '#/components/schemas/endTime' + duration: + $ref: '#/components/schemas/duration' + fileFormat: + $ref: '#/components/schemas/fileFormatEnum' + channels: + $ref: '#/components/schemas/channels' + tag: + $ref: '#/components/schemas/tag1' + status: + $ref: '#/components/schemas/status' + transferCallerId: + $ref: '#/components/schemas/transferCallerId' + transferTo: + $ref: '#/components/schemas/transferTo' + redirectCallback: + type: object + description: >- + The Redirect event is fired when a verb is executed. Its + purpose is to get the next set of verbs from the calling application. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + callUrl: + $ref: '#/components/schemas/callUrl' + parentCallId: + $ref: '#/components/schemas/parentCallId' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + tag: + $ref: '#/components/schemas/tag1' + transferCallerId: + $ref: '#/components/schemas/transferCallerId' + transferTo: + $ref: '#/components/schemas/transferTo' + transcriptionAvailableCallback: + type: object + description: >- + The Transcription Available event is sent when the recording + transcription is available to be downloaded. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + callUrl: + $ref: '#/components/schemas/callUrl' + mediaUrl: + $ref: '#/components/schemas/mediaUrl' + parentCallId: + $ref: '#/components/schemas/parentCallId' + recordingId: + $ref: '#/components/schemas/recordingId' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + endTime: + $ref: '#/components/schemas/endTime' + duration: + $ref: '#/components/schemas/duration' + fileFormat: + $ref: '#/components/schemas/fileFormatEnum' + tag: + $ref: '#/components/schemas/tag1' + transcription: + $ref: '#/components/schemas/transcription' + transferCallerId: + $ref: '#/components/schemas/transferCallerId' + transferTo: + $ref: '#/components/schemas/transferTo' + transferAnswerCallback: + type: object + description: >- + When processing a verb, this event is sent when a called + party (B-leg) answers. The event is sent to the endpoint specified in + the transferAnswerUrl attribute of the tag that answered. + BXML returned by this callback will be executed for the called party + only. After all BXML has been executed, the called party will be bridged + to the original call. Most BXML verbs are allowed in response to a + transferAnswer event, but some are not allowed. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + callUrl: + $ref: '#/components/schemas/callUrl' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + tag: + $ref: '#/components/schemas/tag1' + transferCallerId: + $ref: '#/components/schemas/transferCallerId' + transferTo: + $ref: '#/components/schemas/transferTo' + transferCompleteCallback: + type: object + description: >- + This event is sent to the transferCompleteUrl of the A-leg's + verb when the transferred call (B-leg) completes. In a simultaneous + ringing scenario, only one B-leg succeeds and this event corresponds to + that successful leg. If none of the calls were answered, the + transferComplete event corresponds to one of the legs. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + callUrl: + $ref: '#/components/schemas/callUrl' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + tag: + $ref: '#/components/schemas/tag1' + transferCallerId: + $ref: '#/components/schemas/transferCallerId' + transferTo: + $ref: '#/components/schemas/transferTo' + cause: + $ref: '#/components/schemas/cause' + errorMessage: + $ref: '#/components/schemas/errorMessage' + errorId: + $ref: '#/components/schemas/errorId' + transferDisconnectCallback: + type: object + description: >- + This event is sent to the transferDisconnectUrl of each + tag when its respective call leg ends for any reason. The event is sent + in the normal case, when the transferred leg is answered and later hung + up, but is also sent if the new leg was never answered in the first + place, if it was rejected, and if the original call leg hung up before + the transferred leg. + properties: + eventType: + $ref: '#/components/schemas/eventType' + eventTime: + $ref: '#/components/schemas/eventTime' + accountId: + $ref: '#/components/schemas/accountId' + applicationId: + $ref: '#/components/schemas/applicationId1' + from: + $ref: '#/components/schemas/from' + to: + $ref: '#/components/schemas/to' + direction: + $ref: '#/components/schemas/callDirectionEnum' + callId: + $ref: '#/components/schemas/callId' + callUrl: + $ref: '#/components/schemas/callUrl' + parentCallId: + $ref: '#/components/schemas/parentCallId' + enqueuedTime: + $ref: '#/components/schemas/enqueuedTime' + startTime: + $ref: '#/components/schemas/startTime' + answerTime: + $ref: '#/components/schemas/answerTime' + endTime: + $ref: '#/components/schemas/endTime' + tag: + $ref: '#/components/schemas/tag1' + transferCallerId: + $ref: '#/components/schemas/transferCallerId' + transferTo: + $ref: '#/components/schemas/transferTo' + cause: + $ref: '#/components/schemas/cause' + errorMessage: + $ref: '#/components/schemas/errorMessage' + errorId: + $ref: '#/components/schemas/errorId' + eventType: + type: string + description: >- + The event type, value can be one of the following: answer, + bridgeComplete, bridgeTargetComplete, conferenceCreated, + conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, + conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, + gather, initiate, machineDetectionComplete, recordingComplete, + recordingAvailable, redirect, transcriptionAvailable, transferAnswer, + transferComplete, transferDisconnect. + example: bridgeComplete + eventTime: + type: string + format: date-time + description: >- + The approximate UTC date and time when the event was generated by the + Bandwidth server, in ISO 8601 format. This may not be exactly the time + of event execution. + example: '2022-06-17T22:19:40.375Z' + accountId: + type: string + description: The user account associated with the call. + example: '9900000' + applicationId1: + type: string + description: The id of the application associated with the call. + example: 04e88489-df02-4e34-a0ee-27a91849555f + to: + type: string + description: >- + The phone number that received the call, in E.164 format (e.g. + +15555555555). + example: '+15555555555' + from: + type: string + description: >- + The provided identifier of the caller. Must be a phone number in E.164 + format (e.g. +15555555555). + example: '+15555555555' + conferenceId: + type: string + description: The unique, Bandwidth-generated ID of the conference that was recorded + example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 + name: + type: string + description: The user-specified name of the conference that was recorded + example: my-conference-name + recordingId: + type: string + description: The unique ID of this recording + example: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833 + duration: + type: string + description: The duration of the recording in ISO-8601 format + example: PT13.67S + channels: + type: integer + format: int32 + description: >- + Always `1` for conference recordings; multi-channel recordings are not + supported on conferences. + example: 1 + digit: + type: string + description: The digit collected in the call. + example: '2' + digits: + type: string + description: >- + (optional) The digits, letters, and/or symbols entered by the user. The + string is empty if a timeout occurred before any buttons were pressed. + example: '123' + terminatingDigit: + type: string + description: >- + (optional) The digit the user pressed to end the gather. Empty string + value if no terminating digit was pressed. + example: '#' + startTime: + type: string + format: date-time + description: Time the call was started, in ISO 8601 format. + example: '2022-06-17T22:19:40.375Z' + enqueuedTime: + type: string + format: date-time + description: >- + (optional) If call queueing is enabled and this is an outbound call, + time the call was queued, in ISO 8601 format. + example: '2022-06-17T22:20:00.000Z' + nullable: true + answerTime: + type: string + format: date-time + description: Time the call was answered, in ISO 8601 format. + example: '2022-06-17T22:20:00.000Z' + nullable: true + endTime: + type: string + format: date-time + description: The time that the recording ended in ISO-8601 format + example: '2022-06-17T22:20:00.000Z' + status: + type: string + description: >- + The current status of the process. For recording, current possible + values are 'processing', 'partial', 'complete', 'deleted', and 'error'. + For transcriptions, current possible values are 'none', 'processing', + 'available', 'error', 'timeout', 'file-size-too-big', and + 'file-size-too-small'. Additional states may be added in the future, so + your application must be tolerant of unknown values. + example: completed + transferCallerId: + type: string + description: >- + The phone number used as the from field of the B-leg call, in E.164 + format (e.g. +15555555555). + example: '+15555555555' + transferTo: + type: string + description: >- + The phone number used as the to field of the B-leg call, in E.164 format + (e.g. +15555555555). + example: '+15555555555' + mediaUrl: + nullable: true + type: string + format: uri + description: >- + The URL that can be used to download the recording. Only present if the + recording is finished and may be downloaded. + example: >- + https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9/recordings/r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833/media + callId: + type: string + description: The call id associated with the event. + example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + recordingName: + type: string + description: A name to identify this recording. + example: my-recording-name + callUrl: + type: string + format: uri + description: The URL of the call associated with the event. + example: >- + https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + parentCallId: + type: string + description: >- + (optional) If the event is related to the B leg of a , the + call id of the original call leg that executed the . + Otherwise, this field will not be present. + example: c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d + tag1: + type: string + description: >- + (optional) The tag specified on call creation. If no tag was specified + or it was previously cleared, this field will not be present. + example: exampleTag + nullable: true + cause: + type: string + description: >- + Reason the call failed - hangup, busy, timeout, cancel, rejected, + callback-error, invalid-bxml, application-error, account-limit, + node-capacity-exceeded, error, or unknown. + example: busy + errorMessage: + type: string + description: >- + Text explaining the reason that caused the call to fail in case of + errors. + example: >- + Call c-2a913f94-6a486f3a-3cae-4034-bcc3-f0c9fa77ca2f is already bridged + with another call + nullable: true + errorId: + type: string + description: Bandwidth's internal id that references the error event. + example: 4642074b-7b58-478b-96e4-3a60955c6765 + nullable: true + machineDetectionResult: + type: object + description: >- + (optional) if machine detection was requested in sync mode, the result + will be specified here. Possible values are the same as the async + counterpart: Machine Detection Complete + properties: + value: + type: string + description: >- + Possible values are answering-machine, human, silence, timeout, or + error. + example: answering-machine + duration: + type: string + description: The amount of time it took to determine the result. + example: PT4.9891287S + nullable: true + diversion: + type: object + properties: + reason: + type: string + description: >- + The reason for the diversion. Common values: unknown, user-busy, + no-answer, unavailable, unconditional, time-of-day, do-not-disturb, + deflection, follow-me, out-of-service, away. + example: unavailable + privacy: + type: string + description: off or full + example: 'off' + screen: + type: string + description: >- + No if the number was provided by the user, yes if the number was + provided by the network + example: 'no' + counter: + type: string + description: The number of diversions that have occurred + example: '2' + limit: + type: string + description: The maximum number of diversions allowed for this session + example: '3' + unknown: + type: string + description: >- + The normal list of values is not exhaustive. Your application must + be tolerant of unlisted keys and unlisted values of those keys. + example: unknownValue + origTo: + type: string + description: >- + Always present. Indicates the last telephone number that the call + was diverted from. + example: '+15558884444' + transcription: + type: object + properties: + speaker: + type: integer + description: Zero-based index identifying the speaker. + example: 0 + text: + type: string + description: The transcribed text + example: Nice talking to you, friend! + confidence: + type: number + format: double + description: >- + The confidence on the recognized content, ranging from `0.0` to + `1.0` with `1.0` being the highest confidence. + example: 0.9 + stirShaken: + type: object + properties: + verstat: + type: string + description: >- + (optional) The verification status indicating whether the + verification was successful or not. Possible values are + TN-Validation-Passed and TN-Validation-Failed. + example: Tn-Validation-Passed + attestationIndicator: + type: string + description: >- + (optional) The attestation level verified by Bandwidth. Possible + values are A (full), B (partial) or C (gateway). + example: A + originatingId: + type: string + description: (optional) A unique origination identifier. + example: 99759086-1335-11ed-9bcf-5f7d464e91af + uui: + type: string + description: >- + The value of the `User-To-User` header to send within the initial + `INVITE`. Must include the encoding parameter as specified in RFC 7433. + Only `base64`, `jwt` and `hex` encoding are currently allowed. This + value, including the encoding specifier, may not exceed 256 characters. + example: bXktdXVp + maxLength: 256 + codeRequest: + type: object + properties: + to: + type: string + description: The phone number to send the mfa code to. + pattern: ^\+[1-9]\d{1,14}$ + example: '+19195551234' + from: + type: string + description: The application phone number, the sender of the mfa code. + pattern: ^\+[1-9]\d{1,14}$ + maxLength: 32 + example: '+19195554321' + applicationId: + type: string + description: The application unique ID, obtained from Bandwidth. + maxLength: 50 + example: 66fd98ae-ac8d-a00f-7fcd-ba3280aeb9b1 + scope: + type: string + description: >- + An optional field to denote what scope or action the mfa code is + addressing. If not supplied, defaults to "2FA". + maxLength: 25 + example: 2FA + message: + type: string + description: >- + The message format of the mfa code. There are three values that the + system will replace "{CODE}", "{NAME}", "{SCOPE}". The "{SCOPE}" + and "{NAME} value template are optional, while "{CODE}" must be + supplied. As the name would suggest, code will be replace with the + actual mfa code. Name is replaced with the application name, + configured during provisioning of mfa. The scope value is the same + value sent during the call and partitioned by the server. + maxLength: 2048 + example: Your temporary {NAME} {SCOPE} code is {CODE} + digits: + type: integer + description: >- + The number of digits for your mfa code. The valid number ranges + from 2 to 8, inclusively. + minimum: 4 + maximum: 8 + example: 6 + required: + - to + - from + - applicationId + - message + - digits + voiceCodeResponse: + type: object + properties: + callId: + type: string + description: Programmable Voice API Call ID. + example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + messagingCodeResponse: + type: object + properties: + messageId: + type: string + description: Messaging API Message ID. + example: 1589228074636lm4k2je7j7jklbn2 + verifyCodeRequest: + type: object + properties: + to: + type: string + description: The phone number to send the mfa code to. + pattern: ^\+[1-9]\d{1,14}$ + example: '+19195551234' + scope: + type: string + description: >- + An optional field to denote what scope or action the mfa code is + addressing. If not supplied, defaults to "2FA". + example: 2FA + expirationTimeInMinutes: + type: number + description: >- + The time period, in minutes, to validate the mfa code. By setting + this to 3 minutes, it will mean any code generated within the last 3 + minutes are still valid. The valid range for expiration time is + between 0 and 15 minutes, exclusively and inclusively, respectively. + minimum: 1 + maximum: 15 + example: 3 + code: + type: string + description: The generated mfa code to check if valid. + minLength: 4 + maxLength: 8 + example: '123456' + required: + - to + - expirationTimeInMinutes + - code + verifyCodeResponse: + type: object + properties: + valid: + type: boolean + description: Whether or not the supplied code is valid. + example: true + mfaRequestError: + type: object + properties: + error: + type: string + description: A message describing the error with your request. + example: 400 Request is malformed or invalid + requestId: + type: string + description: The associated requestId from AWS. + example: 354cc8a3-6701-461e-8fa7-8671703dd898 + mfaUnauthorizedRequestError: + type: object + properties: + message: + type: string + description: Unauthorized + example: Unauthorized + mfaForbiddenRequestError: + type: object + properties: + message: + type: string + description: >- + The message containing the reason behind the request being + forbidden. + example: Missing Authentication Token + completedLookupStatusEnum: + type: string + enum: + - COMPLETE + - PARTIAL_COMPLETE + - FAILED + example: COMPLETE + inProgressLookupStatusEnum: + type: string + enum: + - IN_PROGRESS + - COMPLETE + - PARTIAL_COMPLETE + - FAILED + example: COMPLETE + deactivationEventEnum: + type: string + description: > + [DNI-Only](#section/DNI-Only). + + `DEACTIVATED` if the carrier reported a deactivation event for this + phone number. + enum: + - DEACTIVATED + latestMessageDeliveryStatusEnum: + type: string + description: >- + [DNI-Only](#section/DNI-Only). The current delivery status of the phone + number. + + - ACTIVE: A message was successfully sent to the number (delivery code + 0). + + - DEACTIVATED: A message was not delivered to a number (delivery code + 720) + + - UNKNOWN: Bandwidth cannot find an delivery status entry for the + number. + + - NOT_ENABLED: The phone number is not enabled for messaging, so there + is no delivery status information. + enum: + - ACTIVE + - DEACTIVATED + - UNKNOWN + - NOT_ENABLED + lineTypeEnum: + type: string + enum: + - FIXED + - VOIP-FIXED + - MOBILE + - VOIP + example: MOBILE + requestId: + type: string + format: uuid + description: The phone number lookup request ID from Bandwidth. + example: 004223a0-8b17-41b1-bf81-20732adf5590 + linkSchema: + title: Link + type: object + properties: + href: + type: string + description: URI of the link. + example: /relative/uri + rel: + type: string + description: Specifies the relationship between this link and the resource. + example: aRelatedResource + method: + type: string + description: HTTP method to be used. + example: GET + lookupErrorSchema: + type: object + required: + - code + - type + - description + properties: + code: + type: string + description: Validation error code + example: NO-MATCH + description: + type: string + description: Description of validation error + example: Example error description + type: + type: string + description: Type of validation error + example: NumberInventory + meta: + type: object + properties: + phoneNumbers: + type: array + items: + type: string + description: Phone number experiencing the error. + example: + - '+13992077164' + - '+19196104424' + message: + type: string + description: Message describing the error + example: Invalid TNs + code: + type: integer + description: Error code associated with the message + example: 1001 + syncLookupRequest: + type: object + properties: + phoneNumbers: + description: Telephone numbers in E.164 format. + type: array + minimum: 1 + maximum: 100 + items: + type: string + pattern: ^\+[1-9]\d{1,14}$ + rcsAgent: + type: string + description: >- + Override the default RCS sender/agent ID used when checking RCS + capabilities. + + When provided, this value is used as the `sender` in the RCS + capability-check request instead of the account default. + + Must be 1–40 characters and contain only letters, digits, + underscores, or hyphens. + pattern: ^[A-Za-z0-9_-]{1,40}$ + example: MyCustomRcsAgent + required: + - phoneNumbers + asyncLookupRequest: + type: object + properties: + phoneNumbers: + description: Telephone numbers in E.164 format. + type: array + minimum: 1 + maximum: 15000 + items: + type: string + pattern: ^\+[1-9]\d{1,14}$ + required: + - phoneNumbers + createSyncLookupResponse: + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/linkSchema' + example: [] + data: + type: object + description: The phone number lookup response data + properties: + requestId: + $ref: '#/components/schemas/requestId' + status: + $ref: '#/components/schemas/completedLookupStatusEnum' + results: + type: array + description: >- + The carrier information results for the specified telephone + numbers. + items: + $ref: '#/components/schemas/lookupResult' + errors: + type: array + items: + $ref: '#/components/schemas/lookupErrorSchema' + createAsyncBulkLookupResponse: + type: object + properties: + links: + type: array + description: Links for pagination (if applicable) + items: + $ref: '#/components/schemas/linkSchema' + data: + type: object + description: The phone number lookup response data + properties: + requestId: + $ref: '#/components/schemas/requestId' + status: + $ref: '#/components/schemas/inProgressLookupStatusEnum' + errors: + type: array + items: + $ref: '#/components/schemas/lookupErrorSchema' + getAsyncBulkLookupResponse: + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/linkSchema' + example: [] + data: + type: object + description: The phone number lookup response data + properties: + requestId: + $ref: '#/components/schemas/requestId' + status: + $ref: '#/components/schemas/inProgressLookupStatusEnum' + results: + type: array + description: >- + The carrier information results for the specified telephone + number. + items: + $ref: '#/components/schemas/lookupResult' + errors: + type: array + items: + $ref: '#/components/schemas/lookupErrorSchema' + lookupErrorResponse: + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/linkSchema' + example: [] + data: + type: object + description: The phone number lookup response data + errors: + type: array + items: + $ref: '#/components/schemas/lookupErrorSchema' + rcsErrorEnum: + type: string + description: >- + [RCS-Only](#section/RCS-Only). Error encountered during RCS capability + lookup. Appears as the `code` field in the top-level `errors` array. + + + **RCS service pass-through codes:** + + - `REQUEST_FAILED`: The RCS service returned this error code. + + - `UNKNOWN_CODE`: The RCS service returned this error code. + + - `INVALID_DESTINATION_ADDRESS`: The RCS service returned this error + code. + + - `UNKNOWN_STATUS: `: The RCS service returned an unrecognized + status code, where `` is the raw value. + + + **Service-level errors:** + + - `MISSING_FROM_RESPONSE`: The phone number was absent from the RCS + service response. + + - `RCS_SERVICE_UNAVAILABLE`: An exception was thrown during the async + RCS service call. + + - `RCS_SERVICE_DISABLED`: RCS lookup is disabled in configuration. + + - `EMPTY_RESPONSE`: The RCS service returned a null or empty response + body. + example: RCS_SERVICE_UNAVAILABLE + lookupResult: + type: object + description: Carrier information results for the specified telephone number. + properties: + phoneNumber: + type: string + description: The telephone number in E.164 format. + example: '+10072904498' + lineType: + $ref: '#/components/schemas/lineTypeEnum' + messagingProvider: + type: string + description: The messaging service provider of the telephone number. + example: Verizon Wireless + voiceProvider: + type: string + description: The voice service provider of the telephone number. + example: Verizon Wireless + countryCodeA3: + type: string + description: >- + The country code of the telephone number in ISO 3166-1 alpha-3 + format. + example: USA + deactivationReporter: + type: string + description: > + [DNI-Only](#section/DNI-Only). + + The carrier that reported a deactivation event for this phone + number. + deactivationDate: + type: string + format: date-time-local + description: >- + [DNI-Only](#section/DNI-Only). The datetime the carrier reported a + deactivation event. + example: 2025-06-20 18:35 + deactivationEvent: + $ref: '#/components/schemas/deactivationEventEnum' + latestMessageDeliveryStatus: + $ref: '#/components/schemas/latestMessageDeliveryStatusEnum' + initialMessageDeliveryStatusDate: + type: string + format: date + description: >- + [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. + example: '2025-06-20' + latestMessageDeliveryStatusDate: + type: string + format: date + description: >- + [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. + example: '2025-06-21' + rcsEnabled: + type: boolean + description: > + [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. + example: true + accountId1: + type: string + description: User's account ID. + example: '1234567' + tfPhoneNumber: + type: string + description: Toll-free telephone number in E.164 format. + minLength: 12 + maxLength: 12 + nullable: false + pattern: ^\+1(800|833|844|855|866|877|888)[2-9]\d{6}$ + example: '+18005555555' + tfvWebhookErrors: + type: array + description: Details of the errors that were encountered when processing the request. + items: + type: string + example: 'optInWorkflowImageURLs: Entries must be a valid array of objects.' + tfvCallbackStatusEnum: + type: string + enum: + - VERIFIED + - UNVERIFIED + example: VERIFIED + tfvUnverifiedStatus: + type: string + default: UNVERIFIED + example: UNVERIFIED + declineReasonDescription: + type: string + description: Explanation for why a verification request was declined. + nullable: false + example: >- + Invalid Information - Can't Validate URL - Website is not accessible / + not available + denialStatusCode: + description: Reason code for denial. + type: integer + example: 511 + denialStatusCodeNullable: + description: Reason code for denial. + nullable: true + type: integer + example: 511 + resubmitAllowed: + description: >- + Whether a Toll-Free Verification request qualifies for resubmission via + PUT. + example: true + type: boolean + additionalDenialReason: + type: object + properties: + statusCode: + $ref: '#/components/schemas/denialStatusCode' + reason: + $ref: '#/components/schemas/declineReasonDescription' + resubmitAllowed: + $ref: '#/components/schemas/resubmitAllowed' + required: + - statusCode + - reason + - resubmitAllowed + blocked: + description: >- + Whether a Toll-Free Verification is blocked. This attribute will only be + defined when the number is blocked. + example: true + type: boolean + blockedReason: + description: >- + The reason why the Toll-Free Verification is blocked. This attribute + will only be defined when the number is blocked. + example: Toll-free number was used to send spam messages + type: string + privacyPolicyUrl: + description: The Toll-Free Verification request privacy policy URL. + maxLength: 500 + example: http://your-company.com/privacyPolicy + type: string + termsAndConditionsUrl: + description: The Toll-Free Verification request terms and conditions policy URL. + maxLength: 500 + example: http://your-company.com/termsAndConditions + type: string + businessDba: + description: The company 'Doing Business As'. + maxLength: 500 + example: Another Company Name Inc. + type: string + businessRegistrationNumber: + type: string + description: > + Government-issued business identifying number. + + + **Note: As of October 19th, 2026 this field will be required when + `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is + provided, `businessRegistrationType` and + `businessRegistrationIssuingCountry` are also required.** + nullable: true + maxLength: 500 + example: 12-3456789 + businessRegistrationTypeEnum: + type: string + description: > + The type of business registration number. + + + **Note: As of October 19th, 2026 this field will be required when + `businessRegistrationNumber` is provided.** + enum: + - EIN + - CBN + - NEQ + - PROVINCIAL_NUMBER + - CRN + - VAT + - ACN + - ABN + - BRN + - SIREN + - SIRET + - NZBN + - UST_IDNR + - CIF + - NIF + - CNPJ + - UID + - OTHER + example: EIN + nullable: true + businessRegistrationIssuingCountry: + type: string + description: >- + The country issuing the business registration in ISO-3166-1 alpha-3 + format. Alpha-2 format is accepted by the API, but alpha-3 is highly + encouraged. + + + **Note: As of October 19th, 2026 this field will be required when + `businessRegistrationNumber` is provided.** + + + | Registration Type | Supported Countries | + + |----------------------|------------------------------------| + + | EIN | USA | + + | CBN | CAN | + + | NEQ | CAN | + + | PROVINCIAL_NUMBER | CAN | + + | CRN | GBR, HKG | + + | VAT | GBR, IRL, BRA, NLD | + + | ACN | AUS | + + | ABN | AUS | + + | BRN | HKG | + + | SIREN | FRA | + + | SIRET | FRA | + + | NZBN | NZL | + + | UST_IDNR | DEU | + + | CIF | ESP | + + | NIF | ESP | + + | CNPJ | BRA | + + | UID | CHE | + + | OTHER | Must Provide Country Code | + example: USA + nullable: true + businessEntityTypeEnum: + type: string + description: > + The type of registered business. + + + **Note: As of October 19th, 2026 submissions using a value other than + `SOLE_PROPRIETOR` must provide a value for `businessRegistrationNumber`, + `businessRegistrationType`, and `businessRegistrationIssuingCountry`. + + Submissions using `SOLE_PROPRIETOR` must _omit_ + `businessRegistrationNumber`, `businessRegistrationType`, and + `businessRegistrationIssuingCountry`. Failure to adhere to these + constraints will result in a 400 Bad Request rejection.** + enum: + - SOLE_PROPRIETOR + - PRIVATE_PROFIT + - PUBLIC_PROFIT + - NON_PROFIT + - GOVERNMENT + example: PRIVATE_PROFIT + nullable: false + helpMessageResponse: + type: string + description: A message that gets sent to users requesting help. + nullable: true + maxLength: 500 + example: Please contact support for assistance. + ageGatedContent: + type: boolean + description: Indicates whether the content is age-gated. + example: false + internalTicketNumber: + type: string + description: >- + Unique identifier (UUID) generated by Bandwidth to assist in tracking + the verification status of a toll-free number - included in all webhook + payloads. + example: acde070d-8c4c-4f0d-9d8a-162843c10333 + internalTicketNumberForWebhook: + type: string + description: >- + Unique identifier (UUID) generated by Bandwidth to assist in tracking + the verification status of a toll-free number. + example: acde070d-8c4c-4f0d-9d8a-162843c10333 + businessContactPhoneNumber: + description: Contact telephone number + type: string + minLength: 1 + maxLength: 500 + nullable: false + example: '+19192654500' + verificationRequest: + type: object + required: + - businessAddress + - businessContact + - messageVolume + - phoneNumbers + - useCase + - useCaseSummary + - productionMessageContent + - optInWorkflow + - businessEntityType + properties: + businessAddress: + $ref: '#/components/schemas/address' + businessContact: + $ref: '#/components/schemas/contact' + messageVolume: + type: integer + description: Estimated monthly volume of messages from the toll-free number. + minimum: 10 + maximum: 10000000 + example: 10000 + phoneNumbers: + type: array + minItems: 1 + maxItems: 10 + items: + $ref: '#/components/schemas/tfPhoneNumber' + useCase: + $ref: '#/components/schemas/useCase' + useCaseSummary: + $ref: '#/components/schemas/useCaseSummary' + productionMessageContent: + $ref: '#/components/schemas/productionMessageContent' + optInWorkflow: + $ref: '#/components/schemas/optInWorkflow' + additionalInformation: + type: string + description: Any additional information. + minLength: 0 + maxLength: 500 + nullable: true + example: Any additional information + isvReseller: + $ref: '#/components/schemas/isvReseller' + privacyPolicyUrl: + $ref: '#/components/schemas/privacyPolicyUrl' + termsAndConditionsUrl: + $ref: '#/components/schemas/termsAndConditionsUrl' + businessDba: + $ref: '#/components/schemas/businessDba' + businessRegistrationNumber: + $ref: '#/components/schemas/businessRegistrationNumber' + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + businessRegistrationIssuingCountry: + $ref: '#/components/schemas/businessRegistrationIssuingCountry' + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + helpMessageResponse: + $ref: '#/components/schemas/helpMessageResponse' + ageGatedContent: + $ref: '#/components/schemas/ageGatedContent' + cvToken: + $ref: '#/components/schemas/cvTokenNullable' + verificationUpdateRequest: + type: object + required: + - businessAddress + - businessContact + - messageVolume + - useCase + - useCaseSummary + - productionMessageContent + - optInWorkflow + properties: + businessAddress: + $ref: '#/components/schemas/address' + businessContact: + $ref: '#/components/schemas/contact' + messageVolume: + type: integer + description: Estimated monthly volume of messages from the toll-free number. + minimum: 10 + maximum: 10000000 + example: 10000 + useCase: + $ref: '#/components/schemas/useCase' + useCaseSummary: + $ref: '#/components/schemas/useCaseSummary' + productionMessageContent: + $ref: '#/components/schemas/productionMessageContent' + optInWorkflow: + $ref: '#/components/schemas/optInWorkflow' + additionalInformation: + $ref: '#/components/schemas/additionalInformation' + isvReseller: + $ref: '#/components/schemas/isvReseller' + privacyPolicyUrl: + $ref: '#/components/schemas/privacyPolicyUrl' + termsAndConditionsUrl: + $ref: '#/components/schemas/termsAndConditionsUrl' + businessDba: + $ref: '#/components/schemas/businessDba' + businessRegistrationNumber: + $ref: '#/components/schemas/businessRegistrationNumber' + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + businessRegistrationIssuingCountry: + $ref: '#/components/schemas/businessRegistrationIssuingCountry' + helpMessageResponse: + $ref: '#/components/schemas/helpMessageResponse' + ageGatedContent: + $ref: '#/components/schemas/ageGatedContent' + cvToken: + $ref: '#/components/schemas/cvTokenNullable' + tfvBasicAuthentication: + type: object + properties: + username: + type: string + maxLength: 100 + example: username + password: + type: string + maxLength: 200 + example: password + required: + - username + - password + webhookSubscriptionRequestSchema: + type: object + properties: + basicAuthentication: + $ref: '#/components/schemas/tfvBasicAuthentication' + callbackUrl: + $ref: '#/components/schemas/webhookUrl' + sharedSecretKey: + $ref: '#/components/schemas/sharedSecretKey' + required: + - callbackUrl + failureWebhook: + type: object + properties: + accountId: + $ref: '#/components/schemas/accountId1' + phoneNumber: + $ref: '#/components/schemas/tfPhoneNumber' + errorCode: + type: string + description: >- + An error code indicating what error was encountered. This code can + be interpreted as an HTTP status code in regards to the error that + was encountered. + example: '400' + errorMessage: + type: string + description: A description of the error that was encountered. + example: cannot process request. + errors: + $ref: '#/components/schemas/tfvWebhookErrors' + internalTicketNumber: + $ref: '#/components/schemas/internalTicketNumberForWebhook' + verificationDenialWebhook: + type: object + properties: + accountId: + $ref: '#/components/schemas/accountId1' + additionalDenialReasons: + description: >- + An optional list of denial reasons in addition to + declineReasonDescription when multiple reasons apply. + type: array + items: + $ref: '#/components/schemas/additionalDenialReason' + example: + - statusCode: 512 + reason: Reason A + resubmitAllowed: true + - statusCode: 513 + reason: Reason B + resubmitAllowed: true + declineReasonDescription: + $ref: '#/components/schemas/declineReasonDescription' + denialStatusCode: + $ref: '#/components/schemas/denialStatusCode' + internalTicketNumber: + $ref: '#/components/schemas/internalTicketNumberForWebhook' + phoneNumber: + $ref: '#/components/schemas/tfPhoneNumber' + resubmitAllowed: + $ref: '#/components/schemas/resubmitAllowed' + status: + $ref: '#/components/schemas/tfvUnverifiedStatus' + blocked: + $ref: '#/components/schemas/blocked' + blockedReason: + $ref: '#/components/schemas/blockedReason' + verificationWebhook: + type: object + properties: + accountId: + $ref: '#/components/schemas/accountId1' + phoneNumber: + $ref: '#/components/schemas/tfPhoneNumber' + status: + $ref: '#/components/schemas/tfvCallbackStatusEnum' + internalTicketNumber: + $ref: '#/components/schemas/internalTicketNumberForWebhook' + blockedWebhook: + type: object + properties: + accountId: + $ref: '#/components/schemas/accountId1' + phoneNumber: + $ref: '#/components/schemas/tfPhoneNumber' + status: + $ref: '#/components/schemas/tfvCallbackStatusEnum' + internalTicketNumber: + $ref: '#/components/schemas/internalTicketNumberForWebhook' + blocked: + $ref: '#/components/schemas/blocked' + blockedReason: + $ref: '#/components/schemas/blockedReason' + tfvSubmissionWrapper: + type: object + properties: + submission: + $ref: '#/components/schemas/verificationUpdateRequest' + address: + type: object + nullable: false + required: + - name + - addr1 + - city + - state + - zip + - url + properties: + name: + type: string + description: The name of the business using the toll-free number. + minLength: 1 + maxLength: 500 + nullable: false + example: Bandwidth Inc. + addr1: + type: string + description: The address of the business using the toll-free number. + minLength: 1 + maxLength: 500 + nullable: false + example: 2230 Bandmate Way + addr2: + type: string + description: The address of the business using the toll-free number. + minLength: 0 + maxLength: 500 + nullable: true + example: 2230 Bandmate Way + city: + type: string + description: The city of the business using the toll-free number. + minLength: 1 + maxLength: 500 + nullable: false + example: Raleigh + state: + type: string + description: The state of the business using the toll-free number. + minLength: 1 + maxLength: 500 + nullable: false + example: NC + zip: + type: string + description: The zip of the business using the toll-free number. + nullable: false + example: '27606' + pattern: '[- A-Za-z0-9]{0,500}' + url: + type: string + format: url + description: The website of the business using the toll-free number. + minLength: 1 + maxLength: 500 + nullable: false + example: https://www.example.com/path/to/resource + additionalInformation: + type: string + description: Any additional information. + minLength: 0 + maxLength: 500 + nullable: true + example: Any additional information + optInWorkflow: + type: object + nullable: false + required: + - description + - imageUrls + properties: + description: + type: string + minLength: 1 + maxLength: 500 + nullable: false + example: Opt In Flow + imageUrls: + type: array + items: + type: string + minLength: 1 + maxLength: 500 + nullable: false + example: https://www.example.com/path/to/resource + pattern: >- + ^$|(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,253}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&//=]*) + confirmationResponse: + type: string + minLength: 0 + maxLength: 500 + nullable: true + example: Thank you for opting in! + isvReseller: + type: string + description: ISV name. + minLength: 0 + maxLength: 500 + nullable: true + example: Test ISV + contact: + type: object + nullable: false + required: + - firstName + - lastName + - email + - phoneNumber + properties: + firstName: + type: string + description: The first name of the business contact using the toll-free number. + minLength: 1 + maxLength: 500 + nullable: false + example: John + lastName: + type: string + description: The last name of the business contact using the toll-free number. + minLength: 1 + maxLength: 500 + nullable: false + example: Doe + email: + $ref: '#/components/schemas/email' + phoneNumber: + $ref: '#/components/schemas/businessContactPhoneNumber' + email: + type: string + format: email + minLength: 0 + maxLength: 500 + nullable: false + pattern: >- + ^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$ + example: foo@bar.com + useCases: + type: array + items: + type: string + example: + - 2FA + - App Notifications + - Appointments + - Auctions + - Auto Repair Services + - Bank Transfers + - Billing + - Booking Confirmations + - Business Updates + - COVID-19 Alerts + useCase: + type: string + description: The category of the use case. + minLength: 0 + maxLength: 500 + example: 2FA + useCaseSummary: + type: string + description: A general idea of the use case and customer. + minLength: 0 + maxLength: 500 + nullable: false + example: Text summarizing the use case for the toll-free number + productionMessageContent: + type: string + description: Example of message content. + minLength: 0 + maxLength: 500 + nullable: false + example: Production message content + webhookSubscriptionsListBody: + description: >- + A list of all webhook subscriptions registered for this account ID for + this particular feature (unpaginated). + type: object + required: + - data + properties: + links: + $ref: '#/components/schemas/linksObject' + errors: + type: array + items: + $ref: '#/components/schemas/webhookSubscriptionError' + data: + items: + $ref: '#/components/schemas/webhookSubscription' + type: array + linksObject: + type: object + properties: + first: + description: The first (or only) page of results matching the query. + type: string + next: + description: >- + If more results exist than specified by 'size', this link returns + the next page of 'size' results. + type: string + previous: + description: >- + If the results are more than one page, this link returns the + previous page of 'size' results. + type: string + last: + description: >- + If more results exist than specified by 'size', this link return the + last page of result. + type: string + webhookSubscriptionError: + type: object + properties: + code: + type: integer + description: + type: string + telephoneNumbers: + type: array + items: + $ref: '#/components/schemas/telephoneNumber' + telephoneNumber: + type: object + properties: + telephoneNumber: + description: Simple Telephone Number. + type: string + webhookSubscriptionTypeEnum: + type: string + enum: + - TOLLFREE_VERIFICATION_STATUS + - MESSAGING_PORTOUT_APPROVAL_STATUS + example: TOLLFREE_VERIFICATION_STATUS + webhookSubscription: + description: >- + Information about a webhook that Bandwidth should send upon the + completion of event customer has subscribed to. + type: object + required: + - callbackUrl + properties: + id: + type: string + example: 7hICGStfAfeGxEq3N0lQwO + accountId: + type: string + example: '1234567' + callbackUrl: + $ref: '#/components/schemas/webhookUrl' + type: + $ref: '#/components/schemas/webhookSubscriptionTypeEnum' + basicAuthentication: + description: >- + Basic authentication credentials are not required, but if present, + both username and password must be provided. + type: object + required: + - username + - password + properties: + username: + type: string + maxLength: 100 + password: + type: string + maxLength: 200 + createdDate: + type: string + format: date-time + example: '2023-05-15T13:56:39.965Z' + modifiedDate: + type: string + format: date-time + example: '2023-05-15T13:56:39.965Z' + webhookUrl: + description: >- + Callback URL to receive status updates from Bandwidth. When a webhook + subscription is registered with Bandwidth under a given account ID, it + will be used to send status updates for all requests submitted under + that account ID. + type: string + format: url + minLength: 0 + maxLength: 2000 + nullable: true + example: https://www.example.com/path/to/resource + pattern: >- + ^$|(https?:\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,253}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&//=]*) + tfvError: + description: A generic error object. + properties: + type: + type: string + example: Error Type + description: + type: string + example: Error Message + errors: + type: object + description: >- + Each key of this errors object refers to a field of the submitted + object (using dot notation for nested objects), with the field being + a key to an array of one or more errors for that field. + example: + field: error message + type: object + tfvStatus: + type: object + properties: + phoneNumber: + $ref: '#/components/schemas/tfPhoneNumber' + status: + $ref: '#/components/schemas/tfvStatusEnum' + internalTicketNumber: + $ref: '#/components/schemas/internalTicketNumber' + declineReasonDescription: + $ref: '#/components/schemas/declineReasonDescription' + denialStatusCode: + $ref: '#/components/schemas/denialStatusCodeNullable' + additionalDenialReasons: + description: >- + An optional list of denial reasons in addition to + declineReasonDescription when multiple reasons apply. + nullable: true + type: array + items: + $ref: '#/components/schemas/additionalDenialReason' + example: + - statusCode: 512 + reason: Reason A + resubmitAllowed: true + - statusCode: 513 + reason: Reason B + resubmitAllowed: true + resubmitAllowed: + $ref: '#/components/schemas/resubmitAllowed' + createdDateTime: + type: string + description: Date and time the verification request was created. + format: date-time + example: '2021-06-08T06:45:13.0Z' + modifiedDateTime: + type: string + description: Date and time the verification request was last modified. + format: date-time + example: '2021-06-08T06:45:13.0Z' + submission: + $ref: '#/components/schemas/tfvSubmissionInfo' + blocked: + $ref: '#/components/schemas/blocked' + blockedReason: + $ref: '#/components/schemas/blockedReason' + cvToken: + $ref: '#/components/schemas/cvTokenNullable' + tfvSubmissionInfo: + type: object + properties: + businessAddress: + $ref: '#/components/schemas/address' + businessContact: + $ref: '#/components/schemas/contact' + messageVolume: + type: integer + description: Estimated monthly volume of messages from the toll-free number. + minimum: 10 + maximum: 10000000 + example: 10000 + useCase: + $ref: '#/components/schemas/useCase' + useCaseSummary: + $ref: '#/components/schemas/useCaseSummary' + productionMessageContent: + $ref: '#/components/schemas/productionMessageContent' + optInWorkflow: + $ref: '#/components/schemas/optInWorkflow' + additionalInformation: + $ref: '#/components/schemas/additionalInformation' + isvReseller: + $ref: '#/components/schemas/isvReseller' + privacyPolicyUrl: + $ref: '#/components/schemas/privacyPolicyUrl' + termsAndConditionsUrl: + $ref: '#/components/schemas/termsAndConditionsUrl' + businessDba: + $ref: '#/components/schemas/businessDba' + businessRegistrationNumber: + $ref: '#/components/schemas/businessRegistrationNumber' + description: Government-issued business identifying number. + businessRegistrationType: + $ref: '#/components/schemas/businessRegistrationTypeEnum' + description: The type of business registration number. + businessRegistrationIssuingCountry: + $ref: '#/components/schemas/businessRegistrationIssuingCountry' + description: >- + The country issuing the business registration in ISO-3166-1 alpha-3 + format. + businessEntityType: + $ref: '#/components/schemas/businessEntityTypeEnum' + description: The type of registered business. + tfvStatusEnum: + type: string + enum: + - VERIFIED + - UNVERIFIED + - PENDING + example: VERIFIED + sharedSecretKey: + description: >- + An ASCII string submitted by the user as a shared secret key for + generating an HMAC header for callbacks. + example: This is my $3cret + maxLength: 64 + minLength: 16 + nullable: true + pattern: ^[ -~]{16,64}$ + type: string + cvTokenNullable: + type: string + description: >- + The token provided by Campaign Verify to validate your political use + case. Only required for 527 political organizations. If you are not a + 527 political organization, this field should be omitted. Supplying an + empty string will likely result in rejection. + minLength: 0 + maxLength: 500 + nullable: true + example: >- + cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw + endpointId: + type: string + description: The unique ID of the endpoint. + example: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + endpointStatusEnum: + type: string + enum: + - CONNECTED + - DISCONNECTED + deviceStatusEnum: + type: string + enum: + - CONNECTED + - DISCONNECTED + endpointTypeEnum: + type: string + enum: + - WEBRTC + endpointDirectionEnum: + type: string + enum: + - INBOUND + - OUTBOUND + - BIDIRECTIONAL + sipCredentials: + type: object + properties: + username: + type: string + description: The username for the SIP connection. + example: username + password: + type: string + description: The password for the SIP connection. + example: password + sipConnectionMetadata: + title: SIP Connection + type: object + properties: + ipAddress: + type: string + format: ipv4 + description: The IP address of the SIP connection. + example: 192.168.0.0 + port: + type: integer + description: The port of the SIP connection. + example: 5060 + credentials: + $ref: '#/components/schemas/sipCredentials' + uuiHeader: + type: string + description: The User-to-User Information header for the SIP connection. + example: my-uui-header + webRtcConnectionMetadata: + title: WebRTC Connection + type: object + endpointToken: + type: string + description: >- + The json web token specific to the endpoint. Used to authenticate the + client with the media gateway. + example: xxxxx.yyyyy.zzzzz + endpointTag: + type: string + description: A tag for the endpoint. + example: my-tag + maximum: 1024 + device: + type: object + properties: + deviceId: + type: string + description: The unique ID of the device. + example: d-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + deviceName: + type: string + description: The name of the device. + maximum: 1024 + example: David's iPhone + status: + $ref: '#/components/schemas/deviceStatusEnum' + creationTimestamp: + type: string + format: date-time + description: The time the device was created. In ISO-8601 format. + example: '2021-01-01T00:00:00Z' + required: + - deviceId + - status + - creationTimestamp + endpoints: + type: object + properties: + endpointId: + $ref: '#/components/schemas/endpointId' + type: + $ref: '#/components/schemas/endpointTypeEnum' + status: + $ref: '#/components/schemas/endpointStatusEnum' + creationTimestamp: + type: string + format: date-time + description: The time the endpoint was created. In ISO-8601 format. + example: '2021-01-01T00:00:00Z' + expirationTimestamp: + type: string + format: date-time + description: >- + The time the endpoint token will expire. In ISO-8601 format. Tokens + last 24 hours. + example: '2021-01-02T00:00:00Z' + tag: + $ref: '#/components/schemas/endpointTag' + required: + - endpointId + - type + - status + - creationTimestamp + - expirationTimestamp + endpoint: + type: object + allOf: + - $ref: '#/components/schemas/endpoints' + - type: object + properties: + devices: + type: array + items: + $ref: '#/components/schemas/device' + createWebRtcConnectionRequest: + allOf: + - $ref: '#/components/schemas/createEndpointRequestBase' + - type: object + properties: + connectionMetadata: + $ref: '#/components/schemas/webRtcConnectionMetadata' + createEndpointRequestBase: + type: object + properties: + type: + $ref: '#/components/schemas/endpointTypeEnum' + direction: + $ref: '#/components/schemas/endpointDirectionEnum' + eventCallbackUrl: + type: string + format: uri + description: The URL to send event callbacks to. + example: https://myapp.com/callback + eventFallbackUrl: + type: string + format: uri + description: The URL to send event fallbacks to. + example: https://fallback.myapp.com/callback + tag: + $ref: '#/components/schemas/endpointTag' + required: + - type + - direction + createEndpointRequest: + oneOf: + - $ref: '#/components/schemas/createWebRtcConnectionRequest' + discriminator: + propertyName: type + mapping: + WEBRTC: '#/components/schemas/createWebRtcConnectionRequest' + createEndpointResponseData: + allOf: + - $ref: '#/components/schemas/endpoint' + - type: object + properties: + token: + $ref: '#/components/schemas/endpointToken' + required: + - token + endpointEventTypeEnum: + type: string + enum: + - DEVICE_CONNECTED + - DEVICE_DISCONNECTED + endpointEvent: + description: An event that occurred on an endpoint. + allOf: + - $ref: '#/components/schemas/endpoints' + - type: object + properties: + eventTime: + type: string + format: date-time + description: The time the event occurred. In ISO-8601 format. + example: '2021-01-01T00:00:00Z' + eventType: + $ref: '#/components/schemas/endpointEventTypeEnum' + device: + $ref: '#/components/schemas/device' + required: + - eventType + - eventTime + 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: + pageSize: + type: integer + description: The number of items per page. + minimum: 0 + example: 10 + totalElements: + type: integer + description: The total number of items. + minimum: 0 + example: 100 + totalPages: + type: integer + description: The total number of pages. + minimum: 0 + example: 10 + pageNumber: + type: integer + description: The current page number. + minimum: 0 + example: 0 + required: + - pageSize + 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/brtcLink' + page: + $ref: '#/components/schemas/page' + data: + type: array + items: + $ref: '#/components/schemas/endpoints' + errors: + type: array + items: + $ref: '#/components/schemas/brtcError' + required: + - links + - data + - errors + endpointResponse: + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/brtcLink' + data: + $ref: '#/components/schemas/endpoint' + errors: + type: array + items: + $ref: '#/components/schemas/brtcError' + required: + - links + - data + - errors + createEndpointResponse: + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/brtcLink' + data: + $ref: '#/components/schemas/createEndpointResponseData' + errors: + type: array + items: + $ref: '#/components/schemas/brtcError' + required: + - links + - data + - errors + brtcErrorResponse: + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/brtcLink' + data: + type: object + nullable: true + additionalProperties: false + errors: + type: array + items: + $ref: '#/components/schemas/brtcError' + required: + - links + - data + - errors + responses: + createMessageResponse: + description: Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/message' + createMultiChannelMessageResponse: + description: Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/createMultiChannelMessageResponse' + listMessagesResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/messagesList' + getMediaResponse: + description: OK + content: + application/octet-stream: + schema: + type: string + description: Successful Operation + format: binary + listMediaResponse: + description: OK + headers: + Continuation-Token: + description: Continuation token used to retrieve subsequent media. + schema: + type: string + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/media' + messagingBadRequestError: + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + messagingNotAcceptableError: + description: Not Acceptable + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + createMessageBadRequestError: + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/createMessageRequestError' + messagingUnauthorizedError: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + messagingForbiddenError: + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + messagingNotFoundError: + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + messagingMethodNotAllowedError: + description: Method Not Allowed + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + messagingInvalidMediaTypeError: + description: Unsupported Media Type + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + messagingTooManyRequestsError: + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + messagingInternalServerError: + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + multiChannelBadRequestError: + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: request-validation + description: >- + The 'channelList[0].from' field must contain exactly one + telephone number + source: + field: channelList[0].from + multiChannelNotAcceptableError: + description: Not Acceptable + multiChannelUnauthorizedError: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: unauthorized + description: Authentication Failed + source: {} + multiChannelForbiddenError: + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: forbidden + description: Access Denied + source: {} + multiChannelNotFoundError: + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: forbidden + description: Resource not found. + source: {} + multiChannelMethodNotAllowedError: + description: Method Not Allowed + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: method-not-allowed + description: Method 'PUT' not supported for this resource. + source: {} + multiChannelInvalidMediaTypeError: + description: Unsupported Media Type + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: unsupported-content-type + description: >- + Content-Type 'application/xml;charset=UTF-8' is not supported. + Please use 'application/json' + source: + header: Content-Type + multiChannelTooManyRequestsError: + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: rate-limit-exceeded + description: >- + You have exceeded your rate limit for this endpoint. Please + retry later. + source: {} + multiChannelInternalServerError: + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: internal-server-error + description: Internal server error. No further information available + source: {} + listMessagesTooManyRequestsError: + description: Too Many Requests + headers: + Retry-After: + description: The number of seconds to wait before retrying the request. + schema: + type: integer + example: 300 + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + example: + type: rate_limit_exceeded + description: >- + Rate limit exceeded. Wait for Retry-After time before sending + another request. + createCallResponse: + description: Created + headers: + Location: + description: The URL for further interactions with this call + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/createCallResponse' + examples: + createCall Response: + $ref: '#/components/examples/createCallResponseExample' + getCallStateResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/callState' + updateCallResponse: + description: OK + listCallsResponse: + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/callState' + getStatisticsResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/accountStatistics' + updateRecordingResponse: + description: OK + listCallRecordingsResponse: + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/callRecordingMetadata' + getCallRecordingResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/callRecordingMetadata' + downloadRecordingMediaResponse: + description: OK + content: + audio/vnd.wave: + schema: + type: string + format: binary + audio/mpeg: + schema: + type: string + format: binary + getRecordingTranscriptionResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/recordingTranscriptions' + listTranscriptionsResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/callTranscriptionMetadataList' + getCallTranscriptionResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/callTranscriptionResponse' + deleteCallTranscriptionResponse: + description: No Content + listConferencesResponse: + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/conference' + examples: + listConferences Response: + $ref: '#/components/examples/listConferencesResponseExample' + getConferenceResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/conference' + getConferenceMemberResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/conferenceMember' + listConferenceRecordingsResponse: + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/conferenceRecordingMetadata' + getConferenceRecordingResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/conferenceRecordingMetadata' + voiceBadRequestError: + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/voiceApiError' + examples: + badRequestErrorExample: + $ref: '#/components/examples/voiceBadRequestErrorExample' + voiceUnauthorizedError: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/voiceApiError' + examples: + unauthorizedErrorExample: + $ref: '#/components/examples/voiceUnauthorizedErrorExample' + voiceForbiddenError: + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/voiceApiError' + examples: + forbiddenErrorExample: + $ref: '#/components/examples/voiceForbiddenErrorExample' + voiceNotFoundError: + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/voiceApiError' + examples: + notFoundErrorExample: + $ref: '#/components/examples/voiceNotFoundErrorExample' + voiceNotAllowedError: + description: Method Not Allowed + content: + application/json: + schema: + $ref: '#/components/schemas/voiceApiError' + examples: + notAllowedErrorExample: + $ref: '#/components/examples/voiceNotAllowedErrorExample' + voiceConflictError: + description: Conflict + content: + application/json: + schema: + $ref: '#/components/schemas/voiceApiError' + examples: + conflictErrorExample: + $ref: '#/components/examples/voiceConflictErrorExample' + voiceUnsupportedMediaTypeError: + description: Unsupported Media Type + content: + application/json: + schema: + $ref: '#/components/schemas/voiceApiError' + examples: + tooManyRequestsErrorExample: + $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + voiceTooManyRequestsError: + description: Too Many Requests + headers: + Retry-After: + description: When you should try your request again. + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/voiceApiError' + examples: + tooManyRequestsErrorExample: + $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + voiceInternalServerError: + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/voiceApiError' + examples: + internalServerErrorExample: + $ref: '#/components/examples/voiceInternalServerErrorExample' + voiceCodeResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/voiceCodeResponse' + messagingCodeResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/messagingCodeResponse' + verifyCodeResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/verifyCodeResponse' + mfaBadRequestError: + description: Bad Request + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/mfaRequestError' + mfaUnauthorizedError: + description: Unauthorized + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/mfaUnauthorizedRequestError' + mfaForbiddenError: + description: Forbidden + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/mfaForbiddenRequestError' + mfaTooManyRequestsError: + description: Too Many Requests + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/mfaRequestError' + mfaInternalServerError: + description: Internal Server Error + headers: {} + content: + application/json: + schema: + $ref: '#/components/schemas/mfaRequestError' + createSyncLookupResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/createSyncLookupResponse' + examples: + lookupCompleteWithDniExample: + $ref: '#/components/examples/lookupCompleteWithDniExample' + lookupCompleteExample: + $ref: '#/components/examples/lookupCompleteExample' + lookupCompleteWithRcsExample: + $ref: '#/components/examples/lookupCompleteWithRcsExample' + lookupCompleteWithRcsErrorExample: + $ref: '#/components/examples/lookupCompleteWithRcsErrorExample' + lookupPartialExample: + $ref: '#/components/examples/lookupPartialExample' + lookupFailedExample: + $ref: '#/components/examples/lookupFailedExample' + createAsyncBulkLookupResponse: + description: Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/createAsyncBulkLookupResponse' + examples: + lookupAcceptedExample: + $ref: '#/components/examples/lookupAcceptedExample' + getAsyncBulkLookupResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/getAsyncBulkLookupResponse' + examples: + lookupCompleteWithDniExample: + $ref: '#/components/examples/lookupCompleteWithDniExample' + lookupCompleteExample: + $ref: '#/components/examples/lookupCompleteExample' + lookupInProgressExample: + $ref: '#/components/examples/lookupInProgressExample' + lookupPartialExample: + $ref: '#/components/examples/lookupPartialExample' + lookupFailedExample: + $ref: '#/components/examples/lookupFailedExample' + tnLookupDefaultResponse: + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/lookupErrorResponse' + examples: + badRequest: + $ref: '#/components/examples/badRequestExample' + unauthorized: + $ref: '#/components/examples/unauthorizedExample' + forbidden: + $ref: '#/components/examples/forbiddenExample' + mediaType: + $ref: '#/components/examples/unsupportedMediaTypeExample' + notFound: + $ref: '#/components/examples/notFoundExample' + tooManyRequests: + $ref: '#/components/examples/tooManyRequestsExample' + internalServer: + $ref: '#/components/examples/internalServerErrorExample' + getTollFreeVerificationStatusResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/tfvStatus' + listWebhookSubscriptionsResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/webhookSubscriptionsListBody' + createWebhookSubscriptionResponse: + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/webhookSubscription' + updateWebhookSubscriptionResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/webhookSubscription' + listTollFreeUseCasesResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/useCases' + tfvBadRequestResponse: + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/tfvError' + example: + description: Cannot process request. + type: bad request + noContentResponse: + description: No Content + tfvPostBadRequestResponse: + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/tfvError' + example: + description: cannot process request. + errors: + businessName: Business name is required. + businessContactEmail: Business contact email is not a valid email address. + optInWorkflowImageURLs: Entries must be a valid array of objects. + tfvUnauthorizedResponse: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/tfvError' + example: + description: Client is providing incorrect or invalid credentials. + type: unauthorized + tfvForbiddenResponse: + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/tfvError' + example: + description: Client is not authorized for the action. + type: forbidden + tfvNotFoundResponse: + description: Cannot find the requested resource. + content: + application/json: + schema: + $ref: '#/components/schemas/tfvError' + example: + description: Cannot find the requested resource. + type: Not Found + tfvNotAllowedResponse: + description: Method Not Allowed + content: + application/json: + schema: + $ref: '#/components/schemas/tfvError' + example: + description: Method is not allowed. + type: Method Not Allowed + tfvTooManyRequestsResponse: + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/tfvError' + example: + description: Throttling error. Too many requests. + type: Too Many Requests + tfvServerErrorResponse: + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/tfvError' + example: + description: Internal Server Error. + type: Internal Server Error + tfvServiceUnavailableResponse: + description: Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/tfvError' + example: + description: Service Unavailable Error. + type: Service Unavailable + verifyPutResponse: + description: Accepted + listEndpointsResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/listEndpointsResponse' + examples: + listEndpointsResponseExample: + $ref: '#/components/examples/listEndpointsResponseExample' + createEndpointResponse: + description: Created + content: + application/json: + schema: + $ref: '#/components/schemas/createEndpointResponse' + examples: + createEndpointResponseExample: + $ref: '#/components/examples/createEndpointResponseExample' + getEndpointResponse: + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/endpointResponse' + examples: + getEndpointResponseExample: + $ref: '#/components/examples/getEndpointResponseExample' + badRequestErrorResponse: + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/brtcErrorResponse' + examples: + badRequestErrorExample: + $ref: '#/components/examples/badRequestErrorExample' + unauthorizedErrorResponse: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/brtcErrorResponse' + examples: + unauthorizedErrorExample: + $ref: '#/components/examples/unauthorizedErrorExample' + forbiddenErrorResponse: + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/brtcErrorResponse' + examples: + forbiddenErrorExample: + $ref: '#/components/examples/forbiddenErrorExample' + notFoundErrorResponse: + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/brtcErrorResponse' + examples: + notFoundErrorExample: + $ref: '#/components/examples/notFoundErrorExample' + methodNotAllowedErrorResponse: + description: Method Not Allowed + content: + application/json: + schema: + $ref: '#/components/schemas/brtcErrorResponse' + examples: + methodNotAllowedErrorExample: + $ref: '#/components/examples/methodNotAllowedErrorExample' + unsupportedMediaTypeErrorResponse: + description: Unsupported Media Type + content: + application/json: + schema: + $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/brtcErrorResponse' + examples: + tooManyRequestsErrorExample: + $ref: '#/components/examples/tooManyRequestsErrorExample' + serviceUnavailableErrorResponse: + description: Service Unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/brtcErrorResponse' + examples: + serviceUnavailableErrorExample: + $ref: '#/components/examples/serviceUnavailableErrorExample' + parameters: + accountId: + in: path + name: accountId + required: true + schema: + type: string + description: Your Bandwidth Account ID. + example: '9900000' + mediaId: + in: path + name: mediaId + required: true + description: Media ID to retrieve. + example: 14762070468292kw2fuqty55yp2b2/0/bw.png + schema: + type: string + contentType: + in: header + name: Content-Type + style: simple + explode: false + description: The media type of the entity-body. + example: audio/wav + schema: + type: string + cacheControl: + in: header + name: Cache-Control + style: simple + explode: false + description: >- + General-header field is used to specify directives that MUST be obeyed + by all caching mechanisms along the request/response chain. + example: no-cache + schema: + type: string + continuationToken: + in: header + name: Continuation-Token + description: Continuation token used to retrieve subsequent media. + example: >- + 1XEi2tsFtLo1JbtLwETnM1ZJ+PqAa8w6ENvC5QKvwyrCDYII663Gy5M4s40owR1tjkuWUif6qbWvFtQJR5/ipqbUnfAqL254LKNlPy6tATCzioKSuHuOqgzloDkSwRtX0LtcL2otHS69hK343m+SjdL+vlj71tT39 + schema: + type: string + messageId: + in: query + name: messageId + required: false + description: >- + The ID of the message to search for. Special characters need to be + encoded using URL encoding. Message IDs could come in different formats, + e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and + 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that + you must include at least one query parameter. + example: 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 + schema: + type: string + sourceTn: + in: query + name: sourceTn + required: false + description: >- + The phone number that sent the message. Accepted values are: a single + full phone number a comma separated list of full phone numbers (maximum + of 10) or a single partial phone number (minimum of 5 characters e.g. + '%2B1919'). + example: '%2B15554443333' + schema: + type: string + destinationTn: + in: query + name: destinationTn + required: false + description: >- + The phone number that received the message. Accepted values are: a + single full phone number a comma separated list of full phone numbers + (maximum of 10) or a single partial phone number (minimum of 5 + characters e.g. '%2B1919'). + example: '%2B15554443333' + schema: + type: string + messageStatus: + in: query + name: messageStatus + required: false + description: >- + The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED + DELIVERED ACCEPTED UNDELIVERED. + schema: + $ref: '#/components/schemas/messageStatusEnum' + messageDirection: + in: query + name: messageDirection + required: false + description: The direction of the message. One of INBOUND OUTBOUND. + schema: + $ref: '#/components/schemas/listMessageDirectionEnum' + carrierName: + in: query + name: carrierName + required: false + description: >- + The name of the carrier used for this message. Possible values include + but are not limited to Verizon and TMobile. Special characters need to + be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). + example: Verizon + schema: + type: string + messageType: + in: query + name: messageType + required: false + description: The type of message. Either sms or mms. + schema: + $ref: '#/components/schemas/messageTypeEnum' + errorCode: + in: query + name: errorCode + required: false + description: The error code of the message. + example: 9902 + schema: + type: integer + fromDateTime: + in: query + name: fromDateTime + required: false + description: >- + The start of the date range to search in ISO 8601 format. Uses the + message receive time. The date range to search in is currently 14 days. + example: 2022-09-14T18:20:16.000Z + schema: + type: string + toDateTime: + in: query + name: toDateTime + required: false + description: >- + The end of the date range to search in ISO 8601 format. Uses the message + receive time. The date range to search in is currently 14 days. + example: 2022-09-14T18:20:16.000Z + schema: + type: string + campaignId: + in: query + name: campaignId + required: false + description: The campaign ID of the message. + example: CJEUMDK + schema: + type: string + fromBwLatency: + in: query + name: fromBwLatency + required: false + description: >- + The minimum Bandwidth latency of the message in seconds. Only available + for accounts with the Advanced Quality Metrics feature enabled. + example: 5 + schema: + type: integer + bwQueued: + in: query + name: bwQueued + required: false + description: >- + A boolean value indicating whether the message is queued in the + Bandwidth network. + example: true + schema: + type: boolean + product: + in: query + name: product + required: false + description: Messaging product associated with the message. + example: P2P + schema: + $ref: '#/components/schemas/productTypeEnum' + location: + in: query + name: location + required: false + description: Location Id associated with the message. + example: 123ABC + schema: + type: string + carrierQueued: + in: query + name: carrierQueued + required: false + description: >- + A boolean value indicating whether the message is queued in the carrier + network. Only available for OUTBOUND messages from accounts with the + Advanced Quality Metrics feature enabled. + example: true + schema: + type: boolean + fromCarrierLatency: + in: query + name: fromCarrierLatency + required: false + description: >- + The minimum carrier latency of the message in seconds. Only available + for OUTBOUND messages from accounts with the Advanced Quality Metrics + feature enabled. + example: 50 + schema: + type: integer + callingNumberCountryA3: + in: query + name: callingNumberCountryA3 + required: false + description: Calling number country in A3 format. + example: USA + schema: + type: string + calledNumberCountryA3: + in: query + name: calledNumberCountryA3 + required: false + description: Called number country in A3 format. + example: USA + schema: + type: string + fromSegmentCount: + in: query + name: fromSegmentCount + required: false + description: Segment count (start range). + example: 1 + schema: + type: integer + toSegmentCount: + in: query + name: toSegmentCount + required: false + description: Segment count (end range). + example: 3 + schema: + type: integer + fromMessageSize: + in: query + name: fromMessageSize + required: false + description: Message size (start range). + example: 100 + schema: + type: integer + toMessageSize: + in: query + name: toMessageSize + required: false + description: Message size (end range). + example: 120 + schema: + type: integer + sort: + in: query + name: sort + required: false + description: >- + The field and direction to sort by combined with a colon. Direction is + either asc or desc. + example: sourceTn:desc + schema: + type: string + pageToken: + in: query + name: pageToken + required: false + description: A base64 encoded value used for pagination of results. + example: gdEewhcJLQRB5 + schema: + type: string + limit: + in: query + name: limit + required: false + description: >- + The maximum records requested in search result. Default 100. The sum of + limit and after cannot be more than 10000. + schema: + type: integer + example: 50 + limitTotalCount: + in: query + name: limitTotalCount + required: false + description: >- + When set to true, the response's totalCount field will have a maximum + value of 10,000. When set to false, or excluded, this will give an + accurate totalCount of all messages that match the provided filters. If + you are experiencing latency, try using this parameter to limit your + results. + example: true + schema: + type: boolean + callId: + name: callId + in: path + required: true + schema: + type: string + description: Programmable Voice API Call ID. + example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + recordingId: + name: recordingId + in: path + required: true + schema: + type: string + description: Programmable Voice API Recording ID. + example: r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + conferenceId: + name: conferenceId + in: path + required: true + schema: + type: string + description: Programmable Voice API Conference ID. + example: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 + memberId: + name: memberId + in: path + required: true + schema: + type: string + description: Programmable Voice API Conference Member ID. + example: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + transcriptionId: + name: transcriptionId + in: path + required: true + schema: + type: string + description: Programmable Voice API Transcription ID. + example: t-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + to: + name: to + in: query + required: false + schema: + type: string + description: Filter results by the `to` field. + example: '%2b19195551234' + from: + name: from + in: query + required: false + schema: + type: string + description: Filter results by the `from` field. + example: '%2b19195554321' + name: + name: name + in: query + required: false + schema: + type: string + description: Filter results by the `name` field. + example: my-custom-name + minCreatedTime: + name: minCreatedTime + in: query + required: false + schema: + type: string + description: >- + Filter results to conferences which have a `createdTime` after or at + `minCreatedTime` (in ISO8601 format). + example: '2022-06-21T19:13:21Z' + maxCreatedTime: + name: maxCreatedTime + in: query + required: false + schema: + type: string + description: >- + Filter results to conferences which have a `createdTime` before or at + `maxCreatedTime` (in ISO8601 format). + example: '2022-06-21T19:13:21Z' + minStartTime: + name: minStartTime + in: query + required: false + schema: + type: string + description: >- + Filter results to recordings which have a `startTime` after or including + `minStartTime` (in ISO8601 format). + example: '2022-06-21T19:13:21Z' + maxStartTime: + name: maxStartTime + in: query + required: false + schema: + type: string + description: >- + Filter results to recordings which have a `startTime` before + `maxStartTime` (in ISO8601 format). + example: '2022-06-21T19:13:21Z' + pageSize: + name: pageSize + in: query + required: false + schema: + type: integer + format: int32 + minimum: 1 + maximum: 1000 + default: 1000 + description: Specifies the max number of conferences that will be returned. + example: 500 + minStartTimeCalls: + name: minStartTime + in: query + required: false + schema: + type: string + description: >- + Filter results to calls which have a `startTime` after or including + `minStartTime` (in ISO8601 format). + example: '2022-06-21T19:13:21Z' + maxStartTimeCalls: + name: maxStartTime + in: query + required: false + schema: + type: string + description: >- + Filter results to calls which have a `startTime` before or including + `maxStartTime` (in ISO8601 format). + example: '2022-06-21T19:13:21Z' + pageSizeCalls: + name: pageSize + in: query + required: false + schema: + type: integer + format: int32 + minimum: 1 + maximum: 10000 + default: 1000 + description: Specifies the max number of calls that will be returned. + example: 500 + pageToken1: + name: pageToken + in: query + required: false + schema: + type: string + description: >- + Not intended for explicit use. To use pagination, follow the links in + the `Link` header of the response, as indicated in the endpoint + description. + example: eyJwYWdlVG9rZW4iOiJ0b2tlbiJ9 + disconnectCause: + name: disconnectCause + in: query + required: false + schema: + type: string + description: Filter results to calls with specified call Disconnect Cause. + example: hangup + accountId1: + in: path + name: accountId + required: true + schema: + type: string + description: Your Bandwidth Account ID. + example: '9900000' + requestId: + in: path + name: requestId + required: true + schema: + type: string + format: uuid + description: The phone number lookup request ID from Bandwidth. + example: 004223a0-8b17-41b1-bf81-20732adf5590 + tfPhoneNumberPathParam: + in: path + name: phoneNumber + required: true + schema: + $ref: '#/components/schemas/tfPhoneNumber' + description: Valid Toll-Free telephone number in E.164 format. + example: '+18885555555' + webhookSubscriptionIdPathParam: + in: path + name: id + required: true + schema: + type: string + description: Webhook subscription ID + example: 7bt57JcsVYJrN9K1OcV1Nu + endpointId: + name: endpointId + in: path + required: true + schema: + type: string + example: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + description: BRTC Endpoint ID. + endpointType: + name: type + in: query + schema: + $ref: '#/components/schemas/endpointTypeEnum' + description: The type of endpoint. + endpointStatus: + name: status + in: query + schema: + $ref: '#/components/schemas/endpointStatusEnum' + description: The status of the endpoint. + afterCursor: + name: afterCursor + in: query + schema: + type: string + example: TWF5IHRoZSBmb3JjZSBiZSB3aXRoIHlvdQ== + description: >- + The cursor to use for pagination. This is the value of the `next` link + in the previous response. + limit1: + name: limit + in: query + schema: + type: integer + minimum: 1 + maximum: 1000 + default: 100 + example: 2 + description: The maximum number of endpoints to return in the response. + examples: + smsMessageReceivedCallbackExample: + summary: An example of a sms message-received callback body. + value: + time: '2025-01-06T15:43:35.502180Z' + type: message-received + to: '+12345678902' + description: Incoming message received + message: + id: 14762070468292kw2fuqty55yp2b2 + owner: '+12345678902' + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + time: '2025-01-06T15:43:34.000000Z' + segmentCount: 1 + direction: in + to: + - '+12345678902' + from: '+12345678901' + text: Hey, check out this SMS! + mmsMessageReceivedCallbackExample: + summary: An example of a mms message-received callback body. + value: + time: '2024-09-14T18:20:45.160744Z' + type: message-received + to: '+12345678902' + description: Incoming message received + message: + id: 14762070468292kw2fuqty55yp2b2 + owner: '+12345678902' + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + time: '2024-09-14T18:20:45.160744Z' + segmentCount: 1 + direction: in + to: + - '+12345678902' + - '+12345678903' + from: '+12345678901' + text: Hey, check out the MMS! + media: + - >- + https://messaging.bandwidth.com/api/v2/users/9900902/media/14762070468292kw2fuqty55yp2b2/0/bw.png + messageSendingCallbackExample: + summary: An example of a message-sending callback body. + value: + time: '2024-06-25T18:42:36.979456Z' + type: message-sending + to: '+15554443333' + description: Message is sending to carrier. + message: + id: 1593110555875xo7watq5px6rbe5d + owner: '+15552221111' + applicationId: cfd4fb83-7531-4acc-b471-42d0bb76a65c + time: '2024-06-25T18:42:35.876906Z' + segmentCount: 1 + direction: out + to: + - '+15554443333' + from: '+15552221111' + text: '' + media: + - https://dev.bandwidth.com/images/bandwidth-logo.png + tag: your tag here + messageSentCallbackExample: + summary: An example of a message-sent callback body. + value: + time: '2024-06-25T18:42:36.979456Z' + type: message-sent + to: '+15554443333' + description: Message sent to carrier + message: + id: 1593110555875xo7watq5px6rbe5d + owner: '+15552221111' + applicationId: cfd4fb83-7531-4acc-b471-42d0bb76a65c + time: '2024-06-25T18:42:35.876906Z' + segmentCount: 1 + direction: out + to: + - '+15554443333' + from: '+15552221111' + text: '' + media: + - https://dev.bandwidth.com/images/bandwidth-logo.png + tag: v2 lab + smsMessageDeliveredCallbackExample: + summary: An example of a sms message-delivered callback body. + value: + type: message-delivered + time: '2024-09-14T18:20:11.160744Z' + description: Message delivered to handset. + to: '+12345678902' + message: + id: 14762070468292kw2fuqty55yp2b2 + time: '2024-09-14T18:20:11.160744Z' + to: + - '+12345678902' + from: '+12345678901' + text: '' + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + owner: '+12345678902' + direction: out + segmentCount: 1 + mmsMessageDeliveredCallbackExample: + summary: An example of a mms message-delivered callback body. + value: + type: message-delivered + time: '2024-09-14T18:20:24.160544Z' + description: Message delivered to handset. + to: '+12345678902' + message: + id: 14762070468292kw2fuqty55yp2b2 + time: '2024-09-14T18:20:24.160544Z' + to: + - '+12345678902' + from: '+12345678901' + text: '' + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + owner: '+12345678902' + direction: out + segmentCount: 1 + media: + - https://dev.bandwidth.com/images/bandwidth-logo.png + groupMmsMessageDeliveredCallbackExample: + summary: An example of a group mms message-delivered callback body. + value: + type: message-delivered + time: '2024-09-14T18:20:17.160544Z' + description: Message delivered to handset. + to: '+12345678902' + message: + id: 14762070468292kw2fuqty55yp2b2 + time: '2024-09-14T18:20:17.160544Z' + to: + - '+12345678902' + - '+12345678903' + from: '+12345678901' + text: '' + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + owner: '+12345678902' + direction: out + segmentCount: 1 + messageFailedCallbackExample: + summary: An example of a message-failed callback body. + value: + type: message-failed + time: '2024-12-18T16:51:27.704450Z' + description: forbidden to country + to: '+52345678903' + errorCode: 4432 + message: + id: 14762070468292kw2fuqty55yp2b2 + time: '2024-12-18T16:51:27.704450Z' + to: + - '+12345678902' + - '+52345678903' + from: '+12345678901' + text: '' + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + media: + - https://dev.bandwidth.com/images/bandwidth-logo.png + owner: '+12345678901' + direction: out + segmentCount: 1 + createCallResponseExample: + summary: Example of a createCall Response + value: + applicationId: 04e88489-df02-4e34-a0ee-27a91849555f + accountId: '9900000' + callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + to: '+19195551234' + from: '+19195554312' + enqueuedTime: '2022-06-16T13:15:07.160Z' + callUrl: >- + https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + callTimeout: 30 + callbackTimeout: 15 + tag: My custom tag value + answerMethod: POST + answerUrl: https://myServer.example/bandwidth/webhooks/answer + answerFallbackMethod: POST + answerFallbackUrl: https://myServer.example/bandwidth/webhooks/answerFallback + disconnectMethod: POST + disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect + username: mySecretUsername + password: '*****' + fallbackUsername: mySecretUsername + fallbackPassword: '*****' + priority: 5 + listConferencesResponseExample: + summary: Example of a listConferences Response + value: + - id: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 + name: my-conference-name + createdTime: '2022-06-17T22:19:40.375Z' + completedTime: '2022-06-17T22:20:00.000Z' + conferenceEventUrl: https://myServer.example/bandwidth/webhooks/conferenceEvent + conferenceEventMethod: POST + tag: my custom tag + voiceBadRequestErrorExample: + summary: Example of a Bad Request (400) Error + value: + type: validation + description: 'Invalid answerUrl: only http and https are allowed.' + voiceUnauthorizedErrorExample: + summary: Example of an Unauthorized (401) Error + value: + type: validation + description: 'Invalid answerUrl: only http and https are allowed.' + voiceForbiddenErrorExample: + summary: Example of a Forbidden (403) Error + value: + type: validation + description: 'Invalid answerUrl: only http and https are allowed.' + voiceNotFoundErrorExample: + summary: Example of a Not Found (404) Error + value: + type: validation + description: 'Invalid answerUrl: only http and https are allowed.' + voiceNotAllowedErrorExample: + summary: Example of a Not Allowed (405) Error + value: + type: validation + description: 'Invalid answerUrl: only http and https are allowed.' + voiceConflictErrorExample: + summary: Example of a Conflict (409) Error + value: + type: validation + description: 'Invalid answerUrl: only http and https are allowed.' + voiceUnsupportedMediaTypeErrorExample: + summary: Example of an Unsupported Media Type (415) Error + value: + type: validation + description: 'Invalid answerUrl: only http and https are allowed.' + voiceTooManyRequestsErrorExample: + summary: Example of a Too Many Requests (429) Error + value: + type: validation + description: 'Invalid answerUrl: only http and https are allowed.' + voiceInternalServerErrorExample: + summary: Example of an Internal Server (500) Error + value: + type: validation + description: 'Invalid answerUrl: only http and https are allowed.' + singleNumberRequestExample: + summary: Number Lookup Request + value: + phoneNumbers: + - '+19196104423' + multipleNumberRequestExample: + summary: Number Lookup Request for Multiple Numbers + value: + phoneNumbers: + - '+19196104423' + - '+19196104424' + rcsAgentRequestExample: + summary: Number Lookup Request with Custom RCS Agent + value: + phoneNumbers: + - '+19196104423' + - '+19196104424' + rcsAgent: MyCustomRcsAgent + lookupAcceptedExample: + summary: Numbers Lookup Accepted + value: + links: + - href: >- + /accounts/9912345/phoneNumberLookup/bulk/004223a0-8b17-41b1-bf81-20732adf5590 + rel: createdRequest + method: GET + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: IN_PROGRESS + results: [] + errors: [] + lookupInProgressExample: + summary: Numbers Lookup In Progress + value: + links: [] + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: IN_PROGRESS + results: [] + errors: [] + lookupFailedExample: + summary: Numbers Lookup Failed + value: + links: [] + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: FAILED + results: [] + errors: + - code: NO-MATCH + description: The following TNs could not be found in the Number Industry data + meta: + phoneNumbers: + - '+13992077164' + message: Invalid TNs + code: 1001 + type: NumberInventory + lookupPartialExample: + summary: Numbers Lookup Partial Complete + value: + links: [] + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: PARTIAL_COMPLETE + results: + - phoneNumber: '+19196104423' + lineType: MOBILE + messagingProvider: Verizon Wireless + voiceProvider: Verizon Wireless + countryCodeA3: USA + - phoneNumber: '+19196104424' + lineType: MOBILE + messagingProvider: T-Mobile USA + voiceProvider: T-Mobile USA + countryCodeA3: USA + errors: + - code: NO-MATCH + description: The following TNs could not be found in the Number Industry data + meta: + phoneNumbers: + - '+13992077164' + message: Invalid TNs + code: 1001 + type: NumberInventory + lookupCompleteExample: + summary: Numbers Lookup Complete (without DNI) + value: + links: [] + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: COMPLETE + results: + - phoneNumber: '+10072904497' + lineType: MOBILE + messagingProvider: Verizon Wireless + voiceProvider: Verizon Wireless + countryCodeA3: USA + - phoneNumber: '+10072904498' + lineType: MOBILE + messagingProvider: T-Mobile USA + voiceProvider: T-Mobile USA + countryCodeA3: USA + errors: [] + lookupCompleteWithDniExample: + summary: Numbers Lookup Complete (with DNI) + value: + links: [] + data: + requestId: 20732adf-bf81-8b17-41b1-004223a05590 + status: COMPLETE + results: + - phoneNumber: '+10072904497' + countryCodeA3: USA + lineType: MOBILE + messagingProvider: T-MOBILE USA INC + voiceProvider: T-MOBILE USA INC + latestMessageDeliveryStatus: ACTIVE + initialMessageDeliveryStatusDate: '2025-05-14' + latestMessageDeliveryStatusDate: '2025-05-18' + - phoneNumber: '+10072904498' + countryCodeA3: USA + lineType: MOBILE + voiceProvider: VERIZON + latestMessageDeliveryStatus: DEACTIVATED + initialMessageDeliveryStatusDate: '2025-09-05' + latestMessageDeliveryStatusDate: '2025-09-05' + - phoneNumber: '+10072904499' + lineType: MOBILE + countryCodeA3: USA + messagingProvider: VERIZON + voiceProvider: VERIZON + deactivationReporter: Verizon Wireless + deactivationDate: '2025-09-29 01:23:00' + deactivationEvent: DEACTIVATED + latestMessageDeliveryStatus: UNKNOWN + - phoneNumber: '+10072904500' + lineType: FIXED + countryCodeA3: USA + voiceProvider: VERIZON + deactivationReporter: Verizon Wireless + deactivationDate: '2025-09-29 01:23:00' + deactivationEvent: DEACTIVATED + latestMessageDeliveryStatus: NOT_ENABLED + errors: [] + lookupCompleteWithRcsExample: + summary: Numbers Lookup Complete (with RCS) + value: + links: [] + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: COMPLETE + results: + - phoneNumber: '+10072904497' + lineType: MOBILE + messagingProvider: Verizon Wireless + voiceProvider: Verizon Wireless + countryCodeA3: USA + rcsEnabled: true + - phoneNumber: '+10072904498' + lineType: MOBILE + messagingProvider: T-Mobile USA + voiceProvider: T-Mobile USA + countryCodeA3: USA + rcsEnabled: false + errors: [] + lookupCompleteWithRcsErrorExample: + summary: Numbers Lookup Complete (with RCS error) + value: + links: [] + data: + requestId: 004223a0-8b17-41b1-bf81-20732adf5590 + status: COMPLETE + results: + - phoneNumber: '+10072904497' + lineType: MOBILE + messagingProvider: Verizon Wireless + voiceProvider: Verizon Wireless + countryCodeA3: USA + - phoneNumber: '+10072904498' + lineType: MOBILE + messagingProvider: T-Mobile USA + voiceProvider: T-Mobile USA + countryCodeA3: USA + errors: + - code: RCS_SERVICE_UNAVAILABLE + type: rcs-error + description: An exception was thrown during the async RCS service call. + meta: + phoneNumbers: + - '+10072904497' + - code: MISSING_FROM_RESPONSE + type: rcs-error + description: The phone number was absent from the RCS service response. + meta: + phoneNumbers: + - '+10072904498' + badRequestExample: + summary: Example Bad Request Error + value: + links: [] + data: {} + errors: + - type: bad-request + description: >- + Bad Request. Ensure that you have set the requestId as a URL path + parameter. + unauthorizedExample: + summary: Unauthorized Error + value: + links: [] + data: {} + errors: + - type: Unauthorized + description: You are not authorized to access this resource. + code: '1' + page: null + forbiddenExample: + summary: Forbidden Error + value: + links: [] + data: {} + errors: + - type: Forbidden + description: You do not have permission to access this resource. + code: '2' + page: null + unsupportedMediaTypeExample: + summary: Unsupported Media Type Error + value: + links: [] + data: {} + errors: + - type: invalid-content-type + description: >- + Invalid content-type. Ensure that your content-type header is set + to application/json. + notFoundExample: + summary: Not Found Error + value: + links: [] + data: {} + errors: + - type: not-found + description: >- + RequestId not found. Ensure that the requestId used in the URL + path is valid and maps to a previous request that was submitted. + tooManyRequestsExample: + summary: Too Many Requests Error + value: + links: [] + data: {} + errors: + - type: rate-limiting + description: >- + Rate limit exceeded. Wait for the time specified in the + Retry-After header before sending another request. + internalServerErrorExample: + summary: Internal Server Error + value: + links: [] + data: {} + errors: + - code: '500' + type: unexpected-error + description: >- + Unexpected error. Please contact Bandwidth Support if your + requests are receiving this status code for an extended period of + time. + listEndpointsResponseExample: + summary: List Endpoints Paginated Response + value: + links: + - href: >- + https://api.bandwidth.com/v2/accounts/5500123/endpoints?type=SIP&status=CONNECTED&limit=2 + rel: self + method: GET + - href: >- + https://api.bandwidth.com/v2/accounts/5500123/endpoints?type=SIP&status=CONNECTED&limit=2&afterCursor=TWF5IHRoZSBmb3JjZSBiZSB3aXRoIHlvdQ== + rel: next + method: GET + page: + pageSize: 2 + totalElements: 10 + totalPages: 5 + pageNumber: 0 + data: + - endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + type: WEBRTC + status: CONNECTED + creationTimestamp: '2021-01-01T00:00:00Z' + expirationTimestamp: '2021-01-02T00:00:00Z' + tag: my-tag + - endpointId: e-2cb0-4a07-b215-b22865662d85-15ac29a2-1331029c + type: WEBRTC + status: CONNECTED + creationTimestamp: '2021-01-01T00:00:00Z' + expirationTimestamp: '2021-01-02T00:00:00Z' + tag: my-tag + errors: [] + createEndpointResponseExample: + summary: Create Endpoint Response + value: + links: + - href: >- + https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + rel: endpoint + method: GET + data: + endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + token: xxxxx.yyyyy.zzzzz + type: WEBRTC + status: CONNECTED + creationTimestamp: '2021-01-01T00:00:00Z' + expirationTimestamp: '2021-01-02T00:00:00Z' + devices: [] + tag: my-tag + errors: [] + getEndpointResponseExample: + summary: Get Endpoint Response + value: + links: + - href: >- + https://api.bandwidth.com/v2/accounts/5500123/endpoints/e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + rel: self + method: GET + data: + endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + type: WEBRTC + status: CONNECTED + creationTimestamp: '2021-01-01T00:00:00Z' + expirationTimestamp: '2021-01-02T00:00:00Z' + devices: [] + tag: my-tag + errors: [] + createSipEndpointRequestExample: + summary: SIP Endpoint Example + value: + type: SIP + connectionMetadata: + ipAddress: 0.0.0.0 + port: 3000 + credentials: + username: username + password: '********' + uuiHeader: 123456;encoding=jwt + direction: INBOUND + eventCallbackUrl: https://myEventCallbackUrl.com/callbacks/bandwidth + eventFallbackUrl: https://fallback.myEventCallbackUrl.com/callbacks/bandwidth + tag: '{"myTag": "myTagValue"}' + createWeRtcEndpointExample: + summary: WebRTC Endpoint Example + value: + type: WEBRTC + direction: BIDIRECTIONAL + eventCallbackUrl: https://myEventCallbackUrl.com/callbacks/bandwidth + eventFallbackUrl: https://fallback.myEventCallbackUrl.com/callbacks/bandwidth + tag: '{"myTag": "myTagValue"}' + updateEndpointBxmlRequestExample: + summary: Update Endpoint BXML Request Example + value: + endpointDisconnectedEventExample: + summary: Endpoint Disconnected Event + value: + endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + type: WEBRTC + status: DISCONNECTED + creationTimestamp: '2021-01-01T00:00:00Z' + expirationTimestamp: '2021-01-02T00:00:00Z' + eventTime: '2021-01-01T00:00:00Z' + eventType: DEVICE_DISCONNECTED + tag: my-tag + badRequestErrorExample: + summary: Bad Request Error Example + value: + links: [] + data: null + errors: + - id: 59512d87-7a92-4040-8e4a-78fb772019b9 + type: invalid_parameter + description: accountId must not contain any characters other than numbers. + code: '400' + source: + parameter: accountId + unauthorizedErrorExample: + summary: Unauthorized Error Example + value: + links: [] + data: null + errors: + - id: 59512d87-7a92-4040-8e4a-78fb772019b9 + type: unauthorized + description: >- + The provided credentials are not authorized to access this + resource. + code: '401' + source: + header: Authorization + forbiddenErrorExample: + summary: Forbidden Error Example + value: + links: [] + data: null + errors: + - id: 59512d87-7a92-4040-8e4a-78fb772019b9 + type: forbidden + description: >- + The provided credentials are not authorized to access this + resource. + code: '403' + source: + header: Authorization + notFoundErrorExample: + summary: Not Found Error Example + value: + links: [] + data: null + errors: + - id: 59512d87-7a92-4040-8e4a-78fb772019b9 + type: resource_not_found + description: The requested resource was not found. + code: '404' + source: + reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 + methodNotAllowedErrorExample: + summary: Method Not Allowed Error Example + value: + links: [] + data: null + errors: + - id: 59512d87-7a92-4040-8e4a-78fb772019b9 + type: method_not_allowed + description: The requested method is not allowed on this resource. + code: '405' + source: + parameter: accountId + unsupportedMediaTypeErrorExample: + summary: Unsupported Media Type Error Example + value: + links: [] + data: null + errors: + - id: 59512d87-7a92-4040-8e4a-78fb772019b9 + type: unsupported_media_type + description: The provided media type is not supported. + code: '415' + source: + header: Content-Type + tooManyRequestsErrorExample: + summary: Too Many Requests Error Example + value: + links: [] + data: null + errors: + - type: too_many_endpoints + description: >- + Too many endpoints. Please delete an existing endpoint or wait 24 + hours for an endpoint to be removed. + serviceUnavailableErrorExample: + summary: Service Unavailable Error Example + value: + links: [] + data: null + errors: + - id: 59512d87-7a92-4040-8e4a-78fb772019b9 + type: service_unavailable + description: The service is currently unavailable. + code: '500' + requestBodies: + createMessageRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/messageRequest' + required: true + createMultiChannelMessageRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelMessageRequest' + required: true + uploadMediaRequest: + content: + application/json: + schema: + type: string + format: binary + application/ogg: + schema: + type: string + format: binary + application/pdf: + schema: + type: string + format: binary + application/rtf: + schema: + type: string + format: binary + application/zip: + schema: + type: string + format: binary + application/x-tar: + schema: + type: string + format: binary + application/xml: + schema: + type: string + format: binary + application/gzip: + schema: + type: string + format: binary + application/x-bzip2: + schema: + type: string + format: binary + application/x-gzip: + schema: + type: string + format: binary + application/smil: + schema: + type: string + format: binary + application/javascript: + schema: + type: string + format: binary + audio/mp4: + schema: + type: string + format: binary + audio/mpeg: + schema: + type: string + format: binary + audio/ogg: + schema: + type: string + format: binary + audio/flac: + schema: + type: string + format: binary + audio/webm: + schema: + type: string + format: binary + audio/wav: + schema: + type: string + format: binary + audio/amr: + schema: + type: string + format: binary + audio/3gpp: + schema: + type: string + format: binary + image/bmp: + schema: + type: string + format: binary + image/gif: + schema: + type: string + format: binary + image/heic: + schema: + type: string + format: binary + image/heif: + schema: + type: string + format: binary + image/jpeg: + schema: + type: string + format: binary + image/pjpeg: + schema: + type: string + format: binary + image/png: + schema: + type: string + format: binary + image/svg+xml: + schema: + type: string + format: binary + image/tiff: + schema: + type: string + format: binary + image/webp: + schema: + type: string + format: binary + image/x-icon: + schema: + type: string + format: binary + text/css: + schema: + type: string + format: binary + text/csv: + schema: + type: string + format: binary + text/calendar: + schema: + type: string + format: binary + text/html: + schema: + type: string + format: binary + text/plain: + schema: + type: string + format: binary + text/javascript: + schema: + type: string + format: binary + text/vcard: + schema: + type: string + format: binary + text/vnd.wap.wml: + schema: + type: string + format: binary + text/xml: + schema: + type: string + format: binary + video/avi: + schema: + type: string + format: binary + video/mp4: + schema: + type: string + format: binary + video/mpeg: + schema: + type: string + format: binary + video/ogg: + schema: + type: string + format: binary + video/quicktime: + schema: + type: string + format: binary + video/webm: + schema: + type: string + format: binary + video/x-ms-wmv: + schema: + type: string + format: binary + video/x-flv: + schema: + type: string + format: binary + required: true + createCallRequest: + description: JSON object containing information to create an outbound call + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/createCall' + updateCallRequest: + description: >- + JSON object containing information to redirect an existing call to a new + BXML document + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/updateCall' + updateCallBxmlRequest: + required: true + content: + application/xml: + schema: + type: string + description: A valid BXML document to replace the call's current BXML. + examples: + speakSentence: + summary: Speak Sentence + value: |- + + + This is a test sentence. + + redirectUrl: + summary: Redirect + value: |- + + + + + updateCallRecordingRequest: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/updateCallRecording' + transcribeRecordingRequest: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/transcribeRecording' + updateConferenceRequest: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/updateConference' + updateConferenceBxmlRequest: + required: true + content: + application/xml: + schema: + type: string + description: A valid BXML document to replace the call's current BXML. + examples: + stopRecording: + summary: Stop Recording + value: |- + + + + + updateConferenceMemberRequest: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/updateConferenceMember' + codeRequest: + description: MFA code request body. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/codeRequest' + codeVerify: + description: MFA code verify request body. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/verifyCodeRequest' + createSyncLookupRequest: + description: Synchronous phone number lookup request. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/syncLookupRequest' + examples: + singleNumberRequestExample: + $ref: '#/components/examples/singleNumberRequestExample' + multipleNumberRequestExample: + $ref: '#/components/examples/multipleNumberRequestExample' + rcsAgentRequestExample: + $ref: '#/components/examples/rcsAgentRequestExample' + createAsyncBulkLookupRequest: + description: Asynchronous bulk phone number lookup request. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/asyncLookupRequest' + examples: + multipleNumberRequestExample: + $ref: '#/components/examples/multipleNumberRequestExample' + requestTollFreeVerificationRequest: + description: Request for verification of a toll-free phone number. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/verificationRequest' + updateTollFreeVerificationRequestRequest: + description: Update a request for verification of a toll-free phone number. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/tfvSubmissionWrapper' + verificationWebhookRequest: + description: Verification callback status of a toll-free phone number. + required: true + content: + application/json: + schema: + oneOf: + - $ref: '#/components/schemas/verificationWebhook' + - $ref: '#/components/schemas/verificationDenialWebhook' + - $ref: '#/components/schemas/failureWebhook' + - $ref: '#/components/schemas/blockedWebhook' + webhookSubscriptionRequest: + description: >- + Information about a webhook that Bandwidth should send upon the + completion of event customer is trying to subscribe to. + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/webhookSubscriptionRequestSchema' + createEndpointRequest: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/createEndpointRequest' + examples: + createWebRtcEndpointRequestExample: + $ref: '#/components/examples/createWeRtcEndpointExample' + updateEndpointBxmlRequest: + required: true + content: + application/xml: + schema: + type: string + description: >- + The BXML document to update the endpoint with. This BXML document + will be executed against the endpoint when it is updated. + + For more information, please refer to our [BXML + documentation](/docs/voice/bxml/). + examples: + updateEndpointBxmlRequestExample: + $ref: '#/components/examples/updateEndpointBxmlRequestExample' + securitySchemes: + Basic: + type: http + scheme: basic + description: >- + Basic authentication is a simple authentication scheme built into the + HTTP protocol. To use it, send your HTTP requests with an + `Authorization` header that contains the word `Basic` followed by a + space and a Base64-encoded string `username:password`. + + + - Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==` + OAuth2: + type: oauth2 + flows: + clientCredentials: + tokenUrl: https://api.bandwidth.com/api/v1/oauth2/token + scopes: {} + callbacks: + inboundCallback: + '{inboundCallbackUrl}': + post: + requestBody: + required: true + description: >- +

This Inbound Message Webhook is an envelope containing either a + received (MO) message to your + + message-enabled Bandwidth telephone number or a multichannel + client's response to a suggestion response + + or location request. + +

The payload type will be one of message-received, + suggestion-response, or + requested-location-response. + +

Note that suggestion-response and + requested-location-response callback types are + pertinent only for RBM messages sent from the + /messages/multiChannel endpoint. + +

Please visit Webhooks

+ content: + application/json: + schema: + $ref: '#/components/schemas/inboundCallback' + examples: + smsMessageReceivedCallback: + $ref: '#/components/examples/smsMessageReceivedCallbackExample' + mmsMessageReceivedCallback: + $ref: '#/components/examples/mmsMessageReceivedCallbackExample' + responses: + '200': + description: OK + '202': + description: Accepted + statusCallback: + '{statusCallbackUrl}': + post: + requestBody: + required: true + description: >- +

This Outbound Message Webhook is an envelope containing status + information regarding a message sent (MT) + + from your message-enabled Bandwidth telephone number. +

The payload type will be one of message-sending, message-sent, message-delivered, message-failed or message-read. +

Note that message-read callbacks are pertinent only for RBM messages sent from the /messages/multiChannel endpoint. +

Please visit Webhooks

+ content: + application/json: + schema: + $ref: '#/components/schemas/statusCallback' + examples: + messageSendingCallback: + $ref: '#/components/examples/messageSendingCallbackExample' + messageSentCallback: + $ref: '#/components/examples/messageSentCallbackExample' + smsMessageDeliveredCallback: + $ref: '#/components/examples/smsMessageDeliveredCallbackExample' + mmsMessageDeliveredCallback: + $ref: '#/components/examples/mmsMessageDeliveredCallbackExample' + groupMmsMessageDeliveredCallback: + $ref: >- + #/components/examples/groupMmsMessageDeliveredCallbackExample + messageFailedCallback: + $ref: '#/components/examples/messageFailedCallbackExample' + responses: + '200': + description: OK + '202': + description: Accepted + tfVerificationStatus: + your_url.com/webhookService: + post: + summary: TFV status updates sent to customer's webhook URL. + description: >- + Unique webhook URL provided by customers to which Bandwidth sends a + POST request to notify customer regarding TFV status updates. + operationId: tfvRequest + parameters: + - description: >- + 64-character lowercase hexidecimal HMAC calculated with a shared + secret key, the canonicalized request body, and SHA256. It is + only included when a shared secret key is set through webhook + subscription. + example: ca7b9e9816c90d336f5dca529e733354b81535c7af027b81878ac98afb2dbaa2 + in: header + name: x-bandwidth-signature-hmac-sha256 + schema: + type: string + requestBody: + $ref: '#/components/requestBodies/verificationWebhookRequest' + responses: + '204': + $ref: '#/components/responses/noContentResponse' + '400': + $ref: '#/components/responses/tfvBadRequestResponse' + '401': + $ref: '#/components/responses/tfvUnauthorizedResponse' + '403': + $ref: '#/components/responses/tfvForbiddenResponse' + '404': + $ref: '#/components/responses/tfvNotFoundResponse' + '405': + $ref: '#/components/responses/tfvNotAllowedResponse' + '429': + $ref: '#/components/responses/tfvTooManyRequestsResponse' + '500': + $ref: '#/components/responses/tfvServerErrorResponse' + '503': + $ref: '#/components/responses/tfvServiceUnavailableResponse' + endpointEvent: + '{request.body#/eventCallbackUrl}': + post: + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/endpointEvent' + examples: + endpointDisconnectedEventExample: + $ref: '#/components/examples/endpointDisconnectedEventExample' + responses: + '204': + description: Event was successfully received. diff --git a/composer.json b/composer.json index d0b683aa..d3029390 100644 --- a/composer.json +++ b/composer.json @@ -1,33 +1,46 @@ { "name": "bandwidth/sdk", - "type": "library", - "description": "Bandwidth's set of APIs", - "keywords": ["bandwidth","API","SDK"], - "homepage": "https://www.bandwidth.com/", - "license": "MIT", + "description": "Bandwidth's Communication APIs", + "keywords": [ + "openapitools", + "openapi-generator", + "openapi", + "php", + "sdk", + "rest", + "api" + ], + "homepage": "https://openapi-generator.tech", + "license": "unlicense", "authors": [ { - "name": "Bandwidth Inc.", - "email": "support@bandwidth.com", - "homepage": "https://www.bandwidth.com/", - "role": "Owner" + "name": "OpenAPI-Generator contributors", + "homepage": "https://openapi-generator.tech" } ], "require": { - "ext-SimpleXML": "*", - "php": ">=8.0.0", + "php": "^8.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "mashape/unirest-php": "~3.0.1", - "apimatic/jsonmapper": "~1.3.0" + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.0" }, "require-dev": { - "phpunit/phpunit": "^9" + "friendsofphp/php-cs-fixer": "^3.5", + "overtrue/phplint": "^9.0", + "phpunit/phpunit": "^9.0" }, "autoload": { - "psr-4": { - "BandwidthLib\\": "src/" - } + "psr-4": { "OpenAPI\\Client\\" : "src/" } + }, + "autoload-dev": { + "psr-4": { "OpenAPI\\Client\\Test\\" : "tests/" } + }, + "scripts": { + "test": [ + "@phplint" + ], + "phplint": "phplint" } } diff --git a/docs/Api/CallsApi.md b/docs/Api/CallsApi.md new file mode 100644 index 00000000..148c1343 --- /dev/null +++ b/docs/Api/CallsApi.md @@ -0,0 +1,399 @@ +# OpenAPI\Client\CallsApi + +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createCall()**](CallsApi.md#createCall) | **POST** /accounts/{accountId}/calls | Create Call | +| [**getCallState()**](CallsApi.md#getCallState) | **GET** /accounts/{accountId}/calls/{callId} | Get Call State Information | +| [**listCalls()**](CallsApi.md#listCalls) | **GET** /accounts/{accountId}/calls | Get Calls | +| [**updateCall()**](CallsApi.md#updateCall) | **POST** /accounts/{accountId}/calls/{callId} | Update Call | +| [**updateCallBxml()**](CallsApi.md#updateCallBxml) | **PUT** /accounts/{accountId}/calls/{callId}/bxml | Update Call BXML | + + +## `createCall()` + +```php +createCall($account_id, $create_call): \OpenAPI\Client\Model\CreateCallResponse +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Create Call + +Creates an outbound phone call. All calls are initially queued. Your outbound calls will initiated at a specific dequeueing rate, enabling your application to \"fire and forget\" when creating calls. Queued calls may not be modified until they are dequeued and placed, but may be removed from your queue on demand. Please note: Calls submitted to your queue will be placed approximately in order, but exact ordering is not guaranteed. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\CallsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$create_call = new \OpenAPI\Client\Model\CreateCall(); // \OpenAPI\Client\Model\CreateCall | JSON object containing information to create an outbound call + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->createCall($account_id, $create_call, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CallsApi->createCall: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **create_call** | [**\OpenAPI\Client\Model\CreateCall**](../Model/CreateCall.md)| JSON object containing information to create an outbound call | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\CreateCallResponse**](../Model/CreateCallResponse.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getCallState()` + +```php +getCallState($account_id, $call_id): \OpenAPI\Client\Model\CallState +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Get Call State Information + +Retrieve the current state of a specific call. This information is near-realtime, so it may take a few minutes for your call to be accessible using this endpoint. **Note**: Call information is kept for 7 days after the calls are hung up. If you attempt to retrieve information for a call that is older than 7 days, you will get an HTTP 404 response. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\CallsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->getCallState($account_id, $call_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CallsApi->getCallState: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\CallState**](../Model/CallState.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listCalls()` + +```php +listCalls($account_id, $to, $from, $min_start_time, $max_start_time, $disconnect_cause, $page_size, $page_token): \OpenAPI\Client\Model\CallState[] +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Get Calls + +Returns a max of 10000 calls, sorted by `createdTime` from oldest to newest. **NOTE:** If the number of calls in the account is bigger than `pageSize`, a `Link` header (with format `<{url}>; rel=\"next\"`) will be returned in the response. The url can be used to retrieve the next page of call records. Also, call information is kept for 7 days after the calls are hung up. If you attempt to retrieve information for a call that is older than 7 days, you will get an empty array [] in response. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\CallsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$to = %2b19195551234; // string | Filter results by the `to` field. +$from = %2b19195554321; // string | Filter results by the `from` field. +$min_start_time = 2022-06-21T19:13:21Z; // string | Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format). +$max_start_time = 2022-06-21T19:13:21Z; // string | Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format). +$disconnect_cause = hangup; // string | Filter results to calls with specified call Disconnect Cause. +$page_size = 500; // int | Specifies the max number of calls that will be returned. +$page_token = eyJwYWdlVG9rZW4iOiJ0b2tlbiJ9; // string | Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->listCalls($account_id, $to, $from, $min_start_time, $max_start_time, $disconnect_cause, $page_size, $page_token, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling CallsApi->listCalls: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **to** | **string**| Filter results by the `to` field. | [optional] | +| **from** | **string**| Filter results by the `from` field. | [optional] | +| **min_start_time** | **string**| Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format). | [optional] | +| **max_start_time** | **string**| Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format). | [optional] | +| **disconnect_cause** | **string**| Filter results to calls with specified call Disconnect Cause. | [optional] | +| **page_size** | **int**| Specifies the max number of calls that will be returned. | [optional] [default to 1000] | +| **page_token** | **string**| Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. | [optional] | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\CallState[]**](../Model/CallState.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateCall()` + +```php +updateCall($account_id, $call_id, $update_call) +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Update Call + +Interrupts and redirects a call to a different URL that should return a BXML document. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\CallsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. +$update_call = new \OpenAPI\Client\Model\UpdateCall(); // \OpenAPI\Client\Model\UpdateCall | JSON object containing information to redirect an existing call to a new BXML document + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->updateCall($account_id, $call_id, $update_call, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling CallsApi->updateCall: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| **update_call** | [**\OpenAPI\Client\Model\UpdateCall**](../Model/UpdateCall.md)| JSON object containing information to redirect an existing call to a new BXML document | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateCallBxml()` + +```php +updateCallBxml($account_id, $call_id, $body) +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Update Call BXML + +Interrupts and replaces an active call's BXML document. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\CallsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. +$body = + + This is a test sentence. +; // string + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->updateCallBxml($account_id, $call_id, $body, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling CallsApi->updateCallBxml: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| **body** | **string**| | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/xml` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/ConferencesApi.md b/docs/Api/ConferencesApi.md new file mode 100644 index 00000000..5394fe7d --- /dev/null +++ b/docs/Api/ConferencesApi.md @@ -0,0 +1,704 @@ +# OpenAPI\Client\ConferencesApi + +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**downloadConferenceRecording()**](ConferencesApi.md#downloadConferenceRecording) | **GET** /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media | Download Conference Recording | +| [**getConference()**](ConferencesApi.md#getConference) | **GET** /accounts/{accountId}/conferences/{conferenceId} | Get Conference Information | +| [**getConferenceMember()**](ConferencesApi.md#getConferenceMember) | **GET** /accounts/{accountId}/conferences/{conferenceId}/members/{memberId} | Get Conference Member | +| [**getConferenceRecording()**](ConferencesApi.md#getConferenceRecording) | **GET** /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId} | Get Conference Recording Information | +| [**listConferenceRecordings()**](ConferencesApi.md#listConferenceRecordings) | **GET** /accounts/{accountId}/conferences/{conferenceId}/recordings | Get Conference Recordings | +| [**listConferences()**](ConferencesApi.md#listConferences) | **GET** /accounts/{accountId}/conferences | Get Conferences | +| [**updateConference()**](ConferencesApi.md#updateConference) | **POST** /accounts/{accountId}/conferences/{conferenceId} | Update Conference | +| [**updateConferenceBxml()**](ConferencesApi.md#updateConferenceBxml) | **PUT** /accounts/{accountId}/conferences/{conferenceId}/bxml | Update Conference BXML | +| [**updateConferenceMember()**](ConferencesApi.md#updateConferenceMember) | **PUT** /accounts/{accountId}/conferences/{conferenceId}/members/{memberId} | Update Conference Member | + + +## `downloadConferenceRecording()` + +```php +downloadConferenceRecording($account_id, $conference_id, $recording_id): \SplFileObject +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Download Conference Recording + +Downloads the specified recording file. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\ConferencesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$conference_id = conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9; // string | Programmable Voice API Conference ID. +$recording_id = r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Recording ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->downloadConferenceRecording($account_id, $conference_id, $recording_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ConferencesApi->downloadConferenceRecording: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **conference_id** | **string**| Programmable Voice API Conference ID. | | +| **recording_id** | **string**| Programmable Voice API Recording ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +**\SplFileObject** + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `audio/vnd.wave`, `audio/mpeg`, `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getConference()` + +```php +getConference($account_id, $conference_id): \OpenAPI\Client\Model\Conference +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Get Conference Information + +Returns information about the specified conference. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\ConferencesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$conference_id = conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9; // string | Programmable Voice API Conference ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->getConference($account_id, $conference_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ConferencesApi->getConference: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **conference_id** | **string**| Programmable Voice API Conference ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\Conference**](../Model/Conference.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getConferenceMember()` + +```php +getConferenceMember($account_id, $conference_id, $member_id): \OpenAPI\Client\Model\ConferenceMember +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Get Conference Member + +Returns information about the specified conference member. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\ConferencesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$conference_id = conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9; // string | Programmable Voice API Conference ID. +$member_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Conference Member ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->getConferenceMember($account_id, $conference_id, $member_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ConferencesApi->getConferenceMember: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **conference_id** | **string**| Programmable Voice API Conference ID. | | +| **member_id** | **string**| Programmable Voice API Conference Member ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\ConferenceMember**](../Model/ConferenceMember.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getConferenceRecording()` + +```php +getConferenceRecording($account_id, $conference_id, $recording_id): \OpenAPI\Client\Model\ConferenceRecordingMetadata +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Get Conference Recording Information + +Returns metadata for the specified recording. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\ConferencesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$conference_id = conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9; // string | Programmable Voice API Conference ID. +$recording_id = r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Recording ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->getConferenceRecording($account_id, $conference_id, $recording_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ConferencesApi->getConferenceRecording: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **conference_id** | **string**| Programmable Voice API Conference ID. | | +| **recording_id** | **string**| Programmable Voice API Recording ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\ConferenceRecordingMetadata**](../Model/ConferenceRecordingMetadata.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listConferenceRecordings()` + +```php +listConferenceRecordings($account_id, $conference_id): \OpenAPI\Client\Model\ConferenceRecordingMetadata[] +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Get Conference Recordings + +Returns a (potentially empty) list of metadata for the recordings that took place during the specified conference. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\ConferencesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$conference_id = conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9; // string | Programmable Voice API Conference ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->listConferenceRecordings($account_id, $conference_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ConferencesApi->listConferenceRecordings: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **conference_id** | **string**| Programmable Voice API Conference ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\ConferenceRecordingMetadata[]**](../Model/ConferenceRecordingMetadata.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listConferences()` + +```php +listConferences($account_id, $name, $min_created_time, $max_created_time, $page_size, $page_token): \OpenAPI\Client\Model\Conference[] +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Get Conferences + +Returns a max of 1000 conferences, sorted by `createdTime` from oldest to newest. **NOTE:** If the number of conferences in the account is bigger than `pageSize`, a `Link` header (with format `<{url}>; rel=\"next\"`) will be returned in the response. The url can be used to retrieve the next page of conference records. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\ConferencesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$name = my-custom-name; // string | Filter results by the `name` field. +$min_created_time = 2022-06-21T19:13:21Z; // string | Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). +$max_created_time = 2022-06-21T19:13:21Z; // string | Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). +$page_size = 500; // int | Specifies the max number of conferences that will be returned. +$page_token = eyJwYWdlVG9rZW4iOiJ0b2tlbiJ9; // string | Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->listConferences($account_id, $name, $min_created_time, $max_created_time, $page_size, $page_token, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ConferencesApi->listConferences: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **name** | **string**| Filter results by the `name` field. | [optional] | +| **min_created_time** | **string**| Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). | [optional] | +| **max_created_time** | **string**| Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). | [optional] | +| **page_size** | **int**| Specifies the max number of conferences that will be returned. | [optional] [default to 1000] | +| **page_token** | **string**| Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. | [optional] | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\Conference[]**](../Model/Conference.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateConference()` + +```php +updateConference($account_id, $conference_id, $update_conference) +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Update Conference + +Update the conference state. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\ConferencesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$conference_id = conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9; // string | Programmable Voice API Conference ID. +$update_conference = new \OpenAPI\Client\Model\UpdateConference(); // \OpenAPI\Client\Model\UpdateConference + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->updateConference($account_id, $conference_id, $update_conference, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling ConferencesApi->updateConference: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **conference_id** | **string**| Programmable Voice API Conference ID. | | +| **update_conference** | [**\OpenAPI\Client\Model\UpdateConference**](../Model/UpdateConference.md)| | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateConferenceBxml()` + +```php +updateConferenceBxml($account_id, $conference_id, $body) +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Update Conference BXML + +Update the conference BXML document. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\ConferencesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$conference_id = conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9; // string | Programmable Voice API Conference ID. +$body = + + +; // string + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->updateConferenceBxml($account_id, $conference_id, $body, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling ConferencesApi->updateConferenceBxml: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **conference_id** | **string**| Programmable Voice API Conference ID. | | +| **body** | **string**| | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/xml` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateConferenceMember()` + +```php +updateConferenceMember($account_id, $conference_id, $member_id, $update_conference_member) +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Update Conference Member + +Updates settings for a particular conference member. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\ConferencesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$conference_id = conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9; // string | Programmable Voice API Conference ID. +$member_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Conference Member ID. +$update_conference_member = new \OpenAPI\Client\Model\UpdateConferenceMember(); // \OpenAPI\Client\Model\UpdateConferenceMember + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->updateConferenceMember($account_id, $conference_id, $member_id, $update_conference_member, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling ConferencesApi->updateConferenceMember: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **conference_id** | **string**| Programmable Voice API Conference ID. | | +| **member_id** | **string**| Programmable Voice API Conference Member ID. | | +| **update_conference_member** | [**\OpenAPI\Client\Model\UpdateConferenceMember**](../Model/UpdateConferenceMember.md)| | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/EndpointsApi.md b/docs/Api/EndpointsApi.md new file mode 100644 index 00000000..e32306a8 --- /dev/null +++ b/docs/Api/EndpointsApi.md @@ -0,0 +1,388 @@ +# OpenAPI\Client\EndpointsApi + +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createEndpoint()**](EndpointsApi.md#createEndpoint) | **POST** /accounts/{accountId}/endpoints | Create Endpoint | +| [**deleteEndpoint()**](EndpointsApi.md#deleteEndpoint) | **DELETE** /accounts/{accountId}/endpoints/{endpointId} | Delete Endpoint | +| [**getEndpoint()**](EndpointsApi.md#getEndpoint) | **GET** /accounts/{accountId}/endpoints/{endpointId} | Get Endpoint | +| [**listEndpoints()**](EndpointsApi.md#listEndpoints) | **GET** /accounts/{accountId}/endpoints | List Endpoints | +| [**updateEndpointBxml()**](EndpointsApi.md#updateEndpointBxml) | **PUT** /accounts/{accountId}/endpoints/{endpointId}/bxml | Update Endpoint BXML | + + +## `createEndpoint()` + +```php +createEndpoint($account_id, $body): \OpenAPI\Client\Model\CreateEndpointResponse +``` +### URI(s): +- https://api.bandwidth.com/v2 Production +Create Endpoint + +Creates a new Endpoint for the specified account. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\EndpointsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$body = new \OpenAPI\Client\Model\CreateWebRtcConnectionRequest(); // \OpenAPI\Client\Model\CreateWebRtcConnectionRequest + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->createEndpoint($account_id, $body, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EndpointsApi->createEndpoint: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **body** | **\OpenAPI\Client\Model\CreateWebRtcConnectionRequest**| | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\CreateEndpointResponse**](../Model/CreateEndpointResponse.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteEndpoint()` + +```php +deleteEndpoint($account_id, $endpoint_id) +``` +### URI(s): +- https://api.bandwidth.com/v2 Production +Delete Endpoint + +Deletes the specified endpoint. If the endpoint is actively streaming media, the media stream will be terminated. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\EndpointsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$endpoint_id = e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | BRTC Endpoint ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->deleteEndpoint($account_id, $endpoint_id, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling EndpointsApi->deleteEndpoint: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **endpoint_id** | **string**| BRTC Endpoint ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getEndpoint()` + +```php +getEndpoint($account_id, $endpoint_id): \OpenAPI\Client\Model\EndpointResponse +``` +### URI(s): +- https://api.bandwidth.com/v2 Production +Get Endpoint + +Returns information about the specified endpoint. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\EndpointsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$endpoint_id = e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | BRTC Endpoint ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->getEndpoint($account_id, $endpoint_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EndpointsApi->getEndpoint: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **endpoint_id** | **string**| BRTC Endpoint ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\EndpointResponse**](../Model/EndpointResponse.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listEndpoints()` + +```php +listEndpoints($account_id, $type, $status, $after_cursor, $limit): \OpenAPI\Client\Model\ListEndpointsResponse +``` +### URI(s): +- https://api.bandwidth.com/v2 Production +List Endpoints + +Returns a list of endpoints associated with the specified account. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\EndpointsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$type = new \OpenAPI\Client\Model\\OpenAPI\Client\Model\EndpointTypeEnum(); // \OpenAPI\Client\Model\EndpointTypeEnum | The type of endpoint. +$status = new \OpenAPI\Client\Model\\OpenAPI\Client\Model\EndpointStatusEnum(); // \OpenAPI\Client\Model\EndpointStatusEnum | The status of the endpoint. +$after_cursor = TWF5IHRoZSBmb3JjZSBiZSB3aXRoIHlvdQ==; // string | The cursor to use for pagination. This is the value of the `next` link in the previous response. +$limit = 2; // int | The maximum number of endpoints to return in the response. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->listEndpoints($account_id, $type, $status, $after_cursor, $limit, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling EndpointsApi->listEndpoints: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](../Model/.md)| The type of endpoint. | [optional] | +| **status** | [**\OpenAPI\Client\Model\EndpointStatusEnum**](../Model/.md)| The status of the endpoint. | [optional] | +| **after_cursor** | **string**| The cursor to use for pagination. This is the value of the `next` link in the previous response. | [optional] | +| **limit** | **int**| The maximum number of endpoints to return in the response. | [optional] [default to 100] | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\ListEndpointsResponse**](../Model/ListEndpointsResponse.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateEndpointBxml()` + +```php +updateEndpointBxml($account_id, $endpoint_id, $body) +``` +### URI(s): +- https://api.bandwidth.com/v2 Production +Update Endpoint BXML + +Updates the BXML for the specified endpoint. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\EndpointsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$endpoint_id = e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | BRTC Endpoint ID. +$body = 'body_example'; // string + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->updateEndpointBxml($account_id, $endpoint_id, $body, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling EndpointsApi->updateEndpointBxml: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **endpoint_id** | **string**| BRTC Endpoint ID. | | +| **body** | **string**| | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/xml` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/MFAApi.md b/docs/Api/MFAApi.md new file mode 100644 index 00000000..aa08eeaf --- /dev/null +++ b/docs/Api/MFAApi.md @@ -0,0 +1,232 @@ +# OpenAPI\Client\MFAApi + +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**generateMessagingCode()**](MFAApi.md#generateMessagingCode) | **POST** /accounts/{accountId}/code/messaging | Messaging Authentication Code | +| [**generateVoiceCode()**](MFAApi.md#generateVoiceCode) | **POST** /accounts/{accountId}/code/voice | Voice Authentication Code | +| [**verifyCode()**](MFAApi.md#verifyCode) | **POST** /accounts/{accountId}/code/verify | Verify Authentication Code | + + +## `generateMessagingCode()` + +```php +generateMessagingCode($account_id, $code_request): \OpenAPI\Client\Model\MessagingCodeResponse +``` +### URI(s): +- https://mfa.bandwidth.com/api/v1 Production +Messaging Authentication Code + +Send an MFA code via text message (SMS). + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\MFAApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$code_request = new \OpenAPI\Client\Model\CodeRequest(); // \OpenAPI\Client\Model\CodeRequest | MFA code request body. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->generateMessagingCode($account_id, $code_request, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MFAApi->generateMessagingCode: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **code_request** | [**\OpenAPI\Client\Model\CodeRequest**](../Model/CodeRequest.md)| MFA code request body. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\MessagingCodeResponse**](../Model/MessagingCodeResponse.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `generateVoiceCode()` + +```php +generateVoiceCode($account_id, $code_request): \OpenAPI\Client\Model\VoiceCodeResponse +``` +### URI(s): +- https://mfa.bandwidth.com/api/v1 Production +Voice Authentication Code + +Send an MFA Code via a phone call. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\MFAApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$code_request = new \OpenAPI\Client\Model\CodeRequest(); // \OpenAPI\Client\Model\CodeRequest | MFA code request body. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->generateVoiceCode($account_id, $code_request, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MFAApi->generateVoiceCode: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **code_request** | [**\OpenAPI\Client\Model\CodeRequest**](../Model/CodeRequest.md)| MFA code request body. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\VoiceCodeResponse**](../Model/VoiceCodeResponse.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `verifyCode()` + +```php +verifyCode($account_id, $verify_code_request): \OpenAPI\Client\Model\VerifyCodeResponse +``` +### URI(s): +- https://mfa.bandwidth.com/api/v1 Production +Verify Authentication Code + +Verify a previously sent MFA code. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\MFAApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$verify_code_request = new \OpenAPI\Client\Model\VerifyCodeRequest(); // \OpenAPI\Client\Model\VerifyCodeRequest | MFA code verify request body. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->verifyCode($account_id, $verify_code_request, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MFAApi->verifyCode: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **verify_code_request** | [**\OpenAPI\Client\Model\VerifyCodeRequest**](../Model/VerifyCodeRequest.md)| MFA code verify request body. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\VerifyCodeResponse**](../Model/VerifyCodeResponse.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/MediaApi.md b/docs/Api/MediaApi.md new file mode 100644 index 00000000..9506c4dd --- /dev/null +++ b/docs/Api/MediaApi.md @@ -0,0 +1,311 @@ +# OpenAPI\Client\MediaApi + +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**deleteMedia()**](MediaApi.md#deleteMedia) | **DELETE** /users/{accountId}/media/{mediaId} | Delete Media | +| [**getMedia()**](MediaApi.md#getMedia) | **GET** /users/{accountId}/media/{mediaId} | Get Media | +| [**listMedia()**](MediaApi.md#listMedia) | **GET** /users/{accountId}/media | List Media | +| [**uploadMedia()**](MediaApi.md#uploadMedia) | **PUT** /users/{accountId}/media/{mediaId} | Upload Media | + + +## `deleteMedia()` + +```php +deleteMedia($account_id, $media_id) +``` +### URI(s): +- https://messaging.bandwidth.com/api/v2 Production +Delete Media + +Deletes a media file from Bandwidth API server. Make sure you don't have any application scripts still using the media before you delete. If you accidentally delete a media file you can immediately upload a new file with the same name. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\MediaApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$media_id = 14762070468292kw2fuqty55yp2b2/0/bw.png; // string | Media ID to retrieve. + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->deleteMedia($account_id, $media_id, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling MediaApi->deleteMedia: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **media_id** | **string**| Media ID to retrieve. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getMedia()` + +```php +getMedia($account_id, $media_id): \SplFileObject +``` +### URI(s): +- https://messaging.bandwidth.com/api/v2 Production +Get Media + +Downloads a media file you previously uploaded. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\MediaApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$media_id = 14762070468292kw2fuqty55yp2b2/0/bw.png; // string | Media ID to retrieve. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->getMedia($account_id, $media_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MediaApi->getMedia: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **media_id** | **string**| Media ID to retrieve. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +**\SplFileObject** + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/octet-stream`, `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listMedia()` + +```php +listMedia($account_id, $continuation_token): \OpenAPI\Client\Model\Media[] +``` +### URI(s): +- https://messaging.bandwidth.com/api/v2 Production +List Media + +Gets a list of your media files. No query parameters are supported. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\MediaApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$continuation_token = 1XEi2tsFtLo1JbtLwETnM1ZJ+PqAa8w6ENvC5QKvwyrCDYII663Gy5M4s40owR1tjkuWUif6qbWvFtQJR5/ipqbUnfAqL254LKNlPy6tATCzioKSuHuOqgzloDkSwRtX0LtcL2otHS69hK343m+SjdL+vlj71tT39; // string | Continuation token used to retrieve subsequent media. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->listMedia($account_id, $continuation_token, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MediaApi->listMedia: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **continuation_token** | **string**| Continuation token used to retrieve subsequent media. | [optional] | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\Media[]**](../Model/Media.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `uploadMedia()` + +```php +uploadMedia($account_id, $media_id, $body, $content_type, $cache_control) +``` +### URI(s): +- https://messaging.bandwidth.com/api/v2 Production +Upload Media + +Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported). + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\MediaApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$media_id = 14762070468292kw2fuqty55yp2b2/0/bw.png; // string | Media ID to retrieve. +$body = '/path/to/file.txt'; // \SplFileObject +$content_type = audio/wav; // string | The media type of the entity-body. +$cache_control = no-cache; // string | General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->uploadMedia($account_id, $media_id, $body, $content_type, $cache_control, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling MediaApi->uploadMedia: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **media_id** | **string**| Media ID to retrieve. | | +| **body** | **\SplFileObject****\SplFileObject**| | | +| **content_type** | **string**| The media type of the entity-body. | [optional] | +| **cache_control** | **string**| General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. | [optional] | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json`, `application/ogg`, `application/pdf`, `application/rtf`, `application/zip`, `application/x-tar`, `application/xml`, `application/gzip`, `application/x-bzip2`, `application/x-gzip`, `application/smil`, `application/javascript`, `audio/mp4`, `audio/mpeg`, `audio/ogg`, `audio/flac`, `audio/webm`, `audio/wav`, `audio/amr`, `audio/3gpp`, `image/bmp`, `image/gif`, `image/heic`, `image/heif`, `image/jpeg`, `image/pjpeg`, `image/png`, `image/svg+xml`, `image/tiff`, `image/webp`, `image/x-icon`, `text/css`, `text/csv`, `text/calendar`, `text/html`, `text/plain`, `text/javascript`, `text/vcard`, `text/vnd.wap.wml`, `text/xml`, `video/avi`, `video/mp4`, `video/mpeg`, `video/ogg`, `video/quicktime`, `video/webm`, `video/x-ms-wmv`, `video/x-flv` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/MessagesApi.md b/docs/Api/MessagesApi.md new file mode 100644 index 00000000..6e69cad2 --- /dev/null +++ b/docs/Api/MessagesApi.md @@ -0,0 +1,209 @@ +# OpenAPI\Client\MessagesApi + +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createMessage()**](MessagesApi.md#createMessage) | **POST** /users/{accountId}/messages | Create Message | +| [**listMessages()**](MessagesApi.md#listMessages) | **GET** /users/{accountId}/messages | List Messages | + + +## `createMessage()` + +```php +createMessage($account_id, $message_request): \OpenAPI\Client\Model\Message +``` +### URI(s): +- https://messaging.bandwidth.com/api/v2 Production +Create Message + +Endpoint for sending text messages and picture messages using V2 messaging. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\MessagesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$message_request = new \OpenAPI\Client\Model\MessageRequest(); // \OpenAPI\Client\Model\MessageRequest + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->createMessage($account_id, $message_request, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MessagesApi->createMessage: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **message_request** | [**\OpenAPI\Client\Model\MessageRequest**](../Model/MessageRequest.md)| | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\Message**](../Model/Message.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listMessages()` + +```php +listMessages($account_id, $message_id, $source_tn, $destination_tn, $message_status, $message_direction, $carrier_name, $message_type, $error_code, $from_date_time, $to_date_time, $campaign_id, $from_bw_latency, $bw_queued, $product, $location, $carrier_queued, $from_carrier_latency, $calling_number_country_a3, $called_number_country_a3, $from_segment_count, $to_segment_count, $from_message_size, $to_message_size, $sort, $page_token, $limit, $limit_total_count): \OpenAPI\Client\Model\MessagesList +``` +### URI(s): +- https://messaging.bandwidth.com/api/v2 Production +List Messages + +Returns a list of messages based on query parameters. **Rate Limit:** This endpoint is rate limited to 3500 requests per 5 minutes per Source IP address. Exceeding the limit returns HTTP 429 with a `Retry-After` header. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\MessagesApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$message_id = 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6; // string | The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. +$source_tn = %2B15554443333; // string | The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). +$destination_tn = %2B15554443333; // string | The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). +$message_status = new \OpenAPI\Client\Model\\OpenAPI\Client\Model\MessageStatusEnum(); // \OpenAPI\Client\Model\MessageStatusEnum | The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. +$message_direction = new \OpenAPI\Client\Model\\OpenAPI\Client\Model\ListMessageDirectionEnum(); // \OpenAPI\Client\Model\ListMessageDirectionEnum | The direction of the message. One of INBOUND OUTBOUND. +$carrier_name = Verizon; // string | The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). +$message_type = new \OpenAPI\Client\Model\\OpenAPI\Client\Model\MessageTypeEnum(); // \OpenAPI\Client\Model\MessageTypeEnum | The type of message. Either sms or mms. +$error_code = 9902; // int | The error code of the message. +$from_date_time = 2022-09-14T18:20:16.000Z; // string | The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. +$to_date_time = 2022-09-14T18:20:16.000Z; // string | The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. +$campaign_id = CJEUMDK; // string | The campaign ID of the message. +$from_bw_latency = 5; // int | The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. +$bw_queued = true; // bool | A boolean value indicating whether the message is queued in the Bandwidth network. +$product = P2P; // \OpenAPI\Client\Model\ProductTypeEnum | Messaging product associated with the message. +$location = 123ABC; // string | Location Id associated with the message. +$carrier_queued = true; // bool | A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. +$from_carrier_latency = 50; // int | The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. +$calling_number_country_a3 = USA; // string | Calling number country in A3 format. +$called_number_country_a3 = USA; // string | Called number country in A3 format. +$from_segment_count = 1; // int | Segment count (start range). +$to_segment_count = 3; // int | Segment count (end range). +$from_message_size = 100; // int | Message size (start range). +$to_message_size = 120; // int | Message size (end range). +$sort = sourceTn:desc; // string | The field and direction to sort by combined with a colon. Direction is either asc or desc. +$page_token = gdEewhcJLQRB5; // string | A base64 encoded value used for pagination of results. +$limit = 50; // int | The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. +$limit_total_count = true; // bool | When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->listMessages($account_id, $message_id, $source_tn, $destination_tn, $message_status, $message_direction, $carrier_name, $message_type, $error_code, $from_date_time, $to_date_time, $campaign_id, $from_bw_latency, $bw_queued, $product, $location, $carrier_queued, $from_carrier_latency, $calling_number_country_a3, $called_number_country_a3, $from_segment_count, $to_segment_count, $from_message_size, $to_message_size, $sort, $page_token, $limit, $limit_total_count, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MessagesApi->listMessages: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **message_id** | **string**| The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. | [optional] | +| **source_tn** | **string**| The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). | [optional] | +| **destination_tn** | **string**| The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). | [optional] | +| **message_status** | [**\OpenAPI\Client\Model\MessageStatusEnum**](../Model/.md)| The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. | [optional] | +| **message_direction** | [**\OpenAPI\Client\Model\ListMessageDirectionEnum**](../Model/.md)| The direction of the message. One of INBOUND OUTBOUND. | [optional] | +| **carrier_name** | **string**| The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). | [optional] | +| **message_type** | [**\OpenAPI\Client\Model\MessageTypeEnum**](../Model/.md)| The type of message. Either sms or mms. | [optional] | +| **error_code** | **int**| The error code of the message. | [optional] | +| **from_date_time** | **string**| The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | [optional] | +| **to_date_time** | **string**| The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | [optional] | +| **campaign_id** | **string**| The campaign ID of the message. | [optional] | +| **from_bw_latency** | **int**| The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. | [optional] | +| **bw_queued** | **bool**| A boolean value indicating whether the message is queued in the Bandwidth network. | [optional] | +| **product** | [**\OpenAPI\Client\Model\ProductTypeEnum**](../Model/.md)| Messaging product associated with the message. | [optional] | +| **location** | **string**| Location Id associated with the message. | [optional] | +| **carrier_queued** | **bool**| A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] | +| **from_carrier_latency** | **int**| The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] | +| **calling_number_country_a3** | **string**| Calling number country in A3 format. | [optional] | +| **called_number_country_a3** | **string**| Called number country in A3 format. | [optional] | +| **from_segment_count** | **int**| Segment count (start range). | [optional] | +| **to_segment_count** | **int**| Segment count (end range). | [optional] | +| **from_message_size** | **int**| Message size (start range). | [optional] | +| **to_message_size** | **int**| Message size (end range). | [optional] | +| **sort** | **string**| The field and direction to sort by combined with a colon. Direction is either asc or desc. | [optional] | +| **page_token** | **string**| A base64 encoded value used for pagination of results. | [optional] | +| **limit** | **int**| The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. | [optional] | +| **limit_total_count** | **bool**| When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. | [optional] | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\MessagesList**](../Model/MessagesList.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/MultiChannelApi.md b/docs/Api/MultiChannelApi.md new file mode 100644 index 00000000..631e46c0 --- /dev/null +++ b/docs/Api/MultiChannelApi.md @@ -0,0 +1,82 @@ +# OpenAPI\Client\MultiChannelApi + +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createMultiChannelMessage()**](MultiChannelApi.md#createMultiChannelMessage) | **POST** /users/{accountId}/messages/multiChannel | Create Multi-Channel Message | + + +## `createMultiChannelMessage()` + +```php +createMultiChannelMessage($account_id, $multi_channel_message_request): \OpenAPI\Client\Model\CreateMultiChannelMessageResponse +``` +### URI(s): +- https://messaging.bandwidth.com/api/v2 Production +Create Multi-Channel Message + +Endpoint for sending Multi-Channel messages. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\MultiChannelApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$multi_channel_message_request = new \OpenAPI\Client\Model\MultiChannelMessageRequest(); // \OpenAPI\Client\Model\MultiChannelMessageRequest + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->createMultiChannelMessage($account_id, $multi_channel_message_request, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling MultiChannelApi->createMultiChannelMessage: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **multi_channel_message_request** | [**\OpenAPI\Client\Model\MultiChannelMessageRequest**](../Model/MultiChannelMessageRequest.md)| | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\CreateMultiChannelMessageResponse**](../Model/CreateMultiChannelMessageResponse.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/PhoneNumberLookupApi.md b/docs/Api/PhoneNumberLookupApi.md new file mode 100644 index 00000000..d33675ce --- /dev/null +++ b/docs/Api/PhoneNumberLookupApi.md @@ -0,0 +1,232 @@ +# OpenAPI\Client\PhoneNumberLookupApi + +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createAsyncBulkLookup()**](PhoneNumberLookupApi.md#createAsyncBulkLookup) | **POST** /accounts/{accountId}/phoneNumberLookup/bulk | Create Asynchronous Bulk Number Lookup | +| [**createSyncLookup()**](PhoneNumberLookupApi.md#createSyncLookup) | **POST** /accounts/{accountId}/phoneNumberLookup | Create Synchronous Number Lookup | +| [**getAsyncBulkLookup()**](PhoneNumberLookupApi.md#getAsyncBulkLookup) | **GET** /accounts/{accountId}/phoneNumberLookup/bulk/{requestId} | Get Asynchronous Bulk Number Lookup | + + +## `createAsyncBulkLookup()` + +```php +createAsyncBulkLookup($account_id, $async_lookup_request): \OpenAPI\Client\Model\CreateAsyncBulkLookupResponse +``` +### URI(s): +- https://api.bandwidth.com/v2 Production +Create Asynchronous Bulk Number Lookup + +Creates an asynchronous bulk phone number lookup request. Maximum of 15,000 telephone numbers per request. Use the [Get Asynchronous Bulk Number Lookup](#tag/Phone-Number-Lookup/operation/getAsyncBulkLookup) endpoint to check the status of the request and view the results. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\PhoneNumberLookupApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string +$async_lookup_request = new \OpenAPI\Client\Model\AsyncLookupRequest(); // \OpenAPI\Client\Model\AsyncLookupRequest | Asynchronous bulk phone number lookup request. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->createAsyncBulkLookup($account_id, $async_lookup_request, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling PhoneNumberLookupApi->createAsyncBulkLookup: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| | | +| **async_lookup_request** | [**\OpenAPI\Client\Model\AsyncLookupRequest**](../Model/AsyncLookupRequest.md)| Asynchronous bulk phone number lookup request. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\CreateAsyncBulkLookupResponse**](../Model/CreateAsyncBulkLookupResponse.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `createSyncLookup()` + +```php +createSyncLookup($account_id, $sync_lookup_request): \OpenAPI\Client\Model\CreateSyncLookupResponse +``` +### URI(s): +- https://api.bandwidth.com/v2 Production +Create Synchronous Number Lookup + +Creates a synchronous phone number lookup request. Maximum of 100 telephone numbers per request. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\PhoneNumberLookupApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string +$sync_lookup_request = new \OpenAPI\Client\Model\SyncLookupRequest(); // \OpenAPI\Client\Model\SyncLookupRequest | Synchronous phone number lookup request. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->createSyncLookup($account_id, $sync_lookup_request, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling PhoneNumberLookupApi->createSyncLookup: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| | | +| **sync_lookup_request** | [**\OpenAPI\Client\Model\SyncLookupRequest**](../Model/SyncLookupRequest.md)| Synchronous phone number lookup request. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\CreateSyncLookupResponse**](../Model/CreateSyncLookupResponse.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getAsyncBulkLookup()` + +```php +getAsyncBulkLookup($account_id, $request_id): \OpenAPI\Client\Model\GetAsyncBulkLookupResponse +``` +### URI(s): +- https://api.bandwidth.com/v2 Production +Get Asynchronous Bulk Number Lookup + +Get an existing [Asynchronous Bulk Number Lookup](#tag/Phone-Number-Lookup/operation/createAsyncBulkLookup). Use this endpoint to check the status of the request and view the results. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\PhoneNumberLookupApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string +$request_id = 004223a0-8b17-41b1-bf81-20732adf5590; // string + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->getAsyncBulkLookup($account_id, $request_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling PhoneNumberLookupApi->getAsyncBulkLookup: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| | | +| **request_id** | **string**| | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\GetAsyncBulkLookupResponse**](../Model/GetAsyncBulkLookupResponse.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/RecordingsApi.md b/docs/Api/RecordingsApi.md new file mode 100644 index 00000000..08270ce2 --- /dev/null +++ b/docs/Api/RecordingsApi.md @@ -0,0 +1,776 @@ +# OpenAPI\Client\RecordingsApi + +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**deleteRecording()**](RecordingsApi.md#deleteRecording) | **DELETE** /accounts/{accountId}/calls/{callId}/recordings/{recordingId} | Delete Recording | +| [**deleteRecordingMedia()**](RecordingsApi.md#deleteRecordingMedia) | **DELETE** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media | Delete Recording Media | +| [**deleteRecordingTranscription()**](RecordingsApi.md#deleteRecordingTranscription) | **DELETE** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Delete Transcription | +| [**downloadCallRecording()**](RecordingsApi.md#downloadCallRecording) | **GET** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media | Download Recording | +| [**getCallRecording()**](RecordingsApi.md#getCallRecording) | **GET** /accounts/{accountId}/calls/{callId}/recordings/{recordingId} | Get Call Recording | +| [**getRecordingTranscription()**](RecordingsApi.md#getRecordingTranscription) | **GET** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Get Transcription | +| [**listAccountCallRecordings()**](RecordingsApi.md#listAccountCallRecordings) | **GET** /accounts/{accountId}/recordings | Get Call Recordings | +| [**listCallRecordings()**](RecordingsApi.md#listCallRecordings) | **GET** /accounts/{accountId}/calls/{callId}/recordings | List Call Recordings | +| [**transcribeCallRecording()**](RecordingsApi.md#transcribeCallRecording) | **POST** /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Create Transcription Request | +| [**updateCallRecordingState()**](RecordingsApi.md#updateCallRecordingState) | **PUT** /accounts/{accountId}/calls/{callId}/recording | Update Recording | + + +## `deleteRecording()` + +```php +deleteRecording($account_id, $call_id, $recording_id) +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Delete Recording + +Delete the recording information, media and transcription. Note: After the deletion is requested and a `204` is returned, neither the recording metadata nor the actual media nor its transcription will be accessible anymore. However, the media of the specified recording is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\RecordingsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. +$recording_id = r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Recording ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->deleteRecording($account_id, $call_id, $recording_id, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling RecordingsApi->deleteRecording: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| **recording_id** | **string**| Programmable Voice API Recording ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteRecordingMedia()` + +```php +deleteRecordingMedia($account_id, $call_id, $recording_id) +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Delete Recording Media + +Deletes the specified recording's media. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\RecordingsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. +$recording_id = r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Recording ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->deleteRecordingMedia($account_id, $call_id, $recording_id, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling RecordingsApi->deleteRecordingMedia: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| **recording_id** | **string**| Programmable Voice API Recording ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteRecordingTranscription()` + +```php +deleteRecordingTranscription($account_id, $call_id, $recording_id) +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Delete Transcription + +Deletes the specified recording's transcription. Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\RecordingsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. +$recording_id = r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Recording ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->deleteRecordingTranscription($account_id, $call_id, $recording_id, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling RecordingsApi->deleteRecordingTranscription: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| **recording_id** | **string**| Programmable Voice API Recording ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `downloadCallRecording()` + +```php +downloadCallRecording($account_id, $call_id, $recording_id): \SplFileObject +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Download Recording + +Downloads the specified recording. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\RecordingsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. +$recording_id = r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Recording ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->downloadCallRecording($account_id, $call_id, $recording_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling RecordingsApi->downloadCallRecording: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| **recording_id** | **string**| Programmable Voice API Recording ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +**\SplFileObject** + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `audio/vnd.wave`, `audio/mpeg`, `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getCallRecording()` + +```php +getCallRecording($account_id, $call_id, $recording_id): \OpenAPI\Client\Model\CallRecordingMetadata +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Get Call Recording + +Returns metadata for the specified recording. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\RecordingsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. +$recording_id = r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Recording ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->getCallRecording($account_id, $call_id, $recording_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling RecordingsApi->getCallRecording: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| **recording_id** | **string**| Programmable Voice API Recording ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\CallRecordingMetadata**](../Model/CallRecordingMetadata.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getRecordingTranscription()` + +```php +getRecordingTranscription($account_id, $call_id, $recording_id): \OpenAPI\Client\Model\RecordingTranscriptions +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Get Transcription + +Downloads the specified transcription. If the recording was multi-channel, then there will be 2 transcripts. The caller/called party transcript will be the first item while [``](/docs/voice/bxml/playAudio) and [``](/docs/voice/bxml/speakSentence) transcript will be the second item. During a [``](/docs/voice/bxml/transfer) the A-leg transcript will be the first item while the B-leg transcript will be the second item. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\RecordingsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. +$recording_id = r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Recording ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->getRecordingTranscription($account_id, $call_id, $recording_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling RecordingsApi->getRecordingTranscription: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| **recording_id** | **string**| Programmable Voice API Recording ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\RecordingTranscriptions**](../Model/RecordingTranscriptions.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listAccountCallRecordings()` + +```php +listAccountCallRecordings($account_id, $to, $from, $min_start_time, $max_start_time): \OpenAPI\Client\Model\CallRecordingMetadata[] +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Get Call Recordings + +Returns a list of metadata for the recordings associated with the specified account. The list can be filtered by the optional from, to, minStartTime, and maxStartTime arguments. The list is capped at 1000 entries and may be empty if no recordings match the specified criteria. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\RecordingsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$to = %2b19195551234; // string | Filter results by the `to` field. +$from = %2b19195554321; // string | Filter results by the `from` field. +$min_start_time = 2022-06-21T19:13:21Z; // string | Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). +$max_start_time = 2022-06-21T19:13:21Z; // string | Filter results to recordings which have a `startTime` before `maxStartTime` (in ISO8601 format). + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->listAccountCallRecordings($account_id, $to, $from, $min_start_time, $max_start_time, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling RecordingsApi->listAccountCallRecordings: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **to** | **string**| Filter results by the `to` field. | [optional] | +| **from** | **string**| Filter results by the `from` field. | [optional] | +| **min_start_time** | **string**| Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). | [optional] | +| **max_start_time** | **string**| Filter results to recordings which have a `startTime` before `maxStartTime` (in ISO8601 format). | [optional] | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\CallRecordingMetadata[]**](../Model/CallRecordingMetadata.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listCallRecordings()` + +```php +listCallRecordings($account_id, $call_id): \OpenAPI\Client\Model\CallRecordingMetadata[] +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +List Call Recordings + +Returns a (potentially empty) list of metadata for the recordings that took place during the specified call. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\RecordingsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->listCallRecordings($account_id, $call_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling RecordingsApi->listCallRecordings: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\CallRecordingMetadata[]**](../Model/CallRecordingMetadata.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `transcribeCallRecording()` + +```php +transcribeCallRecording($account_id, $call_id, $recording_id, $transcribe_recording) +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Create Transcription Request + +Generate the transcription for a specific recording. Transcription can succeed only for recordings of length greater than 500 milliseconds and less than 4 hours. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\RecordingsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. +$recording_id = r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Recording ID. +$transcribe_recording = new \OpenAPI\Client\Model\TranscribeRecording(); // \OpenAPI\Client\Model\TranscribeRecording + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->transcribeCallRecording($account_id, $call_id, $recording_id, $transcribe_recording, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling RecordingsApi->transcribeCallRecording: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| **recording_id** | **string**| Programmable Voice API Recording ID. | | +| **transcribe_recording** | [**\OpenAPI\Client\Model\TranscribeRecording**](../Model/TranscribeRecording.md)| | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateCallRecordingState()` + +```php +updateCallRecordingState($account_id, $call_id, $update_call_recording) +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Update Recording + +Pause or resume a recording on an active phone call. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\RecordingsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. +$update_call_recording = new \OpenAPI\Client\Model\UpdateCallRecording(); // \OpenAPI\Client\Model\UpdateCallRecording + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->updateCallRecordingState($account_id, $call_id, $update_call_recording, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling RecordingsApi->updateCallRecordingState: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| **update_call_recording** | [**\OpenAPI\Client\Model\UpdateCallRecording**](../Model/UpdateCallRecording.md)| | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/StatisticsApi.md b/docs/Api/StatisticsApi.md new file mode 100644 index 00000000..c70133f5 --- /dev/null +++ b/docs/Api/StatisticsApi.md @@ -0,0 +1,80 @@ +# OpenAPI\Client\StatisticsApi + +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**getStatistics()**](StatisticsApi.md#getStatistics) | **GET** /accounts/{accountId}/statistics | Get Account Statistics | + + +## `getStatistics()` + +```php +getStatistics($account_id): \OpenAPI\Client\Model\AccountStatistics +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Get Account Statistics + +Returns details about the current state of the account. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\StatisticsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->getStatistics($account_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling StatisticsApi->getStatistics: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\AccountStatistics**](../Model/AccountStatistics.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/TollFreeVerificationApi.md b/docs/Api/TollFreeVerificationApi.md new file mode 100644 index 00000000..868b3853 --- /dev/null +++ b/docs/Api/TollFreeVerificationApi.md @@ -0,0 +1,675 @@ +# OpenAPI\Client\TollFreeVerificationApi + +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**createWebhookSubscription()**](TollFreeVerificationApi.md#createWebhookSubscription) | **POST** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions | Create Webhook Subscription | +| [**deleteVerificationRequest()**](TollFreeVerificationApi.md#deleteVerificationRequest) | **DELETE** /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Delete a Toll-Free Verification Submission | +| [**deleteWebhookSubscription()**](TollFreeVerificationApi.md#deleteWebhookSubscription) | **DELETE** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id} | Delete Webhook Subscription | +| [**getTollFreeVerificationStatus()**](TollFreeVerificationApi.md#getTollFreeVerificationStatus) | **GET** /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Get Toll-Free Verification Status | +| [**listTollFreeUseCases()**](TollFreeVerificationApi.md#listTollFreeUseCases) | **GET** /tollFreeVerification/useCases | List Toll-Free Use Cases | +| [**listWebhookSubscriptions()**](TollFreeVerificationApi.md#listWebhookSubscriptions) | **GET** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions | List Webhook Subscriptions | +| [**requestTollFreeVerification()**](TollFreeVerificationApi.md#requestTollFreeVerification) | **POST** /accounts/{accountId}/tollFreeVerification | Request Toll-Free Verification | +| [**updateTollFreeVerificationRequest()**](TollFreeVerificationApi.md#updateTollFreeVerificationRequest) | **PUT** /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Update Toll-Free Verification Request | +| [**updateWebhookSubscription()**](TollFreeVerificationApi.md#updateWebhookSubscription) | **PUT** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id} | Update Webhook Subscription | + + +## `createWebhookSubscription()` + +```php +createWebhookSubscription($account_id, $webhook_subscription_request_schema): \OpenAPI\Client\Model\WebhookSubscription +``` +### URI(s): +- https://api.bandwidth.com/api/v2 Production +Create Webhook Subscription + +Create a new webhook subscription (this webhook will be called for every update on every submission). In addition to a `callbackUrl`, this subscription can provide optional HTTP basic authentication credentials (a username and a password). The returned subscription object will contain an ID that can be used to modify or delete the subscription at a later time. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$webhook_subscription_request_schema = new \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema(); // \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema | Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->createWebhookSubscription($account_id, $webhook_subscription_request_schema, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TollFreeVerificationApi->createWebhookSubscription: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **webhook_subscription_request_schema** | [**\OpenAPI\Client\Model\WebhookSubscriptionRequestSchema**](../Model/WebhookSubscriptionRequestSchema.md)| Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\WebhookSubscription**](../Model/WebhookSubscription.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteVerificationRequest()` + +```php +deleteVerificationRequest($account_id, $phone_number) +``` +### URI(s): +- https://api.bandwidth.com/api/v2 Production +Delete a Toll-Free Verification Submission + +Delete a toll-free verification submission for a toll-free number. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$phone_number = +18885555555; // string | Valid Toll-Free telephone number in E.164 format. + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->deleteVerificationRequest($account_id, $phone_number, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling TollFreeVerificationApi->deleteVerificationRequest: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **phone_number** | **string**| Valid Toll-Free telephone number in E.164 format. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `deleteWebhookSubscription()` + +```php +deleteWebhookSubscription($account_id, $id) +``` +### URI(s): +- https://api.bandwidth.com/api/v2 Production +Delete Webhook Subscription + +Delete a webhook subscription by ID. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$id = 7bt57JcsVYJrN9K1OcV1Nu; // string | Webhook subscription ID + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->deleteWebhookSubscription($account_id, $id, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling TollFreeVerificationApi->deleteWebhookSubscription: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **id** | **string**| Webhook subscription ID | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getTollFreeVerificationStatus()` + +```php +getTollFreeVerificationStatus($account_id, $phone_number): \OpenAPI\Client\Model\TfvStatus +``` +### URI(s): +- https://api.bandwidth.com/api/v2 Production +Get Toll-Free Verification Status + +Gets the verification status for a phone number that is provisioned to your account. Submission information will be appended to the response if it is available. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$phone_number = +18885555555; // string | Valid Toll-Free telephone number in E.164 format. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->getTollFreeVerificationStatus($account_id, $phone_number, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TollFreeVerificationApi->getTollFreeVerificationStatus: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **phone_number** | **string**| Valid Toll-Free telephone number in E.164 format. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\TfvStatus**](../Model/TfvStatus.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listTollFreeUseCases()` + +```php +listTollFreeUseCases(): string[] +``` +### URI(s): +- https://api.bandwidth.com/api/v2 Production +List Toll-Free Use Cases + +Lists valid toll-free use cases. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->listTollFreeUseCases($hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TollFreeVerificationApi->listTollFreeUseCases: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +This endpoint does not need any parameter. +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +**string[]** + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listWebhookSubscriptions()` + +```php +listWebhookSubscriptions($account_id): \OpenAPI\Client\Model\WebhookSubscriptionsListBody +``` +### URI(s): +- https://api.bandwidth.com/api/v2 Production +List Webhook Subscriptions + +Lists all webhook subscriptions that are registered to receive status updates for the toll-free verification requests submitted under this account (password will not be returned through this API If `basicAuthentication` is defined, the `password` property of that object will be null). + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->listWebhookSubscriptions($account_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TollFreeVerificationApi->listWebhookSubscriptions: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\WebhookSubscriptionsListBody**](../Model/WebhookSubscriptionsListBody.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `requestTollFreeVerification()` + +```php +requestTollFreeVerification($account_id, $verification_request) +``` +### URI(s): +- https://api.bandwidth.com/api/v2 Production +Request Toll-Free Verification + +Submit a request for verification of a toll-free phone number. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$verification_request = new \OpenAPI\Client\Model\VerificationRequest(); // \OpenAPI\Client\Model\VerificationRequest | Request for verification of a toll-free phone number. + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->requestTollFreeVerification($account_id, $verification_request, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling TollFreeVerificationApi->requestTollFreeVerification: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **verification_request** | [**\OpenAPI\Client\Model\VerificationRequest**](../Model/VerificationRequest.md)| Request for verification of a toll-free phone number. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateTollFreeVerificationRequest()` + +```php +updateTollFreeVerificationRequest($account_id, $phone_number, $tfv_submission_wrapper) +``` +### URI(s): +- https://api.bandwidth.com/api/v2 Production +Update Toll-Free Verification Request + +Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true). + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$phone_number = +18885555555; // string | Valid Toll-Free telephone number in E.164 format. +$tfv_submission_wrapper = new \OpenAPI\Client\Model\TfvSubmissionWrapper(); // \OpenAPI\Client\Model\TfvSubmissionWrapper | Update a request for verification of a toll-free phone number. + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->updateTollFreeVerificationRequest($account_id, $phone_number, $tfv_submission_wrapper, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling TollFreeVerificationApi->updateTollFreeVerificationRequest: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **phone_number** | **string**| Valid Toll-Free telephone number in E.164 format. | | +| **tfv_submission_wrapper** | [**\OpenAPI\Client\Model\TfvSubmissionWrapper**](../Model/TfvSubmissionWrapper.md)| Update a request for verification of a toll-free phone number. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `updateWebhookSubscription()` + +```php +updateWebhookSubscription($account_id, $id, $webhook_subscription_request_schema): \OpenAPI\Client\Model\WebhookSubscription +``` +### URI(s): +- https://api.bandwidth.com/api/v2 Production +Update Webhook Subscription + +Update an existing webhook subscription (`callbackUrl` and `basicAuthentication` can be updated). + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$id = 7bt57JcsVYJrN9K1OcV1Nu; // string | Webhook subscription ID +$webhook_subscription_request_schema = new \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema(); // \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema | Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->updateWebhookSubscription($account_id, $id, $webhook_subscription_request_schema, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TollFreeVerificationApi->updateWebhookSubscription: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **id** | **string**| Webhook subscription ID | | +| **webhook_subscription_request_schema** | [**\OpenAPI\Client\Model\WebhookSubscriptionRequestSchema**](../Model/WebhookSubscriptionRequestSchema.md)| Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\WebhookSubscription**](../Model/WebhookSubscription.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Api/TranscriptionsApi.md b/docs/Api/TranscriptionsApi.md new file mode 100644 index 00000000..c7059769 --- /dev/null +++ b/docs/Api/TranscriptionsApi.md @@ -0,0 +1,235 @@ +# OpenAPI\Client\TranscriptionsApi + +All URIs are relative to http://localhost, except if the operation defines another base path. + +| Method | HTTP request | Description | +| ------------- | ------------- | ------------- | +| [**deleteRealTimeTranscription()**](TranscriptionsApi.md#deleteRealTimeTranscription) | **DELETE** /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId} | Delete Real-time Transcription | +| [**getRealTimeTranscription()**](TranscriptionsApi.md#getRealTimeTranscription) | **GET** /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId} | Get Real-time Transcription | +| [**listRealTimeTranscriptions()**](TranscriptionsApi.md#listRealTimeTranscriptions) | **GET** /accounts/{accountId}/calls/{callId}/transcriptions | List Real-time Transcriptions | + + +## `deleteRealTimeTranscription()` + +```php +deleteRealTimeTranscription($account_id, $call_id, $transcription_id) +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Delete Real-time Transcription + +Delete the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription). Note: After the deletion is requested and a `200` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\TranscriptionsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. +$transcription_id = t-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Transcription ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $apiInstance->deleteRealTimeTranscription($account_id, $call_id, $transcription_id, $hostIndex, $variables); +} catch (Exception $e) { + echo 'Exception when calling TranscriptionsApi->deleteRealTimeTranscription: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| **transcription_id** | **string**| Programmable Voice API Transcription ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `getRealTimeTranscription()` + +```php +getRealTimeTranscription($account_id, $call_id, $transcription_id): \OpenAPI\Client\Model\CallTranscriptionResponse +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +Get Real-time Transcription + +Retrieve the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription). + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\TranscriptionsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. +$transcription_id = t-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Transcription ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->getRealTimeTranscription($account_id, $call_id, $transcription_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TranscriptionsApi->getRealTimeTranscription: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| **transcription_id** | **string**| Programmable Voice API Transcription ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\CallTranscriptionResponse**](../Model/CallTranscriptionResponse.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + +## `listRealTimeTranscriptions()` + +```php +listRealTimeTranscriptions($account_id, $call_id): \OpenAPI\Client\Model\CallTranscriptionMetadata[] +``` +### URI(s): +- https://voice.bandwidth.com/api/v2 Production +List Real-time Transcriptions + +List the transcriptions created on this call via [startTranscription](/docs/voice/bxml/startTranscription). + +### Example + +```php +setUsername('YOUR_USERNAME') + ->setPassword('YOUR_PASSWORD'); + +// Configure OAuth2 access token for authorization: OAuth2 +$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); + + +$apiInstance = new OpenAPI\Client\Api\TranscriptionsApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$account_id = 9900000; // string | Your Bandwidth Account ID. +$call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. + +$hostIndex = 0; +$variables = [ +]; + +try { + $result = $apiInstance->listRealTimeTranscriptions($account_id, $call_id, $hostIndex, $variables); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling TranscriptionsApi->listRealTimeTranscriptions: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **account_id** | **string**| Your Bandwidth Account ID. | | +| **call_id** | **string**| Programmable Voice API Call ID. | | +| hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | +| variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | + +### Return type + +[**\OpenAPI\Client\Model\CallTranscriptionMetadata[]**](../Model/CallTranscriptionMetadata.md) + +### Authorization + +[Basic](../../README.md#Basic), [OAuth2](../../README.md#OAuth2) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) diff --git a/docs/Model/AccountStatistics.md b/docs/Model/AccountStatistics.md new file mode 100644 index 00000000..e3681aba --- /dev/null +++ b/docs/Model/AccountStatistics.md @@ -0,0 +1,10 @@ +# AccountStatistics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**current_call_queue_size** | **int** | The number of calls currently enqueued. | [optional] +**max_call_queue_size** | **int** | The maximum size of the queue before outgoing calls start being rejected. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AdditionalDenialReason.md b/docs/Model/AdditionalDenialReason.md new file mode 100644 index 00000000..f4151662 --- /dev/null +++ b/docs/Model/AdditionalDenialReason.md @@ -0,0 +1,11 @@ +# AdditionalDenialReason + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status_code** | **int** | Reason code for denial. | +**reason** | **string** | Explanation for why a verification request was declined. | +**resubmit_allowed** | **bool** | Whether a Toll-Free Verification request qualifies for resubmission via PUT. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Address.md b/docs/Model/Address.md new file mode 100644 index 00000000..622be5b8 --- /dev/null +++ b/docs/Model/Address.md @@ -0,0 +1,15 @@ +# Address + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | The name of the business using the toll-free number. | +**addr1** | **string** | The address of the business using the toll-free number. | +**addr2** | **string** | The address of the business using the toll-free number. | [optional] +**city** | **string** | The city of the business using the toll-free number. | +**state** | **string** | The state of the business using the toll-free number. | +**zip** | **string** | The zip of the business using the toll-free number. | +**url** | **string** | The website of the business using the toll-free number. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AnswerCallback.md b/docs/Model/AnswerCallback.md new file mode 100644 index 00000000..198aa6a8 --- /dev/null +++ b/docs/Model/AnswerCallback.md @@ -0,0 +1,22 @@ +# AnswerCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**machine_detection_result** | [**\OpenAPI\Client\Model\MachineDetectionResult**](MachineDetectionResult.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AsyncLookupRequest.md b/docs/Model/AsyncLookupRequest.md new file mode 100644 index 00000000..c3afbb4d --- /dev/null +++ b/docs/Model/AsyncLookupRequest.md @@ -0,0 +1,9 @@ +# AsyncLookupRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phone_numbers** | **string[]** | Telephone numbers in E.164 format. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BlockedWebhook.md b/docs/Model/BlockedWebhook.md new file mode 100644 index 00000000..ec505175 --- /dev/null +++ b/docs/Model/BlockedWebhook.md @@ -0,0 +1,14 @@ +# BlockedWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **string** | User's account ID. | [optional] +**phone_number** | **string** | Toll-free telephone number in E.164 format. | [optional] +**status** | [**\OpenAPI\Client\Model\TfvCallbackStatusEnum**](TfvCallbackStatusEnum.md) | | [optional] +**internal_ticket_number** | **string** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. | [optional] +**blocked** | **bool** | Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] +**blocked_reason** | **string** | The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BridgeCompleteCallback.md b/docs/Model/BridgeCompleteCallback.md new file mode 100644 index 00000000..e77f2a3e --- /dev/null +++ b/docs/Model/BridgeCompleteCallback.md @@ -0,0 +1,24 @@ +# BridgeCompleteCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**cause** | **string** | Reason the call failed - hangup, busy, timeout, cancel, rejected, callback-error, invalid-bxml, application-error, account-limit, node-capacity-exceeded, error, or unknown. | [optional] +**error_message** | **string** | Text explaining the reason that caused the call to fail in case of errors. | [optional] +**error_id** | **string** | Bandwidth's internal id that references the error event. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BridgeTargetCompleteCallback.md b/docs/Model/BridgeTargetCompleteCallback.md new file mode 100644 index 00000000..8304212c --- /dev/null +++ b/docs/Model/BridgeTargetCompleteCallback.md @@ -0,0 +1,21 @@ +# BridgeTargetCompleteCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrtcError.md b/docs/Model/BrtcError.md new file mode 100644 index 00000000..df33268d --- /dev/null +++ b/docs/Model/BrtcError.md @@ -0,0 +1,13 @@ +# BrtcError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | A unique identifier for the error. | [optional] +**type** | **string** | The type of error. | +**description** | **string** | A description of the error. | +**code** | **string** | A code that uniquely identifies the error. | [optional] +**source** | [**\OpenAPI\Client\Model\BrtcErrorSource**](BrtcErrorSource.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrtcErrorResponse.md b/docs/Model/BrtcErrorResponse.md new file mode 100644 index 00000000..dd25ae45 --- /dev/null +++ b/docs/Model/BrtcErrorResponse.md @@ -0,0 +1,11 @@ +# BrtcErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**\OpenAPI\Client\Model\BrtcLink[]**](BrtcLink.md) | | +**data** | **object** | | +**errors** | [**\OpenAPI\Client\Model\BrtcError[]**](BrtcError.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrtcErrorSource.md b/docs/Model/BrtcErrorSource.md new file mode 100644 index 00000000..62b8ae5f --- /dev/null +++ b/docs/Model/BrtcErrorSource.md @@ -0,0 +1,12 @@ +# 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#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrtcLink.md b/docs/Model/BrtcLink.md new file mode 100644 index 00000000..50f4249e --- /dev/null +++ b/docs/Model/BrtcLink.md @@ -0,0 +1,11 @@ +# 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#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BusinessEntityTypeEnum.md b/docs/Model/BusinessEntityTypeEnum.md new file mode 100644 index 00000000..f279aeed --- /dev/null +++ b/docs/Model/BusinessEntityTypeEnum.md @@ -0,0 +1,8 @@ +# BusinessEntityTypeEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BusinessRegistrationTypeEnum.md b/docs/Model/BusinessRegistrationTypeEnum.md new file mode 100644 index 00000000..ee8ba414 --- /dev/null +++ b/docs/Model/BusinessRegistrationTypeEnum.md @@ -0,0 +1,8 @@ +# BusinessRegistrationTypeEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CallDirectionEnum.md b/docs/Model/CallDirectionEnum.md new file mode 100644 index 00000000..754d6d7f --- /dev/null +++ b/docs/Model/CallDirectionEnum.md @@ -0,0 +1,8 @@ +# CallDirectionEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CallRecordingMetadata.md b/docs/Model/CallRecordingMetadata.md new file mode 100644 index 00000000..a2880395 --- /dev/null +++ b/docs/Model/CallRecordingMetadata.md @@ -0,0 +1,27 @@ +# CallRecordingMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **string** | The id of the application associated with the call. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**parent_call_id** | **string** | (optional) If the event is related to the B leg of a <Transfer>, the call id of the original call leg that executed the <Transfer>. Otherwise, this field will not be present. | [optional] +**recording_id** | **string** | The unique ID of this recording | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**transfer_caller_id** | **string** | The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**transfer_to** | **string** | The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**duration** | **string** | The duration of the recording in ISO-8601 format | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**channels** | **int** | Always `1` for conference recordings; multi-channel recordings are not supported on conferences. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] +**file_format** | [**\OpenAPI\Client\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] +**status** | **string** | The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] +**media_url** | **string** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional] +**transcription** | [**\OpenAPI\Client\Model\RecordingTranscriptionMetadata**](RecordingTranscriptionMetadata.md) | | [optional] +**recording_name** | **string** | A name to identify this recording. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CallState.md b/docs/Model/CallState.md new file mode 100644 index 00000000..4d81c635 --- /dev/null +++ b/docs/Model/CallState.md @@ -0,0 +1,26 @@ +# CallState + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **string** | The application id associated with the call. | [optional] +**account_id** | **string** | The account id associated with the call. | [optional] +**call_id** | **string** | The programmable voice API call ID. | [optional] +**parent_call_id** | **string** | The A-leg call id, set only if this call is the B-leg of a [`<Transfer>`](/docs/voice/bxml/transfer). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555), or if the call was to a SIP URI, the SIP URI. | [optional] +**from** | **string** | The phone number that made the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**state** | **string** | The current state of the call. Current possible values are `queued`, `initiated`, `answered` and `disconnected`. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] +**stir_shaken** | **array** | For inbound calls, the Bandwidth STIR/SHAKEN implementation will verify the information provided in the inbound invite request `Identity` header. The verification status is stored in the call state `stirShaken` property as follows. | Property | Description | |:------------------|:------------| | verstat | (optional) The verification status indicating whether the verification was successful or not. Possible values are `TN-Validation-Passed` or `TN-Validation-Failed`. | | attestationIndicator | (optional) The attestation level verified by Bandwidth. Possible values are `A` (full), `B` (partial) or `C` (gateway). | | originatingId | (optional) A unique origination identifier. | Note that these are common properties but that the `stirShaken` object is free form and can contain other key-value pairs. More information: [Understanding STIR/SHAKEN](https://www.bandwidth.com/regulations/stir-shaken). | [optional] +**identity** | **string** | The value of the `Identity` header from the inbound invite request. Only present for inbound calls and if the account is configured to forward this header. | [optional] +**enqueued_time** | **\DateTime** | The time this call was placed in queue. | [optional] +**start_time** | **\DateTime** | The time the call was initiated, in ISO 8601 format. `null` if the call is still in your queue. | [optional] +**answer_time** | **\DateTime** | Populated once the call has been answered, with the time in ISO 8601 format. | [optional] +**end_time** | **\DateTime** | Populated once the call has ended, with the time in ISO 8601 format. | [optional] +**disconnect_cause** | **string** | | Cause | Description | |:------|:------------| | `hangup`| One party hung up the call, a [`<Hangup>`](../../bxml/verbs/hangup.md) verb was executed, or there was no more BXML to execute; it indicates that the call ended normally. | | `busy` | Callee was busy. | | `timeout` | Call wasn't answered before the `callTimeout` was reached. | | `cancel` | Call was cancelled by its originator while it was ringing. | | `rejected` | Call was rejected by the callee. | | `callback-error` | BXML callback couldn't be delivered to your callback server. | | `invalid-bxml` | Invalid BXML was returned in response to a callback. | | `application-error` | An unsupported action was tried on the call, e.g. trying to play a .ogg audio. | | `account-limit` | Account rate limits were reached. | | `node-capacity-exceeded` | System maximum capacity was reached. | | `error` | Some error not described in any of the other causes happened on the call. | | `unknown` | Unknown error happened on the call. | Note: This list is not exhaustive and other values can appear in the future. | [optional] +**error_message** | **string** | Populated only if the call ended with an error, with text explaining the reason. | [optional] +**error_id** | **string** | Populated only if the call ended with an error, with a Bandwidth internal id that references the error event. | [optional] +**last_update** | **\DateTime** | The last time the call had a state update, in ISO 8601 format. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CallStateEnum.md b/docs/Model/CallStateEnum.md new file mode 100644 index 00000000..8d260713 --- /dev/null +++ b/docs/Model/CallStateEnum.md @@ -0,0 +1,8 @@ +# CallStateEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CallTranscription.md b/docs/Model/CallTranscription.md new file mode 100644 index 00000000..43c87383 --- /dev/null +++ b/docs/Model/CallTranscription.md @@ -0,0 +1,12 @@ +# CallTranscription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**detected_language** | [**\OpenAPI\Client\Model\CallTranscriptionDetectedLanguageEnum**](CallTranscriptionDetectedLanguageEnum.md) | | [optional] +**track** | [**\OpenAPI\Client\Model\CallTranscriptionTrackEnum**](CallTranscriptionTrackEnum.md) | | [optional] +**transcript** | **string** | The transcription itself. | [optional] +**confidence** | **float** | How confident the transcription engine was in transcribing the associated audio (from `0` to `1`). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CallTranscriptionDetectedLanguageEnum.md b/docs/Model/CallTranscriptionDetectedLanguageEnum.md new file mode 100644 index 00000000..10a2cb73 --- /dev/null +++ b/docs/Model/CallTranscriptionDetectedLanguageEnum.md @@ -0,0 +1,8 @@ +# CallTranscriptionDetectedLanguageEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CallTranscriptionMetadata.md b/docs/Model/CallTranscriptionMetadata.md new file mode 100644 index 00000000..04ae984c --- /dev/null +++ b/docs/Model/CallTranscriptionMetadata.md @@ -0,0 +1,11 @@ +# CallTranscriptionMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transcription_id** | **string** | The programmable voice API transcription ID. | [optional] +**transcription_name** | **string** | The programmable voice API transcription name. This name could be provided by the user when creating the transcription. | [optional] +**transcription_url** | **string** | A URL that may be used to retrieve the transcription itself. This points to the [Get Call Transcription](/apis/voice-apis/voice/#tag/Transcriptions/operation/getRealTimeTranscription) endpoint. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CallTranscriptionResponse.md b/docs/Model/CallTranscriptionResponse.md new file mode 100644 index 00000000..d3112be9 --- /dev/null +++ b/docs/Model/CallTranscriptionResponse.md @@ -0,0 +1,12 @@ +# CallTranscriptionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **string** | The user account associated with the call. | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**transcription_id** | **string** | The programmable voice API transcription ID. | [optional] +**tracks** | [**\OpenAPI\Client\Model\CallTranscription[]**](CallTranscription.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CallTranscriptionTrackEnum.md b/docs/Model/CallTranscriptionTrackEnum.md new file mode 100644 index 00000000..a2e7f72d --- /dev/null +++ b/docs/Model/CallTranscriptionTrackEnum.md @@ -0,0 +1,8 @@ +# CallTranscriptionTrackEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Callback.md b/docs/Model/Callback.md new file mode 100644 index 00000000..dba3107e --- /dev/null +++ b/docs/Model/Callback.md @@ -0,0 +1,16 @@ +# Callback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **\DateTime** | | +**event_time** | **\DateTime** | Represents the time at which the message was read, for `message-read` callbacks. | [optional] +**type** | [**\OpenAPI\Client\Model\InboundCallbackTypeEnum**](InboundCallbackTypeEnum.md) | | +**to** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | +**description** | **string** | A detailed description of the event described by the callback. | +**message** | [**\OpenAPI\Client\Model\InboundCallbackMessage**](InboundCallbackMessage.md) | | +**error_code** | **int** | Optional error code, applicable only when type is `message-failed`. | [optional] +**carrier_name** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CallbackMethodEnum.md b/docs/Model/CallbackMethodEnum.md new file mode 100644 index 00000000..89658f45 --- /dev/null +++ b/docs/Model/CallbackMethodEnum.md @@ -0,0 +1,8 @@ +# CallbackMethodEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CardWidthEnum.md b/docs/Model/CardWidthEnum.md new file mode 100644 index 00000000..9d737ecd --- /dev/null +++ b/docs/Model/CardWidthEnum.md @@ -0,0 +1,8 @@ +# CardWidthEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CodeRequest.md b/docs/Model/CodeRequest.md new file mode 100644 index 00000000..40a0a6d5 --- /dev/null +++ b/docs/Model/CodeRequest.md @@ -0,0 +1,14 @@ +# CodeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to** | **string** | The phone number to send the mfa code to. | +**from** | **string** | The application phone number, the sender of the mfa code. | +**application_id** | **string** | The application unique ID, obtained from Bandwidth. | +**scope** | **string** | An optional field to denote what scope or action the mfa code is addressing. If not supplied, defaults to \"2FA\". | [optional] +**message** | **string** | The message format of the mfa code. There are three values that the system will replace \"{CODE}\", \"{NAME}\", \"{SCOPE}\". The \"{SCOPE}\" and \"{NAME} value template are optional, while \"{CODE}\" must be supplied. As the name would suggest, code will be replace with the actual mfa code. Name is replaced with the application name, configured during provisioning of mfa. The scope value is the same value sent during the call and partitioned by the server. | +**digits** | **int** | The number of digits for your mfa code. The valid number ranges from 2 to 8, inclusively. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CompletedLookupStatusEnum.md b/docs/Model/CompletedLookupStatusEnum.md new file mode 100644 index 00000000..ea04ebfd --- /dev/null +++ b/docs/Model/CompletedLookupStatusEnum.md @@ -0,0 +1,8 @@ +# CompletedLookupStatusEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Conference.md b/docs/Model/Conference.md new file mode 100644 index 00000000..06b1aff7 --- /dev/null +++ b/docs/Model/Conference.md @@ -0,0 +1,16 @@ +# Conference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The Bandwidth-generated conference ID. | [optional] +**name** | **string** | The name of the conference, as specified by your application. | [optional] +**created_time** | **\DateTime** | The time the conference was initiated, in ISO 8601 format. | [optional] +**completed_time** | **\DateTime** | The time the conference was terminated, in ISO 8601 format. | [optional] +**conference_event_url** | **string** | The URL to send the conference-related events. | [optional] +**conference_event_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**tag** | **string** | The custom string attached to the conference that will be sent with callbacks. | [optional] +**active_members** | [**\OpenAPI\Client\Model\ConferenceMember[]**](ConferenceMember.md) | A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConferenceCompletedCallback.md b/docs/Model/ConferenceCompletedCallback.md new file mode 100644 index 00000000..60a60e80 --- /dev/null +++ b/docs/Model/ConferenceCompletedCallback.md @@ -0,0 +1,13 @@ +# ConferenceCompletedCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] +**name** | **string** | The user-specified name of the conference that was recorded | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConferenceCreatedCallback.md b/docs/Model/ConferenceCreatedCallback.md new file mode 100644 index 00000000..f54696f8 --- /dev/null +++ b/docs/Model/ConferenceCreatedCallback.md @@ -0,0 +1,13 @@ +# ConferenceCreatedCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] +**name** | **string** | The user-specified name of the conference that was recorded | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConferenceMember.md b/docs/Model/ConferenceMember.md new file mode 100644 index 00000000..ad6d74fd --- /dev/null +++ b/docs/Model/ConferenceMember.md @@ -0,0 +1,14 @@ +# ConferenceMember + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**call_id** | **string** | The call id associated with the event. | [optional] +**conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] +**member_url** | **string** | A URL that may be used to retrieve information about or update the state of this conference member. This is the URL of this member's [Get Conference Member](/apis/voice-apis/voice/#tag/Conferences/operation/getConferenceMember) endpoint and [Modify Conference Member](/apis/voice-apis/voice/#tag/Conferences/operation/updateConferenceMember) endpoint. | [optional] +**mute** | **bool** | Whether or not this member is currently muted. Members who are muted are still able to hear other participants. If used in a PUT request, updates this member's mute status. Has no effect if omitted. | [optional] +**hold** | **bool** | Whether or not this member is currently on hold. Members who are on hold are not able to hear or speak in the conference. If used in a PUT request, updates this member's hold status. Has no effect if omitted. | [optional] +**call_ids_to_coach** | **string[]** | If this member had a value set for `callIdsToCoach` in its [Conference](/docs/voice/bxml/conference) verb or this list was added with a previous PUT request to modify the member, this is that list of calls. If present in a PUT request, modifies the calls that this member is coaching. Has no effect if omitted. See the documentation for the [Conference](/docs/voice/bxml/conference) verb for more details about coaching. Note that this will not add the matching calls to the conference; each call must individually execute a Conference verb to join. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConferenceMemberExitCallback.md b/docs/Model/ConferenceMemberExitCallback.md new file mode 100644 index 00000000..837a8e06 --- /dev/null +++ b/docs/Model/ConferenceMemberExitCallback.md @@ -0,0 +1,16 @@ +# ConferenceMemberExitCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] +**name** | **string** | The user-specified name of the conference that was recorded | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConferenceMemberJoinCallback.md b/docs/Model/ConferenceMemberJoinCallback.md new file mode 100644 index 00000000..f47aea1e --- /dev/null +++ b/docs/Model/ConferenceMemberJoinCallback.md @@ -0,0 +1,16 @@ +# ConferenceMemberJoinCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] +**name** | **string** | The user-specified name of the conference that was recorded | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConferenceRecordingAvailableCallback.md b/docs/Model/ConferenceRecordingAvailableCallback.md new file mode 100644 index 00000000..3976ad2e --- /dev/null +++ b/docs/Model/ConferenceRecordingAvailableCallback.md @@ -0,0 +1,22 @@ +# ConferenceRecordingAvailableCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] +**name** | **string** | The user-specified name of the conference that was recorded | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**recording_id** | **string** | The unique ID of this recording | [optional] +**channels** | **int** | Always `1` for conference recordings; multi-channel recordings are not supported on conferences. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] +**duration** | **string** | The duration of the recording in ISO-8601 format | [optional] +**file_format** | [**\OpenAPI\Client\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] +**media_url** | **string** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**status** | **string** | The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConferenceRecordingMetadata.md b/docs/Model/ConferenceRecordingMetadata.md new file mode 100644 index 00000000..14b84d46 --- /dev/null +++ b/docs/Model/ConferenceRecordingMetadata.md @@ -0,0 +1,20 @@ +# ConferenceRecordingMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **string** | The user account associated with the call. | [optional] +**conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] +**name** | **string** | The user-specified name of the conference that was recorded | [optional] +**recording_id** | **string** | The unique ID of this recording | [optional] +**duration** | **string** | The duration of the recording in ISO-8601 format | [optional] +**channels** | **int** | Always `1` for conference recordings; multi-channel recordings are not supported on conferences. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] +**file_format** | [**\OpenAPI\Client\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] +**status** | **string** | The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] +**media_url** | **string** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional] +**recording_name** | **string** | A name to identify this recording. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConferenceRedirectCallback.md b/docs/Model/ConferenceRedirectCallback.md new file mode 100644 index 00000000..d1bd898c --- /dev/null +++ b/docs/Model/ConferenceRedirectCallback.md @@ -0,0 +1,13 @@ +# ConferenceRedirectCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] +**name** | **string** | The user-specified name of the conference that was recorded | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConferenceStateEnum.md b/docs/Model/ConferenceStateEnum.md new file mode 100644 index 00000000..e61483ba --- /dev/null +++ b/docs/Model/ConferenceStateEnum.md @@ -0,0 +1,8 @@ +# ConferenceStateEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Contact.md b/docs/Model/Contact.md new file mode 100644 index 00000000..e18b6e6e --- /dev/null +++ b/docs/Model/Contact.md @@ -0,0 +1,12 @@ +# Contact + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first_name** | **string** | The first name of the business contact using the toll-free number. | +**last_name** | **string** | The last name of the business contact using the toll-free number. | +**email** | **string** | | +**phone_number** | **string** | Contact telephone number | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateAsyncBulkLookupResponse.md b/docs/Model/CreateAsyncBulkLookupResponse.md new file mode 100644 index 00000000..2460c41f --- /dev/null +++ b/docs/Model/CreateAsyncBulkLookupResponse.md @@ -0,0 +1,11 @@ +# CreateAsyncBulkLookupResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**\OpenAPI\Client\Model\LinkSchema[]**](LinkSchema.md) | Links for pagination (if applicable) | [optional] +**data** | [**\OpenAPI\Client\Model\CreateAsyncBulkLookupResponseData**](CreateAsyncBulkLookupResponseData.md) | | [optional] +**errors** | [**\OpenAPI\Client\Model\LookupErrorSchema[]**](LookupErrorSchema.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateAsyncBulkLookupResponseData.md b/docs/Model/CreateAsyncBulkLookupResponseData.md new file mode 100644 index 00000000..6de366b9 --- /dev/null +++ b/docs/Model/CreateAsyncBulkLookupResponseData.md @@ -0,0 +1,10 @@ +# CreateAsyncBulkLookupResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_id** | **string** | The phone number lookup request ID from Bandwidth. | [optional] +**status** | [**\OpenAPI\Client\Model\InProgressLookupStatusEnum**](InProgressLookupStatusEnum.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateCall.md b/docs/Model/CreateCall.md new file mode 100644 index 00000000..60f853e0 --- /dev/null +++ b/docs/Model/CreateCall.md @@ -0,0 +1,29 @@ +# CreateCall + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to** | **string** | The destination to call (must be an E.164 formatted number (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.example`)). | +**from** | **string** | A Bandwidth phone number on your account the call should come from (must be in E.164 format, like `+15555551212`) even if `privacy` is set to true. | +**privacy** | **bool** | Hide the calling number. The `displayName` field can be used to customize the displayed name. | [optional] +**display_name** | **string** | The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If `privacy` is true, only the following values are valid: `Restricted`, `Anonymous`, `Private`, or `Unavailable`. | [optional] +**uui** | **string** | A comma-separated list of 'User-To-User' headers to be sent in the INVITE when calling a SIP URI. Each value must end with an 'encoding' parameter as described in <a href='https://tools.ietf.org/html/rfc7433'>RFC 7433</a>. Only 'jwt', 'base64' and 'hex' encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators. | [optional] +**application_id** | **string** | The id of the application associated with the `from` number. | +**answer_url** | **string** | The full URL to send the <a href='/docs/voice/webhooks/answer'>Answer</a> event to when the called party answers. This endpoint should return the first <a href='/docs/voice/bxml'>BXML document</a> to be executed in the call. Must use `https` if specifying `username` and `password`. | +**answer_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**username** | **string** | Basic auth username. | [optional] +**password** | **string** | Basic auth password. | [optional] +**answer_fallback_url** | **string** | A fallback url which, if provided, will be used to retry the `answer` webhook delivery in case `answerUrl` fails to respond Must use `https` if specifying `fallbackUsername` and `fallbackPassword`. | [optional] +**answer_fallback_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**fallback_username** | **string** | Basic auth username. | [optional] +**fallback_password** | **string** | Basic auth password. | [optional] +**disconnect_url** | **string** | The URL to send the <a href='/docs/voice/webhooks/disconnect'>Disconnect</a> event to when the call ends. This event does not expect a BXML response. | [optional] +**disconnect_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**call_timeout** | **float** | The timeout (in seconds) for the callee to answer the call after it starts ringing. If the call does not start ringing within 30s, the call will be cancelled regardless of this value. Can be any numeric value (including decimals) between 1 and 300. | [optional] [default to 30] +**callback_timeout** | **float** | This is the timeout (in seconds) to use when delivering webhooks for the call. Can be any numeric value (including decimals) between 1 and 25. | [optional] [default to 15] +**machine_detection** | [**\OpenAPI\Client\Model\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 4096 characters. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateCallResponse.md b/docs/Model/CreateCallResponse.md new file mode 100644 index 00000000..b5724fe9 --- /dev/null +++ b/docs/Model/CreateCallResponse.md @@ -0,0 +1,29 @@ +# CreateCallResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **string** | The id of the application associated with the `from` number. | +**account_id** | **string** | The bandwidth account ID associated with the call. | +**call_id** | **string** | Programmable Voice API Call ID. | +**to** | **string** | Recipient of the outgoing call. | +**from** | **string** | Phone number that created the outbound call. | +**enqueued_time** | **\DateTime** | The time at which the call was accepted into the queue. | [optional] +**call_url** | **string** | The URL to update this call's state. | +**call_timeout** | **float** | The timeout (in seconds) for the callee to answer the call after it starts ringing. | [optional] +**callback_timeout** | **float** | This is the timeout (in seconds) to use when delivering webhooks for the call. | [optional] +**tag** | **string** | Custom tag value. | [optional] +**answer_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | +**answer_url** | **string** | URL to deliver the `answer` event webhook. | +**answer_fallback_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**answer_fallback_url** | **string** | Fallback URL to deliver the `answer` event webhook. | [optional] +**disconnect_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | +**disconnect_url** | **string** | URL to deliver the `disconnect` event webhook. | [optional] +**username** | **string** | Basic auth username. | [optional] +**password** | **string** | Basic auth password. | [optional] +**fallback_username** | **string** | Basic auth username. | [optional] +**fallback_password** | **string** | Basic auth password. | [optional] +**priority** | **int** | The priority of this call over other calls from your account. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateEndpointRequestBase.md b/docs/Model/CreateEndpointRequestBase.md new file mode 100644 index 00000000..699242a5 --- /dev/null +++ b/docs/Model/CreateEndpointRequestBase.md @@ -0,0 +1,13 @@ +# CreateEndpointRequestBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | +**direction** | [**\OpenAPI\Client\Model\EndpointDirectionEnum**](EndpointDirectionEnum.md) | | +**event_callback_url** | **string** | The URL to send event callbacks to. | [optional] +**event_fallback_url** | **string** | The URL to send event fallbacks to. | [optional] +**tag** | **string** | A tag for the endpoint. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateEndpointResponse.md b/docs/Model/CreateEndpointResponse.md new file mode 100644 index 00000000..0fde440b --- /dev/null +++ b/docs/Model/CreateEndpointResponse.md @@ -0,0 +1,11 @@ +# CreateEndpointResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**\OpenAPI\Client\Model\BrtcLink[]**](BrtcLink.md) | | +**data** | [**\OpenAPI\Client\Model\CreateEndpointResponseData**](CreateEndpointResponseData.md) | | +**errors** | [**\OpenAPI\Client\Model\BrtcError[]**](BrtcError.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateEndpointResponseData.md b/docs/Model/CreateEndpointResponseData.md new file mode 100644 index 00000000..ed7b8be9 --- /dev/null +++ b/docs/Model/CreateEndpointResponseData.md @@ -0,0 +1,16 @@ +# CreateEndpointResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endpoint_id** | **string** | The unique ID of the endpoint. | +**type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | +**status** | [**\OpenAPI\Client\Model\EndpointStatusEnum**](EndpointStatusEnum.md) | | +**creation_timestamp** | **\DateTime** | The time the endpoint was created. In ISO-8601 format. | +**expiration_timestamp** | **\DateTime** | The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. | +**tag** | **string** | A tag for the endpoint. | [optional] +**devices** | [**\OpenAPI\Client\Model\Device[]**](Device.md) | | [optional] +**token** | **string** | The json web token specific to the endpoint. Used to authenticate the client with the media gateway. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateMessageRequestError.md b/docs/Model/CreateMessageRequestError.md new file mode 100644 index 00000000..b834941e --- /dev/null +++ b/docs/Model/CreateMessageRequestError.md @@ -0,0 +1,11 @@ +# CreateMessageRequestError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | +**description** | **string** | | +**field_errors** | [**\OpenAPI\Client\Model\FieldError[]**](FieldError.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateMultiChannelMessageResponse.md b/docs/Model/CreateMultiChannelMessageResponse.md new file mode 100644 index 00000000..5d8e7fbe --- /dev/null +++ b/docs/Model/CreateMultiChannelMessageResponse.md @@ -0,0 +1,11 @@ +# CreateMultiChannelMessageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**\OpenAPI\Client\Model\Link[]**](Link.md) | | [optional] +**data** | [**\OpenAPI\Client\Model\MultiChannelMessageResponseData**](MultiChannelMessageResponseData.md) | | [optional] +**errors** | [**\OpenAPI\Client\Model\ErrorObject[]**](ErrorObject.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateSyncLookupResponse.md b/docs/Model/CreateSyncLookupResponse.md new file mode 100644 index 00000000..1515b193 --- /dev/null +++ b/docs/Model/CreateSyncLookupResponse.md @@ -0,0 +1,11 @@ +# CreateSyncLookupResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**\OpenAPI\Client\Model\LinkSchema[]**](LinkSchema.md) | | [optional] +**data** | [**\OpenAPI\Client\Model\CreateSyncLookupResponseData**](CreateSyncLookupResponseData.md) | | [optional] +**errors** | [**\OpenAPI\Client\Model\LookupErrorSchema[]**](LookupErrorSchema.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateSyncLookupResponseData.md b/docs/Model/CreateSyncLookupResponseData.md new file mode 100644 index 00000000..f9e55798 --- /dev/null +++ b/docs/Model/CreateSyncLookupResponseData.md @@ -0,0 +1,11 @@ +# CreateSyncLookupResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_id** | **string** | The phone number lookup request ID from Bandwidth. | [optional] +**status** | [**\OpenAPI\Client\Model\CompletedLookupStatusEnum**](CompletedLookupStatusEnum.md) | | [optional] +**results** | [**\OpenAPI\Client\Model\LookupResult[]**](LookupResult.md) | The carrier information results for the specified telephone numbers. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateWebRtcConnectionRequest.md b/docs/Model/CreateWebRtcConnectionRequest.md new file mode 100644 index 00000000..7003b3fe --- /dev/null +++ b/docs/Model/CreateWebRtcConnectionRequest.md @@ -0,0 +1,14 @@ +# CreateWebRtcConnectionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | +**direction** | [**\OpenAPI\Client\Model\EndpointDirectionEnum**](EndpointDirectionEnum.md) | | +**event_callback_url** | **string** | The URL to send event callbacks to. | [optional] +**event_fallback_url** | **string** | The URL to send event fallbacks to. | [optional] +**tag** | **string** | A tag for the endpoint. | [optional] +**connection_metadata** | **object** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DeactivationEventEnum.md b/docs/Model/DeactivationEventEnum.md new file mode 100644 index 00000000..c8bdf825 --- /dev/null +++ b/docs/Model/DeactivationEventEnum.md @@ -0,0 +1,8 @@ +# DeactivationEventEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Device.md b/docs/Model/Device.md new file mode 100644 index 00000000..ee92cf78 --- /dev/null +++ b/docs/Model/Device.md @@ -0,0 +1,12 @@ +# Device + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**device_id** | **string** | The unique ID of the device. | +**device_name** | **string** | The name of the device. | [optional] +**status** | [**\OpenAPI\Client\Model\DeviceStatusEnum**](DeviceStatusEnum.md) | | +**creation_timestamp** | **\DateTime** | The time the device was created. In ISO-8601 format. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DeviceStatusEnum.md b/docs/Model/DeviceStatusEnum.md new file mode 100644 index 00000000..7bc751c3 --- /dev/null +++ b/docs/Model/DeviceStatusEnum.md @@ -0,0 +1,8 @@ +# DeviceStatusEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DisconnectCallback.md b/docs/Model/DisconnectCallback.md new file mode 100644 index 00000000..34fbd3d5 --- /dev/null +++ b/docs/Model/DisconnectCallback.md @@ -0,0 +1,25 @@ +# DisconnectCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] +**end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] +**cause** | **string** | Reason the call failed - hangup, busy, timeout, cancel, rejected, callback-error, invalid-bxml, application-error, account-limit, node-capacity-exceeded, error, or unknown. | [optional] +**error_message** | **string** | Text explaining the reason that caused the call to fail in case of errors. | [optional] +**error_id** | **string** | Bandwidth's internal id that references the error event. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Diversion.md b/docs/Model/Diversion.md new file mode 100644 index 00000000..7bb2d6cf --- /dev/null +++ b/docs/Model/Diversion.md @@ -0,0 +1,15 @@ +# Diversion + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**reason** | **string** | The reason for the diversion. Common values: unknown, user-busy, no-answer, unavailable, unconditional, time-of-day, do-not-disturb, deflection, follow-me, out-of-service, away. | [optional] +**privacy** | **string** | off or full | [optional] +**screen** | **string** | No if the number was provided by the user, yes if the number was provided by the network | [optional] +**counter** | **string** | The number of diversions that have occurred | [optional] +**limit** | **string** | The maximum number of diversions allowed for this session | [optional] +**unknown** | **string** | The normal list of values is not exhaustive. Your application must be tolerant of unlisted keys and unlisted values of those keys. | [optional] +**orig_to** | **string** | Always present. Indicates the last telephone number that the call was diverted from. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DtmfCallback.md b/docs/Model/DtmfCallback.md new file mode 100644 index 00000000..4824835a --- /dev/null +++ b/docs/Model/DtmfCallback.md @@ -0,0 +1,25 @@ +# DtmfCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**digit** | **string** | The digit collected in the call. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] +**parent_call_id** | **string** | (optional) If the event is related to the B leg of a <Transfer>, the call id of the original call leg that executed the <Transfer>. Otherwise, this field will not be present. | [optional] +**transfer_caller_id** | **string** | The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**transfer_to** | **string** | The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Endpoint.md b/docs/Model/Endpoint.md new file mode 100644 index 00000000..2b11f07f --- /dev/null +++ b/docs/Model/Endpoint.md @@ -0,0 +1,15 @@ +# Endpoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endpoint_id** | **string** | The unique ID of the endpoint. | +**type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | +**status** | [**\OpenAPI\Client\Model\EndpointStatusEnum**](EndpointStatusEnum.md) | | +**creation_timestamp** | **\DateTime** | The time the endpoint was created. In ISO-8601 format. | +**expiration_timestamp** | **\DateTime** | The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. | +**tag** | **string** | A tag for the endpoint. | [optional] +**devices** | [**\OpenAPI\Client\Model\Device[]**](Device.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EndpointDirectionEnum.md b/docs/Model/EndpointDirectionEnum.md new file mode 100644 index 00000000..41e4d0fc --- /dev/null +++ b/docs/Model/EndpointDirectionEnum.md @@ -0,0 +1,8 @@ +# EndpointDirectionEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EndpointEvent.md b/docs/Model/EndpointEvent.md new file mode 100644 index 00000000..4096d40b --- /dev/null +++ b/docs/Model/EndpointEvent.md @@ -0,0 +1,17 @@ +# EndpointEvent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endpoint_id** | **string** | The unique ID of the endpoint. | +**type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | +**status** | [**\OpenAPI\Client\Model\EndpointStatusEnum**](EndpointStatusEnum.md) | | +**creation_timestamp** | **\DateTime** | The time the endpoint was created. In ISO-8601 format. | +**expiration_timestamp** | **\DateTime** | The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. | +**tag** | **string** | A tag for the endpoint. | [optional] +**event_time** | **\DateTime** | The time the event occurred. In ISO-8601 format. | +**event_type** | [**\OpenAPI\Client\Model\EndpointEventTypeEnum**](EndpointEventTypeEnum.md) | | +**device** | [**\OpenAPI\Client\Model\Device**](Device.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EndpointEventTypeEnum.md b/docs/Model/EndpointEventTypeEnum.md new file mode 100644 index 00000000..da95b814 --- /dev/null +++ b/docs/Model/EndpointEventTypeEnum.md @@ -0,0 +1,8 @@ +# EndpointEventTypeEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EndpointResponse.md b/docs/Model/EndpointResponse.md new file mode 100644 index 00000000..7fd26e7f --- /dev/null +++ b/docs/Model/EndpointResponse.md @@ -0,0 +1,11 @@ +# EndpointResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**\OpenAPI\Client\Model\BrtcLink[]**](BrtcLink.md) | | +**data** | [**\OpenAPI\Client\Model\Endpoint**](Endpoint.md) | | +**errors** | [**\OpenAPI\Client\Model\BrtcError[]**](BrtcError.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EndpointStatusEnum.md b/docs/Model/EndpointStatusEnum.md new file mode 100644 index 00000000..c8542918 --- /dev/null +++ b/docs/Model/EndpointStatusEnum.md @@ -0,0 +1,8 @@ +# EndpointStatusEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EndpointTypeEnum.md b/docs/Model/EndpointTypeEnum.md new file mode 100644 index 00000000..f6014f63 --- /dev/null +++ b/docs/Model/EndpointTypeEnum.md @@ -0,0 +1,8 @@ +# EndpointTypeEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Endpoints.md b/docs/Model/Endpoints.md new file mode 100644 index 00000000..2385ab5b --- /dev/null +++ b/docs/Model/Endpoints.md @@ -0,0 +1,14 @@ +# Endpoints + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**endpoint_id** | **string** | The unique ID of the endpoint. | +**type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | +**status** | [**\OpenAPI\Client\Model\EndpointStatusEnum**](EndpointStatusEnum.md) | | +**creation_timestamp** | **\DateTime** | The time the endpoint was created. In ISO-8601 format. | +**expiration_timestamp** | **\DateTime** | The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. | +**tag** | **string** | A tag for the endpoint. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ErrorObject.md b/docs/Model/ErrorObject.md new file mode 100644 index 00000000..5a63ae69 --- /dev/null +++ b/docs/Model/ErrorObject.md @@ -0,0 +1,11 @@ +# ErrorObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | A concise summary of the error used for categorization. | +**description** | **string** | A detailed explanation of the error. | +**source** | [**\OpenAPI\Client\Model\ErrorSource**](ErrorSource.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ErrorSource.md b/docs/Model/ErrorSource.md new file mode 100644 index 00000000..6450d7ee --- /dev/null +++ b/docs/Model/ErrorSource.md @@ -0,0 +1,12 @@ +# ErrorSource + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**parameter** | **string** | The relevant URI query parameter causing the error | [optional] +**field** | **string** | The request body field that led to the error | [optional] +**header** | **string** | The header field that contributed to the error | [optional] +**reference** | **string** | A resource ID or path linked to the error | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FailureWebhook.md b/docs/Model/FailureWebhook.md new file mode 100644 index 00000000..57ff20fe --- /dev/null +++ b/docs/Model/FailureWebhook.md @@ -0,0 +1,14 @@ +# FailureWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **string** | User's account ID. | [optional] +**phone_number** | **string** | Toll-free telephone number in E.164 format. | [optional] +**error_code** | **string** | An error code indicating what error was encountered. This code can be interpreted as an HTTP status code in regards to the error that was encountered. | [optional] +**error_message** | **string** | A description of the error that was encountered. | [optional] +**errors** | **string[]** | Details of the errors that were encountered when processing the request. | [optional] +**internal_ticket_number** | **string** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FieldError.md b/docs/Model/FieldError.md new file mode 100644 index 00000000..9bb021f0 --- /dev/null +++ b/docs/Model/FieldError.md @@ -0,0 +1,10 @@ +# FieldError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**field_name** | **string** | The name of the field that contains the error | [optional] +**description** | **string** | The error associated with the field | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/FileFormatEnum.md b/docs/Model/FileFormatEnum.md new file mode 100644 index 00000000..3bfc5753 --- /dev/null +++ b/docs/Model/FileFormatEnum.md @@ -0,0 +1,8 @@ +# FileFormatEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GatherCallback.md b/docs/Model/GatherCallback.md new file mode 100644 index 00000000..a8120031 --- /dev/null +++ b/docs/Model/GatherCallback.md @@ -0,0 +1,26 @@ +# GatherCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**digits** | **string** | (optional) The digits, letters, and/or symbols entered by the user. The string is empty if a timeout occurred before any buttons were pressed. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] +**parent_call_id** | **string** | (optional) If the event is related to the B leg of a <Transfer>, the call id of the original call leg that executed the <Transfer>. Otherwise, this field will not be present. | [optional] +**terminating_digit** | **string** | (optional) The digit the user pressed to end the gather. Empty string value if no terminating digit was pressed. | [optional] +**transfer_caller_id** | **string** | The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**transfer_to** | **string** | The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetAsyncBulkLookupResponse.md b/docs/Model/GetAsyncBulkLookupResponse.md new file mode 100644 index 00000000..1f361899 --- /dev/null +++ b/docs/Model/GetAsyncBulkLookupResponse.md @@ -0,0 +1,11 @@ +# GetAsyncBulkLookupResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**\OpenAPI\Client\Model\LinkSchema[]**](LinkSchema.md) | | [optional] +**data** | [**\OpenAPI\Client\Model\GetAsyncBulkLookupResponseData**](GetAsyncBulkLookupResponseData.md) | | [optional] +**errors** | [**\OpenAPI\Client\Model\LookupErrorSchema[]**](LookupErrorSchema.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetAsyncBulkLookupResponseData.md b/docs/Model/GetAsyncBulkLookupResponseData.md new file mode 100644 index 00000000..20e7fbbe --- /dev/null +++ b/docs/Model/GetAsyncBulkLookupResponseData.md @@ -0,0 +1,11 @@ +# GetAsyncBulkLookupResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**request_id** | **string** | The phone number lookup request ID from Bandwidth. | [optional] +**status** | [**\OpenAPI\Client\Model\InProgressLookupStatusEnum**](InProgressLookupStatusEnum.md) | | [optional] +**results** | [**\OpenAPI\Client\Model\LookupResult[]**](LookupResult.md) | The carrier information results for the specified telephone number. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InProgressLookupStatusEnum.md b/docs/Model/InProgressLookupStatusEnum.md new file mode 100644 index 00000000..cfbdbdef --- /dev/null +++ b/docs/Model/InProgressLookupStatusEnum.md @@ -0,0 +1,8 @@ +# InProgressLookupStatusEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InboundCallback.md b/docs/Model/InboundCallback.md new file mode 100644 index 00000000..59e0d6f0 --- /dev/null +++ b/docs/Model/InboundCallback.md @@ -0,0 +1,14 @@ +# InboundCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **\DateTime** | | +**type** | [**\OpenAPI\Client\Model\InboundCallbackTypeEnum**](InboundCallbackTypeEnum.md) | | +**to** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | +**description** | **string** | A detailed description of the event described by the callback. | +**message** | [**\OpenAPI\Client\Model\InboundCallbackMessage**](InboundCallbackMessage.md) | | +**carrier_name** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InboundCallbackMessage.md b/docs/Model/InboundCallbackMessage.md new file mode 100644 index 00000000..a74bbfa7 --- /dev/null +++ b/docs/Model/InboundCallbackMessage.md @@ -0,0 +1,24 @@ +# InboundCallbackMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | A unique identifier of the message. | +**owner** | **string** | The Bandwidth phone number or alphanumeric identifier associated with the message. | +**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | +**time** | **\DateTime** | | +**segment_count** | **int** | The number of segments the user's message is broken into before sending over carrier networks. | +**direction** | [**\OpenAPI\Client\Model\MessageDirectionEnum**](MessageDirectionEnum.md) | | +**to** | **string[]** | The phone number recipients of the message. | +**from** | **string** | The Bandwidth phone number or alphanumeric identifier the message was sent from. | +**text** | **string** | | [optional] +**tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] +**media** | **string[]** | Optional media, not applicable for sms | [optional] +**priority** | [**\OpenAPI\Client\Model\PriorityEnum**](PriorityEnum.md) | | [optional] +**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | [optional] +**content** | [**\OpenAPI\Client\Model\MultiChannelMessageContent**](MultiChannelMessageContent.md) | | [optional] +**suggestion_response** | [**\OpenAPI\Client\Model\RbmSuggestionResponse**](RbmSuggestionResponse.md) | | [optional] +**location_response** | [**\OpenAPI\Client\Model\RbmLocationResponse**](RbmLocationResponse.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InboundCallbackTypeEnum.md b/docs/Model/InboundCallbackTypeEnum.md new file mode 100644 index 00000000..39ed500a --- /dev/null +++ b/docs/Model/InboundCallbackTypeEnum.md @@ -0,0 +1,8 @@ +# InboundCallbackTypeEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InitiateCallback.md b/docs/Model/InitiateCallback.md new file mode 100644 index 00000000..7c8c82e6 --- /dev/null +++ b/docs/Model/InitiateCallback.md @@ -0,0 +1,21 @@ +# InitiateCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**diversion** | [**\OpenAPI\Client\Model\Diversion**](Diversion.md) | | [optional] +**stir_shaken** | [**\OpenAPI\Client\Model\StirShaken**](StirShaken.md) | | [optional] +**uui** | **string** | The value of the `User-To-User` header to send within the initial `INVITE`. Must include the encoding parameter as specified in RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LatestMessageDeliveryStatusEnum.md b/docs/Model/LatestMessageDeliveryStatusEnum.md new file mode 100644 index 00000000..1a815b4d --- /dev/null +++ b/docs/Model/LatestMessageDeliveryStatusEnum.md @@ -0,0 +1,8 @@ +# LatestMessageDeliveryStatusEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LineTypeEnum.md b/docs/Model/LineTypeEnum.md new file mode 100644 index 00000000..da9aa1d0 --- /dev/null +++ b/docs/Model/LineTypeEnum.md @@ -0,0 +1,8 @@ +# LineTypeEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Link.md b/docs/Model/Link.md new file mode 100644 index 00000000..3c32c36a --- /dev/null +++ b/docs/Model/Link.md @@ -0,0 +1,10 @@ +# Link + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**rel** | **string** | | [optional] +**href** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LinkSchema.md b/docs/Model/LinkSchema.md new file mode 100644 index 00000000..f471ad1a --- /dev/null +++ b/docs/Model/LinkSchema.md @@ -0,0 +1,11 @@ +# LinkSchema + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**href** | **string** | URI of the link. | [optional] +**rel** | **string** | Specifies the relationship between this link and the resource. | [optional] +**method** | **string** | HTTP method to be used. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LinksObject.md b/docs/Model/LinksObject.md new file mode 100644 index 00000000..cc059c54 --- /dev/null +++ b/docs/Model/LinksObject.md @@ -0,0 +1,12 @@ +# LinksObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first** | **string** | The first (or only) page of results matching the query. | [optional] +**next** | **string** | If more results exist than specified by 'size', this link returns the next page of 'size' results. | [optional] +**previous** | **string** | If the results are more than one page, this link returns the previous page of 'size' results. | [optional] +**last** | **string** | If more results exist than specified by 'size', this link return the last page of result. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListEndpointsResponse.md b/docs/Model/ListEndpointsResponse.md new file mode 100644 index 00000000..233b0071 --- /dev/null +++ b/docs/Model/ListEndpointsResponse.md @@ -0,0 +1,12 @@ +# ListEndpointsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**\OpenAPI\Client\Model\BrtcLink[]**](BrtcLink.md) | | +**page** | [**\OpenAPI\Client\Model\Page**](Page.md) | | [optional] +**data** | [**\OpenAPI\Client\Model\Endpoints[]**](Endpoints.md) | | +**errors** | [**\OpenAPI\Client\Model\BrtcError[]**](BrtcError.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListMessageDirectionEnum.md b/docs/Model/ListMessageDirectionEnum.md new file mode 100644 index 00000000..6cffce5f --- /dev/null +++ b/docs/Model/ListMessageDirectionEnum.md @@ -0,0 +1,8 @@ +# ListMessageDirectionEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListMessageItem.md b/docs/Model/ListMessageItem.md new file mode 100644 index 00000000..3e807345 --- /dev/null +++ b/docs/Model/ListMessageItem.md @@ -0,0 +1,31 @@ +# ListMessageItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_id** | **string** | The message id | [optional] +**account_id** | **string** | The account id associated with this message. | [optional] +**source_tn** | **string** | The source phone number of the message. | [optional] +**destination_tn** | **string** | The recipient phone number of the message. | [optional] +**message_status** | [**\OpenAPI\Client\Model\MessageStatusEnum**](MessageStatusEnum.md) | | [optional] +**message_direction** | [**\OpenAPI\Client\Model\ListMessageDirectionEnum**](ListMessageDirectionEnum.md) | | [optional] +**message_type** | [**\OpenAPI\Client\Model\MessageTypeEnum**](MessageTypeEnum.md) | | [optional] +**segment_count** | **int** | The number of segments the user's message is broken into before sending over carrier networks. | [optional] +**error_code** | **int** | The numeric error code of the message. | [optional] +**receive_time** | **\DateTime** | The ISO 8601 datetime of the message. | [optional] +**carrier_name** | **string** | The name of the carrier. Not currently supported for MMS coming soon. | [optional] +**message_size** | **int** | The size of the message including message content and headers. | [optional] +**message_length** | **int** | The length of the message content. | [optional] +**attachment_count** | **int** | The number of attachments the message has. | [optional] +**recipient_count** | **int** | The number of recipients the message has. | [optional] +**campaign_class** | **string** | The campaign class of the message if it has one. | [optional] +**campaign_id** | **string** | The campaign ID of the message if it has one. | [optional] +**bw_latency** | **int** | The Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. | [optional] +**carrier_latency** | **int** | The carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] +**calling_number_country_a3** | **string** | The A3 country code of the calling number. | [optional] +**called_number_country_a3** | **string** | The A3 country code of the called number. | [optional] +**product** | **string** | The messaging product associated with the message. | [optional] +**location** | **string** | The location ID associated with this message. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LookupErrorResponse.md b/docs/Model/LookupErrorResponse.md new file mode 100644 index 00000000..a91edda0 --- /dev/null +++ b/docs/Model/LookupErrorResponse.md @@ -0,0 +1,11 @@ +# LookupErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**\OpenAPI\Client\Model\LinkSchema[]**](LinkSchema.md) | | [optional] +**data** | **object** | The phone number lookup response data | [optional] +**errors** | [**\OpenAPI\Client\Model\LookupErrorSchema[]**](LookupErrorSchema.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LookupErrorSchema.md b/docs/Model/LookupErrorSchema.md new file mode 100644 index 00000000..20617818 --- /dev/null +++ b/docs/Model/LookupErrorSchema.md @@ -0,0 +1,12 @@ +# LookupErrorSchema + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | Validation error code | +**description** | **string** | Description of validation error | +**type** | **string** | Type of validation error | +**meta** | [**\OpenAPI\Client\Model\LookupErrorSchemaMeta**](LookupErrorSchemaMeta.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LookupErrorSchemaMeta.md b/docs/Model/LookupErrorSchemaMeta.md new file mode 100644 index 00000000..5519510b --- /dev/null +++ b/docs/Model/LookupErrorSchemaMeta.md @@ -0,0 +1,11 @@ +# LookupErrorSchemaMeta + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phone_numbers** | **string[]** | | [optional] +**message** | **string** | Message describing the error | [optional] +**code** | **int** | Error code associated with the message | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LookupResult.md b/docs/Model/LookupResult.md new file mode 100644 index 00000000..59e196ee --- /dev/null +++ b/docs/Model/LookupResult.md @@ -0,0 +1,20 @@ +# LookupResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phone_number** | **string** | The telephone number in E.164 format. | [optional] +**line_type** | [**\OpenAPI\Client\Model\LineTypeEnum**](LineTypeEnum.md) | | [optional] +**messaging_provider** | **string** | The messaging service provider of the telephone number. | [optional] +**voice_provider** | **string** | The voice service provider of the telephone number. | [optional] +**country_code_a3** | **string** | The country code of the telephone number in ISO 3166-1 alpha-3 format. | [optional] +**deactivation_reporter** | **string** | [DNI-Only](#section/DNI-Only). The carrier that reported a deactivation event for this phone number. | [optional] +**deactivation_date** | **string** | [DNI-Only](#section/DNI-Only). The datetime the carrier reported a deactivation event. | [optional] +**deactivation_event** | [**\OpenAPI\Client\Model\DeactivationEventEnum**](DeactivationEventEnum.md) | | [optional] +**latest_message_delivery_status** | [**\OpenAPI\Client\Model\LatestMessageDeliveryStatusEnum**](LatestMessageDeliveryStatusEnum.md) | | [optional] +**initial_message_delivery_status_date** | **\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] +**latest_message_delivery_status_date** | **\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] +**rcs_enabled** | **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] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MachineDetectionCompleteCallback.md b/docs/Model/MachineDetectionCompleteCallback.md new file mode 100644 index 00000000..031b391f --- /dev/null +++ b/docs/Model/MachineDetectionCompleteCallback.md @@ -0,0 +1,22 @@ +# MachineDetectionCompleteCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**machine_detection_result** | [**\OpenAPI\Client\Model\MachineDetectionResult**](MachineDetectionResult.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MachineDetectionConfiguration.md b/docs/Model/MachineDetectionConfiguration.md new file mode 100644 index 00000000..63305251 --- /dev/null +++ b/docs/Model/MachineDetectionConfiguration.md @@ -0,0 +1,23 @@ +# MachineDetectionConfiguration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | [**\OpenAPI\Client\Model\MachineDetectionModeEnum**](MachineDetectionModeEnum.md) | | [optional] +**detection_timeout** | **float** | The timeout used for the whole operation, in seconds. If no result is determined in this period, a callback with a `timeout` result is sent. | [optional] [default to 15] +**silence_timeout** | **float** | If no speech is detected in this period, a callback with a 'silence' result is sent. | [optional] [default to 10] +**speech_threshold** | **float** | When speech has ended and a result couldn't be determined based on the audio content itself, this value is used to determine if the speaker is a machine based on the speech duration. If the length of the speech detected is greater than or equal to this threshold, the result will be 'answering-machine'. If the length of speech detected is below this threshold, the result will be 'human'. | [optional] [default to 10] +**speech_end_threshold** | **float** | Amount of silence (in seconds) before assuming the callee has finished speaking. | [optional] [default to 5] +**machine_speech_end_threshold** | **float** | When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value. | [optional] +**delay_result** | **bool** | If set to 'true' and if an answering machine is detected, the 'answering-machine' callback will be delayed until the machine is done speaking, or an end of message tone is detected, or until the 'detectionTimeout' is exceeded. If false, the 'answering-machine' result is sent immediately. | [optional] [default to false] +**callback_url** | **string** | The URL to send the 'machineDetectionComplete' webhook when the detection is completed. Only for 'async' mode. | [optional] +**callback_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**username** | **string** | Basic auth username. | [optional] +**password** | **string** | Basic auth password. | [optional] +**fallback_url** | **string** | A fallback URL which, if provided, will be used to retry the machine detection complete webhook delivery in case `callbackUrl` fails to respond | [optional] +**fallback_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**fallback_username** | **string** | Basic auth username. | [optional] +**fallback_password** | **string** | Basic auth password. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MachineDetectionModeEnum.md b/docs/Model/MachineDetectionModeEnum.md new file mode 100644 index 00000000..8d6bdd3f --- /dev/null +++ b/docs/Model/MachineDetectionModeEnum.md @@ -0,0 +1,8 @@ +# MachineDetectionModeEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MachineDetectionResult.md b/docs/Model/MachineDetectionResult.md new file mode 100644 index 00000000..d4c241db --- /dev/null +++ b/docs/Model/MachineDetectionResult.md @@ -0,0 +1,10 @@ +# MachineDetectionResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **string** | Possible values are answering-machine, human, silence, timeout, or error. | [optional] +**duration** | **string** | The amount of time it took to determine the result. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Media.md b/docs/Model/Media.md new file mode 100644 index 00000000..f0e615f7 --- /dev/null +++ b/docs/Model/Media.md @@ -0,0 +1,11 @@ +# Media + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **string** | | [optional] +**content_length** | **int** | | [optional] +**media_name** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Message.md b/docs/Model/Message.md new file mode 100644 index 00000000..b9afaef2 --- /dev/null +++ b/docs/Model/Message.md @@ -0,0 +1,21 @@ +# Message + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The id of the message. | [optional] +**owner** | **string** | The Bandwidth phone number associated with the message. | [optional] +**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | [optional] +**time** | **\DateTime** | The datetime stamp of the message in ISO 8601 | [optional] +**segment_count** | **int** | The number of segments the user's message is broken into before sending over carrier networks. | [optional] +**direction** | [**\OpenAPI\Client\Model\MessageDirectionEnum**](MessageDirectionEnum.md) | | [optional] +**to** | **string[]** | The phone number recipients of the message. | [optional] +**from** | **string** | The phone number the message was sent from. | [optional] +**media** | **string[]** | The list of media URLs sent in the message. Including a `filename` field in the `Content-Disposition` header of the media linked with a URL will set the displayed file name. This is a best practice to ensure that your media has a readable file name. | [optional] +**text** | **string** | The contents of the message. | [optional] +**tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] +**priority** | [**\OpenAPI\Client\Model\PriorityEnum**](PriorityEnum.md) | | [optional] +**expiration** | **\DateTime** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MessageDirectionEnum.md b/docs/Model/MessageDirectionEnum.md new file mode 100644 index 00000000..66ca35e7 --- /dev/null +++ b/docs/Model/MessageDirectionEnum.md @@ -0,0 +1,8 @@ +# MessageDirectionEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MessageRequest.md b/docs/Model/MessageRequest.md new file mode 100644 index 00000000..4679cb82 --- /dev/null +++ b/docs/Model/MessageRequest.md @@ -0,0 +1,16 @@ +# MessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | +**to** | **string[]** | The phone number(s) the message should be sent to in E164 format. | +**from** | **string** | Either an alphanumeric sender ID or the sender's Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. | +**text** | **string** | The contents of the text message. Must be 2048 characters or less. | [optional] +**media** | **string[]** | A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters. | [optional] +**tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] +**priority** | [**\OpenAPI\Client\Model\PriorityEnum**](PriorityEnum.md) | | [optional] +**expiration** | **\DateTime** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MessageStatusEnum.md b/docs/Model/MessageStatusEnum.md new file mode 100644 index 00000000..66049bb7 --- /dev/null +++ b/docs/Model/MessageStatusEnum.md @@ -0,0 +1,8 @@ +# MessageStatusEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MessageTypeEnum.md b/docs/Model/MessageTypeEnum.md new file mode 100644 index 00000000..520484ed --- /dev/null +++ b/docs/Model/MessageTypeEnum.md @@ -0,0 +1,8 @@ +# MessageTypeEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MessagesList.md b/docs/Model/MessagesList.md new file mode 100644 index 00000000..9491cbda --- /dev/null +++ b/docs/Model/MessagesList.md @@ -0,0 +1,11 @@ +# MessagesList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_count** | **int** | The total number of messages matched by the search. When the request has limitTotalCount set to true this value is limited to 10,000. | [optional] +**page_info** | [**\OpenAPI\Client\Model\PageInfo**](PageInfo.md) | | [optional] +**messages** | [**\OpenAPI\Client\Model\ListMessageItem[]**](ListMessageItem.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MessagingCodeResponse.md b/docs/Model/MessagingCodeResponse.md new file mode 100644 index 00000000..e53d356f --- /dev/null +++ b/docs/Model/MessagingCodeResponse.md @@ -0,0 +1,9 @@ +# MessagingCodeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message_id** | **string** | Messaging API Message ID. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MessagingRequestError.md b/docs/Model/MessagingRequestError.md new file mode 100644 index 00000000..7a96a106 --- /dev/null +++ b/docs/Model/MessagingRequestError.md @@ -0,0 +1,10 @@ +# MessagingRequestError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | +**description** | **string** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MfaForbiddenRequestError.md b/docs/Model/MfaForbiddenRequestError.md new file mode 100644 index 00000000..cf5356e6 --- /dev/null +++ b/docs/Model/MfaForbiddenRequestError.md @@ -0,0 +1,9 @@ +# MfaForbiddenRequestError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **string** | The message containing the reason behind the request being forbidden. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MfaRequestError.md b/docs/Model/MfaRequestError.md new file mode 100644 index 00000000..518e3154 --- /dev/null +++ b/docs/Model/MfaRequestError.md @@ -0,0 +1,10 @@ +# MfaRequestError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**error** | **string** | A message describing the error with your request. | [optional] +**request_id** | **string** | The associated requestId from AWS. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MfaUnauthorizedRequestError.md b/docs/Model/MfaUnauthorizedRequestError.md new file mode 100644 index 00000000..efd1664c --- /dev/null +++ b/docs/Model/MfaUnauthorizedRequestError.md @@ -0,0 +1,9 @@ +# MfaUnauthorizedRequestError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **string** | Unauthorized | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MmsMessageContent.md b/docs/Model/MmsMessageContent.md new file mode 100644 index 00000000..ad079a4b --- /dev/null +++ b/docs/Model/MmsMessageContent.md @@ -0,0 +1,10 @@ +# MmsMessageContent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **string** | The contents of the text message. Must be 2048 characters or less. | [optional] +**media** | [**\OpenAPI\Client\Model\MmsMessageContentFile[]**](MmsMessageContentFile.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MmsMessageContentFile.md b/docs/Model/MmsMessageContentFile.md new file mode 100644 index 00000000..7a5c67cf --- /dev/null +++ b/docs/Model/MmsMessageContentFile.md @@ -0,0 +1,9 @@ +# MmsMessageContentFile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_url** | **string** | The URL of a media attachment. For MMS, the API limits file size to 3.5MB. Specific carriers and channels may have a smaller limit that could cause a large file to fail, see more at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823216-what-are-the-mms-file-size-limits) for more details. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelAction.md b/docs/Model/MultiChannelAction.md new file mode 100644 index 00000000..c819bd26 --- /dev/null +++ b/docs/Model/MultiChannelAction.md @@ -0,0 +1,22 @@ +# MultiChannelAction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**\OpenAPI\Client\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | +**text** | **string** | Displayed text for user to click | +**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | +**phone_number** | **string** | The phone number to dial. Must be E164 format. | +**latitude** | **float** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | +**longitude** | **float** | The longitude of the location. Must be in range [-180.000000, 180.000000]. | +**label** | **string** | The label of the location. | [optional] +**title** | **string** | The title of the event. | +**start_time** | **\DateTime** | The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | +**end_time** | **\DateTime** | The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | +**description** | **string** | The description of the event. | [optional] +**url** | **string** | The URL to open in browser. Must use http:// or https:// scheme. | +**application** | [**\OpenAPI\Client\Model\RbmOpenUrlEnum**](RbmOpenUrlEnum.md) | | [optional] +**webview_view_mode** | [**\OpenAPI\Client\Model\RbmWebViewEnum**](RbmWebViewEnum.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelActionCalendarEvent.md b/docs/Model/MultiChannelActionCalendarEvent.md new file mode 100644 index 00000000..9b12ad47 --- /dev/null +++ b/docs/Model/MultiChannelActionCalendarEvent.md @@ -0,0 +1,15 @@ +# MultiChannelActionCalendarEvent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**\OpenAPI\Client\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | +**text** | **string** | Displayed text for user to click | +**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | +**title** | **string** | The title of the event. | +**start_time** | **\DateTime** | The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | +**end_time** | **\DateTime** | The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | +**description** | **string** | The description of the event. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListMMSObject.md b/docs/Model/MultiChannelChannelListMMSObject.md new file mode 100644 index 00000000..6bf60f18 --- /dev/null +++ b/docs/Model/MultiChannelChannelListMMSObject.md @@ -0,0 +1,12 @@ +# MultiChannelChannelListMMSObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | +**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | +**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\OpenAPI\Client\Model\MmsMessageContent**](MmsMessageContent.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListMMSResponseObject.md b/docs/Model/MultiChannelChannelListMMSResponseObject.md new file mode 100644 index 00000000..d2fea758 --- /dev/null +++ b/docs/Model/MultiChannelChannelListMMSResponseObject.md @@ -0,0 +1,13 @@ +# MultiChannelChannelListMMSResponseObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | +**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | +**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\OpenAPI\Client\Model\MmsMessageContent**](MmsMessageContent.md) | | +**owner** | **string** | The Bandwidth senderId associated with the message. Identical to 'from'. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListObjectBase.md b/docs/Model/MultiChannelChannelListObjectBase.md new file mode 100644 index 00000000..746133a9 --- /dev/null +++ b/docs/Model/MultiChannelChannelListObjectBase.md @@ -0,0 +1,11 @@ +# MultiChannelChannelListObjectBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | +**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | +**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListOwnerObject.md b/docs/Model/MultiChannelChannelListOwnerObject.md new file mode 100644 index 00000000..e44a22d3 --- /dev/null +++ b/docs/Model/MultiChannelChannelListOwnerObject.md @@ -0,0 +1,9 @@ +# MultiChannelChannelListOwnerObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**owner** | **string** | The Bandwidth senderId associated with the message. Identical to 'from'. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListRBMObject.md b/docs/Model/MultiChannelChannelListRBMObject.md new file mode 100644 index 00000000..4df5ff8d --- /dev/null +++ b/docs/Model/MultiChannelChannelListRBMObject.md @@ -0,0 +1,12 @@ +# MultiChannelChannelListRBMObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | +**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | +**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent**](MultiChannelChannelListRBMObjectAllOfContent.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md b/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md new file mode 100644 index 00000000..94205922 --- /dev/null +++ b/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md @@ -0,0 +1,16 @@ +# MultiChannelChannelListRBMObjectAllOfContent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **string** | The text associated with the message. Must be 3270 characters or less | +**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] +**media** | [**\OpenAPI\Client\Model\RbmMessageContentFile[]**](RbmMessageContentFile.md) | | +**orientation** | [**\OpenAPI\Client\Model\StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | +**thumbnail_image_alignment** | [**\OpenAPI\Client\Model\ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [optional] +**card_content** | [**\OpenAPI\Client\Model\RbmCardContent**](RbmCardContent.md) | | +**card_width** | [**\OpenAPI\Client\Model\CardWidthEnum**](CardWidthEnum.md) | | +**card_contents** | [**\OpenAPI\Client\Model\RbmCardContent[]**](RbmCardContent.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListRBMResponseObject.md b/docs/Model/MultiChannelChannelListRBMResponseObject.md new file mode 100644 index 00000000..e84ee8ff --- /dev/null +++ b/docs/Model/MultiChannelChannelListRBMResponseObject.md @@ -0,0 +1,13 @@ +# MultiChannelChannelListRBMResponseObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | +**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | +**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent**](MultiChannelChannelListRBMObjectAllOfContent.md) | | +**owner** | **string** | The Bandwidth senderId associated with the message. Identical to 'from'. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListRequestObject.md b/docs/Model/MultiChannelChannelListRequestObject.md new file mode 100644 index 00000000..3918cd26 --- /dev/null +++ b/docs/Model/MultiChannelChannelListRequestObject.md @@ -0,0 +1,12 @@ +# MultiChannelChannelListRequestObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | +**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | +**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\OpenAPI\Client\Model\MmsMessageContent**](MmsMessageContent.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListResponseObject.md b/docs/Model/MultiChannelChannelListResponseObject.md new file mode 100644 index 00000000..82923581 --- /dev/null +++ b/docs/Model/MultiChannelChannelListResponseObject.md @@ -0,0 +1,13 @@ +# MultiChannelChannelListResponseObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | +**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | +**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\OpenAPI\Client\Model\MmsMessageContent**](MmsMessageContent.md) | | +**owner** | **string** | The Bandwidth senderId associated with the message. Identical to 'from'. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListSMSObject.md b/docs/Model/MultiChannelChannelListSMSObject.md new file mode 100644 index 00000000..4e5bb37c --- /dev/null +++ b/docs/Model/MultiChannelChannelListSMSObject.md @@ -0,0 +1,12 @@ +# MultiChannelChannelListSMSObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | +**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | +**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\OpenAPI\Client\Model\SmsMessageContent**](SmsMessageContent.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListSMSResponseObject.md b/docs/Model/MultiChannelChannelListSMSResponseObject.md new file mode 100644 index 00000000..d2fbcc39 --- /dev/null +++ b/docs/Model/MultiChannelChannelListSMSResponseObject.md @@ -0,0 +1,13 @@ +# MultiChannelChannelListSMSResponseObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | +**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | +**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\OpenAPI\Client\Model\SmsMessageContent**](SmsMessageContent.md) | | +**owner** | **string** | The Bandwidth senderId associated with the message. Identical to 'from'. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelError.md b/docs/Model/MultiChannelError.md new file mode 100644 index 00000000..47957f59 --- /dev/null +++ b/docs/Model/MultiChannelError.md @@ -0,0 +1,11 @@ +# MultiChannelError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**\OpenAPI\Client\Model\Link[]**](Link.md) | | [optional] +**data** | **object** | | [optional] +**errors** | [**\OpenAPI\Client\Model\ErrorObject[]**](ErrorObject.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelMessageChannelEnum.md b/docs/Model/MultiChannelMessageChannelEnum.md new file mode 100644 index 00000000..7a936195 --- /dev/null +++ b/docs/Model/MultiChannelMessageChannelEnum.md @@ -0,0 +1,8 @@ +# MultiChannelMessageChannelEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelMessageContent.md b/docs/Model/MultiChannelMessageContent.md new file mode 100644 index 00000000..483edd25 --- /dev/null +++ b/docs/Model/MultiChannelMessageContent.md @@ -0,0 +1,10 @@ +# MultiChannelMessageContent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **string** | | [optional] +**media** | [**\OpenAPI\Client\Model\RbmMessageContentFile**](RbmMessageContentFile.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelMessageRequest.md b/docs/Model/MultiChannelMessageRequest.md new file mode 100644 index 00000000..9bf972a7 --- /dev/null +++ b/docs/Model/MultiChannelMessageRequest.md @@ -0,0 +1,13 @@ +# MultiChannelMessageRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to** | **string** | The phone number the message should be sent to in E164 format. | +**channel_list** | [**\OpenAPI\Client\Model\MultiChannelChannelListRequestObject[]**](MultiChannelChannelListRequestObject.md) | A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. | +**tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] +**priority** | [**\OpenAPI\Client\Model\PriorityEnum**](PriorityEnum.md) | | [optional] +**expiration** | **\DateTime** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelMessageResponseData.md b/docs/Model/MultiChannelMessageResponseData.md new file mode 100644 index 00000000..f1b5c42d --- /dev/null +++ b/docs/Model/MultiChannelMessageResponseData.md @@ -0,0 +1,16 @@ +# MultiChannelMessageResponseData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The ID of the message. | +**time** | **\DateTime** | The time the message was received by the Bandwidth API. | +**direction** | [**\OpenAPI\Client\Model\MessageDirectionEnum**](MessageDirectionEnum.md) | | +**to** | **string[]** | The destination phone number(s) of the message, in E164 format. | +**channel_list** | [**\OpenAPI\Client\Model\MultiChannelChannelListResponseObject[]**](MultiChannelChannelListResponseObject.md) | A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. | +**tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] +**priority** | [**\OpenAPI\Client\Model\PriorityEnum**](PriorityEnum.md) | | [optional] +**expiration** | **\DateTime** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OptInWorkflow.md b/docs/Model/OptInWorkflow.md new file mode 100644 index 00000000..c9857d3e --- /dev/null +++ b/docs/Model/OptInWorkflow.md @@ -0,0 +1,11 @@ +# OptInWorkflow + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **string** | | +**image_urls** | **string[]** | | +**confirmation_response** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Page.md b/docs/Model/Page.md new file mode 100644 index 00000000..7f9263ed --- /dev/null +++ b/docs/Model/Page.md @@ -0,0 +1,12 @@ +# Page + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page_size** | **int** | The number of items per page. | +**total_elements** | **int** | The total number of items. | [optional] +**total_pages** | **int** | The total number of pages. | [optional] +**page_number** | **int** | The current page number. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PageInfo.md b/docs/Model/PageInfo.md new file mode 100644 index 00000000..ed313084 --- /dev/null +++ b/docs/Model/PageInfo.md @@ -0,0 +1,12 @@ +# PageInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**prev_page** | **string** | The link to the previous page for pagination. | [optional] +**next_page** | **string** | The link to the next page for pagination. | [optional] +**prev_page_token** | **string** | The isolated pagination token for the previous page. | [optional] +**next_page_token** | **string** | The isolated pagination token for the next page. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PriorityEnum.md b/docs/Model/PriorityEnum.md new file mode 100644 index 00000000..c1fe1655 --- /dev/null +++ b/docs/Model/PriorityEnum.md @@ -0,0 +1,8 @@ +# PriorityEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ProductTypeEnum.md b/docs/Model/ProductTypeEnum.md new file mode 100644 index 00000000..f02ecf13 --- /dev/null +++ b/docs/Model/ProductTypeEnum.md @@ -0,0 +1,8 @@ +# ProductTypeEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmActionBase.md b/docs/Model/RbmActionBase.md new file mode 100644 index 00000000..0a2ae92d --- /dev/null +++ b/docs/Model/RbmActionBase.md @@ -0,0 +1,11 @@ +# RbmActionBase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**\OpenAPI\Client\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | +**text** | **string** | Displayed text for user to click | +**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmActionDial.md b/docs/Model/RbmActionDial.md new file mode 100644 index 00000000..aadb2587 --- /dev/null +++ b/docs/Model/RbmActionDial.md @@ -0,0 +1,12 @@ +# RbmActionDial + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**\OpenAPI\Client\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | +**text** | **string** | Displayed text for user to click | +**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | +**phone_number** | **string** | The phone number to dial. Must be E164 format. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmActionOpenUrl.md b/docs/Model/RbmActionOpenUrl.md new file mode 100644 index 00000000..2a47deef --- /dev/null +++ b/docs/Model/RbmActionOpenUrl.md @@ -0,0 +1,14 @@ +# RbmActionOpenUrl + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**\OpenAPI\Client\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | +**text** | **string** | Displayed text for user to click | +**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | +**url** | **string** | The URL to open in browser. Must use http:// or https:// scheme. | +**application** | [**\OpenAPI\Client\Model\RbmOpenUrlEnum**](RbmOpenUrlEnum.md) | | [optional] +**webview_view_mode** | [**\OpenAPI\Client\Model\RbmWebViewEnum**](RbmWebViewEnum.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmActionTypeEnum.md b/docs/Model/RbmActionTypeEnum.md new file mode 100644 index 00000000..57bb63ec --- /dev/null +++ b/docs/Model/RbmActionTypeEnum.md @@ -0,0 +1,8 @@ +# RbmActionTypeEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmActionViewLocation.md b/docs/Model/RbmActionViewLocation.md new file mode 100644 index 00000000..50999c5f --- /dev/null +++ b/docs/Model/RbmActionViewLocation.md @@ -0,0 +1,14 @@ +# RbmActionViewLocation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | [**\OpenAPI\Client\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | +**text** | **string** | Displayed text for user to click | +**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | +**latitude** | **float** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | +**longitude** | **float** | The longitude of the location. Must be in range [-180.000000, 180.000000]. | +**label** | **string** | The label of the location. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmCardContent.md b/docs/Model/RbmCardContent.md new file mode 100644 index 00000000..acfe166f --- /dev/null +++ b/docs/Model/RbmCardContent.md @@ -0,0 +1,12 @@ +# RbmCardContent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | The title of the card. Must be 200 characters or less. | [optional] +**description** | **string** | The description of the card. Must be 2000 characters or less. | [optional] +**media** | [**\OpenAPI\Client\Model\RbmCardContentMedia**](RbmCardContentMedia.md) | | [optional] +**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient that will be displayed on the rich card. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmCardContentMedia.md b/docs/Model/RbmCardContentMedia.md new file mode 100644 index 00000000..ab3d098d --- /dev/null +++ b/docs/Model/RbmCardContentMedia.md @@ -0,0 +1,11 @@ +# RbmCardContentMedia + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_url** | **string** | The URL of the media file. 100MB is the maximum file size. | +**thumbnail_url** | **string** | The URL of the thumbnail image. Applies only to video file media. | [optional] +**height** | [**\OpenAPI\Client\Model\RbmMediaHeightEnum**](RbmMediaHeightEnum.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmLocationResponse.md b/docs/Model/RbmLocationResponse.md new file mode 100644 index 00000000..2538c922 --- /dev/null +++ b/docs/Model/RbmLocationResponse.md @@ -0,0 +1,10 @@ +# RbmLocationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**latitude** | **float** | The latitude of the client's location. | [optional] +**longitude** | **float** | The longitude of the client's location. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmMediaHeightEnum.md b/docs/Model/RbmMediaHeightEnum.md new file mode 100644 index 00000000..d3634cfd --- /dev/null +++ b/docs/Model/RbmMediaHeightEnum.md @@ -0,0 +1,8 @@ +# RbmMediaHeightEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmMessageCarouselCard.md b/docs/Model/RbmMessageCarouselCard.md new file mode 100644 index 00000000..f035b0ff --- /dev/null +++ b/docs/Model/RbmMessageCarouselCard.md @@ -0,0 +1,11 @@ +# RbmMessageCarouselCard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**card_width** | [**\OpenAPI\Client\Model\CardWidthEnum**](CardWidthEnum.md) | | +**card_contents** | [**\OpenAPI\Client\Model\RbmCardContent[]**](RbmCardContent.md) | | +**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmMessageContentFile.md b/docs/Model/RbmMessageContentFile.md new file mode 100644 index 00000000..0c245d71 --- /dev/null +++ b/docs/Model/RbmMessageContentFile.md @@ -0,0 +1,10 @@ +# RbmMessageContentFile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_url** | **string** | The URL of the media file. 100MB is the maximum file size. | +**thumbnail_url** | **string** | The URL of the thumbnail image. Applies only to video file media. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmMessageContentRichCard.md b/docs/Model/RbmMessageContentRichCard.md new file mode 100644 index 00000000..193f391b --- /dev/null +++ b/docs/Model/RbmMessageContentRichCard.md @@ -0,0 +1,14 @@ +# RbmMessageContentRichCard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orientation** | [**\OpenAPI\Client\Model\StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | +**thumbnail_image_alignment** | [**\OpenAPI\Client\Model\ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [optional] +**card_content** | [**\OpenAPI\Client\Model\RbmCardContent**](RbmCardContent.md) | | +**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] +**card_width** | [**\OpenAPI\Client\Model\CardWidthEnum**](CardWidthEnum.md) | | +**card_contents** | [**\OpenAPI\Client\Model\RbmCardContent[]**](RbmCardContent.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmMessageContentText.md b/docs/Model/RbmMessageContentText.md new file mode 100644 index 00000000..0e2439f6 --- /dev/null +++ b/docs/Model/RbmMessageContentText.md @@ -0,0 +1,10 @@ +# RbmMessageContentText + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **string** | The text associated with the message. Must be 3270 characters or less | +**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmMessageMedia.md b/docs/Model/RbmMessageMedia.md new file mode 100644 index 00000000..9f161ba4 --- /dev/null +++ b/docs/Model/RbmMessageMedia.md @@ -0,0 +1,10 @@ +# RbmMessageMedia + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**media** | [**\OpenAPI\Client\Model\RbmMessageContentFile[]**](RbmMessageContentFile.md) | | +**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmOpenUrlEnum.md b/docs/Model/RbmOpenUrlEnum.md new file mode 100644 index 00000000..ff4e99d5 --- /dev/null +++ b/docs/Model/RbmOpenUrlEnum.md @@ -0,0 +1,8 @@ +# RbmOpenUrlEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmStandaloneCard.md b/docs/Model/RbmStandaloneCard.md new file mode 100644 index 00000000..776dfe4c --- /dev/null +++ b/docs/Model/RbmStandaloneCard.md @@ -0,0 +1,12 @@ +# RbmStandaloneCard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**orientation** | [**\OpenAPI\Client\Model\StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | +**thumbnail_image_alignment** | [**\OpenAPI\Client\Model\ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [optional] +**card_content** | [**\OpenAPI\Client\Model\RbmCardContent**](RbmCardContent.md) | | +**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmSuggestionResponse.md b/docs/Model/RbmSuggestionResponse.md new file mode 100644 index 00000000..f4463792 --- /dev/null +++ b/docs/Model/RbmSuggestionResponse.md @@ -0,0 +1,11 @@ +# RbmSuggestionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **string** | The text associated with the suggestion response. | [optional] +**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | [optional] +**paired_message_id** | **string** | Corresponding parent message ID (MT). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmWebViewEnum.md b/docs/Model/RbmWebViewEnum.md new file mode 100644 index 00000000..72c65549 --- /dev/null +++ b/docs/Model/RbmWebViewEnum.md @@ -0,0 +1,8 @@ +# RbmWebViewEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RecordingAvailableCallback.md b/docs/Model/RecordingAvailableCallback.md new file mode 100644 index 00000000..edfb94e4 --- /dev/null +++ b/docs/Model/RecordingAvailableCallback.md @@ -0,0 +1,30 @@ +# RecordingAvailableCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**parent_call_id** | **string** | (optional) If the event is related to the B leg of a <Transfer>, the call id of the original call leg that executed the <Transfer>. Otherwise, this field will not be present. | [optional] +**recording_id** | **string** | The unique ID of this recording | [optional] +**media_url** | **string** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] +**duration** | **string** | The duration of the recording in ISO-8601 format | [optional] +**file_format** | [**\OpenAPI\Client\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] +**channels** | **int** | Always `1` for conference recordings; multi-channel recordings are not supported on conferences. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**status** | **string** | The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] +**transfer_caller_id** | **string** | The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**transfer_to** | **string** | The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RecordingCompleteCallback.md b/docs/Model/RecordingCompleteCallback.md new file mode 100644 index 00000000..d6ed8f92 --- /dev/null +++ b/docs/Model/RecordingCompleteCallback.md @@ -0,0 +1,30 @@ +# RecordingCompleteCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**parent_call_id** | **string** | (optional) If the event is related to the B leg of a <Transfer>, the call id of the original call leg that executed the <Transfer>. Otherwise, this field will not be present. | [optional] +**recording_id** | **string** | The unique ID of this recording | [optional] +**media_url** | **string** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] +**end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] +**duration** | **string** | The duration of the recording in ISO-8601 format | [optional] +**file_format** | [**\OpenAPI\Client\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] +**channels** | **int** | Always `1` for conference recordings; multi-channel recordings are not supported on conferences. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**transfer_caller_id** | **string** | The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**transfer_to** | **string** | The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RecordingStateEnum.md b/docs/Model/RecordingStateEnum.md new file mode 100644 index 00000000..38d6f5c5 --- /dev/null +++ b/docs/Model/RecordingStateEnum.md @@ -0,0 +1,8 @@ +# RecordingStateEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RecordingTranscriptionClip.md b/docs/Model/RecordingTranscriptionClip.md new file mode 100644 index 00000000..98cba8e4 --- /dev/null +++ b/docs/Model/RecordingTranscriptionClip.md @@ -0,0 +1,13 @@ +# RecordingTranscriptionClip + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**speaker** | **int** | Zero-based index identifying the speaker. | [optional] +**text** | **string** | The transcribed text of this clip. | [optional] +**confidence** | **float** | How confident the transcription engine was in transcribing this clip (from `0.0` to `1.0`). | [optional] +**start_time_seconds** | **float** | The start time of this clip within the recording, in seconds. | [optional] +**end_time_seconds** | **float** | The end time of this clip within the recording, in seconds. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RecordingTranscriptionMetadata.md b/docs/Model/RecordingTranscriptionMetadata.md new file mode 100644 index 00000000..aa9a956d --- /dev/null +++ b/docs/Model/RecordingTranscriptionMetadata.md @@ -0,0 +1,12 @@ +# RecordingTranscriptionMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | The unique transcription ID | [optional] +**status** | **string** | The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] +**completed_time** | **\DateTime** | The time that the transcription was completed | [optional] +**url** | **string** | The URL of the [transcription](#operation/getCallTranscription) | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RecordingTranscriptions.md b/docs/Model/RecordingTranscriptions.md new file mode 100644 index 00000000..6ede6261 --- /dev/null +++ b/docs/Model/RecordingTranscriptions.md @@ -0,0 +1,10 @@ +# RecordingTranscriptions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transcripts** | [**\OpenAPI\Client\Model\Transcription[]**](Transcription.md) | | [optional] +**clips** | [**\OpenAPI\Client\Model\RecordingTranscriptionClip[]**](RecordingTranscriptionClip.md) | A list of individual speech clips with speaker, timing, and confidence information. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RedirectCallback.md b/docs/Model/RedirectCallback.md new file mode 100644 index 00000000..29dcdd5c --- /dev/null +++ b/docs/Model/RedirectCallback.md @@ -0,0 +1,24 @@ +# RedirectCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**parent_call_id** | **string** | (optional) If the event is related to the B leg of a <Transfer>, the call id of the original call leg that executed the <Transfer>. Otherwise, this field will not be present. | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**transfer_caller_id** | **string** | The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**transfer_to** | **string** | The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RedirectMethodEnum.md b/docs/Model/RedirectMethodEnum.md new file mode 100644 index 00000000..bab52069 --- /dev/null +++ b/docs/Model/RedirectMethodEnum.md @@ -0,0 +1,8 @@ +# RedirectMethodEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SipConnectionMetadata.md b/docs/Model/SipConnectionMetadata.md new file mode 100644 index 00000000..bb744e6d --- /dev/null +++ b/docs/Model/SipConnectionMetadata.md @@ -0,0 +1,12 @@ +# SipConnectionMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ip_address** | **string** | The IP address of the SIP connection. | [optional] +**port** | **int** | The port of the SIP connection. | [optional] +**credentials** | [**\OpenAPI\Client\Model\SipCredentials**](SipCredentials.md) | | [optional] +**uui_header** | **string** | The User-to-User Information header for the SIP connection. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SipCredentials.md b/docs/Model/SipCredentials.md new file mode 100644 index 00000000..2c1841f9 --- /dev/null +++ b/docs/Model/SipCredentials.md @@ -0,0 +1,10 @@ +# SipCredentials + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **string** | The username for the SIP connection. | [optional] +**password** | **string** | The password for the SIP connection. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SmsMessageContent.md b/docs/Model/SmsMessageContent.md new file mode 100644 index 00000000..6982f084 --- /dev/null +++ b/docs/Model/SmsMessageContent.md @@ -0,0 +1,9 @@ +# SmsMessageContent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**text** | **string** | The contents of the text message. Must be 2048 characters or less. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StandaloneCardOrientationEnum.md b/docs/Model/StandaloneCardOrientationEnum.md new file mode 100644 index 00000000..965564f8 --- /dev/null +++ b/docs/Model/StandaloneCardOrientationEnum.md @@ -0,0 +1,8 @@ +# StandaloneCardOrientationEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StatusCallback.md b/docs/Model/StatusCallback.md new file mode 100644 index 00000000..3d0b6968 --- /dev/null +++ b/docs/Model/StatusCallback.md @@ -0,0 +1,16 @@ +# StatusCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**time** | **\DateTime** | | +**event_time** | **\DateTime** | Represents the time at which the message was read, for `message-read` callbacks. | [optional] +**type** | [**\OpenAPI\Client\Model\StatusCallbackTypeEnum**](StatusCallbackTypeEnum.md) | | +**to** | **string** | The destination phone number the message was sent to. For status callbacks, this the the Bandwidth user's client phone number. | +**description** | **string** | A detailed description of the event described by the callback. | +**message** | [**\OpenAPI\Client\Model\StatusCallbackMessage**](StatusCallbackMessage.md) | | +**error_code** | **int** | Optional error code, applicable only when type is `message-failed`. | [optional] +**carrier_name** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StatusCallbackMessage.md b/docs/Model/StatusCallbackMessage.md new file mode 100644 index 00000000..98a27624 --- /dev/null +++ b/docs/Model/StatusCallbackMessage.md @@ -0,0 +1,21 @@ +# StatusCallbackMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | A unique identifier of the message. | +**owner** | **string** | The Bandwidth phone number or alphanumeric identifier associated with the message. | +**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | +**time** | **\DateTime** | | +**segment_count** | **int** | The number of segments the user's message is broken into before sending over carrier networks. | +**direction** | [**\OpenAPI\Client\Model\MessageDirectionEnum**](MessageDirectionEnum.md) | | +**to** | **string[]** | The phone number recipients of the message. | +**from** | **string** | The Bandwidth phone number or alphanumeric identifier the message was sent from. | +**text** | **string** | | [optional] +**tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] +**media** | **string[]** | Optional media, not applicable for sms | [optional] +**priority** | [**\OpenAPI\Client\Model\PriorityEnum**](PriorityEnum.md) | | [optional] +**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StatusCallbackTypeEnum.md b/docs/Model/StatusCallbackTypeEnum.md new file mode 100644 index 00000000..a16be060 --- /dev/null +++ b/docs/Model/StatusCallbackTypeEnum.md @@ -0,0 +1,8 @@ +# StatusCallbackTypeEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StirShaken.md b/docs/Model/StirShaken.md new file mode 100644 index 00000000..1023b2ad --- /dev/null +++ b/docs/Model/StirShaken.md @@ -0,0 +1,11 @@ +# StirShaken + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**verstat** | **string** | (optional) The verification status indicating whether the verification was successful or not. Possible values are TN-Validation-Passed and TN-Validation-Failed. | [optional] +**attestation_indicator** | **string** | (optional) The attestation level verified by Bandwidth. Possible values are A (full), B (partial) or C (gateway). | [optional] +**originating_id** | **string** | (optional) A unique origination identifier. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/SyncLookupRequest.md b/docs/Model/SyncLookupRequest.md new file mode 100644 index 00000000..bb75e914 --- /dev/null +++ b/docs/Model/SyncLookupRequest.md @@ -0,0 +1,10 @@ +# SyncLookupRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phone_numbers** | **string[]** | Telephone numbers in E.164 format. | +**rcs_agent** | **string** | Override the default RCS sender/agent ID used when checking RCS capabilities. When provided, this value is used as the `sender` in the RCS capability-check request instead of the account default. Must be 1–40 characters and contain only letters, digits, underscores, or hyphens. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TelephoneNumber.md b/docs/Model/TelephoneNumber.md new file mode 100644 index 00000000..bb99ce02 --- /dev/null +++ b/docs/Model/TelephoneNumber.md @@ -0,0 +1,9 @@ +# TelephoneNumber + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**telephone_number** | **string** | Simple Telephone Number. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TfvBasicAuthentication.md b/docs/Model/TfvBasicAuthentication.md new file mode 100644 index 00000000..67a462e6 --- /dev/null +++ b/docs/Model/TfvBasicAuthentication.md @@ -0,0 +1,10 @@ +# TfvBasicAuthentication + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **string** | | +**password** | **string** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TfvCallbackStatusEnum.md b/docs/Model/TfvCallbackStatusEnum.md new file mode 100644 index 00000000..7db3951a --- /dev/null +++ b/docs/Model/TfvCallbackStatusEnum.md @@ -0,0 +1,8 @@ +# TfvCallbackStatusEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TfvError.md b/docs/Model/TfvError.md new file mode 100644 index 00000000..c8b173d8 --- /dev/null +++ b/docs/Model/TfvError.md @@ -0,0 +1,11 @@ +# TfvError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] +**description** | **string** | | [optional] +**errors** | **object** | Each key of this errors object refers to a field of the submitted object (using dot notation for nested objects), with the field being a key to an array of one or more errors for that field. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TfvStatus.md b/docs/Model/TfvStatus.md new file mode 100644 index 00000000..527dfe8c --- /dev/null +++ b/docs/Model/TfvStatus.md @@ -0,0 +1,21 @@ +# TfvStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**phone_number** | **string** | Toll-free telephone number in E.164 format. | [optional] +**status** | [**\OpenAPI\Client\Model\TfvStatusEnum**](TfvStatusEnum.md) | | [optional] +**internal_ticket_number** | **string** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number - included in all webhook payloads. | [optional] +**decline_reason_description** | **string** | Explanation for why a verification request was declined. | [optional] +**denial_status_code** | **int** | Reason code for denial. | [optional] +**additional_denial_reasons** | [**\OpenAPI\Client\Model\AdditionalDenialReason[]**](AdditionalDenialReason.md) | An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. | [optional] +**resubmit_allowed** | **bool** | Whether a Toll-Free Verification request qualifies for resubmission via PUT. | [optional] +**created_date_time** | **\DateTime** | Date and time the verification request was created. | [optional] +**modified_date_time** | **\DateTime** | Date and time the verification request was last modified. | [optional] +**submission** | [**\OpenAPI\Client\Model\TfvSubmissionInfo**](TfvSubmissionInfo.md) | | [optional] +**blocked** | **bool** | Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] +**blocked_reason** | **string** | The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] +**cv_token** | **string** | The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TfvStatusEnum.md b/docs/Model/TfvStatusEnum.md new file mode 100644 index 00000000..a7c720d2 --- /dev/null +++ b/docs/Model/TfvStatusEnum.md @@ -0,0 +1,8 @@ +# TfvStatusEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TfvSubmissionInfo.md b/docs/Model/TfvSubmissionInfo.md new file mode 100644 index 00000000..d99efd4d --- /dev/null +++ b/docs/Model/TfvSubmissionInfo.md @@ -0,0 +1,24 @@ +# TfvSubmissionInfo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**business_address** | [**\OpenAPI\Client\Model\Address**](Address.md) | | [optional] +**business_contact** | [**\OpenAPI\Client\Model\Contact**](Contact.md) | | [optional] +**message_volume** | **int** | Estimated monthly volume of messages from the toll-free number. | [optional] +**use_case** | **string** | The category of the use case. | [optional] +**use_case_summary** | **string** | A general idea of the use case and customer. | [optional] +**production_message_content** | **string** | Example of message content. | [optional] +**opt_in_workflow** | [**\OpenAPI\Client\Model\OptInWorkflow**](OptInWorkflow.md) | | [optional] +**additional_information** | **string** | Any additional information. | [optional] +**isv_reseller** | **string** | ISV name. | [optional] +**privacy_policy_url** | **string** | The Toll-Free Verification request privacy policy URL. | [optional] +**terms_and_conditions_url** | **string** | The Toll-Free Verification request terms and conditions policy URL. | [optional] +**business_dba** | **string** | The company 'Doing Business As'. | [optional] +**business_registration_number** | **string** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] +**business_registration_type** | [**\OpenAPI\Client\Model\BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] +**business_registration_issuing_country** | **string** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] +**business_entity_type** | [**\OpenAPI\Client\Model\BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TfvSubmissionWrapper.md b/docs/Model/TfvSubmissionWrapper.md new file mode 100644 index 00000000..0979c831 --- /dev/null +++ b/docs/Model/TfvSubmissionWrapper.md @@ -0,0 +1,9 @@ +# TfvSubmissionWrapper + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**submission** | [**\OpenAPI\Client\Model\VerificationUpdateRequest**](VerificationUpdateRequest.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ThumbnailAlignmentEnum.md b/docs/Model/ThumbnailAlignmentEnum.md new file mode 100644 index 00000000..e56d8206 --- /dev/null +++ b/docs/Model/ThumbnailAlignmentEnum.md @@ -0,0 +1,8 @@ +# ThumbnailAlignmentEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TranscribeRecording.md b/docs/Model/TranscribeRecording.md new file mode 100644 index 00000000..13ff7d39 --- /dev/null +++ b/docs/Model/TranscribeRecording.md @@ -0,0 +1,15 @@ +# TranscribeRecording + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**callback_url** | **string** | The URL to send the [TranscriptionAvailable](/docs/voice/webhooks/transcriptionAvailable) event to. You should not include sensitive or personally-identifiable information in the callbackUrl field! Always use the proper username and password fields for authorization. | [optional] +**callback_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**username** | **string** | Basic auth username. | [optional] +**password** | **string** | Basic auth password. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**callback_timeout** | **float** | This is the timeout (in seconds) to use when delivering the webhook to `callbackUrl`. Can be any numeric value (including decimals) between 1 and 25. | [optional] [default to 15] +**detect_language** | **bool** | A boolean value to indicate that the recording may not be in English, and the transcription service will need to detect the dominant language the recording is in and transcribe accordingly. Current supported languages are English, French, and Spanish. | [optional] [default to false] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Transcription.md b/docs/Model/Transcription.md new file mode 100644 index 00000000..c341d5d7 --- /dev/null +++ b/docs/Model/Transcription.md @@ -0,0 +1,11 @@ +# Transcription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**speaker** | **int** | Zero-based index identifying the speaker. | [optional] +**text** | **string** | The transcribed text | [optional] +**confidence** | **float** | The confidence on the recognized content, ranging from `0.0` to `1.0` with `1.0` being the highest confidence. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TranscriptionAvailableCallback.md b/docs/Model/TranscriptionAvailableCallback.md new file mode 100644 index 00000000..73c22272 --- /dev/null +++ b/docs/Model/TranscriptionAvailableCallback.md @@ -0,0 +1,29 @@ +# TranscriptionAvailableCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**media_url** | **string** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional] +**parent_call_id** | **string** | (optional) If the event is related to the B leg of a <Transfer>, the call id of the original call leg that executed the <Transfer>. Otherwise, this field will not be present. | [optional] +**recording_id** | **string** | The unique ID of this recording | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] +**duration** | **string** | The duration of the recording in ISO-8601 format | [optional] +**file_format** | [**\OpenAPI\Client\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**transcription** | [**\OpenAPI\Client\Model\Transcription**](Transcription.md) | | [optional] +**transfer_caller_id** | **string** | The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**transfer_to** | **string** | The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TransferAnswerCallback.md b/docs/Model/TransferAnswerCallback.md new file mode 100644 index 00000000..d8b6079c --- /dev/null +++ b/docs/Model/TransferAnswerCallback.md @@ -0,0 +1,23 @@ +# TransferAnswerCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**transfer_caller_id** | **string** | The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**transfer_to** | **string** | The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TransferCompleteCallback.md b/docs/Model/TransferCompleteCallback.md new file mode 100644 index 00000000..8be1819a --- /dev/null +++ b/docs/Model/TransferCompleteCallback.md @@ -0,0 +1,26 @@ +# TransferCompleteCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**transfer_caller_id** | **string** | The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**transfer_to** | **string** | The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**cause** | **string** | Reason the call failed - hangup, busy, timeout, cancel, rejected, callback-error, invalid-bxml, application-error, account-limit, node-capacity-exceeded, error, or unknown. | [optional] +**error_message** | **string** | Text explaining the reason that caused the call to fail in case of errors. | [optional] +**error_id** | **string** | Bandwidth's internal id that references the error event. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TransferDisconnectCallback.md b/docs/Model/TransferDisconnectCallback.md new file mode 100644 index 00000000..9e673c54 --- /dev/null +++ b/docs/Model/TransferDisconnectCallback.md @@ -0,0 +1,28 @@ +# TransferDisconnectCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**parent_call_id** | **string** | (optional) If the event is related to the B leg of a <Transfer>, the call id of the original call leg that executed the <Transfer>. Otherwise, this field will not be present. | [optional] +**enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] +**end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**transfer_caller_id** | **string** | The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**transfer_to** | **string** | The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] +**cause** | **string** | Reason the call failed - hangup, busy, timeout, cancel, rejected, callback-error, invalid-bxml, application-error, account-limit, node-capacity-exceeded, error, or unknown. | [optional] +**error_message** | **string** | Text explaining the reason that caused the call to fail in case of errors. | [optional] +**error_id** | **string** | Bandwidth's internal id that references the error event. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateCall.md b/docs/Model/UpdateCall.md new file mode 100644 index 00000000..83ab0c45 --- /dev/null +++ b/docs/Model/UpdateCall.md @@ -0,0 +1,18 @@ +# UpdateCall + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | [**\OpenAPI\Client\Model\CallStateEnum**](CallStateEnum.md) | | [optional] +**redirect_url** | **string** | The URL to send the [Redirect](/docs/voice/bxml/redirect) event to which will provide new BXML. Required if `state` is `active`. Not allowed if `state` is `completed`. | [optional] +**redirect_method** | [**\OpenAPI\Client\Model\RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] +**username** | **string** | Basic auth username. | [optional] +**password** | **string** | Basic auth password. | [optional] +**redirect_fallback_url** | **string** | A fallback url which, if provided, will be used to retry the redirect callback delivery in case `redirectUrl` fails to respond. | [optional] +**redirect_fallback_method** | [**\OpenAPI\Client\Model\RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] +**fallback_username** | **string** | Basic auth username. | [optional] +**fallback_password** | **string** | Basic auth password. | [optional] +**tag** | **string** | A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [`<Tag>`](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 4096 characters. Not allowed if `state` is `completed`. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateCallRecording.md b/docs/Model/UpdateCallRecording.md new file mode 100644 index 00000000..33a14df4 --- /dev/null +++ b/docs/Model/UpdateCallRecording.md @@ -0,0 +1,9 @@ +# UpdateCallRecording + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**state** | [**\OpenAPI\Client\Model\RecordingStateEnum**](RecordingStateEnum.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateConference.md b/docs/Model/UpdateConference.md new file mode 100644 index 00000000..03093f4b --- /dev/null +++ b/docs/Model/UpdateConference.md @@ -0,0 +1,17 @@ +# UpdateConference + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**\OpenAPI\Client\Model\ConferenceStateEnum**](ConferenceStateEnum.md) | | [optional] +**redirect_url** | **string** | The URL to send the [conferenceRedirect](/docs/voice/webhooks/conferenceRedirect) event which will provide new BXML. Not allowed if `state` is `completed`, but required if `state` is `active`. | [optional] +**redirect_method** | [**\OpenAPI\Client\Model\RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] +**username** | **string** | Basic auth username. | [optional] +**password** | **string** | Basic auth password. | [optional] +**redirect_fallback_url** | **string** | A fallback url which, if provided, will be used to retry the `conferenceRedirect` webhook delivery in case `redirectUrl` fails to respond. Not allowed if `state` is `completed`. | [optional] +**redirect_fallback_method** | [**\OpenAPI\Client\Model\RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] +**fallback_username** | **string** | Basic auth username. | [optional] +**fallback_password** | **string** | Basic auth password. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateConferenceMember.md b/docs/Model/UpdateConferenceMember.md new file mode 100644 index 00000000..a21b0037 --- /dev/null +++ b/docs/Model/UpdateConferenceMember.md @@ -0,0 +1,11 @@ +# UpdateConferenceMember + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mute** | **bool** | Whether or not this member is currently muted. Members who are muted are still able to hear other participants. Updates this member's mute status. Has no effect if omitted. | [optional] +**hold** | **bool** | Whether or not this member is currently on hold. Members who are on hold are not able to hear or speak in the conference. Updates this member's hold status. Has no effect if omitted. | [optional] +**call_ids_to_coach** | **string[]** | If this member had a value set for `callIdsToCoach` in its [Conference](/docs/voice/bxml/conference) verb or this list was added with a previous PUT request to modify the member, this is that list of calls. Modifies the calls that this member is coaching. Has no effect if omitted. See the documentation for the [Conference](/docs/voice/bxml/conference) verb for more details about coaching. Note that this will not add the matching calls to the conference; each call must individually execute a Conference verb to join. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VerificationDenialWebhook.md b/docs/Model/VerificationDenialWebhook.md new file mode 100644 index 00000000..ad0fe2b0 --- /dev/null +++ b/docs/Model/VerificationDenialWebhook.md @@ -0,0 +1,18 @@ +# VerificationDenialWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **string** | User's account ID. | [optional] +**additional_denial_reasons** | [**\OpenAPI\Client\Model\AdditionalDenialReason[]**](AdditionalDenialReason.md) | An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. | [optional] +**decline_reason_description** | **string** | Explanation for why a verification request was declined. | [optional] +**denial_status_code** | **int** | Reason code for denial. | [optional] +**internal_ticket_number** | **string** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. | [optional] +**phone_number** | **string** | Toll-free telephone number in E.164 format. | [optional] +**resubmit_allowed** | **bool** | Whether a Toll-Free Verification request qualifies for resubmission via PUT. | [optional] +**status** | **string** | | [optional] [default to 'UNVERIFIED'] +**blocked** | **bool** | Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] +**blocked_reason** | **string** | The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VerificationRequest.md b/docs/Model/VerificationRequest.md new file mode 100644 index 00000000..0d347778 --- /dev/null +++ b/docs/Model/VerificationRequest.md @@ -0,0 +1,28 @@ +# VerificationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**business_address** | [**\OpenAPI\Client\Model\Address**](Address.md) | | +**business_contact** | [**\OpenAPI\Client\Model\Contact**](Contact.md) | | +**message_volume** | **int** | Estimated monthly volume of messages from the toll-free number. | +**phone_numbers** | **string[]** | | +**use_case** | **string** | The category of the use case. | +**use_case_summary** | **string** | A general idea of the use case and customer. | +**production_message_content** | **string** | Example of message content. | +**opt_in_workflow** | [**\OpenAPI\Client\Model\OptInWorkflow**](OptInWorkflow.md) | | +**additional_information** | **string** | Any additional information. | [optional] +**isv_reseller** | **string** | ISV name. | [optional] +**privacy_policy_url** | **string** | The Toll-Free Verification request privacy policy URL. | [optional] +**terms_and_conditions_url** | **string** | The Toll-Free Verification request terms and conditions policy URL. | [optional] +**business_dba** | **string** | The company 'Doing Business As'. | [optional] +**business_registration_number** | **string** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] +**business_registration_type** | [**\OpenAPI\Client\Model\BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] +**business_registration_issuing_country** | **string** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] +**business_entity_type** | [**\OpenAPI\Client\Model\BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | +**help_message_response** | **string** | A message that gets sent to users requesting help. | [optional] +**age_gated_content** | **bool** | Indicates whether the content is age-gated. | [optional] +**cv_token** | **string** | The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VerificationUpdateRequest.md b/docs/Model/VerificationUpdateRequest.md new file mode 100644 index 00000000..9aed1caf --- /dev/null +++ b/docs/Model/VerificationUpdateRequest.md @@ -0,0 +1,27 @@ +# VerificationUpdateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**business_address** | [**\OpenAPI\Client\Model\Address**](Address.md) | | +**business_contact** | [**\OpenAPI\Client\Model\Contact**](Contact.md) | | +**message_volume** | **int** | Estimated monthly volume of messages from the toll-free number. | +**use_case** | **string** | The category of the use case. | +**use_case_summary** | **string** | A general idea of the use case and customer. | +**production_message_content** | **string** | Example of message content. | +**opt_in_workflow** | [**\OpenAPI\Client\Model\OptInWorkflow**](OptInWorkflow.md) | | +**additional_information** | **string** | Any additional information. | [optional] +**isv_reseller** | **string** | ISV name. | [optional] +**privacy_policy_url** | **string** | The Toll-Free Verification request privacy policy URL. | [optional] +**terms_and_conditions_url** | **string** | The Toll-Free Verification request terms and conditions policy URL. | [optional] +**business_dba** | **string** | The company 'Doing Business As'. | [optional] +**business_registration_number** | **string** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] +**business_registration_type** | [**\OpenAPI\Client\Model\BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] +**business_entity_type** | [**\OpenAPI\Client\Model\BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] +**business_registration_issuing_country** | **string** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] +**help_message_response** | **string** | A message that gets sent to users requesting help. | [optional] +**age_gated_content** | **bool** | Indicates whether the content is age-gated. | [optional] +**cv_token** | **string** | The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VerificationWebhook.md b/docs/Model/VerificationWebhook.md new file mode 100644 index 00000000..d98948d6 --- /dev/null +++ b/docs/Model/VerificationWebhook.md @@ -0,0 +1,12 @@ +# VerificationWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**account_id** | **string** | User's account ID. | [optional] +**phone_number** | **string** | Toll-free telephone number in E.164 format. | [optional] +**status** | [**\OpenAPI\Client\Model\TfvCallbackStatusEnum**](TfvCallbackStatusEnum.md) | | [optional] +**internal_ticket_number** | **string** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VerifyCodeRequest.md b/docs/Model/VerifyCodeRequest.md new file mode 100644 index 00000000..5c70f913 --- /dev/null +++ b/docs/Model/VerifyCodeRequest.md @@ -0,0 +1,12 @@ +# VerifyCodeRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**to** | **string** | The phone number to send the mfa code to. | +**scope** | **string** | An optional field to denote what scope or action the mfa code is addressing. If not supplied, defaults to \"2FA\". | [optional] +**expiration_time_in_minutes** | **float** | The time period, in minutes, to validate the mfa code. By setting this to 3 minutes, it will mean any code generated within the last 3 minutes are still valid. The valid range for expiration time is between 0 and 15 minutes, exclusively and inclusively, respectively. | +**code** | **string** | The generated mfa code to check if valid. | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VerifyCodeResponse.md b/docs/Model/VerifyCodeResponse.md new file mode 100644 index 00000000..9bd4f40c --- /dev/null +++ b/docs/Model/VerifyCodeResponse.md @@ -0,0 +1,9 @@ +# VerifyCodeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**valid** | **bool** | Whether or not the supplied code is valid. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VoiceApiError.md b/docs/Model/VoiceApiError.md new file mode 100644 index 00000000..68457bef --- /dev/null +++ b/docs/Model/VoiceApiError.md @@ -0,0 +1,11 @@ +# VoiceApiError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | | [optional] +**description** | **string** | | [optional] +**id** | **string** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/VoiceCodeResponse.md b/docs/Model/VoiceCodeResponse.md new file mode 100644 index 00000000..7810c41b --- /dev/null +++ b/docs/Model/VoiceCodeResponse.md @@ -0,0 +1,9 @@ +# VoiceCodeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**call_id** | **string** | Programmable Voice API Call ID. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookSubscription.md b/docs/Model/WebhookSubscription.md new file mode 100644 index 00000000..78aefa80 --- /dev/null +++ b/docs/Model/WebhookSubscription.md @@ -0,0 +1,15 @@ +# WebhookSubscription + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | | [optional] +**account_id** | **string** | | [optional] +**callback_url** | **string** | Callback URL to receive status updates from Bandwidth. When a webhook subscription is registered with Bandwidth under a given account ID, it will be used to send status updates for all requests submitted under that account ID. | +**type** | [**\OpenAPI\Client\Model\WebhookSubscriptionTypeEnum**](WebhookSubscriptionTypeEnum.md) | | [optional] +**basic_authentication** | [**\OpenAPI\Client\Model\WebhookSubscriptionBasicAuthentication**](WebhookSubscriptionBasicAuthentication.md) | | [optional] +**created_date** | **\DateTime** | | [optional] +**modified_date** | **\DateTime** | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookSubscriptionBasicAuthentication.md b/docs/Model/WebhookSubscriptionBasicAuthentication.md new file mode 100644 index 00000000..da07487c --- /dev/null +++ b/docs/Model/WebhookSubscriptionBasicAuthentication.md @@ -0,0 +1,10 @@ +# WebhookSubscriptionBasicAuthentication + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **string** | | +**password** | **string** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookSubscriptionError.md b/docs/Model/WebhookSubscriptionError.md new file mode 100644 index 00000000..999901be --- /dev/null +++ b/docs/Model/WebhookSubscriptionError.md @@ -0,0 +1,11 @@ +# WebhookSubscriptionError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] +**description** | **string** | | [optional] +**telephone_numbers** | [**\OpenAPI\Client\Model\TelephoneNumber[]**](TelephoneNumber.md) | | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookSubscriptionRequestSchema.md b/docs/Model/WebhookSubscriptionRequestSchema.md new file mode 100644 index 00000000..52567701 --- /dev/null +++ b/docs/Model/WebhookSubscriptionRequestSchema.md @@ -0,0 +1,11 @@ +# WebhookSubscriptionRequestSchema + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**basic_authentication** | [**\OpenAPI\Client\Model\TfvBasicAuthentication**](TfvBasicAuthentication.md) | | [optional] +**callback_url** | **string** | Callback URL to receive status updates from Bandwidth. When a webhook subscription is registered with Bandwidth under a given account ID, it will be used to send status updates for all requests submitted under that account ID. | +**shared_secret_key** | **string** | An ASCII string submitted by the user as a shared secret key for generating an HMAC header for callbacks. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookSubscriptionTypeEnum.md b/docs/Model/WebhookSubscriptionTypeEnum.md new file mode 100644 index 00000000..5faaf407 --- /dev/null +++ b/docs/Model/WebhookSubscriptionTypeEnum.md @@ -0,0 +1,8 @@ +# WebhookSubscriptionTypeEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookSubscriptionsListBody.md b/docs/Model/WebhookSubscriptionsListBody.md new file mode 100644 index 00000000..a8858bfc --- /dev/null +++ b/docs/Model/WebhookSubscriptionsListBody.md @@ -0,0 +1,11 @@ +# WebhookSubscriptionsListBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**\OpenAPI\Client\Model\LinksObject**](LinksObject.md) | | [optional] +**errors** | [**\OpenAPI\Client\Model\WebhookSubscriptionError[]**](WebhookSubscriptionError.md) | | [optional] +**data** | [**\OpenAPI\Client\Model\WebhookSubscription[]**](WebhookSubscription.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 00000000..f53a75d4 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/openapi-config.yml b/openapi-config.yml new file mode 100644 index 00000000..8b5e6f6e --- /dev/null +++ b/openapi-config.yml @@ -0,0 +1,2 @@ +packageName: Bandwidth +composerPackageName: bandwidth/sdk diff --git a/openapitools.json b/openapitools.json new file mode 100644 index 00000000..f3237adc --- /dev/null +++ b/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.23.0" + } +} diff --git a/phpunit.xml b/phpunit.xml deleted file mode 100644 index 5bdcd15c..00000000 --- a/phpunit.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - ./tests - - - diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 00000000..1135449a --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,18 @@ + + + + + ./src/Api + ./src/Model + + + + + ./tests/Api + ./tests/Model + + + + + + diff --git a/src/APIException.php b/src/APIException.php index 55ae203f..4f053177 100644 --- a/src/APIException.php +++ b/src/APIException.php @@ -1,86 +1,119 @@ getResponse()->getStatusCode()); - $this->context = $context; - $this->errorMessage = $reason; - - if (static::class !== 'BandwidthLib\APIException') { - $this->unbox(); - } - - } + protected mixed $responseObject = null; /** - * Unbox response into this exception class + * Constructor + * + * @param string $message Error message + * @param int $code HTTP status code + * @param string[][]|null $responseHeaders HTTP response header + * @param stdClass|string|null $responseBody HTTP decoded body of the server response either as stdClass or string */ - public function unbox() + public function __construct(string $message = "", int $code = 0, ?array $responseHeaders = [], stdClass|string|null $responseBody = null) { + parent::__construct($message, $code); + $this->responseHeaders = $responseHeaders; + $this->responseBody = $responseBody; } /** - * The HTTP context from the API request - * @return \BandwidthLib\Http\HttpContext + * Gets the HTTP response header + * + * @return string[][]|null HTTP response header */ - public function getContext() + public function getResponseHeaders(): ?array { - return $this->context; + return $this->responseHeaders; } /** - * The HTTP response code from the API request - * @return int + * Gets the HTTP body of the server response either as Json or string + * + * @return stdClass|string|null HTTP body of the server response either as \stdClass or string */ - public function getResponseCode() + public function getResponseBody(): stdClass|string|null { - return $this->context->getResponse()->getStatusCode(); + return $this->responseBody; } /** - * The HTTP response body from the API request - * @return mixed + * Sets the deserialized response object (during deserialization) + * + * @param mixed $obj Deserialized response object + * + * @return void */ - public function getResponseBody() + public function setResponseObject(mixed $obj): void { - return $this->context->getResponse()->getRawBody(); + $this->responseObject = $obj; } /** - * The reason for raising an exception - * @return string + * Gets the deserialized response object (during deserialization) + * + * @return mixed the deserialized response object */ - public function getReason() + public function getResponseObject(): mixed { - return $this->message; + return $this->responseObject; } } diff --git a/src/APIHelper.php b/src/APIHelper.php deleted file mode 100644 index debe7664..00000000 --- a/src/APIHelper.php +++ /dev/null @@ -1,172 +0,0 @@ - $value) { - $replaceValue = ''; - - //load parameter value - if (is_null($value)) { - $replaceValue = ''; - } elseif (is_array($value)) { - $replaceValue = implode("/", array_map("urlencode", $value)); - } else { - $val = strval($value); - $replaceValue = $encode ? urlencode($val) : $val; - } - - //find the template parameter and replace it with its value - $url = str_replace('{' . strval($key) . '}', $replaceValue, $url); - } - - return $url; - } - - /** - * Appends the given set of parameters to the given query string - * @param string $queryBuilder The query url string to append the parameters - * @param array $parameters The parameters to append - * @return void - */ - public static function appendUrlWithQueryParameters(string &$queryBuilder, array $parameters) - { - //perform parameter validation - if (is_null($queryBuilder) || !is_string($queryBuilder)) { - throw new InvalidArgumentException('Given value for parameter "queryBuilder" is invalid.'); - } - if (is_null($parameters)) { - return; - } - //does the query string already has parameters - $hasParams = (strrpos($queryBuilder, '?') > 0); - - //if already has parameters, use the & to append new parameters - $queryBuilder = $queryBuilder . (($hasParams) ? '&' : '?'); - - //append parameters - $queryBuilder = $queryBuilder . http_build_query($parameters); - } - - /** - * Validates and processes the given Url - * @param string $url The given Url to process - * @return string Pre-processed Url as string */ - public static function cleanUrl(string $url): string - { - //perform parameter validation - if (is_null($url) || !is_string($url)) { - throw new InvalidArgumentException('Invalid Url.'); - } - //ensure that the urls are absolute - $matchCount = preg_match("#^(https?://[^/]+)#", $url, $matches); - if ($matchCount == 0) { - throw new InvalidArgumentException('Invalid Url format.'); - } - //get the http protocol match - $protocol = $matches[1]; - - //remove redundant forward slashes - $query = substr($url, strlen($protocol)); - $query = preg_replace("#//+#", "/", $query); - - //return process url - return $protocol.$query; - } - - /** - * Deserialize a Json string - * @param string $json A valid Json string - * @param mixed $instance Instance of an object to map the json into - * @param boolean $isArray Is the Json an object array? - * @return mixed Decoded Json - */ - public static function deserialize(string $json, $instance = null, bool $isArray = false) - { - if ($instance == null) { - return json_decode($json, true); - } else { - $mapper = new \apimatic\jsonmapper\JsonMapper(); - if ($isArray) { - return $mapper->mapArray(json_decode($json), array(), $instance); - } else { - return $mapper->map(json_decode($json), $instance); - } - } - } - - /** - * Check if an array isAssociative (has string keys) - * @param array $arr A valid array - * @return boolean True if the array is Associative, false if it is Indexed - */ - private static function isAssociative(array $arr): bool - { - foreach ($arr as $key => $value) { - if (is_string($key)) { - return true; - } - } - - return false; - } - - /** - * Prepare a model for form encoding - * @param JsonSerializable $model A valid instance of JsonSerializable - * @return array The model as a map of key value pairs - */ - public static function prepareFormFields(JsonSerializable $model) - { - if (!$model instanceof JsonSerializable) { - return $model; - } - - $arr = $model->jsonSerialize(); - - foreach ($arr as $key => $value) { - if ($value instanceof JsonSerializable) { - $arr[$key] = static::prepareFormFields($value); - } elseif (is_array($value) && !empty($value) && !static::isAssociative($value) && - $value[0] instanceof JsonSerializable) { - $temp = array(); - foreach ($value as $k => $v) { - $temp[$k] = static::prepareFormFields($v); - } - $arr[$key] = $temp; - } - } - - return $arr; - } -} diff --git a/src/Api/CallsApi.php b/src/Api/CallsApi.php new file mode 100644 index 00000000..43a4f427 --- /dev/null +++ b/src/Api/CallsApi.php @@ -0,0 +1,2651 @@ + [ + 'application/json', + ], + 'getCallState' => [ + 'application/json', + ], + 'listCalls' => [ + 'application/json', + ], + 'updateCall' => [ + 'application/json', + ], + 'updateCallBxml' => [ + 'application/xml', + ], + ]; + + /** + * @param ClientInterface|null $client + * @param Configuration|null $config + * @param HeaderSelector|null $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex(): int + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig(): Configuration + { + return $this->config; + } + + /** + * Operation createCall + * + * Create Call + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createCall'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\CreateCallResponse|\OpenAPI\Client\Model\VoiceApiError + */ + public function createCall( + string $account_id, + \OpenAPI\Client\Model\CreateCall $create_call, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createCall'][0] + ): \OpenAPI\Client\Model\CreateCallResponse|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->createCallWithHttpInfo($account_id, $create_call, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation createCallWithHttpInfo + * + * Create Call + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createCall'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\CreateCallResponse|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function createCallWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\CreateCall $create_call, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createCall'][0] + ): array + { + $request = $this->createCallRequest($account_id, $create_call, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CreateCallResponse', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CreateCallResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\CreateCallResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation createCallAsync + * + * Create Call + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createCall'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createCallAsync( + string $account_id, + \OpenAPI\Client\Model\CreateCall $create_call, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createCall'][0] + ): PromiseInterface + { + return $this->createCallAsyncWithHttpInfo($account_id, $create_call, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createCallAsyncWithHttpInfo + * + * Create Call + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createCall'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createCallAsyncWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\CreateCall $create_call, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createCall'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\CreateCallResponse'; + $request = $this->createCallRequest($account_id, $create_call, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createCall' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createCall'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createCallRequest( + string $account_id, + \OpenAPI\Client\Model\CreateCall $create_call, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createCall'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling createCall' + ); + } + + // verify the required parameter 'create_call' is set + if ($create_call === null || (is_array($create_call) && count($create_call) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $create_call when calling createCall' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($create_call)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_call)); + } else { + $httpBody = $create_call; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForcreateCall(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation createCall + * + * @return array an array of host settings + */ + protected function getHostSettingsForcreateCall(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation getCallState + * + * Get Call State Information + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCallState'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\CallState|\OpenAPI\Client\Model\VoiceApiError + */ + public function getCallState( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getCallState'][0] + ): \OpenAPI\Client\Model\CallState|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->getCallStateWithHttpInfo($account_id, $call_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation getCallStateWithHttpInfo + * + * Get Call State Information + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCallState'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\CallState|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function getCallStateWithHttpInfo( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getCallState'][0] + ): array + { + $request = $this->getCallStateRequest($account_id, $call_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallState', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallState', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\CallState', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getCallStateAsync + * + * Get Call State Information + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCallState'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getCallStateAsync( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getCallState'][0] + ): PromiseInterface + { + return $this->getCallStateAsyncWithHttpInfo($account_id, $call_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCallStateAsyncWithHttpInfo + * + * Get Call State Information + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCallState'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getCallStateAsyncWithHttpInfo( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getCallState'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\CallState'; + $request = $this->getCallStateRequest($account_id, $call_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCallState' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCallState'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getCallStateRequest( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getCallState'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling getCallState' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling getCallState' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgetCallState(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation getCallState + * + * @return array an array of host settings + */ + protected function getHostSettingsForgetCallState(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation listCalls + * + * Get Calls + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $to Filter results by the `to` field. (optional) + * @param string|null $from Filter results by the `from` field. (optional) + * @param string|null $min_start_time Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) + * @param string|null $max_start_time Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format). (optional) + * @param string|null $disconnect_cause Filter results to calls with specified call Disconnect Cause. (optional) + * @param int|null $page_size Specifies the max number of calls that will be returned. (optional, default to 1000) + * @param string|null $page_token Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCalls'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\CallState[]|\OpenAPI\Client\Model\VoiceApiError + */ + public function listCalls( + string $account_id, + ?string $to = null, + ?string $from = null, + ?string $min_start_time = null, + ?string $max_start_time = null, + ?string $disconnect_cause = null, + ?int $page_size = 1000, + ?string $page_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listCalls'][0] + ): array|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->listCallsWithHttpInfo($account_id, $to, $from, $min_start_time, $max_start_time, $disconnect_cause, $page_size, $page_token, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation listCallsWithHttpInfo + * + * Get Calls + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $to Filter results by the `to` field. (optional) + * @param string|null $from Filter results by the `from` field. (optional) + * @param string|null $min_start_time Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) + * @param string|null $max_start_time Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format). (optional) + * @param string|null $disconnect_cause Filter results to calls with specified call Disconnect Cause. (optional) + * @param int|null $page_size Specifies the max number of calls that will be returned. (optional, default to 1000) + * @param string|null $page_token Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCalls'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\CallState[]|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function listCallsWithHttpInfo( + string $account_id, + ?string $to = null, + ?string $from = null, + ?string $min_start_time = null, + ?string $max_start_time = null, + ?string $disconnect_cause = null, + ?int $page_size = 1000, + ?string $page_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listCalls'][0] + ): array + { + $request = $this->listCallsRequest($account_id, $to, $from, $min_start_time, $max_start_time, $disconnect_cause, $page_size, $page_token, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallState[]', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallState[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\CallState[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation listCallsAsync + * + * Get Calls + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $to Filter results by the `to` field. (optional) + * @param string|null $from Filter results by the `from` field. (optional) + * @param string|null $min_start_time Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) + * @param string|null $max_start_time Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format). (optional) + * @param string|null $disconnect_cause Filter results to calls with specified call Disconnect Cause. (optional) + * @param int|null $page_size Specifies the max number of calls that will be returned. (optional, default to 1000) + * @param string|null $page_token Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCalls'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listCallsAsync( + string $account_id, + ?string $to = null, + ?string $from = null, + ?string $min_start_time = null, + ?string $max_start_time = null, + ?string $disconnect_cause = null, + ?int $page_size = 1000, + ?string $page_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listCalls'][0] + ): PromiseInterface + { + return $this->listCallsAsyncWithHttpInfo($account_id, $to, $from, $min_start_time, $max_start_time, $disconnect_cause, $page_size, $page_token, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listCallsAsyncWithHttpInfo + * + * Get Calls + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $to Filter results by the `to` field. (optional) + * @param string|null $from Filter results by the `from` field. (optional) + * @param string|null $min_start_time Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) + * @param string|null $max_start_time Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format). (optional) + * @param string|null $disconnect_cause Filter results to calls with specified call Disconnect Cause. (optional) + * @param int|null $page_size Specifies the max number of calls that will be returned. (optional, default to 1000) + * @param string|null $page_token Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCalls'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listCallsAsyncWithHttpInfo( + string $account_id, + ?string $to = null, + ?string $from = null, + ?string $min_start_time = null, + ?string $max_start_time = null, + ?string $disconnect_cause = null, + ?int $page_size = 1000, + ?string $page_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listCalls'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\CallState[]'; + $request = $this->listCallsRequest($account_id, $to, $from, $min_start_time, $max_start_time, $disconnect_cause, $page_size, $page_token, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listCalls' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $to Filter results by the `to` field. (optional) + * @param string|null $from Filter results by the `from` field. (optional) + * @param string|null $min_start_time Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) + * @param string|null $max_start_time Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format). (optional) + * @param string|null $disconnect_cause Filter results to calls with specified call Disconnect Cause. (optional) + * @param int|null $page_size Specifies the max number of calls that will be returned. (optional, default to 1000) + * @param string|null $page_token Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCalls'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listCallsRequest( + string $account_id, + ?string $to = null, + ?string $from = null, + ?string $min_start_time = null, + ?string $max_start_time = null, + ?string $disconnect_cause = null, + ?int $page_size = 1000, + ?string $page_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listCalls'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling listCalls' + ); + } + + + + + + + if ($page_size !== null && $page_size > 10000) { + throw new InvalidArgumentException('invalid value for "$page_size" when calling CallsApi.listCalls, must be smaller than or equal to 10000.'); + } + if ($page_size !== null && $page_size < 1) { + throw new InvalidArgumentException('invalid value for "$page_size" when calling CallsApi.listCalls, must be bigger than or equal to 1.'); + } + + + + $resourcePath = '/accounts/{accountId}/calls'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $to, + 'to', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $from, + 'from', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $min_start_time, + 'minStartTime', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $max_start_time, + 'maxStartTime', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $disconnect_cause, + 'disconnectCause', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page_size, + 'pageSize', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page_token, + 'pageToken', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForlistCalls(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation listCalls + * + * @return array an array of host settings + */ + protected function getHostSettingsForlistCalls(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation updateCall + * + * Update Call + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param \OpenAPI\Client\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCall'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\VoiceApiError|null + */ + public function updateCall( + string $account_id, + string $call_id, + \OpenAPI\Client\Model\UpdateCall $update_call, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCall'][0] + ): ?\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->updateCallWithHttpInfo($account_id, $call_id, $update_call, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation updateCallWithHttpInfo + * + * Update Call + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param \OpenAPI\Client\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCall'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateCallWithHttpInfo( + string $account_id, + string $call_id, + \OpenAPI\Client\Model\UpdateCall $update_call, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCall'][0] + ): array + { + $request = $this->updateCallRequest($account_id, $call_id, $update_call, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 409: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation updateCallAsync + * + * Update Call + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param \OpenAPI\Client\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCall'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateCallAsync( + string $account_id, + string $call_id, + \OpenAPI\Client\Model\UpdateCall $update_call, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCall'][0] + ): PromiseInterface + { + return $this->updateCallAsyncWithHttpInfo($account_id, $call_id, $update_call, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateCallAsyncWithHttpInfo + * + * Update Call + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param \OpenAPI\Client\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCall'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateCallAsyncWithHttpInfo( + string $account_id, + string $call_id, + \OpenAPI\Client\Model\UpdateCall $update_call, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCall'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->updateCallRequest($account_id, $call_id, $update_call, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateCall' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param \OpenAPI\Client\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCall'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateCallRequest( + string $account_id, + string $call_id, + \OpenAPI\Client\Model\UpdateCall $update_call, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCall'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling updateCall' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling updateCall' + ); + } + + // verify the required parameter 'update_call' is set + if ($update_call === null || (is_array($update_call) && count($update_call) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $update_call when calling updateCall' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_call)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_call)); + } else { + $httpBody = $update_call; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForupdateCall(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation updateCall + * + * @return array an array of host settings + */ + protected function getHostSettingsForupdateCall(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation updateCallBxml + * + * Update Call BXML + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $body body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallBxml'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\VoiceApiError|null + */ + public function updateCallBxml( + string $account_id, + string $call_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCallBxml'][0] + ): ?\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->updateCallBxmlWithHttpInfo($account_id, $call_id, $body, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation updateCallBxmlWithHttpInfo + * + * Update Call BXML + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallBxml'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateCallBxmlWithHttpInfo( + string $account_id, + string $call_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCallBxml'][0] + ): array + { + $request = $this->updateCallBxmlRequest($account_id, $call_id, $body, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 409: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation updateCallBxmlAsync + * + * Update Call BXML + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallBxml'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateCallBxmlAsync( + string $account_id, + string $call_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCallBxml'][0] + ): PromiseInterface + { + return $this->updateCallBxmlAsyncWithHttpInfo($account_id, $call_id, $body, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateCallBxmlAsyncWithHttpInfo + * + * Update Call BXML + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallBxml'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateCallBxmlAsyncWithHttpInfo( + string $account_id, + string $call_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCallBxml'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->updateCallBxmlRequest($account_id, $call_id, $body, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateCallBxml' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallBxml'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateCallBxmlRequest( + string $account_id, + string $call_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCallBxml'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling updateCallBxml' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling updateCallBxml' + ); + } + + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $body when calling updateCallBxml' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}/bxml'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + } else { + $httpBody = $body; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForupdateCallBxml(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation updateCallBxml + * + * @return array an array of host settings + */ + protected function getHostSettingsForupdateCallBxml(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption(): array + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/src/Api/ConferencesApi.php b/src/Api/ConferencesApi.php new file mode 100644 index 00000000..5bbc41cc --- /dev/null +++ b/src/Api/ConferencesApi.php @@ -0,0 +1,4601 @@ + [ + 'application/json', + ], + 'getConference' => [ + 'application/json', + ], + 'getConferenceMember' => [ + 'application/json', + ], + 'getConferenceRecording' => [ + 'application/json', + ], + 'listConferenceRecordings' => [ + 'application/json', + ], + 'listConferences' => [ + 'application/json', + ], + 'updateConference' => [ + 'application/json', + ], + 'updateConferenceBxml' => [ + 'application/xml', + ], + 'updateConferenceMember' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface|null $client + * @param Configuration|null $config + * @param HeaderSelector|null $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex(): int + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig(): Configuration + { + return $this->config; + } + + /** + * Operation downloadConferenceRecording + * + * Download Conference Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadConferenceRecording'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SplFileObject|\OpenAPI\Client\Model\VoiceApiError + */ + public function downloadConferenceRecording( + string $account_id, + string $conference_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['downloadConferenceRecording'][0] + ): \SplFileObject|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->downloadConferenceRecordingWithHttpInfo($account_id, $conference_id, $recording_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation downloadConferenceRecordingWithHttpInfo + * + * Download Conference Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadConferenceRecording'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SplFileObject|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function downloadConferenceRecordingWithHttpInfo( + string $account_id, + string $conference_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['downloadConferenceRecording'][0] + ): array + { + $request = $this->downloadConferenceRecordingRequest($account_id, $conference_id, $recording_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SplFileObject', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation downloadConferenceRecordingAsync + * + * Download Conference Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadConferenceRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function downloadConferenceRecordingAsync( + string $account_id, + string $conference_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['downloadConferenceRecording'][0] + ): PromiseInterface + { + return $this->downloadConferenceRecordingAsyncWithHttpInfo($account_id, $conference_id, $recording_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation downloadConferenceRecordingAsyncWithHttpInfo + * + * Download Conference Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadConferenceRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function downloadConferenceRecordingAsyncWithHttpInfo( + string $account_id, + string $conference_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['downloadConferenceRecording'][0] + ): PromiseInterface + { + $returnType = '\SplFileObject'; + $request = $this->downloadConferenceRecordingRequest($account_id, $conference_id, $recording_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'downloadConferenceRecording' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadConferenceRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function downloadConferenceRecordingRequest( + string $account_id, + string $conference_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['downloadConferenceRecording'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling downloadConferenceRecording' + ); + } + + // verify the required parameter 'conference_id' is set + if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $conference_id when calling downloadConferenceRecording' + ); + } + + // verify the required parameter 'recording_id' is set + if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $recording_id when calling downloadConferenceRecording' + ); + } + + + $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($conference_id !== null) { + $resourcePath = str_replace( + '{conferenceId}', + ObjectSerializer::toPathValue($conference_id), + $resourcePath + ); + } + // path params + if ($recording_id !== null) { + $resourcePath = str_replace( + '{recordingId}', + ObjectSerializer::toPathValue($recording_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['audio/vnd.wave', 'audio/mpeg', 'application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsFordownloadConferenceRecording(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation downloadConferenceRecording + * + * @return array an array of host settings + */ + protected function getHostSettingsFordownloadConferenceRecording(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation getConference + * + * Get Conference Information + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConference'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\Conference|\OpenAPI\Client\Model\VoiceApiError + */ + public function getConference( + string $account_id, + string $conference_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConference'][0] + ): \OpenAPI\Client\Model\Conference|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->getConferenceWithHttpInfo($account_id, $conference_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation getConferenceWithHttpInfo + * + * Get Conference Information + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConference'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\Conference|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function getConferenceWithHttpInfo( + string $account_id, + string $conference_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConference'][0] + ): array + { + $request = $this->getConferenceRequest($account_id, $conference_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\Conference', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\Conference', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\Conference', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getConferenceAsync + * + * Get Conference Information + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConference'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getConferenceAsync( + string $account_id, + string $conference_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConference'][0] + ): PromiseInterface + { + return $this->getConferenceAsyncWithHttpInfo($account_id, $conference_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getConferenceAsyncWithHttpInfo + * + * Get Conference Information + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConference'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getConferenceAsyncWithHttpInfo( + string $account_id, + string $conference_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConference'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\Conference'; + $request = $this->getConferenceRequest($account_id, $conference_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getConference' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConference'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getConferenceRequest( + string $account_id, + string $conference_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConference'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling getConference' + ); + } + + // verify the required parameter 'conference_id' is set + if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $conference_id when calling getConference' + ); + } + + + $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($conference_id !== null) { + $resourcePath = str_replace( + '{conferenceId}', + ObjectSerializer::toPathValue($conference_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgetConference(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation getConference + * + * @return array an array of host settings + */ + protected function getHostSettingsForgetConference(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation getConferenceMember + * + * Get Conference Member + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $member_id Programmable Voice API Conference Member ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConferenceMember'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\ConferenceMember|\OpenAPI\Client\Model\VoiceApiError + */ + public function getConferenceMember( + string $account_id, + string $conference_id, + string $member_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConferenceMember'][0] + ): \OpenAPI\Client\Model\ConferenceMember|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->getConferenceMemberWithHttpInfo($account_id, $conference_id, $member_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation getConferenceMemberWithHttpInfo + * + * Get Conference Member + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $member_id Programmable Voice API Conference Member ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConferenceMember'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\ConferenceMember|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function getConferenceMemberWithHttpInfo( + string $account_id, + string $conference_id, + string $member_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConferenceMember'][0] + ): array + { + $request = $this->getConferenceMemberRequest($account_id, $conference_id, $member_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\ConferenceMember', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\ConferenceMember', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\ConferenceMember', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getConferenceMemberAsync + * + * Get Conference Member + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $member_id Programmable Voice API Conference Member ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConferenceMember'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getConferenceMemberAsync( + string $account_id, + string $conference_id, + string $member_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConferenceMember'][0] + ): PromiseInterface + { + return $this->getConferenceMemberAsyncWithHttpInfo($account_id, $conference_id, $member_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getConferenceMemberAsyncWithHttpInfo + * + * Get Conference Member + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $member_id Programmable Voice API Conference Member ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConferenceMember'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getConferenceMemberAsyncWithHttpInfo( + string $account_id, + string $conference_id, + string $member_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConferenceMember'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\ConferenceMember'; + $request = $this->getConferenceMemberRequest($account_id, $conference_id, $member_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getConferenceMember' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $member_id Programmable Voice API Conference Member ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConferenceMember'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getConferenceMemberRequest( + string $account_id, + string $conference_id, + string $member_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConferenceMember'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling getConferenceMember' + ); + } + + // verify the required parameter 'conference_id' is set + if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $conference_id when calling getConferenceMember' + ); + } + + // verify the required parameter 'member_id' is set + if ($member_id === null || (is_array($member_id) && count($member_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $member_id when calling getConferenceMember' + ); + } + + + $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}/members/{memberId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($conference_id !== null) { + $resourcePath = str_replace( + '{conferenceId}', + ObjectSerializer::toPathValue($conference_id), + $resourcePath + ); + } + // path params + if ($member_id !== null) { + $resourcePath = str_replace( + '{memberId}', + ObjectSerializer::toPathValue($member_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgetConferenceMember(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation getConferenceMember + * + * @return array an array of host settings + */ + protected function getHostSettingsForgetConferenceMember(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation getConferenceRecording + * + * Get Conference Recording Information + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConferenceRecording'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\ConferenceRecordingMetadata|\OpenAPI\Client\Model\VoiceApiError + */ + public function getConferenceRecording( + string $account_id, + string $conference_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConferenceRecording'][0] + ): \OpenAPI\Client\Model\ConferenceRecordingMetadata|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->getConferenceRecordingWithHttpInfo($account_id, $conference_id, $recording_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation getConferenceRecordingWithHttpInfo + * + * Get Conference Recording Information + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConferenceRecording'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\ConferenceRecordingMetadata|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function getConferenceRecordingWithHttpInfo( + string $account_id, + string $conference_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConferenceRecording'][0] + ): array + { + $request = $this->getConferenceRecordingRequest($account_id, $conference_id, $recording_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\ConferenceRecordingMetadata', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\ConferenceRecordingMetadata', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\ConferenceRecordingMetadata', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getConferenceRecordingAsync + * + * Get Conference Recording Information + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConferenceRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getConferenceRecordingAsync( + string $account_id, + string $conference_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConferenceRecording'][0] + ): PromiseInterface + { + return $this->getConferenceRecordingAsyncWithHttpInfo($account_id, $conference_id, $recording_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getConferenceRecordingAsyncWithHttpInfo + * + * Get Conference Recording Information + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConferenceRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getConferenceRecordingAsyncWithHttpInfo( + string $account_id, + string $conference_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConferenceRecording'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\ConferenceRecordingMetadata'; + $request = $this->getConferenceRecordingRequest($account_id, $conference_id, $recording_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getConferenceRecording' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConferenceRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getConferenceRecordingRequest( + string $account_id, + string $conference_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getConferenceRecording'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling getConferenceRecording' + ); + } + + // verify the required parameter 'conference_id' is set + if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $conference_id when calling getConferenceRecording' + ); + } + + // verify the required parameter 'recording_id' is set + if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $recording_id when calling getConferenceRecording' + ); + } + + + $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($conference_id !== null) { + $resourcePath = str_replace( + '{conferenceId}', + ObjectSerializer::toPathValue($conference_id), + $resourcePath + ); + } + // path params + if ($recording_id !== null) { + $resourcePath = str_replace( + '{recordingId}', + ObjectSerializer::toPathValue($recording_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgetConferenceRecording(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation getConferenceRecording + * + * @return array an array of host settings + */ + protected function getHostSettingsForgetConferenceRecording(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation listConferenceRecordings + * + * Get Conference Recordings + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listConferenceRecordings'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\ConferenceRecordingMetadata[]|\OpenAPI\Client\Model\VoiceApiError + */ + public function listConferenceRecordings( + string $account_id, + string $conference_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listConferenceRecordings'][0] + ): array|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->listConferenceRecordingsWithHttpInfo($account_id, $conference_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation listConferenceRecordingsWithHttpInfo + * + * Get Conference Recordings + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listConferenceRecordings'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\ConferenceRecordingMetadata[]|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function listConferenceRecordingsWithHttpInfo( + string $account_id, + string $conference_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listConferenceRecordings'][0] + ): array + { + $request = $this->listConferenceRecordingsRequest($account_id, $conference_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\ConferenceRecordingMetadata[]', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\ConferenceRecordingMetadata[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\ConferenceRecordingMetadata[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation listConferenceRecordingsAsync + * + * Get Conference Recordings + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listConferenceRecordings'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listConferenceRecordingsAsync( + string $account_id, + string $conference_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listConferenceRecordings'][0] + ): PromiseInterface + { + return $this->listConferenceRecordingsAsyncWithHttpInfo($account_id, $conference_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listConferenceRecordingsAsyncWithHttpInfo + * + * Get Conference Recordings + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listConferenceRecordings'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listConferenceRecordingsAsyncWithHttpInfo( + string $account_id, + string $conference_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listConferenceRecordings'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\ConferenceRecordingMetadata[]'; + $request = $this->listConferenceRecordingsRequest($account_id, $conference_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listConferenceRecordings' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listConferenceRecordings'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listConferenceRecordingsRequest( + string $account_id, + string $conference_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listConferenceRecordings'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling listConferenceRecordings' + ); + } + + // verify the required parameter 'conference_id' is set + if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $conference_id when calling listConferenceRecordings' + ); + } + + + $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}/recordings'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($conference_id !== null) { + $resourcePath = str_replace( + '{conferenceId}', + ObjectSerializer::toPathValue($conference_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForlistConferenceRecordings(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation listConferenceRecordings + * + * @return array an array of host settings + */ + protected function getHostSettingsForlistConferenceRecordings(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation listConferences + * + * Get Conferences + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $name Filter results by the `name` field. (optional) + * @param string|null $min_created_time Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). (optional) + * @param string|null $max_created_time Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). (optional) + * @param int|null $page_size Specifies the max number of conferences that will be returned. (optional, default to 1000) + * @param string|null $page_token Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listConferences'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\Conference[]|\OpenAPI\Client\Model\VoiceApiError + */ + public function listConferences( + string $account_id, + ?string $name = null, + ?string $min_created_time = null, + ?string $max_created_time = null, + ?int $page_size = 1000, + ?string $page_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listConferences'][0] + ): array|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->listConferencesWithHttpInfo($account_id, $name, $min_created_time, $max_created_time, $page_size, $page_token, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation listConferencesWithHttpInfo + * + * Get Conferences + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $name Filter results by the `name` field. (optional) + * @param string|null $min_created_time Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). (optional) + * @param string|null $max_created_time Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). (optional) + * @param int|null $page_size Specifies the max number of conferences that will be returned. (optional, default to 1000) + * @param string|null $page_token Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listConferences'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\Conference[]|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function listConferencesWithHttpInfo( + string $account_id, + ?string $name = null, + ?string $min_created_time = null, + ?string $max_created_time = null, + ?int $page_size = 1000, + ?string $page_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listConferences'][0] + ): array + { + $request = $this->listConferencesRequest($account_id, $name, $min_created_time, $max_created_time, $page_size, $page_token, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\Conference[]', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\Conference[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\Conference[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation listConferencesAsync + * + * Get Conferences + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $name Filter results by the `name` field. (optional) + * @param string|null $min_created_time Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). (optional) + * @param string|null $max_created_time Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). (optional) + * @param int|null $page_size Specifies the max number of conferences that will be returned. (optional, default to 1000) + * @param string|null $page_token Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listConferences'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listConferencesAsync( + string $account_id, + ?string $name = null, + ?string $min_created_time = null, + ?string $max_created_time = null, + ?int $page_size = 1000, + ?string $page_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listConferences'][0] + ): PromiseInterface + { + return $this->listConferencesAsyncWithHttpInfo($account_id, $name, $min_created_time, $max_created_time, $page_size, $page_token, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listConferencesAsyncWithHttpInfo + * + * Get Conferences + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $name Filter results by the `name` field. (optional) + * @param string|null $min_created_time Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). (optional) + * @param string|null $max_created_time Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). (optional) + * @param int|null $page_size Specifies the max number of conferences that will be returned. (optional, default to 1000) + * @param string|null $page_token Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listConferences'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listConferencesAsyncWithHttpInfo( + string $account_id, + ?string $name = null, + ?string $min_created_time = null, + ?string $max_created_time = null, + ?int $page_size = 1000, + ?string $page_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listConferences'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\Conference[]'; + $request = $this->listConferencesRequest($account_id, $name, $min_created_time, $max_created_time, $page_size, $page_token, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listConferences' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $name Filter results by the `name` field. (optional) + * @param string|null $min_created_time Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). (optional) + * @param string|null $max_created_time Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). (optional) + * @param int|null $page_size Specifies the max number of conferences that will be returned. (optional, default to 1000) + * @param string|null $page_token Not intended for explicit use. To use pagination, follow the links in the `Link` header of the response, as indicated in the endpoint description. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listConferences'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listConferencesRequest( + string $account_id, + ?string $name = null, + ?string $min_created_time = null, + ?string $max_created_time = null, + ?int $page_size = 1000, + ?string $page_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listConferences'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling listConferences' + ); + } + + + + + if ($page_size !== null && $page_size > 1000) { + throw new InvalidArgumentException('invalid value for "$page_size" when calling ConferencesApi.listConferences, must be smaller than or equal to 1000.'); + } + if ($page_size !== null && $page_size < 1) { + throw new InvalidArgumentException('invalid value for "$page_size" when calling ConferencesApi.listConferences, must be bigger than or equal to 1.'); + } + + + + $resourcePath = '/accounts/{accountId}/conferences'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $name, + 'name', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $min_created_time, + 'minCreatedTime', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $max_created_time, + 'maxCreatedTime', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page_size, + 'pageSize', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page_token, + 'pageToken', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForlistConferences(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation listConferences + * + * @return array an array of host settings + */ + protected function getHostSettingsForlistConferences(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation updateConference + * + * Update Conference + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param \OpenAPI\Client\Model\UpdateConference $update_conference update_conference (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConference'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\VoiceApiError|null + */ + public function updateConference( + string $account_id, + string $conference_id, + \OpenAPI\Client\Model\UpdateConference $update_conference, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConference'][0] + ): ?\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->updateConferenceWithHttpInfo($account_id, $conference_id, $update_conference, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation updateConferenceWithHttpInfo + * + * Update Conference + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param \OpenAPI\Client\Model\UpdateConference $update_conference (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConference'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateConferenceWithHttpInfo( + string $account_id, + string $conference_id, + \OpenAPI\Client\Model\UpdateConference $update_conference, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConference'][0] + ): array + { + $request = $this->updateConferenceRequest($account_id, $conference_id, $update_conference, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation updateConferenceAsync + * + * Update Conference + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param \OpenAPI\Client\Model\UpdateConference $update_conference (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConference'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateConferenceAsync( + string $account_id, + string $conference_id, + \OpenAPI\Client\Model\UpdateConference $update_conference, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConference'][0] + ): PromiseInterface + { + return $this->updateConferenceAsyncWithHttpInfo($account_id, $conference_id, $update_conference, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateConferenceAsyncWithHttpInfo + * + * Update Conference + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param \OpenAPI\Client\Model\UpdateConference $update_conference (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConference'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateConferenceAsyncWithHttpInfo( + string $account_id, + string $conference_id, + \OpenAPI\Client\Model\UpdateConference $update_conference, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConference'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->updateConferenceRequest($account_id, $conference_id, $update_conference, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateConference' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param \OpenAPI\Client\Model\UpdateConference $update_conference (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConference'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateConferenceRequest( + string $account_id, + string $conference_id, + \OpenAPI\Client\Model\UpdateConference $update_conference, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConference'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling updateConference' + ); + } + + // verify the required parameter 'conference_id' is set + if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $conference_id when calling updateConference' + ); + } + + // verify the required parameter 'update_conference' is set + if ($update_conference === null || (is_array($update_conference) && count($update_conference) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $update_conference when calling updateConference' + ); + } + + + $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($conference_id !== null) { + $resourcePath = str_replace( + '{conferenceId}', + ObjectSerializer::toPathValue($conference_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_conference)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_conference)); + } else { + $httpBody = $update_conference; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForupdateConference(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation updateConference + * + * @return array an array of host settings + */ + protected function getHostSettingsForupdateConference(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation updateConferenceBxml + * + * Update Conference BXML + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $body body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceBxml'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\VoiceApiError|null + */ + public function updateConferenceBxml( + string $account_id, + string $conference_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConferenceBxml'][0] + ): ?\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->updateConferenceBxmlWithHttpInfo($account_id, $conference_id, $body, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation updateConferenceBxmlWithHttpInfo + * + * Update Conference BXML + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceBxml'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateConferenceBxmlWithHttpInfo( + string $account_id, + string $conference_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConferenceBxml'][0] + ): array + { + $request = $this->updateConferenceBxmlRequest($account_id, $conference_id, $body, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation updateConferenceBxmlAsync + * + * Update Conference BXML + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceBxml'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateConferenceBxmlAsync( + string $account_id, + string $conference_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConferenceBxml'][0] + ): PromiseInterface + { + return $this->updateConferenceBxmlAsyncWithHttpInfo($account_id, $conference_id, $body, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateConferenceBxmlAsyncWithHttpInfo + * + * Update Conference BXML + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceBxml'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateConferenceBxmlAsyncWithHttpInfo( + string $account_id, + string $conference_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConferenceBxml'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->updateConferenceBxmlRequest($account_id, $conference_id, $body, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateConferenceBxml' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceBxml'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateConferenceBxmlRequest( + string $account_id, + string $conference_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConferenceBxml'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling updateConferenceBxml' + ); + } + + // verify the required parameter 'conference_id' is set + if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $conference_id when calling updateConferenceBxml' + ); + } + + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $body when calling updateConferenceBxml' + ); + } + + + $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}/bxml'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($conference_id !== null) { + $resourcePath = str_replace( + '{conferenceId}', + ObjectSerializer::toPathValue($conference_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + } else { + $httpBody = $body; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForupdateConferenceBxml(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation updateConferenceBxml + * + * @return array an array of host settings + */ + protected function getHostSettingsForupdateConferenceBxml(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation updateConferenceMember + * + * Update Conference Member + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $member_id Programmable Voice API Conference Member ID. (required) + * @param \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member update_conference_member (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceMember'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\VoiceApiError|null + */ + public function updateConferenceMember( + string $account_id, + string $conference_id, + string $member_id, + \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConferenceMember'][0] + ): ?\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->updateConferenceMemberWithHttpInfo($account_id, $conference_id, $member_id, $update_conference_member, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation updateConferenceMemberWithHttpInfo + * + * Update Conference Member + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $member_id Programmable Voice API Conference Member ID. (required) + * @param \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceMember'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateConferenceMemberWithHttpInfo( + string $account_id, + string $conference_id, + string $member_id, + \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConferenceMember'][0] + ): array + { + $request = $this->updateConferenceMemberRequest($account_id, $conference_id, $member_id, $update_conference_member, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation updateConferenceMemberAsync + * + * Update Conference Member + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $member_id Programmable Voice API Conference Member ID. (required) + * @param \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceMember'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateConferenceMemberAsync( + string $account_id, + string $conference_id, + string $member_id, + \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConferenceMember'][0] + ): PromiseInterface + { + return $this->updateConferenceMemberAsyncWithHttpInfo($account_id, $conference_id, $member_id, $update_conference_member, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateConferenceMemberAsyncWithHttpInfo + * + * Update Conference Member + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $member_id Programmable Voice API Conference Member ID. (required) + * @param \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceMember'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateConferenceMemberAsyncWithHttpInfo( + string $account_id, + string $conference_id, + string $member_id, + \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConferenceMember'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->updateConferenceMemberRequest($account_id, $conference_id, $member_id, $update_conference_member, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateConferenceMember' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $conference_id Programmable Voice API Conference ID. (required) + * @param string $member_id Programmable Voice API Conference Member ID. (required) + * @param \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceMember'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateConferenceMemberRequest( + string $account_id, + string $conference_id, + string $member_id, + \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateConferenceMember'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling updateConferenceMember' + ); + } + + // verify the required parameter 'conference_id' is set + if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $conference_id when calling updateConferenceMember' + ); + } + + // verify the required parameter 'member_id' is set + if ($member_id === null || (is_array($member_id) && count($member_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $member_id when calling updateConferenceMember' + ); + } + + // verify the required parameter 'update_conference_member' is set + if ($update_conference_member === null || (is_array($update_conference_member) && count($update_conference_member) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $update_conference_member when calling updateConferenceMember' + ); + } + + + $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}/members/{memberId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($conference_id !== null) { + $resourcePath = str_replace( + '{conferenceId}', + ObjectSerializer::toPathValue($conference_id), + $resourcePath + ); + } + // path params + if ($member_id !== null) { + $resourcePath = str_replace( + '{memberId}', + ObjectSerializer::toPathValue($member_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_conference_member)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_conference_member)); + } else { + $httpBody = $update_conference_member; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForupdateConferenceMember(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation updateConferenceMember + * + * @return array an array of host settings + */ + protected function getHostSettingsForupdateConferenceMember(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption(): array + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/src/Api/EndpointsApi.php b/src/Api/EndpointsApi.php new file mode 100644 index 00000000..26ae2a5b --- /dev/null +++ b/src/Api/EndpointsApi.php @@ -0,0 +1,2551 @@ + [ + 'application/json', + ], + 'deleteEndpoint' => [ + 'application/json', + ], + 'getEndpoint' => [ + 'application/json', + ], + 'listEndpoints' => [ + 'application/json', + ], + 'updateEndpointBxml' => [ + 'application/xml', + ], + ]; + + /** + * @param ClientInterface|null $client + * @param Configuration|null $config + * @param HeaderSelector|null $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex(): int + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig(): Configuration + { + return $this->config; + } + + /** + * Operation createEndpoint + * + * Create Endpoint + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createEndpoint'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\CreateEndpointResponse|\OpenAPI\Client\Model\BrtcErrorResponse + */ + public function createEndpoint( + string $account_id, + \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createEndpoint'][0] + ): \OpenAPI\Client\Model\CreateEndpointResponse|\OpenAPI\Client\Model\BrtcErrorResponse + { + list($response) = $this->createEndpointWithHttpInfo($account_id, $body, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation createEndpointWithHttpInfo + * + * Create Endpoint + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createEndpoint'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\CreateEndpointResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createEndpointWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createEndpoint'][0] + ): array + { + $request = $this->createEndpointRequest($account_id, $body, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CreateEndpointResponse', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CreateEndpointResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\CreateEndpointResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation createEndpointAsync + * + * Create Endpoint + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createEndpoint'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createEndpointAsync( + string $account_id, + \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createEndpoint'][0] + ): PromiseInterface + { + return $this->createEndpointAsyncWithHttpInfo($account_id, $body, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createEndpointAsyncWithHttpInfo + * + * Create Endpoint + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createEndpoint'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createEndpointAsyncWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createEndpoint'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\CreateEndpointResponse'; + $request = $this->createEndpointRequest($account_id, $body, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createEndpoint' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createEndpoint'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createEndpointRequest( + string $account_id, + \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createEndpoint'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling createEndpoint' + ); + } + + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $body when calling createEndpoint' + ); + } + + + $resourcePath = '/accounts/{accountId}/endpoints'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + } else { + $httpBody = $body; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForcreateEndpoint(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation createEndpoint + * + * @return array an array of host settings + */ + protected function getHostSettingsForcreateEndpoint(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation deleteEndpoint + * + * Delete Endpoint + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEndpoint'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\BrtcErrorResponse|null + */ + public function deleteEndpoint( + string $account_id, + string $endpoint_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteEndpoint'][0] + ): ?\OpenAPI\Client\Model\BrtcErrorResponse + { + list($response) = $this->deleteEndpointWithHttpInfo($account_id, $endpoint_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation deleteEndpointWithHttpInfo + * + * Delete Endpoint + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEndpoint'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteEndpointWithHttpInfo( + string $account_id, + string $endpoint_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteEndpoint'][0] + ): array + { + $request = $this->deleteEndpointRequest($account_id, $endpoint_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation deleteEndpointAsync + * + * Delete Endpoint + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEndpoint'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteEndpointAsync( + string $account_id, + string $endpoint_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteEndpoint'][0] + ): PromiseInterface + { + return $this->deleteEndpointAsyncWithHttpInfo($account_id, $endpoint_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteEndpointAsyncWithHttpInfo + * + * Delete Endpoint + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEndpoint'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteEndpointAsyncWithHttpInfo( + string $account_id, + string $endpoint_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteEndpoint'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->deleteEndpointRequest($account_id, $endpoint_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteEndpoint' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteEndpoint'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteEndpointRequest( + string $account_id, + string $endpoint_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteEndpoint'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling deleteEndpoint' + ); + } + + // verify the required parameter 'endpoint_id' is set + if ($endpoint_id === null || (is_array($endpoint_id) && count($endpoint_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $endpoint_id when calling deleteEndpoint' + ); + } + + + $resourcePath = '/accounts/{accountId}/endpoints/{endpointId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($endpoint_id !== null) { + $resourcePath = str_replace( + '{endpointId}', + ObjectSerializer::toPathValue($endpoint_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsFordeleteEndpoint(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation deleteEndpoint + * + * @return array an array of host settings + */ + protected function getHostSettingsFordeleteEndpoint(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation getEndpoint + * + * Get Endpoint + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEndpoint'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\EndpointResponse|\OpenAPI\Client\Model\BrtcErrorResponse + */ + public function getEndpoint( + string $account_id, + string $endpoint_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getEndpoint'][0] + ): \OpenAPI\Client\Model\EndpointResponse|\OpenAPI\Client\Model\BrtcErrorResponse + { + list($response) = $this->getEndpointWithHttpInfo($account_id, $endpoint_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation getEndpointWithHttpInfo + * + * Get Endpoint + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEndpoint'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\EndpointResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getEndpointWithHttpInfo( + string $account_id, + string $endpoint_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getEndpoint'][0] + ): array + { + $request = $this->getEndpointRequest($account_id, $endpoint_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\EndpointResponse', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\EndpointResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\EndpointResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getEndpointAsync + * + * Get Endpoint + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEndpoint'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getEndpointAsync( + string $account_id, + string $endpoint_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getEndpoint'][0] + ): PromiseInterface + { + return $this->getEndpointAsyncWithHttpInfo($account_id, $endpoint_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getEndpointAsyncWithHttpInfo + * + * Get Endpoint + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEndpoint'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getEndpointAsyncWithHttpInfo( + string $account_id, + string $endpoint_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getEndpoint'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\EndpointResponse'; + $request = $this->getEndpointRequest($account_id, $endpoint_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getEndpoint' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEndpoint'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getEndpointRequest( + string $account_id, + string $endpoint_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getEndpoint'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling getEndpoint' + ); + } + + // verify the required parameter 'endpoint_id' is set + if ($endpoint_id === null || (is_array($endpoint_id) && count($endpoint_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $endpoint_id when calling getEndpoint' + ); + } + + + $resourcePath = '/accounts/{accountId}/endpoints/{endpointId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($endpoint_id !== null) { + $resourcePath = str_replace( + '{endpointId}', + ObjectSerializer::toPathValue($endpoint_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgetEndpoint(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation getEndpoint + * + * @return array an array of host settings + */ + protected function getHostSettingsForgetEndpoint(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation listEndpoints + * + * List Endpoints + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) + * @param \OpenAPI\Client\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) + * @param string|null $after_cursor The cursor to use for pagination. This is the value of the `next` link in the previous response. (optional) + * @param int|null $limit The maximum number of endpoints to return in the response. (optional, default to 100) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listEndpoints'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\ListEndpointsResponse|\OpenAPI\Client\Model\BrtcErrorResponse + */ + public function listEndpoints( + string $account_id, + ?\OpenAPI\Client\Model\EndpointTypeEnum $type = null, + ?\OpenAPI\Client\Model\EndpointStatusEnum $status = null, + ?string $after_cursor = null, + ?int $limit = 100, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listEndpoints'][0] + ): \OpenAPI\Client\Model\ListEndpointsResponse|\OpenAPI\Client\Model\BrtcErrorResponse + { + list($response) = $this->listEndpointsWithHttpInfo($account_id, $type, $status, $after_cursor, $limit, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation listEndpointsWithHttpInfo + * + * List Endpoints + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) + * @param \OpenAPI\Client\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) + * @param string|null $after_cursor The cursor to use for pagination. This is the value of the `next` link in the previous response. (optional) + * @param int|null $limit The maximum number of endpoints to return in the response. (optional, default to 100) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listEndpoints'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\ListEndpointsResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function listEndpointsWithHttpInfo( + string $account_id, + ?\OpenAPI\Client\Model\EndpointTypeEnum $type = null, + ?\OpenAPI\Client\Model\EndpointStatusEnum $status = null, + ?string $after_cursor = null, + ?int $limit = 100, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listEndpoints'][0] + ): array + { + $request = $this->listEndpointsRequest($account_id, $type, $status, $after_cursor, $limit, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\ListEndpointsResponse', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\BrtcErrorResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\ListEndpointsResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\ListEndpointsResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation listEndpointsAsync + * + * List Endpoints + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) + * @param \OpenAPI\Client\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) + * @param string|null $after_cursor The cursor to use for pagination. This is the value of the `next` link in the previous response. (optional) + * @param int|null $limit The maximum number of endpoints to return in the response. (optional, default to 100) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listEndpoints'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listEndpointsAsync( + string $account_id, + ?\OpenAPI\Client\Model\EndpointTypeEnum $type = null, + ?\OpenAPI\Client\Model\EndpointStatusEnum $status = null, + ?string $after_cursor = null, + ?int $limit = 100, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listEndpoints'][0] + ): PromiseInterface + { + return $this->listEndpointsAsyncWithHttpInfo($account_id, $type, $status, $after_cursor, $limit, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listEndpointsAsyncWithHttpInfo + * + * List Endpoints + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) + * @param \OpenAPI\Client\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) + * @param string|null $after_cursor The cursor to use for pagination. This is the value of the `next` link in the previous response. (optional) + * @param int|null $limit The maximum number of endpoints to return in the response. (optional, default to 100) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listEndpoints'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listEndpointsAsyncWithHttpInfo( + string $account_id, + ?\OpenAPI\Client\Model\EndpointTypeEnum $type = null, + ?\OpenAPI\Client\Model\EndpointStatusEnum $status = null, + ?string $after_cursor = null, + ?int $limit = 100, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listEndpoints'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\ListEndpointsResponse'; + $request = $this->listEndpointsRequest($account_id, $type, $status, $after_cursor, $limit, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listEndpoints' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) + * @param \OpenAPI\Client\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) + * @param string|null $after_cursor The cursor to use for pagination. This is the value of the `next` link in the previous response. (optional) + * @param int|null $limit The maximum number of endpoints to return in the response. (optional, default to 100) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listEndpoints'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listEndpointsRequest( + string $account_id, + ?\OpenAPI\Client\Model\EndpointTypeEnum $type = null, + ?\OpenAPI\Client\Model\EndpointStatusEnum $status = null, + ?string $after_cursor = null, + ?int $limit = 100, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listEndpoints'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling listEndpoints' + ); + } + + + + + if ($limit !== null && $limit > 1000) { + throw new InvalidArgumentException('invalid value for "$limit" when calling EndpointsApi.listEndpoints, must be smaller than or equal to 1000.'); + } + if ($limit !== null && $limit < 1) { + throw new InvalidArgumentException('invalid value for "$limit" when calling EndpointsApi.listEndpoints, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/accounts/{accountId}/endpoints'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $type?->value, + 'type', // param base name + 'EndpointTypeEnum', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $status?->value, + 'status', // param base name + 'EndpointStatusEnum', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $after_cursor, + 'afterCursor', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForlistEndpoints(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation listEndpoints + * + * @return array an array of host settings + */ + protected function getHostSettingsForlistEndpoints(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation updateEndpointBxml + * + * Update Endpoint BXML + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param string $body body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEndpointBxml'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\BrtcErrorResponse|null + */ + public function updateEndpointBxml( + string $account_id, + string $endpoint_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateEndpointBxml'][0] + ): ?\OpenAPI\Client\Model\BrtcErrorResponse + { + list($response) = $this->updateEndpointBxmlWithHttpInfo($account_id, $endpoint_id, $body, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation updateEndpointBxmlWithHttpInfo + * + * Update Endpoint BXML + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param string $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEndpointBxml'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateEndpointBxmlWithHttpInfo( + string $account_id, + string $endpoint_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateEndpointBxml'][0] + ): array + { + $request = $this->updateEndpointBxmlRequest($account_id, $endpoint_id, $body, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\BrtcErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation updateEndpointBxmlAsync + * + * Update Endpoint BXML + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param string $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEndpointBxml'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateEndpointBxmlAsync( + string $account_id, + string $endpoint_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateEndpointBxml'][0] + ): PromiseInterface + { + return $this->updateEndpointBxmlAsyncWithHttpInfo($account_id, $endpoint_id, $body, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateEndpointBxmlAsyncWithHttpInfo + * + * Update Endpoint BXML + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param string $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEndpointBxml'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateEndpointBxmlAsyncWithHttpInfo( + string $account_id, + string $endpoint_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateEndpointBxml'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->updateEndpointBxmlRequest($account_id, $endpoint_id, $body, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateEndpointBxml' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $endpoint_id BRTC Endpoint ID. (required) + * @param string $body (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateEndpointBxml'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateEndpointBxmlRequest( + string $account_id, + string $endpoint_id, + string $body, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateEndpointBxml'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling updateEndpointBxml' + ); + } + + // verify the required parameter 'endpoint_id' is set + if ($endpoint_id === null || (is_array($endpoint_id) && count($endpoint_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $endpoint_id when calling updateEndpointBxml' + ); + } + + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $body when calling updateEndpointBxml' + ); + } + + + $resourcePath = '/accounts/{accountId}/endpoints/{endpointId}/bxml'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($endpoint_id !== null) { + $resourcePath = str_replace( + '{endpointId}', + ObjectSerializer::toPathValue($endpoint_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + } else { + $httpBody = $body; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForupdateEndpointBxml(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation updateEndpointBxml + * + * @return array an array of host settings + */ + protected function getHostSettingsForupdateEndpointBxml(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/v2", + "description" => "Production", + ] + ]; + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption(): array + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/src/Api/MFAApi.php b/src/Api/MFAApi.php new file mode 100644 index 00000000..ed2f8c27 --- /dev/null +++ b/src/Api/MFAApi.php @@ -0,0 +1,1512 @@ + [ + 'application/json', + ], + 'generateVoiceCode' => [ + 'application/json', + ], + 'verifyCode' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface|null $client + * @param Configuration|null $config + * @param HeaderSelector|null $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex(): int + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig(): Configuration + { + return $this->config; + } + + /** + * Operation generateMessagingCode + * + * Messaging Authentication Code + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateMessagingCode'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\MessagingCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError + */ + public function generateMessagingCode( + string $account_id, + \OpenAPI\Client\Model\CodeRequest $code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['generateMessagingCode'][0] + ): \OpenAPI\Client\Model\MessagingCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError + { + list($response) = $this->generateMessagingCodeWithHttpInfo($account_id, $code_request, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation generateMessagingCodeWithHttpInfo + * + * Messaging Authentication Code + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateMessagingCode'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\MessagingCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError|\OpenAPI\Client\Model\MfaRequestError, HTTP status code, HTTP response headers (array of strings) + */ + public function generateMessagingCodeWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\CodeRequest $code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['generateMessagingCode'][0] + ): array + { + $request = $this->generateMessagingCodeRequest($account_id, $code_request, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingCodeResponse', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MfaRequestError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MfaUnauthorizedRequestError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MfaForbiddenRequestError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MfaRequestError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingCodeResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingCodeResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MfaRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MfaUnauthorizedRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MfaForbiddenRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MfaRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation generateMessagingCodeAsync + * + * Messaging Authentication Code + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateMessagingCode'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function generateMessagingCodeAsync( + string $account_id, + \OpenAPI\Client\Model\CodeRequest $code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['generateMessagingCode'][0] + ): PromiseInterface + { + return $this->generateMessagingCodeAsyncWithHttpInfo($account_id, $code_request, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation generateMessagingCodeAsyncWithHttpInfo + * + * Messaging Authentication Code + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateMessagingCode'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function generateMessagingCodeAsyncWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\CodeRequest $code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['generateMessagingCode'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\MessagingCodeResponse'; + $request = $this->generateMessagingCodeRequest($account_id, $code_request, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'generateMessagingCode' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateMessagingCode'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function generateMessagingCodeRequest( + string $account_id, + \OpenAPI\Client\Model\CodeRequest $code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['generateMessagingCode'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling generateMessagingCode' + ); + } + + // verify the required parameter 'code_request' is set + if ($code_request === null || (is_array($code_request) && count($code_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $code_request when calling generateMessagingCode' + ); + } + + + $resourcePath = '/accounts/{accountId}/code/messaging'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($code_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($code_request)); + } else { + $httpBody = $code_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgenerateMessagingCode(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation generateMessagingCode + * + * @return array an array of host settings + */ + protected function getHostSettingsForgenerateMessagingCode(): array + { + return [ + [ + "url" => "https://mfa.bandwidth.com/api/v1", + "description" => "Production", + ] + ]; + } + + /** + * Operation generateVoiceCode + * + * Voice Authentication Code + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateVoiceCode'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\VoiceCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError + */ + public function generateVoiceCode( + string $account_id, + \OpenAPI\Client\Model\CodeRequest $code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['generateVoiceCode'][0] + ): \OpenAPI\Client\Model\VoiceCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError + { + list($response) = $this->generateVoiceCodeWithHttpInfo($account_id, $code_request, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation generateVoiceCodeWithHttpInfo + * + * Voice Authentication Code + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateVoiceCode'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\VoiceCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError|\OpenAPI\Client\Model\MfaRequestError, HTTP status code, HTTP response headers (array of strings) + */ + public function generateVoiceCodeWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\CodeRequest $code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['generateVoiceCode'][0] + ): array + { + $request = $this->generateVoiceCodeRequest($account_id, $code_request, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceCodeResponse', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MfaRequestError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MfaUnauthorizedRequestError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MfaForbiddenRequestError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MfaRequestError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceCodeResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceCodeResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MfaRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MfaUnauthorizedRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MfaForbiddenRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MfaRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation generateVoiceCodeAsync + * + * Voice Authentication Code + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateVoiceCode'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function generateVoiceCodeAsync( + string $account_id, + \OpenAPI\Client\Model\CodeRequest $code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['generateVoiceCode'][0] + ): PromiseInterface + { + return $this->generateVoiceCodeAsyncWithHttpInfo($account_id, $code_request, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation generateVoiceCodeAsyncWithHttpInfo + * + * Voice Authentication Code + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateVoiceCode'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function generateVoiceCodeAsyncWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\CodeRequest $code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['generateVoiceCode'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\VoiceCodeResponse'; + $request = $this->generateVoiceCodeRequest($account_id, $code_request, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'generateVoiceCode' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateVoiceCode'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function generateVoiceCodeRequest( + string $account_id, + \OpenAPI\Client\Model\CodeRequest $code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['generateVoiceCode'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling generateVoiceCode' + ); + } + + // verify the required parameter 'code_request' is set + if ($code_request === null || (is_array($code_request) && count($code_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $code_request when calling generateVoiceCode' + ); + } + + + $resourcePath = '/accounts/{accountId}/code/voice'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($code_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($code_request)); + } else { + $httpBody = $code_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgenerateVoiceCode(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation generateVoiceCode + * + * @return array an array of host settings + */ + protected function getHostSettingsForgenerateVoiceCode(): array + { + return [ + [ + "url" => "https://mfa.bandwidth.com/api/v1", + "description" => "Production", + ] + ]; + } + + /** + * Operation verifyCode + * + * Verify Authentication Code + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['verifyCode'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\VerifyCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError + */ + public function verifyCode( + string $account_id, + \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['verifyCode'][0] + ): \OpenAPI\Client\Model\VerifyCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError + { + list($response) = $this->verifyCodeWithHttpInfo($account_id, $verify_code_request, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation verifyCodeWithHttpInfo + * + * Verify Authentication Code + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['verifyCode'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\VerifyCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaRequestError, HTTP status code, HTTP response headers (array of strings) + */ + public function verifyCodeWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['verifyCode'][0] + ): array + { + $request = $this->verifyCodeRequest($account_id, $verify_code_request, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VerifyCodeResponse', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MfaRequestError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MfaUnauthorizedRequestError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MfaForbiddenRequestError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MfaRequestError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MfaRequestError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VerifyCodeResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VerifyCodeResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MfaRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MfaUnauthorizedRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MfaForbiddenRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MfaRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MfaRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation verifyCodeAsync + * + * Verify Authentication Code + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['verifyCode'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function verifyCodeAsync( + string $account_id, + \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['verifyCode'][0] + ): PromiseInterface + { + return $this->verifyCodeAsyncWithHttpInfo($account_id, $verify_code_request, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation verifyCodeAsyncWithHttpInfo + * + * Verify Authentication Code + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['verifyCode'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function verifyCodeAsyncWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['verifyCode'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\VerifyCodeResponse'; + $request = $this->verifyCodeRequest($account_id, $verify_code_request, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'verifyCode' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://mfa.bandwidth.com/api/v1 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['verifyCode'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function verifyCodeRequest( + string $account_id, + \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['verifyCode'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling verifyCode' + ); + } + + // verify the required parameter 'verify_code_request' is set + if ($verify_code_request === null || (is_array($verify_code_request) && count($verify_code_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $verify_code_request when calling verifyCode' + ); + } + + + $resourcePath = '/accounts/{accountId}/code/verify'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($verify_code_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($verify_code_request)); + } else { + $httpBody = $verify_code_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForverifyCode(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation verifyCode + * + * @return array an array of host settings + */ + protected function getHostSettingsForverifyCode(): array + { + return [ + [ + "url" => "https://mfa.bandwidth.com/api/v1", + "description" => "Production", + ] + ]; + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption(): array + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/src/Api/MediaApi.php b/src/Api/MediaApi.php new file mode 100644 index 00000000..c7641c35 --- /dev/null +++ b/src/Api/MediaApi.php @@ -0,0 +1,2064 @@ + [ + 'application/json', + ], + 'getMedia' => [ + 'application/json', + ], + 'listMedia' => [ + 'application/json', + ], + 'uploadMedia' => [ + 'application/json', + 'application/ogg', + 'application/pdf', + 'application/rtf', + 'application/zip', + 'application/x-tar', + 'application/xml', + 'application/gzip', + 'application/x-bzip2', + 'application/x-gzip', + 'application/smil', + 'application/javascript', + 'audio/mp4', + 'audio/mpeg', + 'audio/ogg', + 'audio/flac', + 'audio/webm', + 'audio/wav', + 'audio/amr', + 'audio/3gpp', + 'image/bmp', + 'image/gif', + 'image/heic', + 'image/heif', + 'image/jpeg', + 'image/pjpeg', + 'image/png', + 'image/svg+xml', + 'image/tiff', + 'image/webp', + 'image/x-icon', + 'text/css', + 'text/csv', + 'text/calendar', + 'text/html', + 'text/plain', + 'text/javascript', + 'text/vcard', + 'text/vnd.wap.wml', + 'text/xml', + 'video/avi', + 'video/mp4', + 'video/mpeg', + 'video/ogg', + 'video/quicktime', + 'video/webm', + 'video/x-ms-wmv', + 'video/x-flv', + ], + ]; + + /** + * @param ClientInterface|null $client + * @param Configuration|null $config + * @param HeaderSelector|null $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex(): int + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig(): Configuration + { + return $this->config; + } + + /** + * Operation deleteMedia + * + * Delete Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMedia'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\MessagingRequestError|null + */ + public function deleteMedia( + string $account_id, + string $media_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteMedia'][0] + ): ?\OpenAPI\Client\Model\MessagingRequestError + { + list($response) = $this->deleteMediaWithHttpInfo($account_id, $media_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation deleteMediaWithHttpInfo + * + * Delete Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMedia'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteMediaWithHttpInfo( + string $account_id, + string $media_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteMedia'][0] + ): array + { + $request = $this->deleteMediaRequest($account_id, $media_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 406: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation deleteMediaAsync + * + * Delete Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteMediaAsync( + string $account_id, + string $media_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteMedia'][0] + ): PromiseInterface + { + return $this->deleteMediaAsyncWithHttpInfo($account_id, $media_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteMediaAsyncWithHttpInfo + * + * Delete Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteMediaAsyncWithHttpInfo( + string $account_id, + string $media_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteMedia'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->deleteMediaRequest($account_id, $media_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteMedia' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteMediaRequest( + string $account_id, + string $media_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteMedia'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling deleteMedia' + ); + } + + // verify the required parameter 'media_id' is set + if ($media_id === null || (is_array($media_id) && count($media_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $media_id when calling deleteMedia' + ); + } + + + $resourcePath = '/users/{accountId}/media/{mediaId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($media_id !== null) { + $resourcePath = str_replace( + '{mediaId}', + ObjectSerializer::toPathValue($media_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsFordeleteMedia(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation deleteMedia + * + * @return array an array of host settings + */ + protected function getHostSettingsFordeleteMedia(): array + { + return [ + [ + "url" => "https://messaging.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation getMedia + * + * Get Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMedia'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SplFileObject|\OpenAPI\Client\Model\MessagingRequestError + */ + public function getMedia( + string $account_id, + string $media_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getMedia'][0] + ): \SplFileObject|\OpenAPI\Client\Model\MessagingRequestError + { + list($response) = $this->getMediaWithHttpInfo($account_id, $media_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation getMediaWithHttpInfo + * + * Get Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMedia'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SplFileObject|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) + */ + public function getMediaWithHttpInfo( + string $account_id, + string $media_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getMedia'][0] + ): array + { + $request = $this->getMediaRequest($account_id, $media_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 406: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SplFileObject', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 406: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getMediaAsync + * + * Get Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getMediaAsync( + string $account_id, + string $media_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getMedia'][0] + ): PromiseInterface + { + return $this->getMediaAsyncWithHttpInfo($account_id, $media_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getMediaAsyncWithHttpInfo + * + * Get Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getMediaAsyncWithHttpInfo( + string $account_id, + string $media_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getMedia'][0] + ): PromiseInterface + { + $returnType = '\SplFileObject'; + $request = $this->getMediaRequest($account_id, $media_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getMedia' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getMediaRequest( + string $account_id, + string $media_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getMedia'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling getMedia' + ); + } + + // verify the required parameter 'media_id' is set + if ($media_id === null || (is_array($media_id) && count($media_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $media_id when calling getMedia' + ); + } + + + $resourcePath = '/users/{accountId}/media/{mediaId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($media_id !== null) { + $resourcePath = str_replace( + '{mediaId}', + ObjectSerializer::toPathValue($media_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/octet-stream', 'application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgetMedia(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation getMedia + * + * @return array an array of host settings + */ + protected function getHostSettingsForgetMedia(): array + { + return [ + [ + "url" => "https://messaging.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation listMedia + * + * List Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $continuation_token Continuation token used to retrieve subsequent media. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listMedia'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\Media[]|\OpenAPI\Client\Model\MessagingRequestError + */ + public function listMedia( + string $account_id, + ?string $continuation_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listMedia'][0] + ): array|\OpenAPI\Client\Model\MessagingRequestError + { + list($response) = $this->listMediaWithHttpInfo($account_id, $continuation_token, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation listMediaWithHttpInfo + * + * List Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $continuation_token Continuation token used to retrieve subsequent media. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listMedia'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\Media[]|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) + */ + public function listMediaWithHttpInfo( + string $account_id, + ?string $continuation_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listMedia'][0] + ): array + { + $request = $this->listMediaRequest($account_id, $continuation_token, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\Media[]', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 406: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\Media[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\Media[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 406: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation listMediaAsync + * + * List Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $continuation_token Continuation token used to retrieve subsequent media. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listMediaAsync( + string $account_id, + ?string $continuation_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listMedia'][0] + ): PromiseInterface + { + return $this->listMediaAsyncWithHttpInfo($account_id, $continuation_token, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listMediaAsyncWithHttpInfo + * + * List Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $continuation_token Continuation token used to retrieve subsequent media. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listMediaAsyncWithHttpInfo( + string $account_id, + ?string $continuation_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listMedia'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\Media[]'; + $request = $this->listMediaRequest($account_id, $continuation_token, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listMedia' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $continuation_token Continuation token used to retrieve subsequent media. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listMediaRequest( + string $account_id, + ?string $continuation_token = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listMedia'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling listMedia' + ); + } + + + + $resourcePath = '/users/{accountId}/media'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($continuation_token !== null) { + $headerParams['Continuation-Token'] = ObjectSerializer::toHeaderValue($continuation_token); + } + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForlistMedia(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation listMedia + * + * @return array an array of host settings + */ + protected function getHostSettingsForlistMedia(): array + { + return [ + [ + "url" => "https://messaging.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation uploadMedia + * + * Upload Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param \SplFileObject $body body (required) + * @param string|null $content_type The media type of the entity-body. (optional) + * @param string|null $cache_control General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadMedia'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\MessagingRequestError|null + */ + public function uploadMedia( + string $account_id, + string $media_id, + \SplFileObject $body, + ?string $content_type = null, + ?string $cache_control = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['uploadMedia'][0] + ): ?\OpenAPI\Client\Model\MessagingRequestError + { + list($response) = $this->uploadMediaWithHttpInfo($account_id, $media_id, $body, $content_type, $cache_control, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation uploadMediaWithHttpInfo + * + * Upload Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param \SplFileObject $body (required) + * @param string|null $content_type The media type of the entity-body. (optional) + * @param string|null $cache_control General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadMedia'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function uploadMediaWithHttpInfo( + string $account_id, + string $media_id, + \SplFileObject $body, + ?string $content_type = null, + ?string $cache_control = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['uploadMedia'][0] + ): array + { + $request = $this->uploadMediaRequest($account_id, $media_id, $body, $content_type, $cache_control, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 406: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation uploadMediaAsync + * + * Upload Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param \SplFileObject $body (required) + * @param string|null $content_type The media type of the entity-body. (optional) + * @param string|null $cache_control General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function uploadMediaAsync( + string $account_id, + string $media_id, + \SplFileObject $body, + ?string $content_type = null, + ?string $cache_control = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['uploadMedia'][0] + ): PromiseInterface + { + return $this->uploadMediaAsyncWithHttpInfo($account_id, $media_id, $body, $content_type, $cache_control, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation uploadMediaAsyncWithHttpInfo + * + * Upload Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param \SplFileObject $body (required) + * @param string|null $content_type The media type of the entity-body. (optional) + * @param string|null $cache_control General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function uploadMediaAsyncWithHttpInfo( + string $account_id, + string $media_id, + \SplFileObject $body, + ?string $content_type = null, + ?string $cache_control = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['uploadMedia'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->uploadMediaRequest($account_id, $media_id, $body, $content_type, $cache_control, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'uploadMedia' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $media_id Media ID to retrieve. (required) + * @param \SplFileObject $body (required) + * @param string|null $content_type The media type of the entity-body. (optional) + * @param string|null $cache_control General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['uploadMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function uploadMediaRequest( + string $account_id, + string $media_id, + \SplFileObject $body, + ?string $content_type = null, + ?string $cache_control = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['uploadMedia'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling uploadMedia' + ); + } + + // verify the required parameter 'media_id' is set + if ($media_id === null || (is_array($media_id) && count($media_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $media_id when calling uploadMedia' + ); + } + + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $body when calling uploadMedia' + ); + } + + + + + $resourcePath = '/users/{accountId}/media/{mediaId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + // header params + if ($content_type !== null) { + $headerParams['Content-Type'] = ObjectSerializer::toHeaderValue($content_type); + } + // header params + if ($cache_control !== null) { + $headerParams['Cache-Control'] = ObjectSerializer::toHeaderValue($cache_control); + } + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($media_id !== null) { + $resourcePath = str_replace( + '{mediaId}', + ObjectSerializer::toPathValue($media_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + } else { + $httpBody = $body; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForuploadMedia(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation uploadMedia + * + * @return array an array of host settings + */ + protected function getHostSettingsForuploadMedia(): array + { + return [ + [ + "url" => "https://messaging.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption(): array + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/src/Api/MessagesApi.php b/src/Api/MessagesApi.php new file mode 100644 index 00000000..062b5000 --- /dev/null +++ b/src/Api/MessagesApi.php @@ -0,0 +1,1703 @@ + [ + 'application/json', + ], + 'listMessages' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface|null $client + * @param Configuration|null $config + * @param HeaderSelector|null $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex(): int + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig(): Configuration + { + return $this->config; + } + + /** + * Operation createMessage + * + * Create Message + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\MessageRequest $message_request message_request (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMessage'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\Message|\OpenAPI\Client\Model\CreateMessageRequestError|\OpenAPI\Client\Model\MessagingRequestError + */ + public function createMessage( + string $account_id, + \OpenAPI\Client\Model\MessageRequest $message_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createMessage'][0] + ): \OpenAPI\Client\Model\Message|\OpenAPI\Client\Model\CreateMessageRequestError|\OpenAPI\Client\Model\MessagingRequestError + { + list($response) = $this->createMessageWithHttpInfo($account_id, $message_request, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation createMessageWithHttpInfo + * + * Create Message + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\MessageRequest $message_request (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMessage'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\Message|\OpenAPI\Client\Model\CreateMessageRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) + */ + public function createMessageWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\MessageRequest $message_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createMessage'][0] + ): array + { + $request = $this->createMessageRequest($account_id, $message_request, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 202: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\Message', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CreateMessageRequestError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 406: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\Message', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\Message', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\CreateMessageRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 406: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation createMessageAsync + * + * Create Message + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\MessageRequest $message_request (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMessage'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createMessageAsync( + string $account_id, + \OpenAPI\Client\Model\MessageRequest $message_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createMessage'][0] + ): PromiseInterface + { + return $this->createMessageAsyncWithHttpInfo($account_id, $message_request, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createMessageAsyncWithHttpInfo + * + * Create Message + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\MessageRequest $message_request (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMessage'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createMessageAsyncWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\MessageRequest $message_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createMessage'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\Message'; + $request = $this->createMessageRequest($account_id, $message_request, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createMessage' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\MessageRequest $message_request (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMessage'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createMessageRequest( + string $account_id, + \OpenAPI\Client\Model\MessageRequest $message_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createMessage'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling createMessage' + ); + } + + // verify the required parameter 'message_request' is set + if ($message_request === null || (is_array($message_request) && count($message_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $message_request when calling createMessage' + ); + } + + + $resourcePath = '/users/{accountId}/messages'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($message_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($message_request)); + } else { + $httpBody = $message_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForcreateMessage(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation createMessage + * + * @return array an array of host settings + */ + protected function getHostSettingsForcreateMessage(): array + { + return [ + [ + "url" => "https://messaging.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation listMessages + * + * List Messages + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) + * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) + * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) + * @param \OpenAPI\Client\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) + * @param \OpenAPI\Client\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) + * @param string|null $carrier_name The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). (optional) + * @param \OpenAPI\Client\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) + * @param int|null $error_code The error code of the message. (optional) + * @param string|null $from_date_time The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param string|null $to_date_time The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param string|null $campaign_id The campaign ID of the message. (optional) + * @param int|null $from_bw_latency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param bool|null $bw_queued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) + * @param \OpenAPI\Client\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) + * @param string|null $location Location Id associated with the message. (optional) + * @param bool|null $carrier_queued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param int|null $from_carrier_latency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param string|null $calling_number_country_a3 Calling number country in A3 format. (optional) + * @param string|null $called_number_country_a3 Called number country in A3 format. (optional) + * @param int|null $from_segment_count Segment count (start range). (optional) + * @param int|null $to_segment_count Segment count (end range). (optional) + * @param int|null $from_message_size Message size (start range). (optional) + * @param int|null $to_message_size Message size (end range). (optional) + * @param string|null $sort The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) + * @param string|null $page_token A base64 encoded value used for pagination of results. (optional) + * @param int|null $limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) + * @param bool|null $limit_total_count When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listMessages'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\MessagesList|\OpenAPI\Client\Model\MessagingRequestError + */ + public function listMessages( + string $account_id, + ?string $message_id = null, + ?string $source_tn = null, + ?string $destination_tn = null, + ?\OpenAPI\Client\Model\MessageStatusEnum $message_status = null, + ?\OpenAPI\Client\Model\ListMessageDirectionEnum $message_direction = null, + ?string $carrier_name = null, + ?\OpenAPI\Client\Model\MessageTypeEnum $message_type = null, + ?int $error_code = null, + ?string $from_date_time = null, + ?string $to_date_time = null, + ?string $campaign_id = null, + ?int $from_bw_latency = null, + ?bool $bw_queued = null, + ?\OpenAPI\Client\Model\ProductTypeEnum $product = null, + ?string $location = null, + ?bool $carrier_queued = null, + ?int $from_carrier_latency = null, + ?string $calling_number_country_a3 = null, + ?string $called_number_country_a3 = null, + ?int $from_segment_count = null, + ?int $to_segment_count = null, + ?int $from_message_size = null, + ?int $to_message_size = null, + ?string $sort = null, + ?string $page_token = null, + ?int $limit = null, + ?bool $limit_total_count = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listMessages'][0] + ): \OpenAPI\Client\Model\MessagesList|\OpenAPI\Client\Model\MessagingRequestError + { + list($response) = $this->listMessagesWithHttpInfo($account_id, $message_id, $source_tn, $destination_tn, $message_status, $message_direction, $carrier_name, $message_type, $error_code, $from_date_time, $to_date_time, $campaign_id, $from_bw_latency, $bw_queued, $product, $location, $carrier_queued, $from_carrier_latency, $calling_number_country_a3, $called_number_country_a3, $from_segment_count, $to_segment_count, $from_message_size, $to_message_size, $sort, $page_token, $limit, $limit_total_count, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation listMessagesWithHttpInfo + * + * List Messages + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) + * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) + * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) + * @param \OpenAPI\Client\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) + * @param \OpenAPI\Client\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) + * @param string|null $carrier_name The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). (optional) + * @param \OpenAPI\Client\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) + * @param int|null $error_code The error code of the message. (optional) + * @param string|null $from_date_time The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param string|null $to_date_time The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param string|null $campaign_id The campaign ID of the message. (optional) + * @param int|null $from_bw_latency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param bool|null $bw_queued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) + * @param \OpenAPI\Client\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) + * @param string|null $location Location Id associated with the message. (optional) + * @param bool|null $carrier_queued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param int|null $from_carrier_latency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param string|null $calling_number_country_a3 Calling number country in A3 format. (optional) + * @param string|null $called_number_country_a3 Called number country in A3 format. (optional) + * @param int|null $from_segment_count Segment count (start range). (optional) + * @param int|null $to_segment_count Segment count (end range). (optional) + * @param int|null $from_message_size Message size (start range). (optional) + * @param int|null $to_message_size Message size (end range). (optional) + * @param string|null $sort The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) + * @param string|null $page_token A base64 encoded value used for pagination of results. (optional) + * @param int|null $limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) + * @param bool|null $limit_total_count When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listMessages'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\MessagesList|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) + */ + public function listMessagesWithHttpInfo( + string $account_id, + ?string $message_id = null, + ?string $source_tn = null, + ?string $destination_tn = null, + ?\OpenAPI\Client\Model\MessageStatusEnum $message_status = null, + ?\OpenAPI\Client\Model\ListMessageDirectionEnum $message_direction = null, + ?string $carrier_name = null, + ?\OpenAPI\Client\Model\MessageTypeEnum $message_type = null, + ?int $error_code = null, + ?string $from_date_time = null, + ?string $to_date_time = null, + ?string $campaign_id = null, + ?int $from_bw_latency = null, + ?bool $bw_queued = null, + ?\OpenAPI\Client\Model\ProductTypeEnum $product = null, + ?string $location = null, + ?bool $carrier_queued = null, + ?int $from_carrier_latency = null, + ?string $calling_number_country_a3 = null, + ?string $called_number_country_a3 = null, + ?int $from_segment_count = null, + ?int $to_segment_count = null, + ?int $from_message_size = null, + ?int $to_message_size = null, + ?string $sort = null, + ?string $page_token = null, + ?int $limit = null, + ?bool $limit_total_count = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listMessages'][0] + ): array + { + $request = $this->listMessagesRequest($account_id, $message_id, $source_tn, $destination_tn, $message_status, $message_direction, $carrier_name, $message_type, $error_code, $from_date_time, $to_date_time, $campaign_id, $from_bw_latency, $bw_queued, $product, $location, $carrier_queued, $from_carrier_latency, $calling_number_country_a3, $called_number_country_a3, $from_segment_count, $to_segment_count, $from_message_size, $to_message_size, $sort, $page_token, $limit, $limit_total_count, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagesList', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagingRequestError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MessagesList', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagesList', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MessagingRequestError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation listMessagesAsync + * + * List Messages + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) + * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) + * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) + * @param \OpenAPI\Client\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) + * @param \OpenAPI\Client\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) + * @param string|null $carrier_name The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). (optional) + * @param \OpenAPI\Client\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) + * @param int|null $error_code The error code of the message. (optional) + * @param string|null $from_date_time The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param string|null $to_date_time The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param string|null $campaign_id The campaign ID of the message. (optional) + * @param int|null $from_bw_latency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param bool|null $bw_queued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) + * @param \OpenAPI\Client\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) + * @param string|null $location Location Id associated with the message. (optional) + * @param bool|null $carrier_queued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param int|null $from_carrier_latency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param string|null $calling_number_country_a3 Calling number country in A3 format. (optional) + * @param string|null $called_number_country_a3 Called number country in A3 format. (optional) + * @param int|null $from_segment_count Segment count (start range). (optional) + * @param int|null $to_segment_count Segment count (end range). (optional) + * @param int|null $from_message_size Message size (start range). (optional) + * @param int|null $to_message_size Message size (end range). (optional) + * @param string|null $sort The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) + * @param string|null $page_token A base64 encoded value used for pagination of results. (optional) + * @param int|null $limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) + * @param bool|null $limit_total_count When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listMessages'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listMessagesAsync( + string $account_id, + ?string $message_id = null, + ?string $source_tn = null, + ?string $destination_tn = null, + ?\OpenAPI\Client\Model\MessageStatusEnum $message_status = null, + ?\OpenAPI\Client\Model\ListMessageDirectionEnum $message_direction = null, + ?string $carrier_name = null, + ?\OpenAPI\Client\Model\MessageTypeEnum $message_type = null, + ?int $error_code = null, + ?string $from_date_time = null, + ?string $to_date_time = null, + ?string $campaign_id = null, + ?int $from_bw_latency = null, + ?bool $bw_queued = null, + ?\OpenAPI\Client\Model\ProductTypeEnum $product = null, + ?string $location = null, + ?bool $carrier_queued = null, + ?int $from_carrier_latency = null, + ?string $calling_number_country_a3 = null, + ?string $called_number_country_a3 = null, + ?int $from_segment_count = null, + ?int $to_segment_count = null, + ?int $from_message_size = null, + ?int $to_message_size = null, + ?string $sort = null, + ?string $page_token = null, + ?int $limit = null, + ?bool $limit_total_count = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listMessages'][0] + ): PromiseInterface + { + return $this->listMessagesAsyncWithHttpInfo($account_id, $message_id, $source_tn, $destination_tn, $message_status, $message_direction, $carrier_name, $message_type, $error_code, $from_date_time, $to_date_time, $campaign_id, $from_bw_latency, $bw_queued, $product, $location, $carrier_queued, $from_carrier_latency, $calling_number_country_a3, $called_number_country_a3, $from_segment_count, $to_segment_count, $from_message_size, $to_message_size, $sort, $page_token, $limit, $limit_total_count, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listMessagesAsyncWithHttpInfo + * + * List Messages + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) + * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) + * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) + * @param \OpenAPI\Client\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) + * @param \OpenAPI\Client\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) + * @param string|null $carrier_name The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). (optional) + * @param \OpenAPI\Client\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) + * @param int|null $error_code The error code of the message. (optional) + * @param string|null $from_date_time The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param string|null $to_date_time The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param string|null $campaign_id The campaign ID of the message. (optional) + * @param int|null $from_bw_latency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param bool|null $bw_queued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) + * @param \OpenAPI\Client\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) + * @param string|null $location Location Id associated with the message. (optional) + * @param bool|null $carrier_queued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param int|null $from_carrier_latency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param string|null $calling_number_country_a3 Calling number country in A3 format. (optional) + * @param string|null $called_number_country_a3 Called number country in A3 format. (optional) + * @param int|null $from_segment_count Segment count (start range). (optional) + * @param int|null $to_segment_count Segment count (end range). (optional) + * @param int|null $from_message_size Message size (start range). (optional) + * @param int|null $to_message_size Message size (end range). (optional) + * @param string|null $sort The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) + * @param string|null $page_token A base64 encoded value used for pagination of results. (optional) + * @param int|null $limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) + * @param bool|null $limit_total_count When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listMessages'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listMessagesAsyncWithHttpInfo( + string $account_id, + ?string $message_id = null, + ?string $source_tn = null, + ?string $destination_tn = null, + ?\OpenAPI\Client\Model\MessageStatusEnum $message_status = null, + ?\OpenAPI\Client\Model\ListMessageDirectionEnum $message_direction = null, + ?string $carrier_name = null, + ?\OpenAPI\Client\Model\MessageTypeEnum $message_type = null, + ?int $error_code = null, + ?string $from_date_time = null, + ?string $to_date_time = null, + ?string $campaign_id = null, + ?int $from_bw_latency = null, + ?bool $bw_queued = null, + ?\OpenAPI\Client\Model\ProductTypeEnum $product = null, + ?string $location = null, + ?bool $carrier_queued = null, + ?int $from_carrier_latency = null, + ?string $calling_number_country_a3 = null, + ?string $called_number_country_a3 = null, + ?int $from_segment_count = null, + ?int $to_segment_count = null, + ?int $from_message_size = null, + ?int $to_message_size = null, + ?string $sort = null, + ?string $page_token = null, + ?int $limit = null, + ?bool $limit_total_count = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listMessages'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\MessagesList'; + $request = $this->listMessagesRequest($account_id, $message_id, $source_tn, $destination_tn, $message_status, $message_direction, $carrier_name, $message_type, $error_code, $from_date_time, $to_date_time, $campaign_id, $from_bw_latency, $bw_queued, $product, $location, $carrier_queued, $from_carrier_latency, $calling_number_country_a3, $called_number_country_a3, $from_segment_count, $to_segment_count, $from_message_size, $to_message_size, $sort, $page_token, $limit, $limit_total_count, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listMessages' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) + * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) + * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) + * @param \OpenAPI\Client\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) + * @param \OpenAPI\Client\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) + * @param string|null $carrier_name The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). (optional) + * @param \OpenAPI\Client\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) + * @param int|null $error_code The error code of the message. (optional) + * @param string|null $from_date_time The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param string|null $to_date_time The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + * @param string|null $campaign_id The campaign ID of the message. (optional) + * @param int|null $from_bw_latency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param bool|null $bw_queued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) + * @param \OpenAPI\Client\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) + * @param string|null $location Location Id associated with the message. (optional) + * @param bool|null $carrier_queued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param int|null $from_carrier_latency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) + * @param string|null $calling_number_country_a3 Calling number country in A3 format. (optional) + * @param string|null $called_number_country_a3 Called number country in A3 format. (optional) + * @param int|null $from_segment_count Segment count (start range). (optional) + * @param int|null $to_segment_count Segment count (end range). (optional) + * @param int|null $from_message_size Message size (start range). (optional) + * @param int|null $to_message_size Message size (end range). (optional) + * @param string|null $sort The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) + * @param string|null $page_token A base64 encoded value used for pagination of results. (optional) + * @param int|null $limit The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional) + * @param bool|null $limit_total_count When set to true, the response's totalCount field will have a maximum value of 10,000. When set to false, or excluded, this will give an accurate totalCount of all messages that match the provided filters. If you are experiencing latency, try using this parameter to limit your results. (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listMessages'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listMessagesRequest( + string $account_id, + ?string $message_id = null, + ?string $source_tn = null, + ?string $destination_tn = null, + ?\OpenAPI\Client\Model\MessageStatusEnum $message_status = null, + ?\OpenAPI\Client\Model\ListMessageDirectionEnum $message_direction = null, + ?string $carrier_name = null, + ?\OpenAPI\Client\Model\MessageTypeEnum $message_type = null, + ?int $error_code = null, + ?string $from_date_time = null, + ?string $to_date_time = null, + ?string $campaign_id = null, + ?int $from_bw_latency = null, + ?bool $bw_queued = null, + ?\OpenAPI\Client\Model\ProductTypeEnum $product = null, + ?string $location = null, + ?bool $carrier_queued = null, + ?int $from_carrier_latency = null, + ?string $calling_number_country_a3 = null, + ?string $called_number_country_a3 = null, + ?int $from_segment_count = null, + ?int $to_segment_count = null, + ?int $from_message_size = null, + ?int $to_message_size = null, + ?string $sort = null, + ?string $page_token = null, + ?int $limit = null, + ?bool $limit_total_count = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listMessages'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling listMessages' + ); + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $resourcePath = '/users/{accountId}/messages'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $message_id, + 'messageId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $source_tn, + 'sourceTn', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $destination_tn, + 'destinationTn', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $message_status?->value, + 'messageStatus', // param base name + 'MessageStatusEnum', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $message_direction?->value, + 'messageDirection', // param base name + 'ListMessageDirectionEnum', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $carrier_name, + 'carrierName', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $message_type?->value, + 'messageType', // param base name + 'MessageTypeEnum', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $error_code, + 'errorCode', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $from_date_time, + 'fromDateTime', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $to_date_time, + 'toDateTime', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $campaign_id, + 'campaignId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $from_bw_latency, + 'fromBwLatency', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $bw_queued, + 'bwQueued', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $product?->value, + 'product', // param base name + 'ProductTypeEnum', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $location, + 'location', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $carrier_queued, + 'carrierQueued', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $from_carrier_latency, + 'fromCarrierLatency', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $calling_number_country_a3, + 'callingNumberCountryA3', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $called_number_country_a3, + 'calledNumberCountryA3', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $from_segment_count, + 'fromSegmentCount', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $to_segment_count, + 'toSegmentCount', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $from_message_size, + 'fromMessageSize', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $to_message_size, + 'toMessageSize', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sort, + 'sort', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page_token, + 'pageToken', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit_total_count, + 'limitTotalCount', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForlistMessages(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation listMessages + * + * @return array an array of host settings + */ + protected function getHostSettingsForlistMessages(): array + { + return [ + [ + "url" => "https://messaging.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption(): array + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/src/Api/MultiChannelApi.php b/src/Api/MultiChannelApi.php new file mode 100644 index 00000000..596c01be --- /dev/null +++ b/src/Api/MultiChannelApi.php @@ -0,0 +1,680 @@ + [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface|null $client + * @param Configuration|null $config + * @param HeaderSelector|null $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex(): int + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig(): Configuration + { + return $this->config; + } + + /** + * Operation createMultiChannelMessage + * + * Create Multi-Channel Message + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request multi_channel_message_request (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMultiChannelMessage'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\CreateMultiChannelMessageResponse|\OpenAPI\Client\Model\MultiChannelError|null + */ + public function createMultiChannelMessage( + string $account_id, + \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createMultiChannelMessage'][0] + ): \OpenAPI\Client\Model\CreateMultiChannelMessageResponse|\OpenAPI\Client\Model\MultiChannelError|null + { + list($response) = $this->createMultiChannelMessageWithHttpInfo($account_id, $multi_channel_message_request, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation createMultiChannelMessageWithHttpInfo + * + * Create Multi-Channel Message + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMultiChannelMessage'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\CreateMultiChannelMessageResponse|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError, HTTP status code, HTTP response headers (array of strings) + */ + public function createMultiChannelMessageWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createMultiChannelMessage'][0] + ): array + { + $request = $this->createMultiChannelMessageRequest($account_id, $multi_channel_message_request, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 202: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CreateMultiChannelMessageResponse', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MultiChannelError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MultiChannelError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MultiChannelError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MultiChannelError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MultiChannelError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MultiChannelError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MultiChannelError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\MultiChannelError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CreateMultiChannelMessageResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\CreateMultiChannelMessageResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MultiChannelError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MultiChannelError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MultiChannelError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MultiChannelError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MultiChannelError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MultiChannelError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MultiChannelError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\MultiChannelError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation createMultiChannelMessageAsync + * + * Create Multi-Channel Message + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMultiChannelMessage'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createMultiChannelMessageAsync( + string $account_id, + \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createMultiChannelMessage'][0] + ): PromiseInterface + { + return $this->createMultiChannelMessageAsyncWithHttpInfo($account_id, $multi_channel_message_request, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createMultiChannelMessageAsyncWithHttpInfo + * + * Create Multi-Channel Message + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMultiChannelMessage'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createMultiChannelMessageAsyncWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createMultiChannelMessage'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\CreateMultiChannelMessageResponse'; + $request = $this->createMultiChannelMessageRequest($account_id, $multi_channel_message_request, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createMultiChannelMessage' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://messaging.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMultiChannelMessage'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createMultiChannelMessageRequest( + string $account_id, + \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createMultiChannelMessage'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling createMultiChannelMessage' + ); + } + + // verify the required parameter 'multi_channel_message_request' is set + if ($multi_channel_message_request === null || (is_array($multi_channel_message_request) && count($multi_channel_message_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $multi_channel_message_request when calling createMultiChannelMessage' + ); + } + + + $resourcePath = '/users/{accountId}/messages/multiChannel'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($multi_channel_message_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($multi_channel_message_request)); + } else { + $httpBody = $multi_channel_message_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForcreateMultiChannelMessage(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation createMultiChannelMessage + * + * @return array an array of host settings + */ + protected function getHostSettingsForcreateMultiChannelMessage(): array + { + return [ + [ + "url" => "https://messaging.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption(): array + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/src/Api/PhoneNumberLookupApi.php b/src/Api/PhoneNumberLookupApi.php new file mode 100644 index 00000000..e95dc413 --- /dev/null +++ b/src/Api/PhoneNumberLookupApi.php @@ -0,0 +1,1373 @@ + [ + 'application/json', + ], + 'createSyncLookup' => [ + 'application/json', + ], + 'getAsyncBulkLookup' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface|null $client + * @param Configuration|null $config + * @param HeaderSelector|null $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex(): int + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig(): Configuration + { + return $this->config; + } + + /** + * Operation createAsyncBulkLookup + * + * Create Asynchronous Bulk Number Lookup + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id account_id (required) + * @param \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAsyncBulkLookup'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\CreateAsyncBulkLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse + */ + public function createAsyncBulkLookup( + string $account_id, + \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createAsyncBulkLookup'][0] + ): \OpenAPI\Client\Model\CreateAsyncBulkLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse + { + list($response) = $this->createAsyncBulkLookupWithHttpInfo($account_id, $async_lookup_request, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation createAsyncBulkLookupWithHttpInfo + * + * Create Asynchronous Bulk Number Lookup + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id (required) + * @param \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAsyncBulkLookup'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\CreateAsyncBulkLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createAsyncBulkLookupWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createAsyncBulkLookup'][0] + ): array + { + $request = $this->createAsyncBulkLookupRequest($account_id, $async_lookup_request, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 202: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CreateAsyncBulkLookupResponse', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\LookupErrorResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CreateAsyncBulkLookupResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 202: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\CreateAsyncBulkLookupResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\LookupErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation createAsyncBulkLookupAsync + * + * Create Asynchronous Bulk Number Lookup + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id (required) + * @param \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAsyncBulkLookup'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createAsyncBulkLookupAsync( + string $account_id, + \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createAsyncBulkLookup'][0] + ): PromiseInterface + { + return $this->createAsyncBulkLookupAsyncWithHttpInfo($account_id, $async_lookup_request, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createAsyncBulkLookupAsyncWithHttpInfo + * + * Create Asynchronous Bulk Number Lookup + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id (required) + * @param \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAsyncBulkLookup'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createAsyncBulkLookupAsyncWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createAsyncBulkLookup'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\CreateAsyncBulkLookupResponse'; + $request = $this->createAsyncBulkLookupRequest($account_id, $async_lookup_request, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createAsyncBulkLookup' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id (required) + * @param \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAsyncBulkLookup'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createAsyncBulkLookupRequest( + string $account_id, + \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createAsyncBulkLookup'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling createAsyncBulkLookup' + ); + } + + // verify the required parameter 'async_lookup_request' is set + if ($async_lookup_request === null || (is_array($async_lookup_request) && count($async_lookup_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $async_lookup_request when calling createAsyncBulkLookup' + ); + } + + + $resourcePath = '/accounts/{accountId}/phoneNumberLookup/bulk'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($async_lookup_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($async_lookup_request)); + } else { + $httpBody = $async_lookup_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForcreateAsyncBulkLookup(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation createAsyncBulkLookup + * + * @return array an array of host settings + */ + protected function getHostSettingsForcreateAsyncBulkLookup(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation createSyncLookup + * + * Create Synchronous Number Lookup + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id account_id (required) + * @param \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSyncLookup'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\CreateSyncLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse + */ + public function createSyncLookup( + string $account_id, + \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createSyncLookup'][0] + ): \OpenAPI\Client\Model\CreateSyncLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse + { + list($response) = $this->createSyncLookupWithHttpInfo($account_id, $sync_lookup_request, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation createSyncLookupWithHttpInfo + * + * Create Synchronous Number Lookup + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id (required) + * @param \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSyncLookup'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\CreateSyncLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function createSyncLookupWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createSyncLookup'][0] + ): array + { + $request = $this->createSyncLookupRequest($account_id, $sync_lookup_request, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CreateSyncLookupResponse', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\LookupErrorResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CreateSyncLookupResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\CreateSyncLookupResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\LookupErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation createSyncLookupAsync + * + * Create Synchronous Number Lookup + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id (required) + * @param \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSyncLookup'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createSyncLookupAsync( + string $account_id, + \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createSyncLookup'][0] + ): PromiseInterface + { + return $this->createSyncLookupAsyncWithHttpInfo($account_id, $sync_lookup_request, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createSyncLookupAsyncWithHttpInfo + * + * Create Synchronous Number Lookup + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id (required) + * @param \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSyncLookup'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createSyncLookupAsyncWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createSyncLookup'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\CreateSyncLookupResponse'; + $request = $this->createSyncLookupRequest($account_id, $sync_lookup_request, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createSyncLookup' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id (required) + * @param \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSyncLookup'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createSyncLookupRequest( + string $account_id, + \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createSyncLookup'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling createSyncLookup' + ); + } + + // verify the required parameter 'sync_lookup_request' is set + if ($sync_lookup_request === null || (is_array($sync_lookup_request) && count($sync_lookup_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $sync_lookup_request when calling createSyncLookup' + ); + } + + + $resourcePath = '/accounts/{accountId}/phoneNumberLookup'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($sync_lookup_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($sync_lookup_request)); + } else { + $httpBody = $sync_lookup_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForcreateSyncLookup(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation createSyncLookup + * + * @return array an array of host settings + */ + protected function getHostSettingsForcreateSyncLookup(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation getAsyncBulkLookup + * + * Get Asynchronous Bulk Number Lookup + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id account_id (required) + * @param string $request_id request_id (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAsyncBulkLookup'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\GetAsyncBulkLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse + */ + public function getAsyncBulkLookup( + string $account_id, + string $request_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getAsyncBulkLookup'][0] + ): \OpenAPI\Client\Model\GetAsyncBulkLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse + { + list($response) = $this->getAsyncBulkLookupWithHttpInfo($account_id, $request_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation getAsyncBulkLookupWithHttpInfo + * + * Get Asynchronous Bulk Number Lookup + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id (required) + * @param string $request_id (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAsyncBulkLookup'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\GetAsyncBulkLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse, HTTP status code, HTTP response headers (array of strings) + */ + public function getAsyncBulkLookupWithHttpInfo( + string $account_id, + string $request_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getAsyncBulkLookup'][0] + ): array + { + $request = $this->getAsyncBulkLookupRequest($account_id, $request_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\GetAsyncBulkLookupResponse', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\LookupErrorResponse', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\GetAsyncBulkLookupResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\GetAsyncBulkLookupResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + default: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\LookupErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getAsyncBulkLookupAsync + * + * Get Asynchronous Bulk Number Lookup + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id (required) + * @param string $request_id (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAsyncBulkLookup'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getAsyncBulkLookupAsync( + string $account_id, + string $request_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getAsyncBulkLookup'][0] + ): PromiseInterface + { + return $this->getAsyncBulkLookupAsyncWithHttpInfo($account_id, $request_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getAsyncBulkLookupAsyncWithHttpInfo + * + * Get Asynchronous Bulk Number Lookup + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id (required) + * @param string $request_id (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAsyncBulkLookup'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getAsyncBulkLookupAsyncWithHttpInfo( + string $account_id, + string $request_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getAsyncBulkLookup'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\GetAsyncBulkLookupResponse'; + $request = $this->getAsyncBulkLookupRequest($account_id, $request_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getAsyncBulkLookup' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/v2 + * + * @param string $account_id (required) + * @param string $request_id (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAsyncBulkLookup'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getAsyncBulkLookupRequest( + string $account_id, + string $request_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getAsyncBulkLookup'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling getAsyncBulkLookup' + ); + } + + // verify the required parameter 'request_id' is set + if ($request_id === null || (is_array($request_id) && count($request_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $request_id when calling getAsyncBulkLookup' + ); + } + + + $resourcePath = '/accounts/{accountId}/phoneNumberLookup/bulk/{requestId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($request_id !== null) { + $resourcePath = str_replace( + '{requestId}', + ObjectSerializer::toPathValue($request_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgetAsyncBulkLookup(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation getAsyncBulkLookup + * + * @return array an array of host settings + */ + protected function getHostSettingsForgetAsyncBulkLookup(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/v2", + "description" => "Production", + ] + ]; + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption(): array + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/src/Api/RecordingsApi.php b/src/Api/RecordingsApi.php new file mode 100644 index 00000000..9259667a --- /dev/null +++ b/src/Api/RecordingsApi.php @@ -0,0 +1,4930 @@ + [ + 'application/json', + ], + 'deleteRecordingMedia' => [ + 'application/json', + ], + 'deleteRecordingTranscription' => [ + 'application/json', + ], + 'downloadCallRecording' => [ + 'application/json', + ], + 'getCallRecording' => [ + 'application/json', + ], + 'getRecordingTranscription' => [ + 'application/json', + ], + 'listAccountCallRecordings' => [ + 'application/json', + ], + 'listCallRecordings' => [ + 'application/json', + ], + 'transcribeCallRecording' => [ + 'application/json', + ], + 'updateCallRecordingState' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface|null $client + * @param Configuration|null $config + * @param HeaderSelector|null $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex(): int + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig(): Configuration + { + return $this->config; + } + + /** + * Operation deleteRecording + * + * Delete Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecording'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\VoiceApiError|null + */ + public function deleteRecording( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecording'][0] + ): ?\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->deleteRecordingWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation deleteRecordingWithHttpInfo + * + * Delete Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecording'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteRecordingWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecording'][0] + ): array + { + $request = $this->deleteRecordingRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation deleteRecordingAsync + * + * Delete Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteRecordingAsync( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecording'][0] + ): PromiseInterface + { + return $this->deleteRecordingAsyncWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteRecordingAsyncWithHttpInfo + * + * Delete Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteRecordingAsyncWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecording'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->deleteRecordingRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteRecording' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteRecordingRequest( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecording'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling deleteRecording' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling deleteRecording' + ); + } + + // verify the required parameter 'recording_id' is set + if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $recording_id when calling deleteRecording' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + // path params + if ($recording_id !== null) { + $resourcePath = str_replace( + '{recordingId}', + ObjectSerializer::toPathValue($recording_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsFordeleteRecording(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation deleteRecording + * + * @return array an array of host settings + */ + protected function getHostSettingsFordeleteRecording(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation deleteRecordingMedia + * + * Delete Recording Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecordingMedia'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\VoiceApiError|null + */ + public function deleteRecordingMedia( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecordingMedia'][0] + ): ?\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->deleteRecordingMediaWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation deleteRecordingMediaWithHttpInfo + * + * Delete Recording Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecordingMedia'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteRecordingMediaWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecordingMedia'][0] + ): array + { + $request = $this->deleteRecordingMediaRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation deleteRecordingMediaAsync + * + * Delete Recording Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecordingMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteRecordingMediaAsync( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecordingMedia'][0] + ): PromiseInterface + { + return $this->deleteRecordingMediaAsyncWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteRecordingMediaAsyncWithHttpInfo + * + * Delete Recording Media + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecordingMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteRecordingMediaAsyncWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecordingMedia'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->deleteRecordingMediaRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteRecordingMedia' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecordingMedia'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteRecordingMediaRequest( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecordingMedia'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling deleteRecordingMedia' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling deleteRecordingMedia' + ); + } + + // verify the required parameter 'recording_id' is set + if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $recording_id when calling deleteRecordingMedia' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + // path params + if ($recording_id !== null) { + $resourcePath = str_replace( + '{recordingId}', + ObjectSerializer::toPathValue($recording_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsFordeleteRecordingMedia(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation deleteRecordingMedia + * + * @return array an array of host settings + */ + protected function getHostSettingsFordeleteRecordingMedia(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation deleteRecordingTranscription + * + * Delete Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecordingTranscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\VoiceApiError|null + */ + public function deleteRecordingTranscription( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecordingTranscription'][0] + ): ?\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->deleteRecordingTranscriptionWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation deleteRecordingTranscriptionWithHttpInfo + * + * Delete Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecordingTranscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteRecordingTranscriptionWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecordingTranscription'][0] + ): array + { + $request = $this->deleteRecordingTranscriptionRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation deleteRecordingTranscriptionAsync + * + * Delete Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecordingTranscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteRecordingTranscriptionAsync( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecordingTranscription'][0] + ): PromiseInterface + { + return $this->deleteRecordingTranscriptionAsyncWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteRecordingTranscriptionAsyncWithHttpInfo + * + * Delete Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecordingTranscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteRecordingTranscriptionAsyncWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecordingTranscription'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->deleteRecordingTranscriptionRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteRecordingTranscription' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRecordingTranscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteRecordingTranscriptionRequest( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRecordingTranscription'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling deleteRecordingTranscription' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling deleteRecordingTranscription' + ); + } + + // verify the required parameter 'recording_id' is set + if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $recording_id when calling deleteRecordingTranscription' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + // path params + if ($recording_id !== null) { + $resourcePath = str_replace( + '{recordingId}', + ObjectSerializer::toPathValue($recording_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsFordeleteRecordingTranscription(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation deleteRecordingTranscription + * + * @return array an array of host settings + */ + protected function getHostSettingsFordeleteRecordingTranscription(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation downloadCallRecording + * + * Download Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadCallRecording'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \SplFileObject|\OpenAPI\Client\Model\VoiceApiError + */ + public function downloadCallRecording( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['downloadCallRecording'][0] + ): \SplFileObject|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->downloadCallRecordingWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation downloadCallRecordingWithHttpInfo + * + * Download Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadCallRecording'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \SplFileObject|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function downloadCallRecordingWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['downloadCallRecording'][0] + ): array + { + $request = $this->downloadCallRecordingRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\SplFileObject', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\SplFileObject', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation downloadCallRecordingAsync + * + * Download Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadCallRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function downloadCallRecordingAsync( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['downloadCallRecording'][0] + ): PromiseInterface + { + return $this->downloadCallRecordingAsyncWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation downloadCallRecordingAsyncWithHttpInfo + * + * Download Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadCallRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function downloadCallRecordingAsyncWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['downloadCallRecording'][0] + ): PromiseInterface + { + $returnType = '\SplFileObject'; + $request = $this->downloadCallRecordingRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'downloadCallRecording' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['downloadCallRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function downloadCallRecordingRequest( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['downloadCallRecording'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling downloadCallRecording' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling downloadCallRecording' + ); + } + + // verify the required parameter 'recording_id' is set + if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $recording_id when calling downloadCallRecording' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + // path params + if ($recording_id !== null) { + $resourcePath = str_replace( + '{recordingId}', + ObjectSerializer::toPathValue($recording_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['audio/vnd.wave', 'audio/mpeg', 'application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsFordownloadCallRecording(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation downloadCallRecording + * + * @return array an array of host settings + */ + protected function getHostSettingsFordownloadCallRecording(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation getCallRecording + * + * Get Call Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCallRecording'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\CallRecordingMetadata|\OpenAPI\Client\Model\VoiceApiError + */ + public function getCallRecording( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getCallRecording'][0] + ): \OpenAPI\Client\Model\CallRecordingMetadata|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->getCallRecordingWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation getCallRecordingWithHttpInfo + * + * Get Call Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCallRecording'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\CallRecordingMetadata|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function getCallRecordingWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getCallRecording'][0] + ): array + { + $request = $this->getCallRecordingRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallRecordingMetadata', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallRecordingMetadata', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\CallRecordingMetadata', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getCallRecordingAsync + * + * Get Call Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCallRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getCallRecordingAsync( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getCallRecording'][0] + ): PromiseInterface + { + return $this->getCallRecordingAsyncWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCallRecordingAsyncWithHttpInfo + * + * Get Call Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCallRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getCallRecordingAsyncWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getCallRecording'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\CallRecordingMetadata'; + $request = $this->getCallRecordingRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getCallRecording' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getCallRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getCallRecordingRequest( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getCallRecording'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling getCallRecording' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling getCallRecording' + ); + } + + // verify the required parameter 'recording_id' is set + if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $recording_id when calling getCallRecording' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + // path params + if ($recording_id !== null) { + $resourcePath = str_replace( + '{recordingId}', + ObjectSerializer::toPathValue($recording_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgetCallRecording(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation getCallRecording + * + * @return array an array of host settings + */ + protected function getHostSettingsForgetCallRecording(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation getRecordingTranscription + * + * Get Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRecordingTranscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\RecordingTranscriptions|\OpenAPI\Client\Model\VoiceApiError + */ + public function getRecordingTranscription( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getRecordingTranscription'][0] + ): \OpenAPI\Client\Model\RecordingTranscriptions|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->getRecordingTranscriptionWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation getRecordingTranscriptionWithHttpInfo + * + * Get Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRecordingTranscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\RecordingTranscriptions|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function getRecordingTranscriptionWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getRecordingTranscription'][0] + ): array + { + $request = $this->getRecordingTranscriptionRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\RecordingTranscriptions', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\RecordingTranscriptions', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\RecordingTranscriptions', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getRecordingTranscriptionAsync + * + * Get Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRecordingTranscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getRecordingTranscriptionAsync( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getRecordingTranscription'][0] + ): PromiseInterface + { + return $this->getRecordingTranscriptionAsyncWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getRecordingTranscriptionAsyncWithHttpInfo + * + * Get Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRecordingTranscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getRecordingTranscriptionAsyncWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getRecordingTranscription'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\RecordingTranscriptions'; + $request = $this->getRecordingTranscriptionRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getRecordingTranscription' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRecordingTranscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getRecordingTranscriptionRequest( + string $account_id, + string $call_id, + string $recording_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getRecordingTranscription'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling getRecordingTranscription' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling getRecordingTranscription' + ); + } + + // verify the required parameter 'recording_id' is set + if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $recording_id when calling getRecordingTranscription' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + // path params + if ($recording_id !== null) { + $resourcePath = str_replace( + '{recordingId}', + ObjectSerializer::toPathValue($recording_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgetRecordingTranscription(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation getRecordingTranscription + * + * @return array an array of host settings + */ + protected function getHostSettingsForgetRecordingTranscription(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation listAccountCallRecordings + * + * Get Call Recordings + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $to Filter results by the `to` field. (optional) + * @param string|null $from Filter results by the `from` field. (optional) + * @param string|null $min_start_time Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) + * @param string|null $max_start_time Filter results to recordings which have a `startTime` before `maxStartTime` (in ISO8601 format). (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAccountCallRecordings'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\CallRecordingMetadata[]|\OpenAPI\Client\Model\VoiceApiError + */ + public function listAccountCallRecordings( + string $account_id, + ?string $to = null, + ?string $from = null, + ?string $min_start_time = null, + ?string $max_start_time = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listAccountCallRecordings'][0] + ): array|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->listAccountCallRecordingsWithHttpInfo($account_id, $to, $from, $min_start_time, $max_start_time, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation listAccountCallRecordingsWithHttpInfo + * + * Get Call Recordings + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $to Filter results by the `to` field. (optional) + * @param string|null $from Filter results by the `from` field. (optional) + * @param string|null $min_start_time Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) + * @param string|null $max_start_time Filter results to recordings which have a `startTime` before `maxStartTime` (in ISO8601 format). (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAccountCallRecordings'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\CallRecordingMetadata[]|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function listAccountCallRecordingsWithHttpInfo( + string $account_id, + ?string $to = null, + ?string $from = null, + ?string $min_start_time = null, + ?string $max_start_time = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listAccountCallRecordings'][0] + ): array + { + $request = $this->listAccountCallRecordingsRequest($account_id, $to, $from, $min_start_time, $max_start_time, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallRecordingMetadata[]', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallRecordingMetadata[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\CallRecordingMetadata[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation listAccountCallRecordingsAsync + * + * Get Call Recordings + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $to Filter results by the `to` field. (optional) + * @param string|null $from Filter results by the `from` field. (optional) + * @param string|null $min_start_time Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) + * @param string|null $max_start_time Filter results to recordings which have a `startTime` before `maxStartTime` (in ISO8601 format). (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAccountCallRecordings'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listAccountCallRecordingsAsync( + string $account_id, + ?string $to = null, + ?string $from = null, + ?string $min_start_time = null, + ?string $max_start_time = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listAccountCallRecordings'][0] + ): PromiseInterface + { + return $this->listAccountCallRecordingsAsyncWithHttpInfo($account_id, $to, $from, $min_start_time, $max_start_time, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listAccountCallRecordingsAsyncWithHttpInfo + * + * Get Call Recordings + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $to Filter results by the `to` field. (optional) + * @param string|null $from Filter results by the `from` field. (optional) + * @param string|null $min_start_time Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) + * @param string|null $max_start_time Filter results to recordings which have a `startTime` before `maxStartTime` (in ISO8601 format). (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAccountCallRecordings'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listAccountCallRecordingsAsyncWithHttpInfo( + string $account_id, + ?string $to = null, + ?string $from = null, + ?string $min_start_time = null, + ?string $max_start_time = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listAccountCallRecordings'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\CallRecordingMetadata[]'; + $request = $this->listAccountCallRecordingsRequest($account_id, $to, $from, $min_start_time, $max_start_time, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listAccountCallRecordings' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string|null $to Filter results by the `to` field. (optional) + * @param string|null $from Filter results by the `from` field. (optional) + * @param string|null $min_start_time Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). (optional) + * @param string|null $max_start_time Filter results to recordings which have a `startTime` before `maxStartTime` (in ISO8601 format). (optional) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listAccountCallRecordings'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listAccountCallRecordingsRequest( + string $account_id, + ?string $to = null, + ?string $from = null, + ?string $min_start_time = null, + ?string $max_start_time = null, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listAccountCallRecordings'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling listAccountCallRecordings' + ); + } + + + + + + + $resourcePath = '/accounts/{accountId}/recordings'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $to, + 'to', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $from, + 'from', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $min_start_time, + 'minStartTime', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $max_start_time, + 'maxStartTime', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForlistAccountCallRecordings(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation listAccountCallRecordings + * + * @return array an array of host settings + */ + protected function getHostSettingsForlistAccountCallRecordings(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation listCallRecordings + * + * List Call Recordings + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCallRecordings'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\CallRecordingMetadata[]|\OpenAPI\Client\Model\VoiceApiError + */ + public function listCallRecordings( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listCallRecordings'][0] + ): array|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->listCallRecordingsWithHttpInfo($account_id, $call_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation listCallRecordingsWithHttpInfo + * + * List Call Recordings + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCallRecordings'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\CallRecordingMetadata[]|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function listCallRecordingsWithHttpInfo( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listCallRecordings'][0] + ): array + { + $request = $this->listCallRecordingsRequest($account_id, $call_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallRecordingMetadata[]', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallRecordingMetadata[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\CallRecordingMetadata[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation listCallRecordingsAsync + * + * List Call Recordings + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCallRecordings'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listCallRecordingsAsync( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listCallRecordings'][0] + ): PromiseInterface + { + return $this->listCallRecordingsAsyncWithHttpInfo($account_id, $call_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listCallRecordingsAsyncWithHttpInfo + * + * List Call Recordings + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCallRecordings'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listCallRecordingsAsyncWithHttpInfo( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listCallRecordings'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\CallRecordingMetadata[]'; + $request = $this->listCallRecordingsRequest($account_id, $call_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listCallRecordings' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listCallRecordings'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listCallRecordingsRequest( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listCallRecordings'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling listCallRecordings' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling listCallRecordings' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForlistCallRecordings(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation listCallRecordings + * + * @return array an array of host settings + */ + protected function getHostSettingsForlistCallRecordings(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation transcribeCallRecording + * + * Create Transcription Request + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording transcribe_recording (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transcribeCallRecording'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\VoiceApiError|null + */ + public function transcribeCallRecording( + string $account_id, + string $call_id, + string $recording_id, + \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['transcribeCallRecording'][0] + ): ?\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->transcribeCallRecordingWithHttpInfo($account_id, $call_id, $recording_id, $transcribe_recording, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation transcribeCallRecordingWithHttpInfo + * + * Create Transcription Request + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transcribeCallRecording'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function transcribeCallRecordingWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['transcribeCallRecording'][0] + ): array + { + $request = $this->transcribeCallRecordingRequest($account_id, $call_id, $recording_id, $transcribe_recording, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation transcribeCallRecordingAsync + * + * Create Transcription Request + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transcribeCallRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function transcribeCallRecordingAsync( + string $account_id, + string $call_id, + string $recording_id, + \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['transcribeCallRecording'][0] + ): PromiseInterface + { + return $this->transcribeCallRecordingAsyncWithHttpInfo($account_id, $call_id, $recording_id, $transcribe_recording, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation transcribeCallRecordingAsyncWithHttpInfo + * + * Create Transcription Request + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transcribeCallRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function transcribeCallRecordingAsyncWithHttpInfo( + string $account_id, + string $call_id, + string $recording_id, + \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['transcribeCallRecording'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->transcribeCallRecordingRequest($account_id, $call_id, $recording_id, $transcribe_recording, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'transcribeCallRecording' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $recording_id Programmable Voice API Recording ID. (required) + * @param \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transcribeCallRecording'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function transcribeCallRecordingRequest( + string $account_id, + string $call_id, + string $recording_id, + \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['transcribeCallRecording'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling transcribeCallRecording' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling transcribeCallRecording' + ); + } + + // verify the required parameter 'recording_id' is set + if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $recording_id when calling transcribeCallRecording' + ); + } + + // verify the required parameter 'transcribe_recording' is set + if ($transcribe_recording === null || (is_array($transcribe_recording) && count($transcribe_recording) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $transcribe_recording when calling transcribeCallRecording' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + // path params + if ($recording_id !== null) { + $resourcePath = str_replace( + '{recordingId}', + ObjectSerializer::toPathValue($recording_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($transcribe_recording)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($transcribe_recording)); + } else { + $httpBody = $transcribe_recording; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsFortranscribeCallRecording(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation transcribeCallRecording + * + * @return array an array of host settings + */ + protected function getHostSettingsFortranscribeCallRecording(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation updateCallRecordingState + * + * Update Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording update_call_recording (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallRecordingState'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\VoiceApiError|null + */ + public function updateCallRecordingState( + string $account_id, + string $call_id, + \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCallRecordingState'][0] + ): ?\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->updateCallRecordingStateWithHttpInfo($account_id, $call_id, $update_call_recording, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation updateCallRecordingStateWithHttpInfo + * + * Update Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallRecordingState'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateCallRecordingStateWithHttpInfo( + string $account_id, + string $call_id, + \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCallRecordingState'][0] + ): array + { + $request = $this->updateCallRecordingStateRequest($account_id, $call_id, $update_call_recording, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation updateCallRecordingStateAsync + * + * Update Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallRecordingState'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateCallRecordingStateAsync( + string $account_id, + string $call_id, + \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCallRecordingState'][0] + ): PromiseInterface + { + return $this->updateCallRecordingStateAsyncWithHttpInfo($account_id, $call_id, $update_call_recording, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateCallRecordingStateAsyncWithHttpInfo + * + * Update Recording + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallRecordingState'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateCallRecordingStateAsyncWithHttpInfo( + string $account_id, + string $call_id, + \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCallRecordingState'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->updateCallRecordingStateRequest($account_id, $call_id, $update_call_recording, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateCallRecordingState' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallRecordingState'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateCallRecordingStateRequest( + string $account_id, + string $call_id, + \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateCallRecordingState'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling updateCallRecordingState' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling updateCallRecordingState' + ); + } + + // verify the required parameter 'update_call_recording' is set + if ($update_call_recording === null || (is_array($update_call_recording) && count($update_call_recording) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $update_call_recording when calling updateCallRecordingState' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}/recording'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($update_call_recording)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_call_recording)); + } else { + $httpBody = $update_call_recording; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForupdateCallRecordingState(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation updateCallRecordingState + * + * @return array an array of host settings + */ + protected function getHostSettingsForupdateCallRecordingState(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption(): array + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/src/Api/StatisticsApi.php b/src/Api/StatisticsApi.php new file mode 100644 index 00000000..a1daad66 --- /dev/null +++ b/src/Api/StatisticsApi.php @@ -0,0 +1,656 @@ + [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface|null $client + * @param Configuration|null $config + * @param HeaderSelector|null $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex(): int + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig(): Configuration + { + return $this->config; + } + + /** + * Operation getStatistics + * + * Get Account Statistics + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getStatistics'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\AccountStatistics|\OpenAPI\Client\Model\VoiceApiError + */ + public function getStatistics( + string $account_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getStatistics'][0] + ): \OpenAPI\Client\Model\AccountStatistics|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->getStatisticsWithHttpInfo($account_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation getStatisticsWithHttpInfo + * + * Get Account Statistics + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getStatistics'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\AccountStatistics|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function getStatisticsWithHttpInfo( + string $account_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getStatistics'][0] + ): array + { + $request = $this->getStatisticsRequest($account_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\AccountStatistics', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\AccountStatistics', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\AccountStatistics', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getStatisticsAsync + * + * Get Account Statistics + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getStatistics'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getStatisticsAsync( + string $account_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getStatistics'][0] + ): PromiseInterface + { + return $this->getStatisticsAsyncWithHttpInfo($account_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getStatisticsAsyncWithHttpInfo + * + * Get Account Statistics + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getStatistics'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getStatisticsAsyncWithHttpInfo( + string $account_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getStatistics'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\AccountStatistics'; + $request = $this->getStatisticsRequest($account_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getStatistics' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getStatistics'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getStatisticsRequest( + string $account_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getStatistics'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling getStatistics' + ); + } + + + $resourcePath = '/accounts/{accountId}/statistics'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgetStatistics(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation getStatistics + * + * @return array an array of host settings + */ + protected function getHostSettingsForgetStatistics(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption(): array + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/src/Api/TollFreeVerificationApi.php b/src/Api/TollFreeVerificationApi.php new file mode 100644 index 00000000..ab646b82 --- /dev/null +++ b/src/Api/TollFreeVerificationApi.php @@ -0,0 +1,4221 @@ + [ + 'application/json', + ], + 'deleteVerificationRequest' => [ + 'application/json', + ], + 'deleteWebhookSubscription' => [ + 'application/json', + ], + 'getTollFreeVerificationStatus' => [ + 'application/json', + ], + 'listTollFreeUseCases' => [ + 'application/json', + ], + 'listWebhookSubscriptions' => [ + 'application/json', + ], + 'requestTollFreeVerification' => [ + 'application/json', + ], + 'updateTollFreeVerificationRequest' => [ + 'application/json', + ], + 'updateWebhookSubscription' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface|null $client + * @param Configuration|null $config + * @param HeaderSelector|null $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex(): int + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig(): Configuration + { + return $this->config; + } + + /** + * Operation createWebhookSubscription + * + * Create Webhook Subscription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createWebhookSubscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\WebhookSubscription|\OpenAPI\Client\Model\TfvError + */ + public function createWebhookSubscription( + string $account_id, + \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createWebhookSubscription'][0] + ): \OpenAPI\Client\Model\WebhookSubscription|\OpenAPI\Client\Model\TfvError + { + list($response) = $this->createWebhookSubscriptionWithHttpInfo($account_id, $webhook_subscription_request_schema, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation createWebhookSubscriptionWithHttpInfo + * + * Create Webhook Subscription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createWebhookSubscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\WebhookSubscription|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + */ + public function createWebhookSubscriptionWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createWebhookSubscription'][0] + ): array + { + $request = $this->createWebhookSubscriptionRequest($account_id, $webhook_subscription_request_schema, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 201: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\WebhookSubscription', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 503: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\WebhookSubscription', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 201: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\WebhookSubscription', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 503: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation createWebhookSubscriptionAsync + * + * Create Webhook Subscription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createWebhookSubscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createWebhookSubscriptionAsync( + string $account_id, + \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createWebhookSubscription'][0] + ): PromiseInterface + { + return $this->createWebhookSubscriptionAsyncWithHttpInfo($account_id, $webhook_subscription_request_schema, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation createWebhookSubscriptionAsyncWithHttpInfo + * + * Create Webhook Subscription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createWebhookSubscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function createWebhookSubscriptionAsyncWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createWebhookSubscription'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\WebhookSubscription'; + $request = $this->createWebhookSubscriptionRequest($account_id, $webhook_subscription_request_schema, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'createWebhookSubscription' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createWebhookSubscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function createWebhookSubscriptionRequest( + string $account_id, + \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['createWebhookSubscription'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling createWebhookSubscription' + ); + } + + // verify the required parameter 'webhook_subscription_request_schema' is set + if ($webhook_subscription_request_schema === null || (is_array($webhook_subscription_request_schema) && count($webhook_subscription_request_schema) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $webhook_subscription_request_schema when calling createWebhookSubscription' + ); + } + + + $resourcePath = '/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($webhook_subscription_request_schema)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($webhook_subscription_request_schema)); + } else { + $httpBody = $webhook_subscription_request_schema; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForcreateWebhookSubscription(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation createWebhookSubscription + * + * @return array an array of host settings + */ + protected function getHostSettingsForcreateWebhookSubscription(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation deleteVerificationRequest + * + * Delete a Toll-Free Verification Submission + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteVerificationRequest'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\TfvError|null + */ + public function deleteVerificationRequest( + string $account_id, + string $phone_number, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteVerificationRequest'][0] + ): ?\OpenAPI\Client\Model\TfvError + { + list($response) = $this->deleteVerificationRequestWithHttpInfo($account_id, $phone_number, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation deleteVerificationRequestWithHttpInfo + * + * Delete a Toll-Free Verification Submission + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteVerificationRequest'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteVerificationRequestWithHttpInfo( + string $account_id, + string $phone_number, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteVerificationRequest'][0] + ): array + { + $request = $this->deleteVerificationRequestRequest($account_id, $phone_number, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 503: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation deleteVerificationRequestAsync + * + * Delete a Toll-Free Verification Submission + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteVerificationRequest'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteVerificationRequestAsync( + string $account_id, + string $phone_number, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteVerificationRequest'][0] + ): PromiseInterface + { + return $this->deleteVerificationRequestAsyncWithHttpInfo($account_id, $phone_number, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteVerificationRequestAsyncWithHttpInfo + * + * Delete a Toll-Free Verification Submission + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteVerificationRequest'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteVerificationRequestAsyncWithHttpInfo( + string $account_id, + string $phone_number, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteVerificationRequest'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->deleteVerificationRequestRequest($account_id, $phone_number, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteVerificationRequest' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteVerificationRequest'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteVerificationRequestRequest( + string $account_id, + string $phone_number, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteVerificationRequest'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling deleteVerificationRequest' + ); + } + + // verify the required parameter 'phone_number' is set + if ($phone_number === null || (is_array($phone_number) && count($phone_number) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $phone_number when calling deleteVerificationRequest' + ); + } + if (strlen($phone_number) > 12) { + throw new InvalidArgumentException('invalid length for "$phone_number" when calling TollFreeVerificationApi.deleteVerificationRequest, must be smaller than or equal to 12.'); + } + if (strlen($phone_number) < 12) { + throw new InvalidArgumentException('invalid length for "$phone_number" when calling TollFreeVerificationApi.deleteVerificationRequest, must be bigger than or equal to 12.'); + } + if (!preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", $phone_number)) { + throw new InvalidArgumentException("invalid value for \"phone_number\" when calling TollFreeVerificationApi.deleteVerificationRequest, must conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."); + } + + + $resourcePath = '/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($phone_number !== null) { + $resourcePath = str_replace( + '{phoneNumber}', + ObjectSerializer::toPathValue($phone_number), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsFordeleteVerificationRequest(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation deleteVerificationRequest + * + * @return array an array of host settings + */ + protected function getHostSettingsFordeleteVerificationRequest(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation deleteWebhookSubscription + * + * Delete Webhook Subscription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $id Webhook subscription ID (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWebhookSubscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\TfvError|null + */ + public function deleteWebhookSubscription( + string $account_id, + string $id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteWebhookSubscription'][0] + ): ?\OpenAPI\Client\Model\TfvError + { + list($response) = $this->deleteWebhookSubscriptionWithHttpInfo($account_id, $id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation deleteWebhookSubscriptionWithHttpInfo + * + * Delete Webhook Subscription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $id Webhook subscription ID (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWebhookSubscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteWebhookSubscriptionWithHttpInfo( + string $account_id, + string $id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteWebhookSubscription'][0] + ): array + { + $request = $this->deleteWebhookSubscriptionRequest($account_id, $id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 503: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation deleteWebhookSubscriptionAsync + * + * Delete Webhook Subscription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $id Webhook subscription ID (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWebhookSubscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteWebhookSubscriptionAsync( + string $account_id, + string $id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteWebhookSubscription'][0] + ): PromiseInterface + { + return $this->deleteWebhookSubscriptionAsyncWithHttpInfo($account_id, $id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteWebhookSubscriptionAsyncWithHttpInfo + * + * Delete Webhook Subscription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $id Webhook subscription ID (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWebhookSubscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteWebhookSubscriptionAsyncWithHttpInfo( + string $account_id, + string $id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteWebhookSubscription'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->deleteWebhookSubscriptionRequest($account_id, $id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteWebhookSubscription' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $id Webhook subscription ID (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteWebhookSubscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteWebhookSubscriptionRequest( + string $account_id, + string $id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteWebhookSubscription'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling deleteWebhookSubscription' + ); + } + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling deleteWebhookSubscription' + ); + } + + + $resourcePath = '/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{id}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsFordeleteWebhookSubscription(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation deleteWebhookSubscription + * + * @return array an array of host settings + */ + protected function getHostSettingsFordeleteWebhookSubscription(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation getTollFreeVerificationStatus + * + * Get Toll-Free Verification Status + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTollFreeVerificationStatus'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\TfvStatus|\OpenAPI\Client\Model\TfvError + */ + public function getTollFreeVerificationStatus( + string $account_id, + string $phone_number, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getTollFreeVerificationStatus'][0] + ): \OpenAPI\Client\Model\TfvStatus|\OpenAPI\Client\Model\TfvError + { + list($response) = $this->getTollFreeVerificationStatusWithHttpInfo($account_id, $phone_number, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation getTollFreeVerificationStatusWithHttpInfo + * + * Get Toll-Free Verification Status + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTollFreeVerificationStatus'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\TfvStatus|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + */ + public function getTollFreeVerificationStatusWithHttpInfo( + string $account_id, + string $phone_number, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getTollFreeVerificationStatus'][0] + ): array + { + $request = $this->getTollFreeVerificationStatusRequest($account_id, $phone_number, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvStatus', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 503: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvStatus', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 503: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getTollFreeVerificationStatusAsync + * + * Get Toll-Free Verification Status + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTollFreeVerificationStatus'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getTollFreeVerificationStatusAsync( + string $account_id, + string $phone_number, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getTollFreeVerificationStatus'][0] + ): PromiseInterface + { + return $this->getTollFreeVerificationStatusAsyncWithHttpInfo($account_id, $phone_number, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getTollFreeVerificationStatusAsyncWithHttpInfo + * + * Get Toll-Free Verification Status + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTollFreeVerificationStatus'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getTollFreeVerificationStatusAsyncWithHttpInfo( + string $account_id, + string $phone_number, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getTollFreeVerificationStatus'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\TfvStatus'; + $request = $this->getTollFreeVerificationStatusRequest($account_id, $phone_number, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getTollFreeVerificationStatus' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTollFreeVerificationStatus'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getTollFreeVerificationStatusRequest( + string $account_id, + string $phone_number, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getTollFreeVerificationStatus'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling getTollFreeVerificationStatus' + ); + } + + // verify the required parameter 'phone_number' is set + if ($phone_number === null || (is_array($phone_number) && count($phone_number) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $phone_number when calling getTollFreeVerificationStatus' + ); + } + if (strlen($phone_number) > 12) { + throw new InvalidArgumentException('invalid length for "$phone_number" when calling TollFreeVerificationApi.getTollFreeVerificationStatus, must be smaller than or equal to 12.'); + } + if (strlen($phone_number) < 12) { + throw new InvalidArgumentException('invalid length for "$phone_number" when calling TollFreeVerificationApi.getTollFreeVerificationStatus, must be bigger than or equal to 12.'); + } + if (!preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", $phone_number)) { + throw new InvalidArgumentException("invalid value for \"phone_number\" when calling TollFreeVerificationApi.getTollFreeVerificationStatus, must conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."); + } + + + $resourcePath = '/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($phone_number !== null) { + $resourcePath = str_replace( + '{phoneNumber}', + ObjectSerializer::toPathValue($phone_number), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgetTollFreeVerificationStatus(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation getTollFreeVerificationStatus + * + * @return array an array of host settings + */ + protected function getHostSettingsForgetTollFreeVerificationStatus(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation listTollFreeUseCases + * + * List Toll-Free Use Cases + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTollFreeUseCases'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return string[]|\OpenAPI\Client\Model\TfvError + */ + public function listTollFreeUseCases( + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listTollFreeUseCases'][0] + ): array|\OpenAPI\Client\Model\TfvError + { + list($response) = $this->listTollFreeUseCasesWithHttpInfo($hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation listTollFreeUseCasesWithHttpInfo + * + * List Toll-Free Use Cases + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTollFreeUseCases'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of string[]|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + */ + public function listTollFreeUseCasesWithHttpInfo( + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listTollFreeUseCases'][0] + ): array + { + $request = $this->listTollFreeUseCasesRequest($hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + 'string[]', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 503: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + 'string[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 503: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation listTollFreeUseCasesAsync + * + * List Toll-Free Use Cases + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTollFreeUseCases'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listTollFreeUseCasesAsync( + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listTollFreeUseCases'][0] + ): PromiseInterface + { + return $this->listTollFreeUseCasesAsyncWithHttpInfo($hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listTollFreeUseCasesAsyncWithHttpInfo + * + * List Toll-Free Use Cases + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTollFreeUseCases'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listTollFreeUseCasesAsyncWithHttpInfo( + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listTollFreeUseCases'][0] + ): PromiseInterface + { + $returnType = 'string[]'; + $request = $this->listTollFreeUseCasesRequest($hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listTollFreeUseCases' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listTollFreeUseCases'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listTollFreeUseCasesRequest( + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listTollFreeUseCases'][0] + ): Request + { + + + $resourcePath = '/tollFreeVerification/useCases'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForlistTollFreeUseCases(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation listTollFreeUseCases + * + * @return array an array of host settings + */ + protected function getHostSettingsForlistTollFreeUseCases(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation listWebhookSubscriptions + * + * List Webhook Subscriptions + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listWebhookSubscriptions'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\WebhookSubscriptionsListBody|\OpenAPI\Client\Model\TfvError + */ + public function listWebhookSubscriptions( + string $account_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listWebhookSubscriptions'][0] + ): \OpenAPI\Client\Model\WebhookSubscriptionsListBody|\OpenAPI\Client\Model\TfvError + { + list($response) = $this->listWebhookSubscriptionsWithHttpInfo($account_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation listWebhookSubscriptionsWithHttpInfo + * + * List Webhook Subscriptions + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listWebhookSubscriptions'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\WebhookSubscriptionsListBody|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + */ + public function listWebhookSubscriptionsWithHttpInfo( + string $account_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listWebhookSubscriptions'][0] + ): array + { + $request = $this->listWebhookSubscriptionsRequest($account_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\WebhookSubscriptionsListBody', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 503: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\WebhookSubscriptionsListBody', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\WebhookSubscriptionsListBody', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 503: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation listWebhookSubscriptionsAsync + * + * List Webhook Subscriptions + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listWebhookSubscriptions'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listWebhookSubscriptionsAsync( + string $account_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listWebhookSubscriptions'][0] + ): PromiseInterface + { + return $this->listWebhookSubscriptionsAsyncWithHttpInfo($account_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listWebhookSubscriptionsAsyncWithHttpInfo + * + * List Webhook Subscriptions + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listWebhookSubscriptions'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listWebhookSubscriptionsAsyncWithHttpInfo( + string $account_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listWebhookSubscriptions'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\WebhookSubscriptionsListBody'; + $request = $this->listWebhookSubscriptionsRequest($account_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listWebhookSubscriptions' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listWebhookSubscriptions'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listWebhookSubscriptionsRequest( + string $account_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listWebhookSubscriptions'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling listWebhookSubscriptions' + ); + } + + + $resourcePath = '/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForlistWebhookSubscriptions(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation listWebhookSubscriptions + * + * @return array an array of host settings + */ + protected function getHostSettingsForlistWebhookSubscriptions(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation requestTollFreeVerification + * + * Request Toll-Free Verification + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requestTollFreeVerification'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\TfvError|null + */ + public function requestTollFreeVerification( + string $account_id, + \OpenAPI\Client\Model\VerificationRequest $verification_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['requestTollFreeVerification'][0] + ): ?\OpenAPI\Client\Model\TfvError + { + list($response) = $this->requestTollFreeVerificationWithHttpInfo($account_id, $verification_request, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation requestTollFreeVerificationWithHttpInfo + * + * Request Toll-Free Verification + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requestTollFreeVerification'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function requestTollFreeVerificationWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\VerificationRequest $verification_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['requestTollFreeVerification'][0] + ): array + { + $request = $this->requestTollFreeVerificationRequest($account_id, $verification_request, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 503: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation requestTollFreeVerificationAsync + * + * Request Toll-Free Verification + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requestTollFreeVerification'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function requestTollFreeVerificationAsync( + string $account_id, + \OpenAPI\Client\Model\VerificationRequest $verification_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['requestTollFreeVerification'][0] + ): PromiseInterface + { + return $this->requestTollFreeVerificationAsyncWithHttpInfo($account_id, $verification_request, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation requestTollFreeVerificationAsyncWithHttpInfo + * + * Request Toll-Free Verification + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requestTollFreeVerification'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function requestTollFreeVerificationAsyncWithHttpInfo( + string $account_id, + \OpenAPI\Client\Model\VerificationRequest $verification_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['requestTollFreeVerification'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->requestTollFreeVerificationRequest($account_id, $verification_request, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'requestTollFreeVerification' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param \OpenAPI\Client\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requestTollFreeVerification'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function requestTollFreeVerificationRequest( + string $account_id, + \OpenAPI\Client\Model\VerificationRequest $verification_request, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['requestTollFreeVerification'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling requestTollFreeVerification' + ); + } + + // verify the required parameter 'verification_request' is set + if ($verification_request === null || (is_array($verification_request) && count($verification_request) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $verification_request when calling requestTollFreeVerification' + ); + } + + + $resourcePath = '/accounts/{accountId}/tollFreeVerification'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($verification_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($verification_request)); + } else { + $httpBody = $verification_request; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForrequestTollFreeVerification(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation requestTollFreeVerification + * + * @return array an array of host settings + */ + protected function getHostSettingsForrequestTollFreeVerification(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation updateTollFreeVerificationRequest + * + * Update Toll-Free Verification Request + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateTollFreeVerificationRequest'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\TfvError|null + */ + public function updateTollFreeVerificationRequest( + string $account_id, + string $phone_number, + \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateTollFreeVerificationRequest'][0] + ): ?\OpenAPI\Client\Model\TfvError + { + list($response) = $this->updateTollFreeVerificationRequestWithHttpInfo($account_id, $phone_number, $tfv_submission_wrapper, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation updateTollFreeVerificationRequestWithHttpInfo + * + * Update Toll-Free Verification Request + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateTollFreeVerificationRequest'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function updateTollFreeVerificationRequestWithHttpInfo( + string $account_id, + string $phone_number, + \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateTollFreeVerificationRequest'][0] + ): array + { + $request = $this->updateTollFreeVerificationRequestRequest($account_id, $phone_number, $tfv_submission_wrapper, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 503: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation updateTollFreeVerificationRequestAsync + * + * Update Toll-Free Verification Request + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateTollFreeVerificationRequest'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateTollFreeVerificationRequestAsync( + string $account_id, + string $phone_number, + \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateTollFreeVerificationRequest'][0] + ): PromiseInterface + { + return $this->updateTollFreeVerificationRequestAsyncWithHttpInfo($account_id, $phone_number, $tfv_submission_wrapper, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateTollFreeVerificationRequestAsyncWithHttpInfo + * + * Update Toll-Free Verification Request + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateTollFreeVerificationRequest'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateTollFreeVerificationRequestAsyncWithHttpInfo( + string $account_id, + string $phone_number, + \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateTollFreeVerificationRequest'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->updateTollFreeVerificationRequestRequest($account_id, $phone_number, $tfv_submission_wrapper, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateTollFreeVerificationRequest' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) + * @param \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateTollFreeVerificationRequest'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateTollFreeVerificationRequestRequest( + string $account_id, + string $phone_number, + \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateTollFreeVerificationRequest'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling updateTollFreeVerificationRequest' + ); + } + + // verify the required parameter 'phone_number' is set + if ($phone_number === null || (is_array($phone_number) && count($phone_number) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $phone_number when calling updateTollFreeVerificationRequest' + ); + } + if (strlen($phone_number) > 12) { + throw new InvalidArgumentException('invalid length for "$phone_number" when calling TollFreeVerificationApi.updateTollFreeVerificationRequest, must be smaller than or equal to 12.'); + } + if (strlen($phone_number) < 12) { + throw new InvalidArgumentException('invalid length for "$phone_number" when calling TollFreeVerificationApi.updateTollFreeVerificationRequest, must be bigger than or equal to 12.'); + } + if (!preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", $phone_number)) { + throw new InvalidArgumentException("invalid value for \"phone_number\" when calling TollFreeVerificationApi.updateTollFreeVerificationRequest, must conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."); + } + + // verify the required parameter 'tfv_submission_wrapper' is set + if ($tfv_submission_wrapper === null || (is_array($tfv_submission_wrapper) && count($tfv_submission_wrapper) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $tfv_submission_wrapper when calling updateTollFreeVerificationRequest' + ); + } + + + $resourcePath = '/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($phone_number !== null) { + $resourcePath = str_replace( + '{phoneNumber}', + ObjectSerializer::toPathValue($phone_number), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($tfv_submission_wrapper)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($tfv_submission_wrapper)); + } else { + $httpBody = $tfv_submission_wrapper; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForupdateTollFreeVerificationRequest(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation updateTollFreeVerificationRequest + * + * @return array an array of host settings + */ + protected function getHostSettingsForupdateTollFreeVerificationRequest(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation updateWebhookSubscription + * + * Update Webhook Subscription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $id Webhook subscription ID (required) + * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhookSubscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\WebhookSubscription|\OpenAPI\Client\Model\TfvError + */ + public function updateWebhookSubscription( + string $account_id, + string $id, + \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateWebhookSubscription'][0] + ): \OpenAPI\Client\Model\WebhookSubscription|\OpenAPI\Client\Model\TfvError + { + list($response) = $this->updateWebhookSubscriptionWithHttpInfo($account_id, $id, $webhook_subscription_request_schema, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation updateWebhookSubscriptionWithHttpInfo + * + * Update Webhook Subscription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $id Webhook subscription ID (required) + * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhookSubscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\WebhookSubscription|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + */ + public function updateWebhookSubscriptionWithHttpInfo( + string $account_id, + string $id, + \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateWebhookSubscription'][0] + ): array + { + $request = $this->updateWebhookSubscriptionRequest($account_id, $id, $webhook_subscription_request_schema, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\WebhookSubscription', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + case 503: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\TfvError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\WebhookSubscription', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\WebhookSubscription', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 503: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\TfvError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation updateWebhookSubscriptionAsync + * + * Update Webhook Subscription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $id Webhook subscription ID (required) + * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhookSubscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateWebhookSubscriptionAsync( + string $account_id, + string $id, + \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateWebhookSubscription'][0] + ): PromiseInterface + { + return $this->updateWebhookSubscriptionAsyncWithHttpInfo($account_id, $id, $webhook_subscription_request_schema, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateWebhookSubscriptionAsyncWithHttpInfo + * + * Update Webhook Subscription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $id Webhook subscription ID (required) + * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhookSubscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function updateWebhookSubscriptionAsyncWithHttpInfo( + string $account_id, + string $id, + \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateWebhookSubscription'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\WebhookSubscription'; + $request = $this->updateWebhookSubscriptionRequest($account_id, $id, $webhook_subscription_request_schema, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateWebhookSubscription' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://api.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $id Webhook subscription ID (required) + * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhookSubscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function updateWebhookSubscriptionRequest( + string $account_id, + string $id, + \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['updateWebhookSubscription'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling updateWebhookSubscription' + ); + } + + // verify the required parameter 'id' is set + if ($id === null || (is_array($id) && count($id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $id when calling updateWebhookSubscription' + ); + } + + // verify the required parameter 'webhook_subscription_request_schema' is set + if ($webhook_subscription_request_schema === null || (is_array($webhook_subscription_request_schema) && count($webhook_subscription_request_schema) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $webhook_subscription_request_schema when calling updateWebhookSubscription' + ); + } + + + $resourcePath = '/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($id !== null) { + $resourcePath = str_replace( + '{id}', + ObjectSerializer::toPathValue($id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (isset($webhook_subscription_request_schema)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($webhook_subscription_request_schema)); + } else { + $httpBody = $webhook_subscription_request_schema; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForupdateWebhookSubscription(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation updateWebhookSubscription + * + * @return array an array of host settings + */ + protected function getHostSettingsForupdateWebhookSubscription(): array + { + return [ + [ + "url" => "https://api.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption(): array + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/src/Api/TranscriptionsApi.php b/src/Api/TranscriptionsApi.php new file mode 100644 index 00000000..6e8e3ac8 --- /dev/null +++ b/src/Api/TranscriptionsApi.php @@ -0,0 +1,1624 @@ + [ + 'application/json', + ], + 'getRealTimeTranscription' => [ + 'application/json', + ], + 'listRealTimeTranscriptions' => [ + 'application/json', + ], + ]; + + /** + * @param ClientInterface|null $client + * @param Configuration|null $config + * @param HeaderSelector|null $selector + * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec + */ + public function __construct( + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, + int $hostIndex = 0 + ) { + $this->client = $client ?: new Client(); + $this->config = $config ?: Configuration::getDefaultConfiguration(); + $this->headerSelector = $selector ?: new HeaderSelector(); + $this->hostIndex = $hostIndex; + } + + /** + * Set the host index + * + * @param int $hostIndex Host index (required) + */ + public function setHostIndex(int $hostIndex): void + { + $this->hostIndex = $hostIndex; + } + + /** + * Get the host index + * + * @return int Host index + */ + public function getHostIndex(): int + { + return $this->hostIndex; + } + + /** + * @return Configuration + */ + public function getConfig(): Configuration + { + return $this->config; + } + + /** + * Operation deleteRealTimeTranscription + * + * Delete Real-time Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $transcription_id Programmable Voice API Transcription ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRealTimeTranscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\VoiceApiError|null + */ + public function deleteRealTimeTranscription( + string $account_id, + string $call_id, + string $transcription_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRealTimeTranscription'][0] + ): ?\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->deleteRealTimeTranscriptionWithHttpInfo($account_id, $call_id, $transcription_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation deleteRealTimeTranscriptionWithHttpInfo + * + * Delete Real-time Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $transcription_id Programmable Voice API Transcription ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRealTimeTranscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of null, HTTP status code, HTTP response headers (array of strings) + */ + public function deleteRealTimeTranscriptionWithHttpInfo( + string $account_id, + string $call_id, + string $transcription_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRealTimeTranscription'][0] + ): array + { + $request = $this->deleteRealTimeTranscriptionRequest($account_id, $call_id, $transcription_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + + return [null, $statusCode, $response->getHeaders()]; + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation deleteRealTimeTranscriptionAsync + * + * Delete Real-time Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $transcription_id Programmable Voice API Transcription ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRealTimeTranscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteRealTimeTranscriptionAsync( + string $account_id, + string $call_id, + string $transcription_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRealTimeTranscription'][0] + ): PromiseInterface + { + return $this->deleteRealTimeTranscriptionAsyncWithHttpInfo($account_id, $call_id, $transcription_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation deleteRealTimeTranscriptionAsyncWithHttpInfo + * + * Delete Real-time Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $transcription_id Programmable Voice API Transcription ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRealTimeTranscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function deleteRealTimeTranscriptionAsyncWithHttpInfo( + string $account_id, + string $call_id, + string $transcription_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRealTimeTranscription'][0] + ): PromiseInterface + { + $returnType = ''; + $request = $this->deleteRealTimeTranscriptionRequest($account_id, $call_id, $transcription_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + return [null, $response->getStatusCode(), $response->getHeaders()]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'deleteRealTimeTranscription' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $transcription_id Programmable Voice API Transcription ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteRealTimeTranscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function deleteRealTimeTranscriptionRequest( + string $account_id, + string $call_id, + string $transcription_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['deleteRealTimeTranscription'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling deleteRealTimeTranscription' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling deleteRealTimeTranscription' + ); + } + + // verify the required parameter 'transcription_id' is set + if ($transcription_id === null || (is_array($transcription_id) && count($transcription_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $transcription_id when calling deleteRealTimeTranscription' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + // path params + if ($transcription_id !== null) { + $resourcePath = str_replace( + '{transcriptionId}', + ObjectSerializer::toPathValue($transcription_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsFordeleteRealTimeTranscription(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'DELETE', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation deleteRealTimeTranscription + * + * @return array an array of host settings + */ + protected function getHostSettingsFordeleteRealTimeTranscription(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation getRealTimeTranscription + * + * Get Real-time Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $transcription_id Programmable Voice API Transcription ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRealTimeTranscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\CallTranscriptionResponse|\OpenAPI\Client\Model\VoiceApiError + */ + public function getRealTimeTranscription( + string $account_id, + string $call_id, + string $transcription_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getRealTimeTranscription'][0] + ): \OpenAPI\Client\Model\CallTranscriptionResponse|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->getRealTimeTranscriptionWithHttpInfo($account_id, $call_id, $transcription_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation getRealTimeTranscriptionWithHttpInfo + * + * Get Real-time Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $transcription_id Programmable Voice API Transcription ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRealTimeTranscription'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\CallTranscriptionResponse|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function getRealTimeTranscriptionWithHttpInfo( + string $account_id, + string $call_id, + string $transcription_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getRealTimeTranscription'][0] + ): array + { + $request = $this->getRealTimeTranscriptionRequest($account_id, $call_id, $transcription_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallTranscriptionResponse', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallTranscriptionResponse', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\CallTranscriptionResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation getRealTimeTranscriptionAsync + * + * Get Real-time Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $transcription_id Programmable Voice API Transcription ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRealTimeTranscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getRealTimeTranscriptionAsync( + string $account_id, + string $call_id, + string $transcription_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getRealTimeTranscription'][0] + ): PromiseInterface + { + return $this->getRealTimeTranscriptionAsyncWithHttpInfo($account_id, $call_id, $transcription_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getRealTimeTranscriptionAsyncWithHttpInfo + * + * Get Real-time Transcription + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $transcription_id Programmable Voice API Transcription ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRealTimeTranscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function getRealTimeTranscriptionAsyncWithHttpInfo( + string $account_id, + string $call_id, + string $transcription_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getRealTimeTranscription'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\CallTranscriptionResponse'; + $request = $this->getRealTimeTranscriptionRequest($account_id, $call_id, $transcription_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'getRealTimeTranscription' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param string $transcription_id Programmable Voice API Transcription ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getRealTimeTranscription'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getRealTimeTranscriptionRequest( + string $account_id, + string $call_id, + string $transcription_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['getRealTimeTranscription'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling getRealTimeTranscription' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling getRealTimeTranscription' + ); + } + + // verify the required parameter 'transcription_id' is set + if ($transcription_id === null || (is_array($transcription_id) && count($transcription_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $transcription_id when calling getRealTimeTranscription' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + // path params + if ($transcription_id !== null) { + $resourcePath = str_replace( + '{transcriptionId}', + ObjectSerializer::toPathValue($transcription_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForgetRealTimeTranscription(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation getRealTimeTranscription + * + * @return array an array of host settings + */ + protected function getHostSettingsForgetRealTimeTranscription(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Operation listRealTimeTranscriptions + * + * List Real-time Transcriptions + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listRealTimeTranscriptions'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return \OpenAPI\Client\Model\CallTranscriptionMetadata[]|\OpenAPI\Client\Model\VoiceApiError + */ + public function listRealTimeTranscriptions( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listRealTimeTranscriptions'][0] + ): array|\OpenAPI\Client\Model\VoiceApiError + { + list($response) = $this->listRealTimeTranscriptionsWithHttpInfo($account_id, $call_id, $hostIndex, $variables, $contentType); + return $response; + } + + /** + * Operation listRealTimeTranscriptionsWithHttpInfo + * + * List Real-time Transcriptions + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listRealTimeTranscriptions'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of \OpenAPI\Client\Model\CallTranscriptionMetadata[]|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + */ + public function listRealTimeTranscriptionsWithHttpInfo( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listRealTimeTranscriptions'][0] + ): array + { + $request = $this->listRealTimeTranscriptionsRequest($account_id, $call_id, $hostIndex, $variables, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallTranscriptionMetadata[]', + $request, + $response, + ); + case 400: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 401: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 403: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 404: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 405: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 415: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 429: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + case 500: + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\VoiceApiError', + $request, + $response, + ); + } + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\OpenAPI\Client\Model\CallTranscriptionMetadata[]', + $request, + $response, + ); + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\CallTranscriptionMetadata[]', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 405: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 415: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 429: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\VoiceApiError', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; + } + + throw $e; + } + } + + /** + * Operation listRealTimeTranscriptionsAsync + * + * List Real-time Transcriptions + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listRealTimeTranscriptions'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listRealTimeTranscriptionsAsync( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listRealTimeTranscriptions'][0] + ): PromiseInterface + { + return $this->listRealTimeTranscriptionsAsyncWithHttpInfo($account_id, $call_id, $hostIndex, $variables, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listRealTimeTranscriptionsAsyncWithHttpInfo + * + * List Real-time Transcriptions + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listRealTimeTranscriptions'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function listRealTimeTranscriptionsAsyncWithHttpInfo( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listRealTimeTranscriptions'][0] + ): PromiseInterface + { + $returnType = '\OpenAPI\Client\Model\CallTranscriptionMetadata[]'; + $request = $this->listRealTimeTranscriptionsRequest($account_id, $call_id, $hostIndex, $variables, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if (in_array($returnType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listRealTimeTranscriptions' + * + * This operation contains host(s) defined in the OpenAPI spec. Use 'hostIndex' to select the host. + * if needed, use the 'variables' parameter to pass variables to the host. + * URL: https://voice.bandwidth.com/api/v2 + * + * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $call_id Programmable Voice API Call ID. (required) + * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead + * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listRealTimeTranscriptions'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listRealTimeTranscriptionsRequest( + string $account_id, + string $call_id, + ?int $hostIndex = null, + array $variables = [], + string $contentType = self::contentTypes['listRealTimeTranscriptions'][0] + ): Request + { + + // verify the required parameter 'account_id' is set + if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $account_id when calling listRealTimeTranscriptions' + ); + } + + // verify the required parameter 'call_id' is set + if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { + throw new InvalidArgumentException( + 'Missing the required parameter $call_id when calling listRealTimeTranscriptions' + ); + } + + + $resourcePath = '/accounts/{accountId}/calls/{callId}/transcriptions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($account_id !== null) { + $resourcePath = str_replace( + '{accountId}', + ObjectSerializer::toPathValue($account_id), + $resourcePath + ); + } + // path params + if ($call_id !== null) { + $resourcePath = str_replace( + '{callId}', + ObjectSerializer::toPathValue($call_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires HTTP basic authentication + if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { + $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); + } + + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } + + $hostSettings = $this->getHostSettingsForlistRealTimeTranscriptions(); + + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Returns an array of host settings for Operation listRealTimeTranscriptions + * + * @return array an array of host settings + */ + protected function getHostSettingsForlistRealTimeTranscriptions(): array + { + return [ + [ + "url" => "https://voice.bandwidth.com/api/v2", + "description" => "Production", + ] + ]; + } + + /** + * Create http client option + * + * @throws \RuntimeException on file opening failure + * @return array of http client options + */ + protected function createHttpClientOption(): array + { + $options = []; + if ($this->config->getDebug()) { + $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a'); + if (!$options[RequestOptions::DEBUG]) { + throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile()); + } + } + + return $options; + } + + private function handleResponseWithDataType( + string $dataType, + RequestInterface $request, + ResponseInterface $response, + ): array { + if (in_array($dataType, ['\SplFileObject', '\Psr\Http\Message\StreamInterface'])) { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($dataType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $response->getStatusCode(), + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $dataType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + private function responseWithinRangeCode( + string $rangeCode, + int $statusCode, + ): bool { + $left = (int) ($rangeCode[0].'00'); + $right = (int) ($rangeCode[0].'99'); + + return $statusCode >= $left && $statusCode <= $right; + } +} diff --git a/src/BandwidthClient.php b/src/BandwidthClient.php deleted file mode 100644 index 8e80179a..00000000 --- a/src/BandwidthClient.php +++ /dev/null @@ -1,89 +0,0 @@ -config = $config; - } - - private $messaging; - private $multiFactorAuth; - private $phoneNumberLookup; - private $voice; - private $webRtc; - - /** - * Provides access to Messaging client - * @return Messaging\MessagingClient - */ - public function getMessaging() - { - if ($this->messaging == null) { - $this->messaging = new Messaging\MessagingClient($this->config); - } - return $this->messaging; - } - - /** - * Provides access to MultiFactorAuth client - * @return MultiFactorAuth\MultiFactorAuthClient - */ - public function getMultiFactorAuth() - { - if ($this->multiFactorAuth == null) { - $this->multiFactorAuth = new MultiFactorAuth\MultiFactorAuthClient($this->config); - } - return $this->multiFactorAuth; - } - - /** - * Provides access to PhoneNumberLookup client - * @return PhoneNumberLookup\PhoneNumberLookupClient - */ - public function getPhoneNumberLookup() - { - if ($this->phoneNumberLookup == null) { - $this->phoneNumberLookup = new PhoneNumberLookup\PhoneNumberLookupClient($this->config); - } - return $this->phoneNumberLookup; - } - - /** - * Provides access to Voice client - * @return Voice\VoiceClient - */ - public function getVoice() - { - if ($this->voice == null) { - $this->voice = new Voice\VoiceClient($this->config); - } - return $this->voice; - } - - /** - * Provides access to WebRtc client - * @return WebRtc\WebRtcClient - */ - public function getWebRtc() - { - if ($this->webRtc == null) { - $this->webRtc = new WebRtc\WebRtcClient($this->config); - } - return $this->webRtc; - } - -} diff --git a/src/Configuration.php b/src/Configuration.php index 2f25f720..6eac769d 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -1,384 +1,527 @@ tempFolderPath = sys_get_temp_dir(); + } /** - * The OAuth2 access token to use for API calls - * @var string + * Sets API key + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $key API key or token + * + * @return $this */ - private $accessToken; + public function setApiKey(string $apiKeyIdentifier, string $key): static + { + $this->apiKeys[$apiKeyIdentifier] = $key; + return $this; + } /** - * The expiration time of the access token - * @var int + * Gets API key + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return null|string API key or token */ - private $accessTokenExpiration; + public function getApiKey(string $apiKeyIdentifier): ?string + { + return $this->apiKeys[$apiKeyIdentifier] ?? null; + } /** - * Current API environment - * @var Environments + * Sets the prefix for API key (e.g. Bearer) + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $prefix API key prefix, e.g. Bearer + * + * @return $this */ - private $environment = Environments::PRODUCTION; + public function setApiKeyPrefix(string $apiKeyIdentifier, string $prefix): static + { + $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + return $this; + } /** - * @todo Add description for parameter - * @var string + * Gets API key prefix + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return null|string */ - private $baseUrl = 'https://www.example.com'; + public function getApiKeyPrefix(string $apiKeyIdentifier): ?string + { + return $this->apiKeyPrefixes[$apiKeyIdentifier] ?? null; + } - public function __construct($configOptions = null) + /** + * Sets the access token for OAuth + * + * @param string $accessToken Token for OAuth + * + * @return $this + */ + public function setAccessToken(string $accessToken): static { - if (isset($configOptions['timeout'])) { - $this->timeout = $configOptions['timeout']; - } - if (isset($configOptions['messagingBasicAuthUserName'])) { - $this->messagingBasicAuthUserName = $configOptions['messagingBasicAuthUserName']; - } - if (isset($configOptions['messagingBasicAuthPassword'])) { - $this->messagingBasicAuthPassword = $configOptions['messagingBasicAuthPassword']; - } - if (isset($configOptions['multiFactorAuthBasicAuthUserName'])) { - $this->multiFactorAuthBasicAuthUserName = $configOptions['multiFactorAuthBasicAuthUserName']; - } - if (isset($configOptions['multiFactorAuthBasicAuthPassword'])) { - $this->multiFactorAuthBasicAuthPassword = $configOptions['multiFactorAuthBasicAuthPassword']; - } - if (isset($configOptions['phoneNumberLookupBasicAuthUserName'])) { - $this->phoneNumberLookupBasicAuthUserName = $configOptions['phoneNumberLookupBasicAuthUserName']; - } - if (isset($configOptions['phoneNumberLookupBasicAuthPassword'])) { - $this->phoneNumberLookupBasicAuthPassword = $configOptions['phoneNumberLookupBasicAuthPassword']; - } - if (isset($configOptions['voiceBasicAuthUserName'])) { - $this->voiceBasicAuthUserName = $configOptions['voiceBasicAuthUserName']; - } - if (isset($configOptions['voiceBasicAuthPassword'])) { - $this->voiceBasicAuthPassword = $configOptions['voiceBasicAuthPassword']; - } - if (isset($configOptions['webRtcBasicAuthUserName'])) { - $this->webRtcBasicAuthUserName = $configOptions['webRtcBasicAuthUserName']; - } - if (isset($configOptions['webRtcBasicAuthPassword'])) { - $this->webRtcBasicAuthPassword = $configOptions['webRtcBasicAuthPassword']; - } - if (isset($configOptions['clientId'])) { - $this->clientId = $configOptions['clientId']; - } - if (isset($configOptions['clientSecret'])) { - $this->clientSecret = $configOptions['clientSecret']; - } - if (isset($configOptions['accessToken'])) { - $this->accessToken = $configOptions['accessToken']; - } - if (isset($configOptions['accessTokenExpiration'])) { - $this->accessTokenExpiration = $configOptions['accessTokenExpiration']; - } - if (isset($configOptions['environment'])) { - $this->environment = $configOptions['environment']; - } - if (isset($configOptions['baseUrl'])) { - $this->baseUrl = $configOptions['baseUrl']; - } + $this->accessToken = $accessToken; + return $this; } - public function getConfigurationMap() + /** + * Gets the access token for OAuth + * + * @return string Access token for OAuth + */ + public function getAccessToken(): string { - $configMap = array(); + return $this->accessToken; + } - if (isset($this->timeout)) { - $configMap['timeout'] = $this->timeout; - } - if (isset($this->messagingBasicAuthUserName)) { - $configMap['messagingBasicAuthUserName'] = $this->messagingBasicAuthUserName; - } - if (isset($this->messagingBasicAuthPassword)) { - $configMap['messagingBasicAuthPassword'] = $this->messagingBasicAuthPassword; - } - if (isset($this->multiFactorAuthBasicAuthUserName)) { - $configMap['multiFactorAuthBasicAuthUserName'] = $this->multiFactorAuthBasicAuthUserName; - } - if (isset($this->multiFactorAuthBasicAuthPassword)) { - $configMap['multiFactorAuthBasicAuthPassword'] = $this->multiFactorAuthBasicAuthPassword; - } - if (isset($this->phoneNumberLookupBasicAuthUserName)) { - $configMap['phoneNumberLookupBasicAuthUserName'] = $this->phoneNumberLookupBasicAuthUserName; - } - if (isset($this->phoneNumberLookupBasicAuthPassword)) { - $configMap['phoneNumberLookupBasicAuthPassword'] = $this->phoneNumberLookupBasicAuthPassword; - } - if (isset($this->voiceBasicAuthUserName)) { - $configMap['voiceBasicAuthUserName'] = $this->voiceBasicAuthUserName; - } - if (isset($this->voiceBasicAuthPassword)) { - $configMap['voiceBasicAuthPassword'] = $this->voiceBasicAuthPassword; - } - if (isset($this->webRtcBasicAuthUserName)) { - $configMap['webRtcBasicAuthUserName'] = $this->webRtcBasicAuthUserName; - } - if (isset($this->webRtcBasicAuthPassword)) { - $configMap['webRtcBasicAuthPassword'] = $this->webRtcBasicAuthPassword; - } - if (isset($this->clientId)) { - $configMap['clientId'] = $this->clientId; - } - if (isset($this->clientSecret)) { - $configMap['clientSecret'] = $this->clientSecret; - } - if (isset($this->accessToken)) { - $configMap['accessToken'] = $this->accessToken; - } - if (isset($this->accessTokenExpiration)) { - $configMap['accessTokenExpiration'] = $this->accessTokenExpiration; - } - if (isset($this->environment)) { - $configMap['environment'] = $this->environment; - } - if (isset($this->baseUrl)) { - $configMap['baseUrl'] = $this->baseUrl; - } + /** + * Sets boolean format for query string. + * + * @param string $booleanFormat Boolean format for query string + * + * @return $this + */ + public function setBooleanFormatForQueryString(string $booleanFormat): static + { + $this->booleanFormatForQueryString = $booleanFormat; - return $configMap; + return $this; } - // Getter for timeout - public function getTimeout() + /** + * Gets boolean format for query string. + * + * @return string Boolean format for query string + */ + public function getBooleanFormatForQueryString(): string { - return $this->timeout; + return $this->booleanFormatForQueryString; } - // Getter for messagingBasicAuthUserName - public function getMessagingBasicAuthUserName() + /** + * Sets the username for HTTP basic authentication + * + * @param string $username Username for HTTP basic authentication + * + * @return $this + */ + public function setUsername(string $username): static { - return $this->messagingBasicAuthUserName; + $this->username = $username; + return $this; } - // Getter for messagingBasicAuthPassword - public function getMessagingBasicAuthPassword() + /** + * Gets the username for HTTP basic authentication + * + * @return string Username for HTTP basic authentication + */ + public function getUsername(): string { - return $this->messagingBasicAuthPassword; + return $this->username; } - // Getter for multiFactorAuthBasicAuthUserName - public function getMultiFactorAuthBasicAuthUserName() + /** + * Sets the password for HTTP basic authentication + * + * @param string $password Password for HTTP basic authentication + * + * @return $this + */ + public function setPassword(string $password): static { - return $this->multiFactorAuthBasicAuthUserName; + $this->password = $password; + return $this; } - // Getter for multiFactorAuthBasicAuthPassword - public function getMultiFactorAuthBasicAuthPassword() + /** + * Gets the password for HTTP basic authentication + * + * @return string Password for HTTP basic authentication + */ + public function getPassword(): string { - return $this->multiFactorAuthBasicAuthPassword; + return $this->password; } - // Getter for phoneNumberLookupBasicAuthUserName - public function getPhoneNumberLookupBasicAuthUserName() + /** + * Sets the host + * + * @param string $host Host + * + * @return $this + */ + public function setHost(string $host): static { - return $this->phoneNumberLookupBasicAuthUserName; + $this->host = $host; + return $this; } - // Getter for phoneNumberLookupBasicAuthPassword - public function getPhoneNumberLookupBasicAuthPassword() + /** + * Gets the host + * + * @return string Host + */ + public function getHost(): string { - return $this->phoneNumberLookupBasicAuthPassword; + return $this->host; } - // Getter for voiceBasicAuthUserName - public function getVoiceBasicAuthUserName() + /** + * Sets the user agent of the api client + * + * @param string $userAgent the user agent of the api client + * + * @throws InvalidArgumentException + * @return $this + */ + public function setUserAgent(string $userAgent): static { - return $this->voiceBasicAuthUserName; + $this->userAgent = $userAgent; + return $this; } - // Getter for voiceBasicAuthPassword - public function getVoiceBasicAuthPassword() + /** + * Gets the user agent of the api client + * + * @return string user agent + */ + public function getUserAgent(): string { - return $this->voiceBasicAuthPassword; + return $this->userAgent; } - // Getter for webRtcBasicAuthUserName - public function getWebRtcBasicAuthUserName() + /** + * Sets debug flag + * + * @param bool $debug Debug flag + * + * @return $this + */ + public function setDebug(bool $debug): static { - return $this->webRtcBasicAuthUserName; + $this->debug = $debug; + return $this; } - // Getter for webRtcBasicAuthPassword - public function getWebRtcBasicAuthPassword() + /** + * Gets the debug flag + * + * @return bool + */ + public function getDebug(): bool { - return $this->webRtcBasicAuthPassword; + return $this->debug; } - // Getter for clientId - public function getClientId() + /** + * Sets the debug file + * + * @param string $debugFile Debug file + * + * @return $this + */ + public function setDebugFile(string $debugFile): static { - return $this->clientId; + $this->debugFile = $debugFile; + return $this; } - // Getter for clientSecret - public function getClientSecret() + /** + * Gets the debug file + * + * @return string + */ + public function getDebugFile(): string { - return $this->clientSecret; + return $this->debugFile; } - // Getter for accessToken - public function getAccessToken() + /** + * Sets the temp folder path + * + * @param string $tempFolderPath Temp folder path + * + * @return $this + */ + public function setTempFolderPath(string $tempFolderPath): static { - return $this->accessToken; + $this->tempFolderPath = $tempFolderPath; + return $this; } - // Setter for accessToken - public function setAccessToken($value) + /** + * Gets the temp folder path + * + * @return string Temp folder path + */ + public function getTempFolderPath(): string { - $this->accessToken = $value; + return $this->tempFolderPath; } - // Getter for getAccessTokenExpiration - public function getAccessTokenExpiration() + /** + * Gets the default configuration instance + * + * @return Configuration + */ + public static function getDefaultConfiguration(): Configuration { - return $this->accessTokenExpiration; + if (self::$defaultConfiguration === null) { + self::$defaultConfiguration = new Configuration(); + } + + return self::$defaultConfiguration; } - // Setter for accessTokenExpiration - public function setAccessTokenExpiration($value) + /** + * Sets the default configuration instance + * + * @param Configuration $config An instance of the Configuration Object + * + * @return void + */ + public static function setDefaultConfiguration(Configuration $config): void { - $this->accessTokenExpiration = $value; + self::$defaultConfiguration = $config; } - // Getter for environment - public function getEnvironment() + /** + * Gets the essential information for debugging + * + * @return string The report for debugging + */ + public static function toDebugReport(): string { - return $this->environment; + $report = 'PHP SDK (OpenAPI\Client) Debug Report:' . PHP_EOL; + $report .= ' OS: ' . php_uname() . PHP_EOL; + $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; + $report .= ' The version of the OpenAPI document: 1.0.0' . PHP_EOL; + $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; + + return $report; } - // Getter for baseUrl - public function getBaseUrl() + /** + * Get API key (with prefix if set) + * + * @param string $apiKeyIdentifier name of apikey + * + * @return null|string API key with the prefix + */ + public function getApiKeyWithPrefix(string $apiKeyIdentifier): ?string { - return $this->baseUrl; + $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); + $apiKey = $this->getApiKey($apiKeyIdentifier); + + if ($apiKey === null) { + return null; + } + + if ($prefix === null) { + $keyWithPrefix = $apiKey; + } else { + $keyWithPrefix = $prefix . ' ' . $apiKey; + } + + return $keyWithPrefix; + } + + /** + * Returns an array of host settings + * + * @return array an array of host settings + */ + public function getHostSettings(): array + { + return [ + [ + "url" => "", + "description" => "No description provided", + ] + ]; } /** - * Get the base uri for a given server in the current environment - * @param string $server Server name - * @return string Base URI + * Returns URL based on host settings, index and variables + * + * @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients + * @param int $hostIndex index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings */ - public function getBaseUri(string $server = Servers::DEFAULT_) + public static function getHostString(array $hostSettings, int $hostIndex, ?array $variables = null): string { - return APIHelper::appendUrlWithTemplateParameters( - static::$environmentsMap[$this->environment][$server], - array( - 'base_url' => $this->baseUrl, - ), - false - ); + if (null === $variables) { + $variables = []; + } + + // check array index out of bound + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than ".count($hostSettings)); + } + + $host = $hostSettings[$hostIndex]; + $url = $host["url"]; + + // go through variable and assign a value + foreach ($host["variables"] ?? [] as $name => $variable) { + if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user + if (!isset($variable['enum_values']) || in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum + $url = str_replace("{".$name."}", $variables[$name], $url); + } else { + throw new InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].". Must be ".join(',', $variable["enum_values"])."."); + } + } else { + // use default value + $url = str_replace("{".$name."}", $variable["default_value"], $url); + } + } + + return $url; } /** - * A map of all baseurls used in different environments and servers - * @var array - */ - private static $environmentsMap = array( - Environments::PRODUCTION => array( - Servers::DEFAULT_ => 'api.bandwidth.com', - Servers::MESSAGINGDEFAULT => 'https://messaging.bandwidth.com/api/v2', - Servers::MULTIFACTORAUTHDEFAULT => 'https://mfa.bandwidth.com/api/v1', - Servers::PHONENUMBERLOOKUPDEFAULT => 'https://api.bandwidth.com/v2', - Servers::VOICEDEFAULT => 'https://voice.bandwidth.com', - Servers::WEBRTCDEFAULT => 'https://api.webrtc.bandwidth.com/v1', - ), - Environments::CUSTOM => array( - Servers::DEFAULT_ => '{base_url}', - Servers::MESSAGINGDEFAULT => '{base_url}', - Servers::MULTIFACTORAUTHDEFAULT => '{base_url}', - Servers::PHONENUMBERLOOKUPDEFAULT => '{base_url}', - Servers::VOICEDEFAULT => '{base_url}', - Servers::WEBRTCDEFAULT => '{base_url}', - ), - ); + * Returns URL based on the index and variables + * + * @param int $index index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public function getHostFromSettings(int $index, ?array $variables = null): string + { + return self::getHostString($this->getHostSettings(), $index, $variables); + } } diff --git a/src/Controllers/BaseController.php b/src/Controllers/BaseController.php deleted file mode 100644 index 7a41cc3f..00000000 --- a/src/Controllers/BaseController.php +++ /dev/null @@ -1,141 +0,0 @@ -config = $config; - - if (isset($httpCallBack)) { - $this->httpCallBack = $httpCallBack; - } - } - - /** - * Get HttpCallBack for this controller - * @return HttpCallBack The HttpCallBack object set for this controller - */ - public function getHttpCallBack() - { - return $this->httpCallBack; - } - - /** - * Get a new JsonMapper instance for mapping objects - * @return \apimatic\jsonmapper\JsonMapper JsonMapper instance - */ - protected function getJsonMapper() - { - $mapper = new JsonMapper(); - return $mapper; - } - - protected function validateResponse(HttpResponse $response, HttpContext $_httpContext) - { - if (($response->getStatusCode() < 200) || ($response->getStatusCode() > 208)) { //[200,208] = HTTP OK - throw new APIException('HTTP Response Not OK', $_httpContext); - } - } - - /** - * Update Auth for an HTTP request based on the current configuration - * @param array $headers The headers for the request - * @param string $authType The type of basic auth to use - */ - protected function configureAuth(&$headers, $authType) - { - if (!empty($this->config->getAccessToken()) && - (empty($this->config->getAccessTokenExpiration()) || - $this->config->getAccessTokenExpiration() > time() + 60) - ) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - return; - } - - if (!empty($this->config->getClientId()) && !empty($this->config->getClientSecret())) { - $_tokenUrl = 'https://api.bandwidth.com/api/v1/oauth2/token'; - $_tokenHeaders = array ( - 'User-Agent' => BaseController::USER_AGENT, - 'Content-Type' => 'application/x-www-form-urlencoded', - 'Authorization' => 'Basic ' . base64_encode( - $this->config->getClientId() . ':' . $this->config->getClientSecret() - ) - ); - $_tokenBody = Request\Body::Form([ - 'grant_type' => 'client_credentials' - ]); - $response = Request::post($_tokenUrl, $_tokenHeaders, $_tokenBody); - $this->config->setAccessToken($response->body->access_token); - $this->config->setAccessTokenExpiration(time() + $response->body->expires_in); - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); - - return; - } - - $username = ''; - $password = ''; - - switch ($authType) { - case 'messaging': - $username = $this->config->getMessagingBasicAuthUserName(); - $password = $this->config->getMessagingBasicAuthPassword(); - break; - case 'voice': - $username = $this->config->getVoiceBasicAuthUserName(); - $password = $this->config->getVoiceBasicAuthPassword(); - break; - case 'webrtc': - $username = $this->config->getWebRtcBasicAuthUserName(); - $password = $this->config->getWebRtcBasicAuthPassword(); - break; - case 'phoneNumberLookup': - $username = $this->config->getPhoneNumberLookupBasicAuthUserName(); - $password = $this->config->getPhoneNumberLookupBasicAuthPassword(); - break; - case 'multiFactorAuth': - $username = $this->config->getMultiFactorAuthBasicAuthUserName(); - $password = $this->config->getMultiFactorAuthBasicAuthPassword(); - break; - } - - Request::auth($username, $password); - } -} diff --git a/src/Environments.php b/src/Environments.php deleted file mode 100644 index 418ec490..00000000 --- a/src/Environments.php +++ /dev/null @@ -1,24 +0,0 @@ - $values the value of the form parameter + * + * @return array [key => value] of formdata + */ + public function prepare(array $values): array + { + $this->has_file = false; + $result = []; + + foreach ($values as $k => $v) { + if ($v === null) { + continue; + } + + $result[$k] = $this->makeFormSafe($v); + } + + return $result; + } + + /** + * Flattens a multi-level array of data and generates a single-level array + * compatible with formdata - a single-level array where the keys use bracket + * notation to signify nested data. + * + * credit: https://github.com/FranBar1966/FlatPHP + */ + public static function flatten(array $source, string $start = ''): array + { + $opt = [ + 'prefix' => '[', + 'suffix' => ']', + 'suffix-end' => true, + 'prefix-list' => '[', + 'suffix-list' => ']', + 'suffix-list-end' => true, + ]; + + if ($start === '') { + $currentPrefix = ''; + $currentSuffix = ''; + $currentSuffixEnd = false; + } elseif (array_is_list($source)) { + $currentPrefix = $opt['prefix-list']; + $currentSuffix = $opt['suffix-list']; + $currentSuffixEnd = $opt['suffix-list-end']; + } else { + $currentPrefix = $opt['prefix']; + $currentSuffix = $opt['suffix']; + $currentSuffixEnd = $opt['suffix-end']; + } + + $currentName = $start; + $result = []; + + foreach ($source as $key => $val) { + $currentName .= $currentPrefix . $key; + + if (is_array($val) && !empty($val)) { + $currentName .= $currentSuffix; + $result += self::flatten($val, $currentName); + } else { + if ($currentSuffixEnd) { + $currentName .= $currentSuffix; + } + + if (is_resource($val)) { + $result[$currentName] = $val; + } else { + $result[$currentName] = ObjectSerializer::toString($val); + } + } + + $currentName = $start; + } + + return $result; + } + + /** + * formdata must be limited to scalars or arrays of scalar values, + * or a resource for a file upload. Here we iterate through all available + * data and identify how to handle each scenario + * + * @param string|bool|array|DateTime|ArrayAccess|SplFileObject $value + */ + protected function makeFormSafe(mixed $value) + { + if ($value instanceof SplFileObject) { + return $this->processFiles([$value])[0]; + } + + if (is_resource($value)) { + $this->has_file = true; + + return $value; + } + + if ($value instanceof ModelInterface) { + return $this->processModel($value); + } + + if (is_array($value) || is_object($value)) { + $data = []; + + foreach ($value as $k => $v) { + $data[$k] = $this->makeFormSafe($v); + } + + return $data; + } + + return ObjectSerializer::toString($value); + } + + /** + * We are able to handle nested ModelInterface. We do not simply call + * json_decode(json_encode()) because any given model may have binary data + * or other data that cannot be serialized to a JSON string + */ + protected function processModel(ModelInterface $model): array + { + $result = []; + + foreach ($model::openAPITypes() as $name => $type) { + $value = $model->offsetGet($name); + + if ($value === null) { + continue; + } + + if (str_contains($type, '\SplFileObject')) { + $file = is_array($value) ? $value : [$value]; + $result[$name] = $this->processFiles($file); + + continue; + } + + if ($value instanceof ModelInterface) { + $result[$name] = $this->processModel($value); + + continue; + } + + if (is_array($value) || is_object($value)) { + $result[$name] = $this->makeFormSafe($value); + + continue; + } + + $result[$name] = ObjectSerializer::toString($value); + } + + return $result; + } + + /** + * Handle file data + */ + protected function processFiles(array $files): array + { + $this->has_file = true; + + $result = []; + + foreach ($files as $i => $file) { + if (is_array($file)) { + $result[$i] = $this->processFiles($file); + + continue; + } + + if ($file instanceof StreamInterface) { + $result[$i] = $file; + + continue; + } + + if ($file instanceof SplFileObject) { + $result[$i] = $this->tryFopen($file); + } + } + + return $result; + } + + private function tryFopen(SplFileObject $file) + { + return Utils::tryFopen($file->getRealPath(), 'rb'); + } +} diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php new file mode 100644 index 00000000..14ccd5cc --- /dev/null +++ b/src/HeaderSelector.php @@ -0,0 +1,244 @@ +selectAcceptHeader($accept); + if ($accept !== null) { + $headers['Accept'] = $accept; + } + + if (!$isMultipart) { + if($contentType === '') { + $contentType = 'application/json'; + } + + $headers['Content-Type'] = $contentType; + } + + return $headers; + } + + /** + * Return the header 'Accept' based on an array of Accept provided. + * + * @param string[] $accept Array of header + * + * @return null|string Accept (e.g. application/json) + */ + private function selectAcceptHeader(array $accept): ?string + { + # filter out empty entries + $accept = array_filter($accept); + + if (count($accept) === 0) { + return null; + } + + # If there's only one Accept header, just use it + if (count($accept) === 1) { + return reset($accept); + } + + # If none of the available Accept headers is of type "json", then just use all them + $headersWithJson = preg_grep('~(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$~', $accept); + if (count($headersWithJson) === 0) { + return implode(',', $accept); + } + + # If we got here, then we need add quality values (weight), as described in IETF RFC 9110, Items 12.4.2/12.5.1, + # to give the highest priority to json-like headers - recalculating the existing ones, if needed + return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson); + } + + /** + * Create an Accept header string from the given "Accept" headers array, recalculating all weights + * + * @param string[] $accept Array of Accept Headers + * @param string[] $headersWithJson Array of Accept Headers of type "json" + * + * @return string "Accept" Header (e.g. "application/json, text/html; q=0.9") + */ + private function getAcceptHeaderWithAdjustedWeight(array $accept, array $headersWithJson): string + { + $processedHeaders = [ + 'withApplicationJson' => [], + 'withJson' => [], + 'withoutJson' => [], + ]; + + foreach ($accept as $header) { + + $headerData = $this->getHeaderAndWeight($header); + + if (stripos($headerData['header'], 'application/json') === 0) { + $processedHeaders['withApplicationJson'][] = $headerData; + } elseif (in_array($header, $headersWithJson, true)) { + $processedHeaders['withJson'][] = $headerData; + } else { + $processedHeaders['withoutJson'][] = $headerData; + } + } + + $acceptHeaders = []; + $currentWeight = 1000; + + $hasMoreThan28Headers = count($accept) > 28; + + foreach($processedHeaders as $headers) { + if (count($headers) > 0) { + $acceptHeaders[] = $this->adjustWeight($headers, $currentWeight, $hasMoreThan28Headers); + } + } + + $acceptHeaders = array_merge(...$acceptHeaders); + + return implode(',', $acceptHeaders); + } + + /** + * Given an Accept header, returns an associative array splitting the header and its weight + * + * @param string $header "Accept" Header + * + * @return array with the header and its weight + */ + private function getHeaderAndWeight(string $header): array + { + # matches headers with weight, splitting the header and the weight in $outputArray + if (preg_match('/(.*);\s*q=(1(?:\.0+)?|0\.\d+)$/', $header, $outputArray) === 1) { + $headerData = [ + 'header' => $outputArray[1], + 'weight' => (int)($outputArray[2] * 1000), + ]; + } else { + $headerData = [ + 'header' => trim($header), + 'weight' => 1000, + ]; + } + + return $headerData; + } + + /** + * @param array[] $headers + * @param float $currentWeight + * @param bool $hasMoreThan28Headers + * @return string[] array of adjusted "Accept" headers + */ + private function adjustWeight(array $headers, float &$currentWeight, bool $hasMoreThan28Headers): array + { + usort($headers, function (array $a, array $b) { + return $b['weight'] - $a['weight']; + }); + + $acceptHeaders = []; + foreach ($headers as $index => $header) { + if($index > 0 && $headers[$index - 1]['weight'] > $header['weight']) + { + $currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers); + } + + $weight = $currentWeight; + + $acceptHeaders[] = $this->buildAcceptHeader($header['header'], $weight); + } + + $currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers); + + return $acceptHeaders; + } + + /** + * @param string $header + * @param int $weight + * @return string + */ + private function buildAcceptHeader(string $header, int $weight): string + { + if($weight === 1000) { + return $header; + } + + return trim($header, '; ') . ';q=' . rtrim(sprintf('%0.3f', $weight / 1000), '0'); + } + + /** + * Calculate the next weight, based on the current one. + * + * If there are less than 28 "Accept" headers, the weights will be decreased by 1 on its highest significant digit, using the + * following formula: + * + * next weight = current weight - 10 ^ (floor(log(current weight - 1))) + * + * ( current weight minus ( 10 raised to the power of ( floor of (log to the base 10 of ( current weight minus 1 ) ) ) ) ) + * + * Starting from 1000, this generates the following series: + * + * 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 + * + * The resulting quality codes are closer to the average "normal" usage of them (like "q=0.9", "q=0.8" and so on), but it only works + * if there is a maximum of 28 "Accept" headers. If we have more than that (which is extremely unlikely), then we fall back to a 1-by-1 + * decrement rule, which will result in quality codes like "q=0.999", "q=0.998" etc. + * + * @param int $currentWeight varying from 1 to 1000 (will be divided by 1000 to build the quality value) + * @param bool $hasMoreThan28Headers + * @return int + */ + public function getNextWeight(int $currentWeight, bool $hasMoreThan28Headers): int + { + if ($currentWeight <= 1) { + return 1; + } + + if ($hasMoreThan28Headers) { + return $currentWeight - 1; + } + + return $currentWeight - 10 ** floor( log10($currentWeight - 1) ); + } +} diff --git a/src/Http/ApiResponse.php b/src/Http/ApiResponse.php deleted file mode 100644 index 0da47ee6..00000000 --- a/src/Http/ApiResponse.php +++ /dev/null @@ -1,72 +0,0 @@ -statusCode = $statusCode; - $this->headers = $headers; - $this->result = $result; - } - - /** - * Get status code - * @return int Status code - */ - public function getStatusCode() - { - return $this->statusCode; - } - - /** - * Get headers - * @return array Map of headers - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * Get API call result or body - * @return mixed Deserialized response body - */ - public function getResult() - { - return $this->result; - } -} diff --git a/src/Http/HttpCallBack.php b/src/Http/HttpCallBack.php deleted file mode 100644 index eb0cc1e0..00000000 --- a/src/Http/HttpCallBack.php +++ /dev/null @@ -1,95 +0,0 @@ -onBeforeRequest = $onBeforeRequest; - $this->onAfterRequest = $onAfterRequest; - } - - /** - * Set on-before event callback - * @param callable $func On-before event callable - */ - public function setOnBeforeRequest(callable $func) - { - $this->onBeforeRequest = $func; - } - - /** - * Get On-before API call event callable - * @return callable Callable - */ - public function getOnBeforeRequest() - { - return $this->onBeforeRequest; - } - - /** - * Set On-after API call event callable - * @param callable $func On-after event callable - */ - public function setOnAfterRequest(callable $func) - { - $this->onAfterRequest = $func; - } - - /** - * Get On-After API call event callable - * @return callable On-after event callable - */ - public function getOnAfterRequest() - { - return $this->onAfterRequest; - } - - /** - * Call on-before event callable - * @param HttpRequest $httpRequest HttpRequest for this call - */ - public function callOnBeforeRequest(HttpRequest $httpRequest) - { - if ($this->onBeforeRequest != null) { - call_user_func($this->onBeforeRequest, $httpRequest); - } - } - - /** - * Call on-after event callable - * @param HttpContext $httpContext HttpRequest for this call - */ - public function callOnAfterRequest(HttpContext $httpContext) - { - if ($this->onAfterRequest != null) { - call_user_func($this->onAfterRequest, $httpContext); - } - } -} diff --git a/src/Http/HttpContext.php b/src/Http/HttpContext.php deleted file mode 100644 index 48ae7e06..00000000 --- a/src/Http/HttpContext.php +++ /dev/null @@ -1,55 +0,0 @@ -request = $request; - $this->response = $response; - } - - /** - * Getter for the Http Request - * @return HttpRequest request - */ - public function getRequest() - { - return $this->request; - } - - /** - * Getter for the Http Response - * @return HttpResponse response - */ - public function getResponse() - { - return $this->response; - } -} diff --git a/src/Http/HttpMethod.php b/src/Http/HttpMethod.php deleted file mode 100644 index 6293d938..00000000 --- a/src/Http/HttpMethod.php +++ /dev/null @@ -1,21 +0,0 @@ -httpMethod = $httpMethod; - $this->headers = $headers; - $this->queryUrl = $queryUrl; - $this->parameters = $parameters; - } - - /** - * Get http method - * @return string - */ - public function getHttpMethod() - { - return $this->httpMethod; - } - - /** - * Set http method - * @param string $httpMethod Http Method as defined in HttpMethod class - */ - public function setHttpMethod(string $httpMethod) - { - $this->httpMethod = $httpMethod; - } - - /** - * Get headers - * @return array Map of headers - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * Set headers - * @param array $headers Headers as map - */ - public function setHeaders(array $headers) - { - $this->headers = $headers; - } - - /** - * Get query url - * @return string Query url - */ - public function getQueryUrl() - { - return $this->queryUrl; - } - - /** - * Set query url - * @param string $queryUrl Query url - */ - public function setQueryUrl(string $queryUrl) - { - $this->queryUrl = $queryUrl; - } - - /** - * Get parameters - * @return array Map of input parameters - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * Set parameters - * @param array $parameters Map of input parameters - */ - public function setParameters(array $parameters) - { - $this->parameters = $parameters; - } -} diff --git a/src/Http/HttpResponse.php b/src/Http/HttpResponse.php deleted file mode 100644 index 361bd506..00000000 --- a/src/Http/HttpResponse.php +++ /dev/null @@ -1,72 +0,0 @@ -statusCode = $statusCode; - $this->headers = $headers; - $this->rawBody = $rawBody; - } - - /** - * Get status code - * @return int Status code - */ - public function getStatusCode() - { - return $this->statusCode; - } - - /** - * Get headers - * @return array Map of headers - */ - public function getHeaders() - { - return $this->headers; - } - - /** - * Get raw response body - * @return string Raw body - */ - public function getRawBody() - { - return $this->rawBody; - } -} diff --git a/src/Messaging/Controllers/APIController.php b/src/Messaging/Controllers/APIController.php deleted file mode 100644 index d087337b..00000000 --- a/src/Messaging/Controllers/APIController.php +++ /dev/null @@ -1,615 +0,0 @@ - $accountId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::MESSAGINGDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json', - 'Continuation-Token' => $continuationToken - ); - - //set authentication - $this->configureAuth($_headers, 'messaging'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\MessagingException('400 Request is malformed or invalid', $_httpContext); - } - - if ($response->code == 401) { - throw new Exceptions\MessagingException( - '401 The specified user does not have access to the account', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\MessagingException('403 The user does not have access to this API', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\MessagingException('404 Path not found', $_httpContext); - } - - if ($response->code == 415) { - throw new Exceptions\MessagingException('415 The content-type of the request is incorrect', $_httpContext); - } - - if ($response->code == 429) { - throw new Exceptions\MessagingException('429 The rate limit has been reached', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClassArray($response->body, 'BandwidthLib\\Messaging\\Models\\Media'); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Downloads a media file you previously uploaded. - * - * @param string $accountId User's account ID - * @param string $mediaId Media ID to retrieve - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getMedia( - string $accountId, - string $mediaId - ) { - - //prepare query string for API call - $_queryBuilder = '/users/{accountId}/media/{mediaId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'mediaId' => $mediaId, - ), false - ); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::MESSAGINGDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT - ); - - //set authentication - $this->configureAuth($_headers, 'messaging'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\MessagingException('400 Request is malformed or invalid', $_httpContext); - } - - if ($response->code == 401) { - throw new Exceptions\MessagingException( - '401 The specified user does not have access to the account', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\MessagingException('403 The user does not have access to this API', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\MessagingException('404 Path not found', $_httpContext); - } - - if ($response->code == 415) { - throw new Exceptions\MessagingException('415 The content-type of the request is incorrect', $_httpContext); - } - - if ($response->code == 429) { - throw new Exceptions\MessagingException('429 The rate limit has been reached', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $deserializedResponse = $response->body; - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Uploads a file the normal HTTP way. You may add headers to the request in order to provide some - * control to your media-file. - * - * @param string $accountId User's account ID - * @param string $mediaId The user supplied custom media ID - * @param string $body TODO: type description here - * @param string $contentType (optional) The media type of the entity-body - * @param string|null $cacheControl (optional) General-header field is used to specify directives that MUST be obeyed - * by all caching mechanisms along the request/response chain. - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function uploadMedia( - string $accountId, - string $mediaId, - string $body, - string $contentType = 'application/octet-stream', - ?string $cacheControl = null - ) { - - //prepare query string for API call - $_queryBuilder = '/users/{accountId}/media/{mediaId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'mediaId' => $mediaId, - ), false - ); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::MESSAGINGDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Content-Type' => (null != $contentType) ? $contentType : 'application/octet-stream', - 'Cache-Control' => $cacheControl - ); - - //json encode body - $_bodyJson = $body; - - //set authentication - $this->configureAuth($_headers, 'messaging'); - - $_httpRequest = new HttpRequest(HttpMethod::PUT, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::put($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\MessagingException('400 Request is malformed or invalid', $_httpContext); - } - - if ($response->code == 401) { - throw new Exceptions\MessagingException( - '401 The specified user does not have access to the account', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\MessagingException('403 The user does not have access to this API', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\MessagingException('404 Path not found', $_httpContext); - } - - if ($response->code == 415) { - throw new Exceptions\MessagingException('415 The content-type of the request is incorrect', $_httpContext); - } - - if ($response->code == 429) { - throw new Exceptions\MessagingException('429 The rate limit has been reached', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Deletes a media file from Bandwidth API server. Make sure you don't have any application scripts - * still using the media before you delete. If you accidentally delete a media file, you can - * immediately upload a new file with the same name. - * - * @param string $accountId User's account ID - * @param string $mediaId The media ID to delete - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function deleteMedia( - string $accountId, - string $mediaId - ) { - - //prepare query string for API call - $_queryBuilder = '/users/{accountId}/media/{mediaId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'mediaId' => $mediaId, - ), false - ); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::MESSAGINGDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT - ); - - //set authentication - $this->configureAuth($_headers, 'messaging'); - - $_httpRequest = new HttpRequest(HttpMethod::DELETE, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::delete($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\MessagingException('400 Request is malformed or invalid', $_httpContext); - } - - if ($response->code == 401) { - throw new Exceptions\MessagingException( - '401 The specified user does not have access to the account', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\MessagingException('403 The user does not have access to this API', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\MessagingException('404 Path not found', $_httpContext); - } - - if ($response->code == 415) { - throw new Exceptions\MessagingException('415 The content-type of the request is incorrect', $_httpContext); - } - - if ($response->code == 429) { - throw new Exceptions\MessagingException('429 The rate limit has been reached', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Gets a list of messages based on query parameters. - * - * @param string $accountId User's account ID - * @param string|null $messageId (optional) The ID of the message to search for. Special characters need to be - * encoded using URL encoding - * @param string|null $sourceTn (optional) The phone number that sent the message - * @param string|null $destinationTn (optional) The phone number that received the message - * @param string|null $messageStatus (optional) The status of the message. One of RECEIVED, QUEUED, SENDING, SENT, - * FAILED, DELIVERED, ACCEPTED, UNDELIVERED - * @param integer|null $errorCode (optional) The error code of the message - * @param string|null $fromDateTime (optional) The start of the date range to search in ISO 8601 format. Uses the - * message receive time. The date range to search in is currently 14 days. - * @param string|null $toDateTime (optional) The end of the date range to search in ISO 8601 format. Uses the - * message receive time. The date range to search in is currently 14 days. - * @param string|null $pageToken (optional) A base64 encoded value used for pagination of results - * @param integer|null $limit (optional) The maximum records requested in search result. Default 100. The sum of - * limit and after cannot be more than 10000 - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getMessages( - string $accountId, - ?string $messageId = null, - ?string $sourceTn = null, - ?string $destinationTn = null, - ?string $messageStatus = null, - ?int $errorCode = null, - ?string $fromDateTime = null, - ?string $toDateTime = null, - ?string $pageToken = null, - ?int $limit = null - ) { - - //prepare query string for API call - $_queryBuilder = '/users/{accountId}/messages'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - )); - - //process optional query parameters - APIHelper::appendUrlWithQueryParameters($_queryBuilder, array ( - 'messageId' => $messageId, - 'sourceTn' => $sourceTn, - 'destinationTn' => $destinationTn, - 'messageStatus' => $messageStatus, - 'errorCode' => $errorCode, - 'fromDateTime' => $fromDateTime, - 'toDateTime' => $toDateTime, - 'pageToken' => $pageToken, - 'limit' => $limit, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::MESSAGINGDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'messaging'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\MessagingException('400 Request is malformed or invalid', $_httpContext); - } - - if ($response->code == 401) { - throw new Exceptions\MessagingException( - '401 The specified user does not have access to the account', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\MessagingException('403 The user does not have access to this API', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\MessagingException('404 Path not found', $_httpContext); - } - - if ($response->code == 415) { - throw new Exceptions\MessagingException('415 The content-type of the request is incorrect', $_httpContext); - } - - if ($response->code == 429) { - throw new Exceptions\MessagingException('429 The rate limit has been reached', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass( - $response->body, - 'BandwidthLib\\Messaging\\Models\\BandwidthMessagesList' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Endpoint for sending text messages and picture messages using V2 messaging. - * - * @param string $accountId User's account ID - * @param Models\MessageRequest $body TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function createMessage( - string $accountId, - Models\MessageRequest $body - ) { - - //prepare query string for API call - $_queryBuilder = '/users/{accountId}/messages'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::MESSAGINGDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json', - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'messaging'); - - $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::post($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\MessagingException('400 Request is malformed or invalid', $_httpContext); - } - - if ($response->code == 401) { - throw new Exceptions\MessagingException( - '401 The specified user does not have access to the account', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\MessagingException('403 The user does not have access to this API', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\MessagingException('404 Path not found', $_httpContext); - } - - if ($response->code == 415) { - throw new Exceptions\MessagingException('415 The content-type of the request is incorrect', $_httpContext); - } - - if ($response->code == 429) { - throw new Exceptions\MessagingException('429 The rate limit has been reached', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass($response->body, 'BandwidthLib\\Messaging\\Models\\BandwidthMessage'); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } -} diff --git a/src/Messaging/Exceptions/MessagingException.php b/src/Messaging/Exceptions/MessagingException.php deleted file mode 100644 index 238368f9..00000000 --- a/src/Messaging/Exceptions/MessagingException.php +++ /dev/null @@ -1,46 +0,0 @@ -config = $config; - } - - - private $client; - - /** - * Provides access to API controller - * @return Controllers\APIController - */ - public function getClient() - { - if ($this->client == null) { - $this->client = new Controllers\APIController($this->config); - } - return $this->client; - } -} diff --git a/src/Messaging/Models/BandwidthCallbackMessage.php b/src/Messaging/Models/BandwidthCallbackMessage.php deleted file mode 100644 index ca22d919..00000000 --- a/src/Messaging/Models/BandwidthCallbackMessage.php +++ /dev/null @@ -1,81 +0,0 @@ -time = func_get_arg(0); - $this->type = func_get_arg(1); - $this->to = func_get_arg(2); - $this->errorCode = func_get_arg(3); - $this->description = func_get_arg(4); - $this->message = func_get_arg(5); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['time'] = $this->time; - $json['type'] = $this->type; - $json['to'] = $this->to; - $json['errorCode'] = $this->errorCode; - $json['description'] = $this->description; - $json['message'] = $this->message; - - return array_filter($json); - } -} diff --git a/src/Messaging/Models/BandwidthMessage.php b/src/Messaging/Models/BandwidthMessage.php deleted file mode 100644 index 2e0bc0ce..00000000 --- a/src/Messaging/Models/BandwidthMessage.php +++ /dev/null @@ -1,134 +0,0 @@ -id = func_get_arg(0); - $this->owner = func_get_arg(1); - $this->applicationId = func_get_arg(2); - $this->time = func_get_arg(3); - $this->segmentCount = func_get_arg(4); - $this->direction = func_get_arg(5); - $this->to = func_get_arg(6); - $this->from = func_get_arg(7); - $this->media = func_get_arg(8); - $this->text = func_get_arg(9); - $this->tag = func_get_arg(10); - $this->priority = func_get_arg(11); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['id'] = $this->id; - $json['owner'] = $this->owner; - $json['applicationId'] = $this->applicationId; - $json['time'] = $this->time; - $json['segmentCount'] = $this->segmentCount; - $json['direction'] = $this->direction; - $json['to'] = isset($this->to) ? - array_values($this->to) : null; - $json['from'] = $this->from; - $json['media'] = isset($this->media) ? - array_values($this->media) : null; - $json['text'] = $this->text; - $json['tag'] = $this->tag; - $json['priority'] = $this->priority; - - return array_filter($json); - } -} diff --git a/src/Messaging/Models/BandwidthMessageItem.php b/src/Messaging/Models/BandwidthMessageItem.php deleted file mode 100644 index 21655440..00000000 --- a/src/Messaging/Models/BandwidthMessageItem.php +++ /dev/null @@ -1,161 +0,0 @@ -messageId = func_get_arg(0); - $this->accountId = func_get_arg(1); - $this->sourceTn = func_get_arg(2); - $this->destinationTn = func_get_arg(3); - $this->messageStatus = func_get_arg(4); - $this->messageDirection = func_get_arg(5); - $this->messageType = func_get_arg(6); - $this->segmentCount = func_get_arg(7); - $this->errorCode = func_get_arg(8); - $this->receiveTime = func_get_arg(9); - $this->carrierName = func_get_arg(10); - $this->messageSize = func_get_arg(11); - $this->messageLength = func_get_arg(12); - $this->attachmentCount = func_get_arg(13); - $this->recipientCount = func_get_arg(14); - $this->campaignClass = func_get_arg(15); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['messageId'] = $this->messageId; - $json['accountId'] = $this->accountId; - $json['sourceTn'] = $this->sourceTn; - $json['destinationTn'] = $this->destinationTn; - $json['messageStatus'] = $this->messageStatus; - $json['messageDirection'] = $this->messageDirection; - $json['messageType'] = $this->messageType; - $json['segmentCount'] = $this->segmentCount; - $json['errorCode'] = $this->errorCode; - $json['receiveTime'] = $this->receiveTime; - $json['carrierName'] = $this->carrierName; - $json['messageSize'] = $this->messageSize; - $json['messageLength'] = $this->messageLength; - $json['attachmentCount'] = $this->attachmentCount; - $json['recipientCount'] = $this->recipientCount; - $json['campaignClass'] = $this->campaignClass; - - return array_filter($json); - } -} diff --git a/src/Messaging/Models/BandwidthMessagesList.php b/src/Messaging/Models/BandwidthMessagesList.php deleted file mode 100644 index 8b4dc44a..00000000 --- a/src/Messaging/Models/BandwidthMessagesList.php +++ /dev/null @@ -1,58 +0,0 @@ -totalCount = func_get_arg(0); - $this->pageInfo = func_get_arg(1); - $this->messages = func_get_arg(2); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['totalCount'] = $this->totalCount; - $json['pageInfo'] = $this->pageInfo; - $json['messages'] = isset($this->messages) ? - array_values($this->messages) : null; - - return array_filter($json); - } -} diff --git a/src/Messaging/Models/DeferredResult.php b/src/Messaging/Models/DeferredResult.php deleted file mode 100644 index 70c71d74..00000000 --- a/src/Messaging/Models/DeferredResult.php +++ /dev/null @@ -1,49 +0,0 @@ -result = func_get_arg(0); - $this->setOrExpired = func_get_arg(1); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['result'] = $this->result; - $json['setOrExpired'] = $this->setOrExpired; - - return array_filter($json); - } -} diff --git a/src/Messaging/Models/Media.php b/src/Messaging/Models/Media.php deleted file mode 100644 index 942cd457..00000000 --- a/src/Messaging/Models/Media.php +++ /dev/null @@ -1,57 +0,0 @@ -content = func_get_arg(0); - $this->contentLength = func_get_arg(1); - $this->mediaName = func_get_arg(2); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['content'] = $this->content; - $json['contentLength'] = $this->contentLength; - $json['mediaName'] = $this->mediaName; - - return array_filter($json); - } -} diff --git a/src/Messaging/Models/MessageRequest.php b/src/Messaging/Models/MessageRequest.php deleted file mode 100644 index 08ddbc9b..00000000 --- a/src/Messaging/Models/MessageRequest.php +++ /dev/null @@ -1,95 +0,0 @@ -applicationId = func_get_arg(0); - $this->to = func_get_arg(1); - $this->from = func_get_arg(2); - $this->text = func_get_arg(3); - $this->media = func_get_arg(4); - $this->tag = func_get_arg(5); - $this->priority = func_get_arg(6); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['applicationId'] = $this->applicationId; - $json['to'] = array_values($this->to); - $json['from'] = $this->from; - $json['text'] = $this->text; - $json['media'] = isset($this->media) ? - array_values($this->media) : null; - $json['tag'] = $this->tag; - $json['priority'] = $this->priority; - - return array_filter($json); - } -} diff --git a/src/Messaging/Models/PageInfo.php b/src/Messaging/Models/PageInfo.php deleted file mode 100644 index 2250bf7a..00000000 --- a/src/Messaging/Models/PageInfo.php +++ /dev/null @@ -1,65 +0,0 @@ -prevPage = func_get_arg(0); - $this->nextPage = func_get_arg(1); - $this->prevPageToken = func_get_arg(2); - $this->nextPageToken = func_get_arg(3); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['prevPage'] = $this->prevPage; - $json['nextPage'] = $this->nextPage; - $json['prevPageToken'] = $this->prevPageToken; - $json['nextPageToken'] = $this->nextPageToken; - - return array_filter($json); - } -} diff --git a/src/Messaging/Models/PriorityEnum.php b/src/Messaging/Models/PriorityEnum.php deleted file mode 100644 index 7215ad9d..00000000 --- a/src/Messaging/Models/PriorityEnum.php +++ /dev/null @@ -1,25 +0,0 @@ -key = func_get_arg(0); - $this->value = func_get_arg(1); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['key'] = $this->key; - $json['value'] = $this->value; - - return array_filter($json); - } -} diff --git a/src/Model/AccountStatistics.php b/src/Model/AccountStatistics.php new file mode 100644 index 00000000..78a0801e --- /dev/null +++ b/src/Model/AccountStatistics.php @@ -0,0 +1,418 @@ + + */ +class AccountStatistics implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'accountStatistics'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'current_call_queue_size' => 'int', + 'max_call_queue_size' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'current_call_queue_size' => null, + 'max_call_queue_size' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'current_call_queue_size' => false, + 'max_call_queue_size' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'current_call_queue_size' => 'currentCallQueueSize', + 'max_call_queue_size' => 'maxCallQueueSize' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'current_call_queue_size' => 'setCurrentCallQueueSize', + 'max_call_queue_size' => 'setMaxCallQueueSize' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'current_call_queue_size' => 'getCurrentCallQueueSize', + 'max_call_queue_size' => 'getMaxCallQueueSize' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('current_call_queue_size', $data ?? [], null); + $this->setIfExists('max_call_queue_size', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets current_call_queue_size + * + * @return int|null + */ + public function getCurrentCallQueueSize(): ?int + { + return $this->container['current_call_queue_size']; + } + + /** + * Sets current_call_queue_size + * + * @param int|null $current_call_queue_size The number of calls currently enqueued. + * + * @return $this + */ + public function setCurrentCallQueueSize(?int $current_call_queue_size): static + { + if (is_null($current_call_queue_size)) { + throw new InvalidArgumentException('non-nullable current_call_queue_size cannot be null'); + } + $this->container['current_call_queue_size'] = $current_call_queue_size; + + return $this; + } + + /** + * Gets max_call_queue_size + * + * @return int|null + */ + public function getMaxCallQueueSize(): ?int + { + return $this->container['max_call_queue_size']; + } + + /** + * Sets max_call_queue_size + * + * @param int|null $max_call_queue_size The maximum size of the queue before outgoing calls start being rejected. + * + * @return $this + */ + public function setMaxCallQueueSize(?int $max_call_queue_size): static + { + if (is_null($max_call_queue_size)) { + throw new InvalidArgumentException('non-nullable max_call_queue_size cannot be null'); + } + $this->container['max_call_queue_size'] = $max_call_queue_size; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/AdditionalDenialReason.php b/src/Model/AdditionalDenialReason.php new file mode 100644 index 00000000..6beeb564 --- /dev/null +++ b/src/Model/AdditionalDenialReason.php @@ -0,0 +1,461 @@ + + */ +class AdditionalDenialReason implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'additionalDenialReason'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'status_code' => 'int', + 'reason' => 'string', + 'resubmit_allowed' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'status_code' => null, + 'reason' => null, + 'resubmit_allowed' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'status_code' => false, + 'reason' => false, + 'resubmit_allowed' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'status_code' => 'statusCode', + 'reason' => 'reason', + 'resubmit_allowed' => 'resubmitAllowed' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'status_code' => 'setStatusCode', + 'reason' => 'setReason', + 'resubmit_allowed' => 'setResubmitAllowed' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'status_code' => 'getStatusCode', + 'reason' => 'getReason', + 'resubmit_allowed' => 'getResubmitAllowed' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('status_code', $data ?? [], null); + $this->setIfExists('reason', $data ?? [], null); + $this->setIfExists('resubmit_allowed', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['status_code'] === null) { + $invalidProperties[] = "'status_code' can't be null"; + } + if ($this->container['reason'] === null) { + $invalidProperties[] = "'reason' can't be null"; + } + if ($this->container['resubmit_allowed'] === null) { + $invalidProperties[] = "'resubmit_allowed' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets status_code + * + * @return int + */ + public function getStatusCode(): int + { + return $this->container['status_code']; + } + + /** + * Sets status_code + * + * @param int $status_code Reason code for denial. + * + * @return $this + */ + public function setStatusCode(int $status_code): static + { + if (is_null($status_code)) { + throw new InvalidArgumentException('non-nullable status_code cannot be null'); + } + $this->container['status_code'] = $status_code; + + return $this; + } + + /** + * Gets reason + * + * @return string + */ + public function getReason(): string + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param string $reason Explanation for why a verification request was declined. + * + * @return $this + */ + public function setReason(string $reason): static + { + if (is_null($reason)) { + throw new InvalidArgumentException('non-nullable reason cannot be null'); + } + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Gets resubmit_allowed + * + * @return bool + */ + public function getResubmitAllowed(): bool + { + return $this->container['resubmit_allowed']; + } + + /** + * Sets resubmit_allowed + * + * @param bool $resubmit_allowed Whether a Toll-Free Verification request qualifies for resubmission via PUT. + * + * @return $this + */ + public function setResubmitAllowed(bool $resubmit_allowed): static + { + if (is_null($resubmit_allowed)) { + throw new InvalidArgumentException('non-nullable resubmit_allowed cannot be null'); + } + $this->container['resubmit_allowed'] = $resubmit_allowed; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/Address.php b/src/Model/Address.php new file mode 100644 index 00000000..60bdae62 --- /dev/null +++ b/src/Model/Address.php @@ -0,0 +1,712 @@ + + */ +class Address implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'address'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'name' => 'string', + 'addr1' => 'string', + 'addr2' => 'string', + 'city' => 'string', + 'state' => 'string', + 'zip' => 'string', + 'url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'name' => null, + 'addr1' => null, + 'addr2' => null, + 'city' => null, + 'state' => null, + 'zip' => null, + 'url' => 'url' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'name' => false, + 'addr1' => false, + 'addr2' => true, + 'city' => false, + 'state' => false, + 'zip' => false, + 'url' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'name' => 'name', + 'addr1' => 'addr1', + 'addr2' => 'addr2', + 'city' => 'city', + 'state' => 'state', + 'zip' => 'zip', + 'url' => 'url' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'name' => 'setName', + 'addr1' => 'setAddr1', + 'addr2' => 'setAddr2', + 'city' => 'setCity', + 'state' => 'setState', + 'zip' => 'setZip', + 'url' => 'setUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'name' => 'getName', + 'addr1' => 'getAddr1', + 'addr2' => 'getAddr2', + 'city' => 'getCity', + 'state' => 'getState', + 'zip' => 'getZip', + 'url' => 'getUrl' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('addr1', $data ?? [], null); + $this->setIfExists('addr2', $data ?? [], null); + $this->setIfExists('city', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('zip', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 500)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['addr1'] === null) { + $invalidProperties[] = "'addr1' can't be null"; + } + if ((mb_strlen($this->container['addr1']) > 500)) { + $invalidProperties[] = "invalid value for 'addr1', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['addr1']) < 1)) { + $invalidProperties[] = "invalid value for 'addr1', the character length must be bigger than or equal to 1."; + } + + if (!is_null($this->container['addr2']) && (mb_strlen($this->container['addr2']) > 500)) { + $invalidProperties[] = "invalid value for 'addr2', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['addr2']) && (mb_strlen($this->container['addr2']) < 0)) { + $invalidProperties[] = "invalid value for 'addr2', the character length must be bigger than or equal to 0."; + } + + if ($this->container['city'] === null) { + $invalidProperties[] = "'city' can't be null"; + } + if ((mb_strlen($this->container['city']) > 500)) { + $invalidProperties[] = "invalid value for 'city', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['city']) < 1)) { + $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; + } + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + if ((mb_strlen($this->container['state']) > 500)) { + $invalidProperties[] = "invalid value for 'state', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['state']) < 1)) { + $invalidProperties[] = "invalid value for 'state', the character length must be bigger than or equal to 1."; + } + + if ($this->container['zip'] === null) { + $invalidProperties[] = "'zip' can't be null"; + } + if (!preg_match("/[- A-Za-z0-9]{0,500}/", $this->container['zip'])) { + $invalidProperties[] = "invalid value for 'zip', must be conform to the pattern /[- A-Za-z0-9]{0,500}/."; + } + + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; + } + if ((mb_strlen($this->container['url']) > 500)) { + $invalidProperties[] = "invalid value for 'url', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['url']) < 1)) { + $invalidProperties[] = "invalid value for 'url', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName(): string + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The name of the business using the toll-free number. + * + * @return $this + */ + public function setName(string $name): static + { + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + if ((mb_strlen($name) > 500)) { + throw new InvalidArgumentException('invalid length for $name when calling Address., must be smaller than or equal to 500.'); + } + if ((mb_strlen($name) < 1)) { + throw new InvalidArgumentException('invalid length for $name when calling Address., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets addr1 + * + * @return string + */ + public function getAddr1(): string + { + return $this->container['addr1']; + } + + /** + * Sets addr1 + * + * @param string $addr1 The address of the business using the toll-free number. + * + * @return $this + */ + public function setAddr1(string $addr1): static + { + if (is_null($addr1)) { + throw new InvalidArgumentException('non-nullable addr1 cannot be null'); + } + if ((mb_strlen($addr1) > 500)) { + throw new InvalidArgumentException('invalid length for $addr1 when calling Address., must be smaller than or equal to 500.'); + } + if ((mb_strlen($addr1) < 1)) { + throw new InvalidArgumentException('invalid length for $addr1 when calling Address., must be bigger than or equal to 1.'); + } + + $this->container['addr1'] = $addr1; + + return $this; + } + + /** + * Gets addr2 + * + * @return string|null + */ + public function getAddr2(): ?string + { + return $this->container['addr2']; + } + + /** + * Sets addr2 + * + * @param string|null $addr2 The address of the business using the toll-free number. + * + * @return $this + */ + public function setAddr2(?string $addr2): static + { + if (is_null($addr2)) { + array_push($this->openAPINullablesSetToNull, 'addr2'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('addr2', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($addr2) && (mb_strlen($addr2) > 500)) { + throw new InvalidArgumentException('invalid length for $addr2 when calling Address., must be smaller than or equal to 500.'); + } + if (!is_null($addr2) && (mb_strlen($addr2) < 0)) { + throw new InvalidArgumentException('invalid length for $addr2 when calling Address., must be bigger than or equal to 0.'); + } + + $this->container['addr2'] = $addr2; + + return $this; + } + + /** + * Gets city + * + * @return string + */ + public function getCity(): string + { + return $this->container['city']; + } + + /** + * Sets city + * + * @param string $city The city of the business using the toll-free number. + * + * @return $this + */ + public function setCity(string $city): static + { + if (is_null($city)) { + throw new InvalidArgumentException('non-nullable city cannot be null'); + } + if ((mb_strlen($city) > 500)) { + throw new InvalidArgumentException('invalid length for $city when calling Address., must be smaller than or equal to 500.'); + } + if ((mb_strlen($city) < 1)) { + throw new InvalidArgumentException('invalid length for $city when calling Address., must be bigger than or equal to 1.'); + } + + $this->container['city'] = $city; + + return $this; + } + + /** + * Gets state + * + * @return string + */ + public function getState(): string + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string $state The state of the business using the toll-free number. + * + * @return $this + */ + public function setState(string $state): static + { + if (is_null($state)) { + throw new InvalidArgumentException('non-nullable state cannot be null'); + } + if ((mb_strlen($state) > 500)) { + throw new InvalidArgumentException('invalid length for $state when calling Address., must be smaller than or equal to 500.'); + } + if ((mb_strlen($state) < 1)) { + throw new InvalidArgumentException('invalid length for $state when calling Address., must be bigger than or equal to 1.'); + } + + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets zip + * + * @return string + */ + public function getZip(): string + { + return $this->container['zip']; + } + + /** + * Sets zip + * + * @param string $zip The zip of the business using the toll-free number. + * + * @return $this + */ + public function setZip(string $zip): static + { + if (is_null($zip)) { + throw new InvalidArgumentException('non-nullable zip cannot be null'); + } + + if ((!preg_match("/[- A-Za-z0-9]{0,500}/", ObjectSerializer::toString($zip)))) { + throw new InvalidArgumentException("invalid value for \$zip when calling Address., must conform to the pattern /[- A-Za-z0-9]{0,500}/."); + } + + $this->container['zip'] = $zip; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl(): string + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url The website of the business using the toll-free number. + * + * @return $this + */ + public function setUrl(string $url): static + { + if (is_null($url)) { + throw new InvalidArgumentException('non-nullable url cannot be null'); + } + if ((mb_strlen($url) > 500)) { + throw new InvalidArgumentException('invalid length for $url when calling Address., must be smaller than or equal to 500.'); + } + if ((mb_strlen($url) < 1)) { + throw new InvalidArgumentException('invalid length for $url when calling Address., must be bigger than or equal to 1.'); + } + + $this->container['url'] = $url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/AnswerCallback.php b/src/Model/AnswerCallback.php new file mode 100644 index 00000000..f2724e0e --- /dev/null +++ b/src/Model/AnswerCallback.php @@ -0,0 +1,855 @@ + + */ +class AnswerCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'answerCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_id' => 'string', + 'call_url' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'tag' => 'string', + 'machine_detection_result' => '\OpenAPI\Client\Model\MachineDetectionResult' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'call_url' => 'uri', + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'tag' => null, + 'machine_detection_result' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'call_url' => false, + 'enqueued_time' => true, + 'start_time' => false, + 'answer_time' => true, + 'tag' => true, + 'machine_detection_result' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'call_url' => 'callUrl', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'tag' => 'tag', + 'machine_detection_result' => 'machineDetectionResult' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'call_url' => 'setCallUrl', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'tag' => 'setTag', + 'machine_detection_result' => 'setMachineDetectionResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'call_url' => 'getCallUrl', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'tag' => 'getTag', + 'machine_detection_result' => 'getMachineDetectionResult' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('machine_detection_result', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Time the call was answered, in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets machine_detection_result + * + * @return \OpenAPI\Client\Model\MachineDetectionResult|null + */ + public function getMachineDetectionResult(): ?\OpenAPI\Client\Model\MachineDetectionResult + { + return $this->container['machine_detection_result']; + } + + /** + * Sets machine_detection_result + * + * @param \OpenAPI\Client\Model\MachineDetectionResult|null $machine_detection_result machine_detection_result + * + * @return $this + */ + public function setMachineDetectionResult(?\OpenAPI\Client\Model\MachineDetectionResult $machine_detection_result): static + { + if (is_null($machine_detection_result)) { + array_push($this->openAPINullablesSetToNull, 'machine_detection_result'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('machine_detection_result', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['machine_detection_result'] = $machine_detection_result; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/AsyncLookupRequest.php b/src/Model/AsyncLookupRequest.php new file mode 100644 index 00000000..576d182d --- /dev/null +++ b/src/Model/AsyncLookupRequest.php @@ -0,0 +1,389 @@ + + */ +class AsyncLookupRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'asyncLookupRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'phone_numbers' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'phone_numbers' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'phone_numbers' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'phone_numbers' => 'phoneNumbers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'phone_numbers' => 'setPhoneNumbers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'phone_numbers' => 'getPhoneNumbers' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('phone_numbers', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['phone_numbers'] === null) { + $invalidProperties[] = "'phone_numbers' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets phone_numbers + * + * @return string[] + */ + public function getPhoneNumbers(): array + { + return $this->container['phone_numbers']; + } + + /** + * Sets phone_numbers + * + * @param string[] $phone_numbers Telephone numbers in E.164 format. + * + * @return $this + */ + public function setPhoneNumbers(array $phone_numbers): static + { + if (is_null($phone_numbers)) { + throw new InvalidArgumentException('non-nullable phone_numbers cannot be null'); + } + + + $this->container['phone_numbers'] = $phone_numbers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/BlockedWebhook.php b/src/Model/BlockedWebhook.php new file mode 100644 index 00000000..91f5b712 --- /dev/null +++ b/src/Model/BlockedWebhook.php @@ -0,0 +1,576 @@ + + */ +class BlockedWebhook implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'blockedWebhook'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'account_id' => 'string', + 'phone_number' => 'string', + 'status' => '\OpenAPI\Client\Model\TfvCallbackStatusEnum', + 'internal_ticket_number' => 'string', + 'blocked' => 'bool', + 'blocked_reason' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'account_id' => null, + 'phone_number' => null, + 'status' => null, + 'internal_ticket_number' => null, + 'blocked' => null, + 'blocked_reason' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'account_id' => false, + 'phone_number' => false, + 'status' => false, + 'internal_ticket_number' => false, + 'blocked' => false, + 'blocked_reason' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'account_id' => 'accountId', + 'phone_number' => 'phoneNumber', + 'status' => 'status', + 'internal_ticket_number' => 'internalTicketNumber', + 'blocked' => 'blocked', + 'blocked_reason' => 'blockedReason' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'account_id' => 'setAccountId', + 'phone_number' => 'setPhoneNumber', + 'status' => 'setStatus', + 'internal_ticket_number' => 'setInternalTicketNumber', + 'blocked' => 'setBlocked', + 'blocked_reason' => 'setBlockedReason' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'account_id' => 'getAccountId', + 'phone_number' => 'getPhoneNumber', + 'status' => 'getStatus', + 'internal_ticket_number' => 'getInternalTicketNumber', + 'blocked' => 'getBlocked', + 'blocked_reason' => 'getBlockedReason' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('phone_number', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('internal_ticket_number', $data ?? [], null); + $this->setIfExists('blocked', $data ?? [], null); + $this->setIfExists('blocked_reason', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) > 12)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be smaller than or equal to 12."; + } + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) < 12)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be bigger than or equal to 12."; + } + + if (!is_null($this->container['phone_number']) && !preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", $this->container['phone_number'])) { + $invalidProperties[] = "invalid value for 'phone_number', must be conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id User's account ID. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets phone_number + * + * @return string|null + */ + public function getPhoneNumber(): ?string + { + return $this->container['phone_number']; + } + + /** + * Sets phone_number + * + * @param string|null $phone_number Toll-free telephone number in E.164 format. + * + * @return $this + */ + public function setPhoneNumber(?string $phone_number): static + { + if (is_null($phone_number)) { + throw new InvalidArgumentException('non-nullable phone_number cannot be null'); + } + if ((mb_strlen($phone_number) > 12)) { + throw new InvalidArgumentException('invalid length for $phone_number when calling BlockedWebhook., must be smaller than or equal to 12.'); + } + if ((mb_strlen($phone_number) < 12)) { + throw new InvalidArgumentException('invalid length for $phone_number when calling BlockedWebhook., must be bigger than or equal to 12.'); + } + if ((!preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", ObjectSerializer::toString($phone_number)))) { + throw new InvalidArgumentException("invalid value for \$phone_number when calling BlockedWebhook., must conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."); + } + + $this->container['phone_number'] = $phone_number; + + return $this; + } + + /** + * Gets status + * + * @return \OpenAPI\Client\Model\TfvCallbackStatusEnum|null + */ + public function getStatus(): ?\OpenAPI\Client\Model\TfvCallbackStatusEnum + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\TfvCallbackStatusEnum|null $status status + * + * @return $this + */ + public function setStatus(?\OpenAPI\Client\Model\TfvCallbackStatusEnum $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets internal_ticket_number + * + * @return string|null + */ + public function getInternalTicketNumber(): ?string + { + return $this->container['internal_ticket_number']; + } + + /** + * Sets internal_ticket_number + * + * @param string|null $internal_ticket_number Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. + * + * @return $this + */ + public function setInternalTicketNumber(?string $internal_ticket_number): static + { + if (is_null($internal_ticket_number)) { + throw new InvalidArgumentException('non-nullable internal_ticket_number cannot be null'); + } + $this->container['internal_ticket_number'] = $internal_ticket_number; + + return $this; + } + + /** + * Gets blocked + * + * @return bool|null + */ + public function getBlocked(): ?bool + { + return $this->container['blocked']; + } + + /** + * Sets blocked + * + * @param bool|null $blocked Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. + * + * @return $this + */ + public function setBlocked(?bool $blocked): static + { + if (is_null($blocked)) { + throw new InvalidArgumentException('non-nullable blocked cannot be null'); + } + $this->container['blocked'] = $blocked; + + return $this; + } + + /** + * Gets blocked_reason + * + * @return string|null + */ + public function getBlockedReason(): ?string + { + return $this->container['blocked_reason']; + } + + /** + * Sets blocked_reason + * + * @param string|null $blocked_reason The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. + * + * @return $this + */ + public function setBlockedReason(?string $blocked_reason): static + { + if (is_null($blocked_reason)) { + throw new InvalidArgumentException('non-nullable blocked_reason cannot be null'); + } + $this->container['blocked_reason'] = $blocked_reason; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/BridgeCompleteCallback.php b/src/Model/BridgeCompleteCallback.php new file mode 100644 index 00000000..3c65a627 --- /dev/null +++ b/src/Model/BridgeCompleteCallback.php @@ -0,0 +1,930 @@ + + */ +class BridgeCompleteCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'bridgeCompleteCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_id' => 'string', + 'call_url' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'tag' => 'string', + 'cause' => 'string', + 'error_message' => 'string', + 'error_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'call_url' => 'uri', + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'tag' => null, + 'cause' => null, + 'error_message' => null, + 'error_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'call_url' => false, + 'enqueued_time' => true, + 'start_time' => false, + 'answer_time' => true, + 'tag' => true, + 'cause' => false, + 'error_message' => true, + 'error_id' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'call_url' => 'callUrl', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'tag' => 'tag', + 'cause' => 'cause', + 'error_message' => 'errorMessage', + 'error_id' => 'errorId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'call_url' => 'setCallUrl', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'tag' => 'setTag', + 'cause' => 'setCause', + 'error_message' => 'setErrorMessage', + 'error_id' => 'setErrorId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'call_url' => 'getCallUrl', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'tag' => 'getTag', + 'cause' => 'getCause', + 'error_message' => 'getErrorMessage', + 'error_id' => 'getErrorId' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('cause', $data ?? [], null); + $this->setIfExists('error_message', $data ?? [], null); + $this->setIfExists('error_id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Time the call was answered, in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets cause + * + * @return string|null + */ + public function getCause(): ?string + { + return $this->container['cause']; + } + + /** + * Sets cause + * + * @param string|null $cause Reason the call failed - hangup, busy, timeout, cancel, rejected, callback-error, invalid-bxml, application-error, account-limit, node-capacity-exceeded, error, or unknown. + * + * @return $this + */ + public function setCause(?string $cause): static + { + if (is_null($cause)) { + throw new InvalidArgumentException('non-nullable cause cannot be null'); + } + $this->container['cause'] = $cause; + + return $this; + } + + /** + * Gets error_message + * + * @return string|null + */ + public function getErrorMessage(): ?string + { + return $this->container['error_message']; + } + + /** + * Sets error_message + * + * @param string|null $error_message Text explaining the reason that caused the call to fail in case of errors. + * + * @return $this + */ + public function setErrorMessage(?string $error_message): static + { + if (is_null($error_message)) { + array_push($this->openAPINullablesSetToNull, 'error_message'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('error_message', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['error_message'] = $error_message; + + return $this; + } + + /** + * Gets error_id + * + * @return string|null + */ + public function getErrorId(): ?string + { + return $this->container['error_id']; + } + + /** + * Sets error_id + * + * @param string|null $error_id Bandwidth's internal id that references the error event. + * + * @return $this + */ + public function setErrorId(?string $error_id): static + { + if (is_null($error_id)) { + array_push($this->openAPINullablesSetToNull, 'error_id'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('error_id', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['error_id'] = $error_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/BridgeTargetCompleteCallback.php b/src/Model/BridgeTargetCompleteCallback.php new file mode 100644 index 00000000..f0248349 --- /dev/null +++ b/src/Model/BridgeTargetCompleteCallback.php @@ -0,0 +1,814 @@ + + */ +class BridgeTargetCompleteCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'bridgeTargetCompleteCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_id' => 'string', + 'call_url' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'call_url' => 'uri', + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'tag' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'call_url' => false, + 'enqueued_time' => true, + 'start_time' => false, + 'answer_time' => true, + 'tag' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'call_url' => 'callUrl', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'call_url' => 'setCallUrl', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'call_url' => 'getCallUrl', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'tag' => 'getTag' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Time the call was answered, in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/BrtcError.php b/src/Model/BrtcError.php new file mode 100644 index 00000000..a0fa5b5d --- /dev/null +++ b/src/Model/BrtcError.php @@ -0,0 +1,526 @@ + + */ +class BrtcError implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'brtcError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'id' => 'string', + 'type' => 'string', + 'description' => 'string', + 'code' => 'string', + 'source' => '\OpenAPI\Client\Model\BrtcErrorSource' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'id' => 'uuid', + 'type' => null, + 'description' => null, + 'code' => null, + 'source' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'id' => false, + 'type' => false, + 'description' => false, + 'code' => false, + 'source' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'id' => 'id', + 'type' => 'type', + 'description' => 'description', + 'code' => 'code', + 'source' => 'source' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'id' => 'setId', + 'type' => 'setType', + 'description' => 'setDescription', + 'code' => 'setCode', + 'source' => 'setSource' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'id' => 'getId', + 'type' => 'getType', + 'description' => 'getDescription', + 'code' => 'getCode', + 'source' => 'getSource' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId(): ?string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id A unique identifier for the error. + * + * @return $this + */ + public function setId(?string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType(): string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of error. + * + * @return $this + */ + public function setType(string $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription(): string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description A description of the error. + * + * @return $this + */ + public function setDescription(string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets code + * + * @return string|null + */ + public function getCode(): ?string + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code A code that uniquely identifies the error. + * + * @return $this + */ + public function setCode(?string $code): static + { + if (is_null($code)) { + throw new InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets source + * + * @return \OpenAPI\Client\Model\BrtcErrorSource|null + */ + public function getSource(): ?\OpenAPI\Client\Model\BrtcErrorSource + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param \OpenAPI\Client\Model\BrtcErrorSource|null $source source + * + * @return $this + */ + public function setSource(?\OpenAPI\Client\Model\BrtcErrorSource $source): static + { + if (is_null($source)) { + throw new InvalidArgumentException('non-nullable source cannot be null'); + } + $this->container['source'] = $source; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/BrtcErrorResponse.php b/src/Model/BrtcErrorResponse.php new file mode 100644 index 00000000..4b26c434 --- /dev/null +++ b/src/Model/BrtcErrorResponse.php @@ -0,0 +1,468 @@ + + */ +class BrtcErrorResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'brtcErrorResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'links' => '\OpenAPI\Client\Model\BrtcLink[]', + 'data' => 'object', + 'errors' => '\OpenAPI\Client\Model\BrtcError[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'links' => null, + 'data' => null, + 'errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'links' => false, + 'data' => true, + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'links' => 'links', + 'data' => 'data', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'links' => 'setLinks', + 'data' => 'setData', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'links' => 'getLinks', + 'data' => 'getData', + 'errors' => 'getErrors' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['links'] === null) { + $invalidProperties[] = "'links' can't be null"; + } + if ($this->container['data'] === null && !$this->isNullableSetToNull('data')) { + $invalidProperties[] = "'data' is required"; + } + if ($this->container['errors'] === null) { + $invalidProperties[] = "'errors' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets links + * + * @return \OpenAPI\Client\Model\BrtcLink[] + */ + public function getLinks(): array + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \OpenAPI\Client\Model\BrtcLink[] $links links + * + * @return $this + */ + public function setLinks(array $links): static + { + if (is_null($links)) { + throw new InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + + /** + * Gets data + * + * @return object|null + */ + public function getData(): ?object + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param object|null $data data + * + * @return $this + */ + public function setData(?object $data): static + { + if (is_null($data)) { + array_push($this->openAPINullablesSetToNull, 'data'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('data', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets errors + * + * @return \OpenAPI\Client\Model\BrtcError[] + */ + public function getErrors(): array + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \OpenAPI\Client\Model\BrtcError[] $errors errors + * + * @return $this + */ + public function setErrors(array $errors): static + { + if (is_null($errors)) { + throw new InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/BrtcErrorSource.php b/src/Model/BrtcErrorSource.php new file mode 100644 index 00000000..db505dcb --- /dev/null +++ b/src/Model/BrtcErrorSource.php @@ -0,0 +1,486 @@ + + */ +class BrtcErrorSource implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'brtcErrorSource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'parameter' => 'string', + 'field' => 'string', + 'header' => 'string', + 'reference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'parameter' => null, + 'field' => null, + 'header' => null, + 'reference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'parameter' => false, + 'field' => false, + 'header' => false, + 'reference' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'parameter' => 'parameter', + 'field' => 'field', + 'header' => 'header', + 'reference' => 'reference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'parameter' => 'setParameter', + 'field' => 'setField', + 'header' => 'setHeader', + 'reference' => 'setReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'parameter' => 'getParameter', + 'field' => 'getField', + 'header' => 'getHeader', + 'reference' => 'getReference' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('parameter', $data ?? [], null); + $this->setIfExists('field', $data ?? [], null); + $this->setIfExists('header', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets parameter + * + * @return string|null + */ + public function getParameter(): ?string + { + return $this->container['parameter']; + } + + /** + * Sets parameter + * + * @param string|null $parameter The URI parameter that caused the error. + * + * @return $this + */ + public function setParameter(?string $parameter): static + { + if (is_null($parameter)) { + throw new InvalidArgumentException('non-nullable parameter cannot be null'); + } + $this->container['parameter'] = $parameter; + + return $this; + } + + /** + * Gets field + * + * @return string|null + */ + public function getField(): ?string + { + return $this->container['field']; + } + + /** + * Sets field + * + * @param string|null $field The request body field that caused the error. + * + * @return $this + */ + public function setField(?string $field): static + { + if (is_null($field)) { + throw new InvalidArgumentException('non-nullable field cannot be null'); + } + $this->container['field'] = $field; + + return $this; + } + + /** + * Gets header + * + * @return string|null + */ + public function getHeader(): ?string + { + return $this->container['header']; + } + + /** + * Sets header + * + * @param string|null $header The header that caused the error. + * + * @return $this + */ + public function setHeader(?string $header): static + { + if (is_null($header)) { + throw new InvalidArgumentException('non-nullable header cannot be null'); + } + $this->container['header'] = $header; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference(): ?string + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference The resource ID or path to the resource (or non-existent resource) causing the error. + * + * @return $this + */ + public function setReference(?string $reference): static + { + if (is_null($reference)) { + throw new InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/BrtcLink.php b/src/Model/BrtcLink.php new file mode 100644 index 00000000..347f4d30 --- /dev/null +++ b/src/Model/BrtcLink.php @@ -0,0 +1,452 @@ + + */ +class BrtcLink implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'brtcLink'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'href' => 'string', + 'rel' => 'string', + 'method' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'href' => null, + 'rel' => null, + 'method' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'href' => false, + 'rel' => false, + 'method' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'href' => 'href', + 'rel' => 'rel', + 'method' => 'method' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'href' => 'setHref', + 'rel' => 'setRel', + 'method' => 'setMethod' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'href' => 'getHref', + 'rel' => 'getRel', + 'method' => 'getMethod' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('href', $data ?? [], null); + $this->setIfExists('rel', $data ?? [], null); + $this->setIfExists('method', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets href + * + * @return string|null + */ + public function getHref(): ?string + { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string|null $href The full URL of the link. + * + * @return $this + */ + public function setHref(?string $href): static + { + if (is_null($href)) { + throw new InvalidArgumentException('non-nullable href cannot be null'); + } + $this->container['href'] = $href; + + return $this; + } + + /** + * Gets rel + * + * @return string|null + */ + public function getRel(): ?string + { + return $this->container['rel']; + } + + /** + * Sets rel + * + * @param string|null $rel The relationship of the link to the current resource. + * + * @return $this + */ + public function setRel(?string $rel): static + { + if (is_null($rel)) { + throw new InvalidArgumentException('non-nullable rel cannot be null'); + } + $this->container['rel'] = $rel; + + return $this; + } + + /** + * Gets method + * + * @return string|null + */ + public function getMethod(): ?string + { + return $this->container['method']; + } + + /** + * Sets method + * + * @param string|null $method The HTTP method to use when making the request. + * + * @return $this + */ + public function setMethod(?string $method): static + { + if (is_null($method)) { + throw new InvalidArgumentException('non-nullable method cannot be null'); + } + $this->container['method'] = $method; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/BusinessEntityTypeEnum.php b/src/Model/BusinessEntityTypeEnum.php new file mode 100644 index 00000000..93e9865a --- /dev/null +++ b/src/Model/BusinessEntityTypeEnum.php @@ -0,0 +1,52 @@ + + */ +class CallRecordingMetadata implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'callRecordingMetadata'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'application_id' => 'string', + 'account_id' => 'string', + 'call_id' => 'string', + 'parent_call_id' => 'string', + 'recording_id' => 'string', + 'to' => 'string', + 'from' => 'string', + 'transfer_caller_id' => 'string', + 'transfer_to' => 'string', + 'duration' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'channels' => 'int', + 'start_time' => '\DateTime', + 'end_time' => '\DateTime', + 'file_format' => '\OpenAPI\Client\Model\FileFormatEnum', + 'status' => 'string', + 'media_url' => 'string', + 'transcription' => '\OpenAPI\Client\Model\RecordingTranscriptionMetadata', + 'recording_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'application_id' => null, + 'account_id' => null, + 'call_id' => null, + 'parent_call_id' => null, + 'recording_id' => null, + 'to' => null, + 'from' => null, + 'transfer_caller_id' => null, + 'transfer_to' => null, + 'duration' => null, + 'direction' => null, + 'channels' => 'int32', + 'start_time' => 'date-time', + 'end_time' => 'date-time', + 'file_format' => null, + 'status' => null, + 'media_url' => 'uri', + 'transcription' => null, + 'recording_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'application_id' => false, + 'account_id' => false, + 'call_id' => false, + 'parent_call_id' => false, + 'recording_id' => false, + 'to' => false, + 'from' => false, + 'transfer_caller_id' => false, + 'transfer_to' => false, + 'duration' => false, + 'direction' => false, + 'channels' => false, + 'start_time' => false, + 'end_time' => false, + 'file_format' => false, + 'status' => false, + 'media_url' => true, + 'transcription' => true, + 'recording_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'application_id' => 'applicationId', + 'account_id' => 'accountId', + 'call_id' => 'callId', + 'parent_call_id' => 'parentCallId', + 'recording_id' => 'recordingId', + 'to' => 'to', + 'from' => 'from', + 'transfer_caller_id' => 'transferCallerId', + 'transfer_to' => 'transferTo', + 'duration' => 'duration', + 'direction' => 'direction', + 'channels' => 'channels', + 'start_time' => 'startTime', + 'end_time' => 'endTime', + 'file_format' => 'fileFormat', + 'status' => 'status', + 'media_url' => 'mediaUrl', + 'transcription' => 'transcription', + 'recording_name' => 'recordingName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'application_id' => 'setApplicationId', + 'account_id' => 'setAccountId', + 'call_id' => 'setCallId', + 'parent_call_id' => 'setParentCallId', + 'recording_id' => 'setRecordingId', + 'to' => 'setTo', + 'from' => 'setFrom', + 'transfer_caller_id' => 'setTransferCallerId', + 'transfer_to' => 'setTransferTo', + 'duration' => 'setDuration', + 'direction' => 'setDirection', + 'channels' => 'setChannels', + 'start_time' => 'setStartTime', + 'end_time' => 'setEndTime', + 'file_format' => 'setFileFormat', + 'status' => 'setStatus', + 'media_url' => 'setMediaUrl', + 'transcription' => 'setTranscription', + 'recording_name' => 'setRecordingName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'application_id' => 'getApplicationId', + 'account_id' => 'getAccountId', + 'call_id' => 'getCallId', + 'parent_call_id' => 'getParentCallId', + 'recording_id' => 'getRecordingId', + 'to' => 'getTo', + 'from' => 'getFrom', + 'transfer_caller_id' => 'getTransferCallerId', + 'transfer_to' => 'getTransferTo', + 'duration' => 'getDuration', + 'direction' => 'getDirection', + 'channels' => 'getChannels', + 'start_time' => 'getStartTime', + 'end_time' => 'getEndTime', + 'file_format' => 'getFileFormat', + 'status' => 'getStatus', + 'media_url' => 'getMediaUrl', + 'transcription' => 'getTranscription', + 'recording_name' => 'getRecordingName' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('parent_call_id', $data ?? [], null); + $this->setIfExists('recording_id', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('transfer_caller_id', $data ?? [], null); + $this->setIfExists('transfer_to', $data ?? [], null); + $this->setIfExists('duration', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('channels', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('end_time', $data ?? [], null); + $this->setIfExists('file_format', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('media_url', $data ?? [], null); + $this->setIfExists('transcription', $data ?? [], null); + $this->setIfExists('recording_name', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets parent_call_id + * + * @return string|null + */ + public function getParentCallId(): ?string + { + return $this->container['parent_call_id']; + } + + /** + * Sets parent_call_id + * + * @param string|null $parent_call_id (optional) If the event is related to the B leg of a , the call id of the original call leg that executed the . Otherwise, this field will not be present. + * + * @return $this + */ + public function setParentCallId(?string $parent_call_id): static + { + if (is_null($parent_call_id)) { + throw new InvalidArgumentException('non-nullable parent_call_id cannot be null'); + } + $this->container['parent_call_id'] = $parent_call_id; + + return $this; + } + + /** + * Gets recording_id + * + * @return string|null + */ + public function getRecordingId(): ?string + { + return $this->container['recording_id']; + } + + /** + * Sets recording_id + * + * @param string|null $recording_id The unique ID of this recording + * + * @return $this + */ + public function setRecordingId(?string $recording_id): static + { + if (is_null($recording_id)) { + throw new InvalidArgumentException('non-nullable recording_id cannot be null'); + } + $this->container['recording_id'] = $recording_id; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets transfer_caller_id + * + * @return string|null + */ + public function getTransferCallerId(): ?string + { + return $this->container['transfer_caller_id']; + } + + /** + * Sets transfer_caller_id + * + * @param string|null $transfer_caller_id The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferCallerId(?string $transfer_caller_id): static + { + if (is_null($transfer_caller_id)) { + throw new InvalidArgumentException('non-nullable transfer_caller_id cannot be null'); + } + $this->container['transfer_caller_id'] = $transfer_caller_id; + + return $this; + } + + /** + * Gets transfer_to + * + * @return string|null + */ + public function getTransferTo(): ?string + { + return $this->container['transfer_to']; + } + + /** + * Sets transfer_to + * + * @param string|null $transfer_to The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferTo(?string $transfer_to): static + { + if (is_null($transfer_to)) { + throw new InvalidArgumentException('non-nullable transfer_to cannot be null'); + } + $this->container['transfer_to'] = $transfer_to; + + return $this; + } + + /** + * Gets duration + * + * @return string|null + */ + public function getDuration(): ?string + { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param string|null $duration The duration of the recording in ISO-8601 format + * + * @return $this + */ + public function setDuration(?string $duration): static + { + if (is_null($duration)) { + throw new InvalidArgumentException('non-nullable duration cannot be null'); + } + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets channels + * + * @return int|null + */ + public function getChannels(): ?int + { + return $this->container['channels']; + } + + /** + * Sets channels + * + * @param int|null $channels Always `1` for conference recordings; multi-channel recordings are not supported on conferences. + * + * @return $this + */ + public function setChannels(?int $channels): static + { + if (is_null($channels)) { + throw new InvalidArgumentException('non-nullable channels cannot be null'); + } + $this->container['channels'] = $channels; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets end_time + * + * @return \DateTime|null + */ + public function getEndTime(): ?\DateTime + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param \DateTime|null $end_time The time that the recording ended in ISO-8601 format + * + * @return $this + */ + public function setEndTime(?\DateTime $end_time): static + { + if (is_null($end_time)) { + throw new InvalidArgumentException('non-nullable end_time cannot be null'); + } + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets file_format + * + * @return \OpenAPI\Client\Model\FileFormatEnum|null + */ + public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum + { + return $this->container['file_format']; + } + + /** + * Sets file_format + * + * @param \OpenAPI\Client\Model\FileFormatEnum|null $file_format file_format + * + * @return $this + */ + public function setFileFormat(?\OpenAPI\Client\Model\FileFormatEnum $file_format): static + { + if (is_null($file_format)) { + throw new InvalidArgumentException('non-nullable file_format cannot be null'); + } + $this->container['file_format'] = $file_format; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus(): ?string + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. + * + * @return $this + */ + public function setStatus(?string $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets media_url + * + * @return string|null + */ + public function getMediaUrl(): ?string + { + return $this->container['media_url']; + } + + /** + * Sets media_url + * + * @param string|null $media_url The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. + * + * @return $this + */ + public function setMediaUrl(?string $media_url): static + { + if (is_null($media_url)) { + array_push($this->openAPINullablesSetToNull, 'media_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('media_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['media_url'] = $media_url; + + return $this; + } + + /** + * Gets transcription + * + * @return \OpenAPI\Client\Model\RecordingTranscriptionMetadata|null + */ + public function getTranscription(): ?\OpenAPI\Client\Model\RecordingTranscriptionMetadata + { + return $this->container['transcription']; + } + + /** + * Sets transcription + * + * @param \OpenAPI\Client\Model\RecordingTranscriptionMetadata|null $transcription transcription + * + * @return $this + */ + public function setTranscription(?\OpenAPI\Client\Model\RecordingTranscriptionMetadata $transcription): static + { + if (is_null($transcription)) { + array_push($this->openAPINullablesSetToNull, 'transcription'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('transcription', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['transcription'] = $transcription; + + return $this; + } + + /** + * Gets recording_name + * + * @return string|null + */ + public function getRecordingName(): ?string + { + return $this->container['recording_name']; + } + + /** + * Sets recording_name + * + * @param string|null $recording_name A name to identify this recording. + * + * @return $this + */ + public function setRecordingName(?string $recording_name): static + { + if (is_null($recording_name)) { + throw new InvalidArgumentException('non-nullable recording_name cannot be null'); + } + $this->container['recording_name'] = $recording_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CallState.php b/src/Model/CallState.php new file mode 100644 index 00000000..e58c7f2a --- /dev/null +++ b/src/Model/CallState.php @@ -0,0 +1,1032 @@ + + */ +class CallState implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'callState'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'application_id' => 'string', + 'account_id' => 'string', + 'call_id' => 'string', + 'parent_call_id' => 'string', + 'to' => 'string', + 'from' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'state' => 'string', + 'stir_shaken' => 'array', + 'identity' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'end_time' => '\DateTime', + 'disconnect_cause' => 'string', + 'error_message' => 'string', + 'error_id' => 'string', + 'last_update' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'application_id' => null, + 'account_id' => null, + 'call_id' => null, + 'parent_call_id' => null, + 'to' => null, + 'from' => null, + 'direction' => null, + 'state' => null, + 'stir_shaken' => null, + 'identity' => null, + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'end_time' => 'date-time', + 'disconnect_cause' => null, + 'error_message' => null, + 'error_id' => null, + 'last_update' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'application_id' => false, + 'account_id' => false, + 'call_id' => false, + 'parent_call_id' => true, + 'to' => false, + 'from' => false, + 'direction' => false, + 'state' => false, + 'stir_shaken' => true, + 'identity' => true, + 'enqueued_time' => true, + 'start_time' => true, + 'answer_time' => true, + 'end_time' => true, + 'disconnect_cause' => true, + 'error_message' => true, + 'error_id' => true, + 'last_update' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'application_id' => 'applicationId', + 'account_id' => 'accountId', + 'call_id' => 'callId', + 'parent_call_id' => 'parentCallId', + 'to' => 'to', + 'from' => 'from', + 'direction' => 'direction', + 'state' => 'state', + 'stir_shaken' => 'stirShaken', + 'identity' => 'identity', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'end_time' => 'endTime', + 'disconnect_cause' => 'disconnectCause', + 'error_message' => 'errorMessage', + 'error_id' => 'errorId', + 'last_update' => 'lastUpdate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'application_id' => 'setApplicationId', + 'account_id' => 'setAccountId', + 'call_id' => 'setCallId', + 'parent_call_id' => 'setParentCallId', + 'to' => 'setTo', + 'from' => 'setFrom', + 'direction' => 'setDirection', + 'state' => 'setState', + 'stir_shaken' => 'setStirShaken', + 'identity' => 'setIdentity', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'end_time' => 'setEndTime', + 'disconnect_cause' => 'setDisconnectCause', + 'error_message' => 'setErrorMessage', + 'error_id' => 'setErrorId', + 'last_update' => 'setLastUpdate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'application_id' => 'getApplicationId', + 'account_id' => 'getAccountId', + 'call_id' => 'getCallId', + 'parent_call_id' => 'getParentCallId', + 'to' => 'getTo', + 'from' => 'getFrom', + 'direction' => 'getDirection', + 'state' => 'getState', + 'stir_shaken' => 'getStirShaken', + 'identity' => 'getIdentity', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'end_time' => 'getEndTime', + 'disconnect_cause' => 'getDisconnectCause', + 'error_message' => 'getErrorMessage', + 'error_id' => 'getErrorId', + 'last_update' => 'getLastUpdate' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('parent_call_id', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('stir_shaken', $data ?? [], null); + $this->setIfExists('identity', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('end_time', $data ?? [], null); + $this->setIfExists('disconnect_cause', $data ?? [], null); + $this->setIfExists('error_message', $data ?? [], null); + $this->setIfExists('error_id', $data ?? [], null); + $this->setIfExists('last_update', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The application id associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The account id associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The programmable voice API call ID. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets parent_call_id + * + * @return string|null + */ + public function getParentCallId(): ?string + { + return $this->container['parent_call_id']; + } + + /** + * Sets parent_call_id + * + * @param string|null $parent_call_id The A-leg call id, set only if this call is the B-leg of a [``](/docs/voice/bxml/transfer). + * + * @return $this + */ + public function setParentCallId(?string $parent_call_id): static + { + if (is_null($parent_call_id)) { + array_push($this->openAPINullablesSetToNull, 'parent_call_id'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('parent_call_id', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['parent_call_id'] = $parent_call_id; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555), or if the call was to a SIP URI, the SIP URI. + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The phone number that made the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets state + * + * @return string|null + */ + public function getState(): ?string + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param string|null $state The current state of the call. Current possible values are `queued`, `initiated`, `answered` and `disconnected`. Additional states may be added in the future, so your application must be tolerant of unknown values. + * + * @return $this + */ + public function setState(?string $state): static + { + if (is_null($state)) { + throw new InvalidArgumentException('non-nullable state cannot be null'); + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets stir_shaken + * + * @return array|null + */ + public function getStirShaken(): ?array + { + return $this->container['stir_shaken']; + } + + /** + * Sets stir_shaken + * + * @param array|null $stir_shaken For inbound calls, the Bandwidth STIR/SHAKEN implementation will verify the information provided in the inbound invite request `Identity` header. The verification status is stored in the call state `stirShaken` property as follows. | Property | Description | |:------------------|:------------| | verstat | (optional) The verification status indicating whether the verification was successful or not. Possible values are `TN-Validation-Passed` or `TN-Validation-Failed`. | | attestationIndicator | (optional) The attestation level verified by Bandwidth. Possible values are `A` (full), `B` (partial) or `C` (gateway). | | originatingId | (optional) A unique origination identifier. | Note that these are common properties but that the `stirShaken` object is free form and can contain other key-value pairs. More information: [Understanding STIR/SHAKEN](https://www.bandwidth.com/regulations/stir-shaken). + * + * @return $this + */ + public function setStirShaken(?array $stir_shaken): static + { + if (is_null($stir_shaken)) { + array_push($this->openAPINullablesSetToNull, 'stir_shaken'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('stir_shaken', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['stir_shaken'] = $stir_shaken; + + return $this; + } + + /** + * Gets identity + * + * @return string|null + */ + public function getIdentity(): ?string + { + return $this->container['identity']; + } + + /** + * Sets identity + * + * @param string|null $identity The value of the `Identity` header from the inbound invite request. Only present for inbound calls and if the account is configured to forward this header. + * + * @return $this + */ + public function setIdentity(?string $identity): static + { + if (is_null($identity)) { + array_push($this->openAPINullablesSetToNull, 'identity'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('identity', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['identity'] = $identity; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time The time this call was placed in queue. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time The time the call was initiated, in ISO 8601 format. `null` if the call is still in your queue. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + array_push($this->openAPINullablesSetToNull, 'start_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('start_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Populated once the call has been answered, with the time in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets end_time + * + * @return \DateTime|null + */ + public function getEndTime(): ?\DateTime + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param \DateTime|null $end_time Populated once the call has ended, with the time in ISO 8601 format. + * + * @return $this + */ + public function setEndTime(?\DateTime $end_time): static + { + if (is_null($end_time)) { + array_push($this->openAPINullablesSetToNull, 'end_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('end_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets disconnect_cause + * + * @return string|null + */ + public function getDisconnectCause(): ?string + { + return $this->container['disconnect_cause']; + } + + /** + * Sets disconnect_cause + * + * @param string|null $disconnect_cause | Cause | Description | |:------|:------------| | `hangup`| One party hung up the call, a [``](../../bxml/verbs/hangup.md) verb was executed, or there was no more BXML to execute; it indicates that the call ended normally. | | `busy` | Callee was busy. | | `timeout` | Call wasn't answered before the `callTimeout` was reached. | | `cancel` | Call was cancelled by its originator while it was ringing. | | `rejected` | Call was rejected by the callee. | | `callback-error` | BXML callback couldn't be delivered to your callback server. | | `invalid-bxml` | Invalid BXML was returned in response to a callback. | | `application-error` | An unsupported action was tried on the call, e.g. trying to play a .ogg audio. | | `account-limit` | Account rate limits were reached. | | `node-capacity-exceeded` | System maximum capacity was reached. | | `error` | Some error not described in any of the other causes happened on the call. | | `unknown` | Unknown error happened on the call. | Note: This list is not exhaustive and other values can appear in the future. + * + * @return $this + */ + public function setDisconnectCause(?string $disconnect_cause): static + { + if (is_null($disconnect_cause)) { + array_push($this->openAPINullablesSetToNull, 'disconnect_cause'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('disconnect_cause', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['disconnect_cause'] = $disconnect_cause; + + return $this; + } + + /** + * Gets error_message + * + * @return string|null + */ + public function getErrorMessage(): ?string + { + return $this->container['error_message']; + } + + /** + * Sets error_message + * + * @param string|null $error_message Populated only if the call ended with an error, with text explaining the reason. + * + * @return $this + */ + public function setErrorMessage(?string $error_message): static + { + if (is_null($error_message)) { + array_push($this->openAPINullablesSetToNull, 'error_message'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('error_message', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['error_message'] = $error_message; + + return $this; + } + + /** + * Gets error_id + * + * @return string|null + */ + public function getErrorId(): ?string + { + return $this->container['error_id']; + } + + /** + * Sets error_id + * + * @param string|null $error_id Populated only if the call ended with an error, with a Bandwidth internal id that references the error event. + * + * @return $this + */ + public function setErrorId(?string $error_id): static + { + if (is_null($error_id)) { + array_push($this->openAPINullablesSetToNull, 'error_id'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('error_id', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['error_id'] = $error_id; + + return $this; + } + + /** + * Gets last_update + * + * @return \DateTime|null + */ + public function getLastUpdate(): ?\DateTime + { + return $this->container['last_update']; + } + + /** + * Sets last_update + * + * @param \DateTime|null $last_update The last time the call had a state update, in ISO 8601 format. + * + * @return $this + */ + public function setLastUpdate(?\DateTime $last_update): static + { + if (is_null($last_update)) { + throw new InvalidArgumentException('non-nullable last_update cannot be null'); + } + $this->container['last_update'] = $last_update; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CallStateEnum.php b/src/Model/CallStateEnum.php new file mode 100644 index 00000000..7103ec82 --- /dev/null +++ b/src/Model/CallStateEnum.php @@ -0,0 +1,46 @@ + + */ +class CallTranscription implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'callTranscription'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'detected_language' => '\OpenAPI\Client\Model\CallTranscriptionDetectedLanguageEnum', + 'track' => '\OpenAPI\Client\Model\CallTranscriptionTrackEnum', + 'transcript' => 'string', + 'confidence' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'detected_language' => null, + 'track' => null, + 'transcript' => null, + 'confidence' => 'double' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'detected_language' => false, + 'track' => false, + 'transcript' => false, + 'confidence' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'detected_language' => 'detectedLanguage', + 'track' => 'track', + 'transcript' => 'transcript', + 'confidence' => 'confidence' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'detected_language' => 'setDetectedLanguage', + 'track' => 'setTrack', + 'transcript' => 'setTranscript', + 'confidence' => 'setConfidence' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'detected_language' => 'getDetectedLanguage', + 'track' => 'getTrack', + 'transcript' => 'getTranscript', + 'confidence' => 'getConfidence' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('detected_language', $data ?? [], null); + $this->setIfExists('track', $data ?? [], null); + $this->setIfExists('transcript', $data ?? [], null); + $this->setIfExists('confidence', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['confidence']) && ($this->container['confidence'] > 1)) { + $invalidProperties[] = "invalid value for 'confidence', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['confidence']) && ($this->container['confidence'] < 0)) { + $invalidProperties[] = "invalid value for 'confidence', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets detected_language + * + * @return \OpenAPI\Client\Model\CallTranscriptionDetectedLanguageEnum|null + */ + public function getDetectedLanguage(): ?\OpenAPI\Client\Model\CallTranscriptionDetectedLanguageEnum + { + return $this->container['detected_language']; + } + + /** + * Sets detected_language + * + * @param \OpenAPI\Client\Model\CallTranscriptionDetectedLanguageEnum|null $detected_language detected_language + * + * @return $this + */ + public function setDetectedLanguage(?\OpenAPI\Client\Model\CallTranscriptionDetectedLanguageEnum $detected_language): static + { + if (is_null($detected_language)) { + throw new InvalidArgumentException('non-nullable detected_language cannot be null'); + } + $this->container['detected_language'] = $detected_language; + + return $this; + } + + /** + * Gets track + * + * @return \OpenAPI\Client\Model\CallTranscriptionTrackEnum|null + */ + public function getTrack(): ?\OpenAPI\Client\Model\CallTranscriptionTrackEnum + { + return $this->container['track']; + } + + /** + * Sets track + * + * @param \OpenAPI\Client\Model\CallTranscriptionTrackEnum|null $track track + * + * @return $this + */ + public function setTrack(?\OpenAPI\Client\Model\CallTranscriptionTrackEnum $track): static + { + if (is_null($track)) { + throw new InvalidArgumentException('non-nullable track cannot be null'); + } + $this->container['track'] = $track; + + return $this; + } + + /** + * Gets transcript + * + * @return string|null + */ + public function getTranscript(): ?string + { + return $this->container['transcript']; + } + + /** + * Sets transcript + * + * @param string|null $transcript The transcription itself. + * + * @return $this + */ + public function setTranscript(?string $transcript): static + { + if (is_null($transcript)) { + throw new InvalidArgumentException('non-nullable transcript cannot be null'); + } + $this->container['transcript'] = $transcript; + + return $this; + } + + /** + * Gets confidence + * + * @return float|null + */ + public function getConfidence(): ?float + { + return $this->container['confidence']; + } + + /** + * Sets confidence + * + * @param float|null $confidence How confident the transcription engine was in transcribing the associated audio (from `0` to `1`). + * + * @return $this + */ + public function setConfidence(?float $confidence): static + { + if (is_null($confidence)) { + throw new InvalidArgumentException('non-nullable confidence cannot be null'); + } + + if (($confidence > 1)) { + throw new InvalidArgumentException('invalid value for $confidence when calling CallTranscription., must be smaller than or equal to 1.'); + } + if (($confidence < 0)) { + throw new InvalidArgumentException('invalid value for $confidence when calling CallTranscription., must be bigger than or equal to 0.'); + } + + $this->container['confidence'] = $confidence; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CallTranscriptionDetectedLanguageEnum.php b/src/Model/CallTranscriptionDetectedLanguageEnum.php new file mode 100644 index 00000000..7ac107cf --- /dev/null +++ b/src/Model/CallTranscriptionDetectedLanguageEnum.php @@ -0,0 +1,48 @@ + + */ +class CallTranscriptionMetadata implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'callTranscriptionMetadata'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'transcription_id' => 'string', + 'transcription_name' => 'string', + 'transcription_url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'transcription_id' => null, + 'transcription_name' => null, + 'transcription_url' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'transcription_id' => false, + 'transcription_name' => false, + 'transcription_url' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'transcription_id' => 'transcriptionId', + 'transcription_name' => 'transcriptionName', + 'transcription_url' => 'transcriptionUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'transcription_id' => 'setTranscriptionId', + 'transcription_name' => 'setTranscriptionName', + 'transcription_url' => 'setTranscriptionUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'transcription_id' => 'getTranscriptionId', + 'transcription_name' => 'getTranscriptionName', + 'transcription_url' => 'getTranscriptionUrl' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('transcription_id', $data ?? [], null); + $this->setIfExists('transcription_name', $data ?? [], null); + $this->setIfExists('transcription_url', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets transcription_id + * + * @return string|null + */ + public function getTranscriptionId(): ?string + { + return $this->container['transcription_id']; + } + + /** + * Sets transcription_id + * + * @param string|null $transcription_id The programmable voice API transcription ID. + * + * @return $this + */ + public function setTranscriptionId(?string $transcription_id): static + { + if (is_null($transcription_id)) { + throw new InvalidArgumentException('non-nullable transcription_id cannot be null'); + } + $this->container['transcription_id'] = $transcription_id; + + return $this; + } + + /** + * Gets transcription_name + * + * @return string|null + */ + public function getTranscriptionName(): ?string + { + return $this->container['transcription_name']; + } + + /** + * Sets transcription_name + * + * @param string|null $transcription_name The programmable voice API transcription name. This name could be provided by the user when creating the transcription. + * + * @return $this + */ + public function setTranscriptionName(?string $transcription_name): static + { + if (is_null($transcription_name)) { + throw new InvalidArgumentException('non-nullable transcription_name cannot be null'); + } + $this->container['transcription_name'] = $transcription_name; + + return $this; + } + + /** + * Gets transcription_url + * + * @return string|null + */ + public function getTranscriptionUrl(): ?string + { + return $this->container['transcription_url']; + } + + /** + * Sets transcription_url + * + * @param string|null $transcription_url A URL that may be used to retrieve the transcription itself. This points to the [Get Call Transcription](/apis/voice-apis/voice/#tag/Transcriptions/operation/getRealTimeTranscription) endpoint. + * + * @return $this + */ + public function setTranscriptionUrl(?string $transcription_url): static + { + if (is_null($transcription_url)) { + throw new InvalidArgumentException('non-nullable transcription_url cannot be null'); + } + $this->container['transcription_url'] = $transcription_url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CallTranscriptionResponse.php b/src/Model/CallTranscriptionResponse.php new file mode 100644 index 00000000..13ccb616 --- /dev/null +++ b/src/Model/CallTranscriptionResponse.php @@ -0,0 +1,486 @@ + + */ +class CallTranscriptionResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'callTranscriptionResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'account_id' => 'string', + 'call_id' => 'string', + 'transcription_id' => 'string', + 'tracks' => '\OpenAPI\Client\Model\CallTranscription[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'account_id' => null, + 'call_id' => null, + 'transcription_id' => null, + 'tracks' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'account_id' => false, + 'call_id' => false, + 'transcription_id' => false, + 'tracks' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'account_id' => 'accountId', + 'call_id' => 'callId', + 'transcription_id' => 'transcriptionId', + 'tracks' => 'tracks' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'account_id' => 'setAccountId', + 'call_id' => 'setCallId', + 'transcription_id' => 'setTranscriptionId', + 'tracks' => 'setTracks' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'account_id' => 'getAccountId', + 'call_id' => 'getCallId', + 'transcription_id' => 'getTranscriptionId', + 'tracks' => 'getTracks' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('transcription_id', $data ?? [], null); + $this->setIfExists('tracks', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets transcription_id + * + * @return string|null + */ + public function getTranscriptionId(): ?string + { + return $this->container['transcription_id']; + } + + /** + * Sets transcription_id + * + * @param string|null $transcription_id The programmable voice API transcription ID. + * + * @return $this + */ + public function setTranscriptionId(?string $transcription_id): static + { + if (is_null($transcription_id)) { + throw new InvalidArgumentException('non-nullable transcription_id cannot be null'); + } + $this->container['transcription_id'] = $transcription_id; + + return $this; + } + + /** + * Gets tracks + * + * @return \OpenAPI\Client\Model\CallTranscription[]|null + */ + public function getTracks(): ?array + { + return $this->container['tracks']; + } + + /** + * Sets tracks + * + * @param \OpenAPI\Client\Model\CallTranscription[]|null $tracks tracks + * + * @return $this + */ + public function setTracks(?array $tracks): static + { + if (is_null($tracks)) { + throw new InvalidArgumentException('non-nullable tracks cannot be null'); + } + $this->container['tracks'] = $tracks; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CallTranscriptionTrackEnum.php b/src/Model/CallTranscriptionTrackEnum.php new file mode 100644 index 00000000..0c008e1b --- /dev/null +++ b/src/Model/CallTranscriptionTrackEnum.php @@ -0,0 +1,46 @@ + + */ +class Callback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = 'type'; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'callback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'time' => '\DateTime', + 'event_time' => '\DateTime', + 'type' => '\OpenAPI\Client\Model\InboundCallbackTypeEnum', + 'to' => 'string', + 'description' => 'string', + 'message' => '\OpenAPI\Client\Model\InboundCallbackMessage', + 'error_code' => 'int', + 'carrier_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'time' => 'date-time', + 'event_time' => 'date-time', + 'type' => null, + 'to' => null, + 'description' => null, + 'message' => null, + 'error_code' => null, + 'carrier_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'time' => false, + 'event_time' => false, + 'type' => false, + 'to' => false, + 'description' => false, + 'message' => false, + 'error_code' => false, + 'carrier_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'time' => 'time', + 'event_time' => 'eventTime', + 'type' => 'type', + 'to' => 'to', + 'description' => 'description', + 'message' => 'message', + 'error_code' => 'errorCode', + 'carrier_name' => 'carrierName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'time' => 'setTime', + 'event_time' => 'setEventTime', + 'type' => 'setType', + 'to' => 'setTo', + 'description' => 'setDescription', + 'message' => 'setMessage', + 'error_code' => 'setErrorCode', + 'carrier_name' => 'setCarrierName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'time' => 'getTime', + 'event_time' => 'getEventTime', + 'type' => 'getType', + 'to' => 'getTo', + 'description' => 'getDescription', + 'message' => 'getMessage', + 'error_code' => 'getErrorCode', + 'carrier_name' => 'getCarrierName' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + public const TYPE_MESSAGE_DELIVERED = 'message-delivered'; + public const TYPE_MESSAGE_FAILED = 'message-failed'; + public const TYPE_MESSAGE_READ = 'message-read'; + public const TYPE_MESSAGE_RECEIVED = 'message-received'; + public const TYPE_MESSAGE_SENDING = 'message-sending'; + public const TYPE_MESSAGE_SENT = 'message-sent'; + public const TYPE_REQUESTED_LOCATION_RESPONSE = 'requested-location-response'; + public const TYPE_SUGGESTION_RESPONSE = 'suggestion-response'; + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + // Initialize discriminator property with the model name. + $this->container['type'] = static::$openAPIModelName; + + $this->setIfExists('time', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('error_code', $data ?? [], null); + $this->setIfExists('carrier_name', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['time'] === null) { + $invalidProperties[] = "'time' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets time + * + * @return \DateTime + */ + public function getTime(): \DateTime + { + return $this->container['time']; + } + + /** + * Sets time + * + * @param \DateTime $time time + * + * @return $this + */ + public function setTime(\DateTime $time): static + { + if (is_null($time)) { + throw new InvalidArgumentException('non-nullable time cannot be null'); + } + $this->container['time'] = $time; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time Represents the time at which the message was read, for `message-read` callbacks. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\InboundCallbackTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\InboundCallbackTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\InboundCallbackTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\InboundCallbackTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets to + * + * @return string + */ + public function getTo(): string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string $to The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. + * + * @return $this + */ + public function setTo(string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription(): string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description A detailed description of the event described by the callback. + * + * @return $this + */ + public function setDescription(string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets message + * + * @return \OpenAPI\Client\Model\InboundCallbackMessage + */ + public function getMessage(): \OpenAPI\Client\Model\InboundCallbackMessage + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param \OpenAPI\Client\Model\InboundCallbackMessage $message message + * + * @return $this + */ + public function setMessage(\OpenAPI\Client\Model\InboundCallbackMessage $message): static + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets error_code + * + * @return int|null + */ + public function getErrorCode(): ?int + { + return $this->container['error_code']; + } + + /** + * Sets error_code + * + * @param int|null $error_code Optional error code, applicable only when type is `message-failed`. + * + * @return $this + */ + public function setErrorCode(?int $error_code): static + { + if (is_null($error_code)) { + throw new InvalidArgumentException('non-nullable error_code cannot be null'); + } + $this->container['error_code'] = $error_code; + + return $this; + } + + /** + * Gets carrier_name + * + * @return string|null + */ + public function getCarrierName(): ?string + { + return $this->container['carrier_name']; + } + + /** + * Sets carrier_name + * + * @param string|null $carrier_name The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. + * + * @return $this + */ + public function setCarrierName(?string $carrier_name): static + { + if (is_null($carrier_name)) { + throw new InvalidArgumentException('non-nullable carrier_name cannot be null'); + } + $this->container['carrier_name'] = $carrier_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CallbackMethodEnum.php b/src/Model/CallbackMethodEnum.php new file mode 100644 index 00000000..7b57f5e1 --- /dev/null +++ b/src/Model/CallbackMethodEnum.php @@ -0,0 +1,46 @@ + + */ +class CodeRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'codeRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'to' => 'string', + 'from' => 'string', + 'application_id' => 'string', + 'scope' => 'string', + 'message' => 'string', + 'digits' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'to' => null, + 'from' => null, + 'application_id' => null, + 'scope' => null, + 'message' => null, + 'digits' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'to' => false, + 'from' => false, + 'application_id' => false, + 'scope' => false, + 'message' => false, + 'digits' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'to' => 'to', + 'from' => 'from', + 'application_id' => 'applicationId', + 'scope' => 'scope', + 'message' => 'message', + 'digits' => 'digits' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'to' => 'setTo', + 'from' => 'setFrom', + 'application_id' => 'setApplicationId', + 'scope' => 'setScope', + 'message' => 'setMessage', + 'digits' => 'setDigits' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'to' => 'getTo', + 'from' => 'getFrom', + 'application_id' => 'getApplicationId', + 'scope' => 'getScope', + 'message' => 'getMessage', + 'digits' => 'getDigits' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('scope', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('digits', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + if (!preg_match("/^\\+[1-9]\\d{1,14}$/", $this->container['to'])) { + $invalidProperties[] = "invalid value for 'to', must be conform to the pattern /^\\+[1-9]\\d{1,14}$/."; + } + + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + if ((mb_strlen($this->container['from']) > 32)) { + $invalidProperties[] = "invalid value for 'from', the character length must be smaller than or equal to 32."; + } + + if (!preg_match("/^\\+[1-9]\\d{1,14}$/", $this->container['from'])) { + $invalidProperties[] = "invalid value for 'from', must be conform to the pattern /^\\+[1-9]\\d{1,14}$/."; + } + + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ((mb_strlen($this->container['application_id']) > 50)) { + $invalidProperties[] = "invalid value for 'application_id', the character length must be smaller than or equal to 50."; + } + + if (!is_null($this->container['scope']) && (mb_strlen($this->container['scope']) > 25)) { + $invalidProperties[] = "invalid value for 'scope', the character length must be smaller than or equal to 25."; + } + + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } + if ((mb_strlen($this->container['message']) > 2048)) { + $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 2048."; + } + + if ($this->container['digits'] === null) { + $invalidProperties[] = "'digits' can't be null"; + } + if (($this->container['digits'] > 8)) { + $invalidProperties[] = "invalid value for 'digits', must be smaller than or equal to 8."; + } + + if (($this->container['digits'] < 4)) { + $invalidProperties[] = "invalid value for 'digits', must be bigger than or equal to 4."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets to + * + * @return string + */ + public function getTo(): string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string $to The phone number to send the mfa code to. + * + * @return $this + */ + public function setTo(string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + + if ((!preg_match("/^\\+[1-9]\\d{1,14}$/", ObjectSerializer::toString($to)))) { + throw new InvalidArgumentException("invalid value for \$to when calling CodeRequest., must conform to the pattern /^\\+[1-9]\\d{1,14}$/."); + } + + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from The application phone number, the sender of the mfa code. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + if ((mb_strlen($from) > 32)) { + throw new InvalidArgumentException('invalid length for $from when calling CodeRequest., must be smaller than or equal to 32.'); + } + if ((!preg_match("/^\\+[1-9]\\d{1,14}$/", ObjectSerializer::toString($from)))) { + throw new InvalidArgumentException("invalid value for \$from when calling CodeRequest., must conform to the pattern /^\\+[1-9]\\d{1,14}$/."); + } + + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The application unique ID, obtained from Bandwidth. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + if ((mb_strlen($application_id) > 50)) { + throw new InvalidArgumentException('invalid length for $application_id when calling CodeRequest., must be smaller than or equal to 50.'); + } + + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets scope + * + * @return string|null + */ + public function getScope(): ?string + { + return $this->container['scope']; + } + + /** + * Sets scope + * + * @param string|null $scope An optional field to denote what scope or action the mfa code is addressing. If not supplied, defaults to \"2FA\". + * + * @return $this + */ + public function setScope(?string $scope): static + { + if (is_null($scope)) { + throw new InvalidArgumentException('non-nullable scope cannot be null'); + } + if ((mb_strlen($scope) > 25)) { + throw new InvalidArgumentException('invalid length for $scope when calling CodeRequest., must be smaller than or equal to 25.'); + } + + $this->container['scope'] = $scope; + + return $this; + } + + /** + * Gets message + * + * @return string + */ + public function getMessage(): string + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string $message The message format of the mfa code. There are three values that the system will replace \"{CODE}\", \"{NAME}\", \"{SCOPE}\". The \"{SCOPE}\" and \"{NAME} value template are optional, while \"{CODE}\" must be supplied. As the name would suggest, code will be replace with the actual mfa code. Name is replaced with the application name, configured during provisioning of mfa. The scope value is the same value sent during the call and partitioned by the server. + * + * @return $this + */ + public function setMessage(string $message): static + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + if ((mb_strlen($message) > 2048)) { + throw new InvalidArgumentException('invalid length for $message when calling CodeRequest., must be smaller than or equal to 2048.'); + } + + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets digits + * + * @return int + */ + public function getDigits(): int + { + return $this->container['digits']; + } + + /** + * Sets digits + * + * @param int $digits The number of digits for your mfa code. The valid number ranges from 2 to 8, inclusively. + * + * @return $this + */ + public function setDigits(int $digits): static + { + if (is_null($digits)) { + throw new InvalidArgumentException('non-nullable digits cannot be null'); + } + + if (($digits > 8)) { + throw new InvalidArgumentException('invalid value for $digits when calling CodeRequest., must be smaller than or equal to 8.'); + } + if (($digits < 4)) { + throw new InvalidArgumentException('invalid value for $digits when calling CodeRequest., must be bigger than or equal to 4.'); + } + + $this->container['digits'] = $digits; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CompletedLookupStatusEnum.php b/src/Model/CompletedLookupStatusEnum.php new file mode 100644 index 00000000..24ea98bb --- /dev/null +++ b/src/Model/CompletedLookupStatusEnum.php @@ -0,0 +1,47 @@ + + */ +class Conference implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'conference'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'id' => 'string', + 'name' => 'string', + 'created_time' => '\DateTime', + 'completed_time' => '\DateTime', + 'conference_event_url' => 'string', + 'conference_event_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'tag' => 'string', + 'active_members' => '\OpenAPI\Client\Model\ConferenceMember[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'id' => null, + 'name' => null, + 'created_time' => 'date-time', + 'completed_time' => 'date-time', + 'conference_event_url' => 'uri', + 'conference_event_method' => null, + 'tag' => null, + 'active_members' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'id' => false, + 'name' => false, + 'created_time' => false, + 'completed_time' => true, + 'conference_event_url' => true, + 'conference_event_method' => true, + 'tag' => true, + 'active_members' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'created_time' => 'createdTime', + 'completed_time' => 'completedTime', + 'conference_event_url' => 'conferenceEventUrl', + 'conference_event_method' => 'conferenceEventMethod', + 'tag' => 'tag', + 'active_members' => 'activeMembers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'created_time' => 'setCreatedTime', + 'completed_time' => 'setCompletedTime', + 'conference_event_url' => 'setConferenceEventUrl', + 'conference_event_method' => 'setConferenceEventMethod', + 'tag' => 'setTag', + 'active_members' => 'setActiveMembers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'created_time' => 'getCreatedTime', + 'completed_time' => 'getCompletedTime', + 'conference_event_url' => 'getConferenceEventUrl', + 'conference_event_method' => 'getConferenceEventMethod', + 'tag' => 'getTag', + 'active_members' => 'getActiveMembers' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('created_time', $data ?? [], null); + $this->setIfExists('completed_time', $data ?? [], null); + $this->setIfExists('conference_event_url', $data ?? [], null); + $this->setIfExists('conference_event_method', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('active_members', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId(): ?string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The Bandwidth-generated conference ID. + * + * @return $this + */ + public function setId(?string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName(): ?string + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The name of the conference, as specified by your application. + * + * @return $this + */ + public function setName(?string $name): static + { + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets created_time + * + * @return \DateTime|null + */ + public function getCreatedTime(): ?\DateTime + { + return $this->container['created_time']; + } + + /** + * Sets created_time + * + * @param \DateTime|null $created_time The time the conference was initiated, in ISO 8601 format. + * + * @return $this + */ + public function setCreatedTime(?\DateTime $created_time): static + { + if (is_null($created_time)) { + throw new InvalidArgumentException('non-nullable created_time cannot be null'); + } + $this->container['created_time'] = $created_time; + + return $this; + } + + /** + * Gets completed_time + * + * @return \DateTime|null + */ + public function getCompletedTime(): ?\DateTime + { + return $this->container['completed_time']; + } + + /** + * Sets completed_time + * + * @param \DateTime|null $completed_time The time the conference was terminated, in ISO 8601 format. + * + * @return $this + */ + public function setCompletedTime(?\DateTime $completed_time): static + { + if (is_null($completed_time)) { + array_push($this->openAPINullablesSetToNull, 'completed_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('completed_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['completed_time'] = $completed_time; + + return $this; + } + + /** + * Gets conference_event_url + * + * @return string|null + */ + public function getConferenceEventUrl(): ?string + { + return $this->container['conference_event_url']; + } + + /** + * Sets conference_event_url + * + * @param string|null $conference_event_url The URL to send the conference-related events. + * + * @return $this + */ + public function setConferenceEventUrl(?string $conference_event_url): static + { + if (is_null($conference_event_url)) { + array_push($this->openAPINullablesSetToNull, 'conference_event_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('conference_event_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['conference_event_url'] = $conference_event_url; + + return $this; + } + + /** + * Gets conference_event_method + * + * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + */ + public function getConferenceEventMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + { + return $this->container['conference_event_method']; + } + + /** + * Sets conference_event_method + * + * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $conference_event_method conference_event_method + * + * @return $this + */ + public function setConferenceEventMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $conference_event_method): static + { + if (is_null($conference_event_method)) { + array_push($this->openAPINullablesSetToNull, 'conference_event_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('conference_event_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['conference_event_method'] = $conference_event_method; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag The custom string attached to the conference that will be sent with callbacks. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets active_members + * + * @return \OpenAPI\Client\Model\ConferenceMember[]|null + */ + public function getActiveMembers(): ?array + { + return $this->container['active_members']; + } + + /** + * Sets active_members + * + * @param \OpenAPI\Client\Model\ConferenceMember[]|null $active_members A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences). + * + * @return $this + */ + public function setActiveMembers(?array $active_members): static + { + if (is_null($active_members)) { + array_push($this->openAPINullablesSetToNull, 'active_members'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('active_members', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['active_members'] = $active_members; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ConferenceCompletedCallback.php b/src/Model/ConferenceCompletedCallback.php new file mode 100644 index 00000000..79f5f59b --- /dev/null +++ b/src/Model/ConferenceCompletedCallback.php @@ -0,0 +1,528 @@ + + */ +class ConferenceCompletedCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'conferenceCompletedCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'conference_id' => 'string', + 'name' => 'string', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'conference_id' => null, + 'name' => null, + 'tag' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'conference_id' => false, + 'name' => false, + 'tag' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'conference_id' => 'conferenceId', + 'name' => 'name', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'conference_id' => 'setConferenceId', + 'name' => 'setName', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'conference_id' => 'getConferenceId', + 'name' => 'getName', + 'tag' => 'getTag' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('conference_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets conference_id + * + * @return string|null + */ + public function getConferenceId(): ?string + { + return $this->container['conference_id']; + } + + /** + * Sets conference_id + * + * @param string|null $conference_id The unique, Bandwidth-generated ID of the conference that was recorded + * + * @return $this + */ + public function setConferenceId(?string $conference_id): static + { + if (is_null($conference_id)) { + throw new InvalidArgumentException('non-nullable conference_id cannot be null'); + } + $this->container['conference_id'] = $conference_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName(): ?string + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The user-specified name of the conference that was recorded + * + * @return $this + */ + public function setName(?string $name): static + { + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ConferenceCreatedCallback.php b/src/Model/ConferenceCreatedCallback.php new file mode 100644 index 00000000..9b211ecf --- /dev/null +++ b/src/Model/ConferenceCreatedCallback.php @@ -0,0 +1,528 @@ + + */ +class ConferenceCreatedCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'conferenceCreatedCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'conference_id' => 'string', + 'name' => 'string', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'conference_id' => null, + 'name' => null, + 'tag' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'conference_id' => false, + 'name' => false, + 'tag' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'conference_id' => 'conferenceId', + 'name' => 'name', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'conference_id' => 'setConferenceId', + 'name' => 'setName', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'conference_id' => 'getConferenceId', + 'name' => 'getName', + 'tag' => 'getTag' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('conference_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets conference_id + * + * @return string|null + */ + public function getConferenceId(): ?string + { + return $this->container['conference_id']; + } + + /** + * Sets conference_id + * + * @param string|null $conference_id The unique, Bandwidth-generated ID of the conference that was recorded + * + * @return $this + */ + public function setConferenceId(?string $conference_id): static + { + if (is_null($conference_id)) { + throw new InvalidArgumentException('non-nullable conference_id cannot be null'); + } + $this->container['conference_id'] = $conference_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName(): ?string + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The user-specified name of the conference that was recorded + * + * @return $this + */ + public function setName(?string $name): static + { + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ConferenceMember.php b/src/Model/ConferenceMember.php new file mode 100644 index 00000000..d1f0dfc4 --- /dev/null +++ b/src/Model/ConferenceMember.php @@ -0,0 +1,561 @@ + + */ +class ConferenceMember implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'conferenceMember'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'call_id' => 'string', + 'conference_id' => 'string', + 'member_url' => 'string', + 'mute' => 'bool', + 'hold' => 'bool', + 'call_ids_to_coach' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'call_id' => null, + 'conference_id' => null, + 'member_url' => 'uri', + 'mute' => null, + 'hold' => null, + 'call_ids_to_coach' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'call_id' => false, + 'conference_id' => false, + 'member_url' => false, + 'mute' => false, + 'hold' => false, + 'call_ids_to_coach' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'call_id' => 'callId', + 'conference_id' => 'conferenceId', + 'member_url' => 'memberUrl', + 'mute' => 'mute', + 'hold' => 'hold', + 'call_ids_to_coach' => 'callIdsToCoach' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'call_id' => 'setCallId', + 'conference_id' => 'setConferenceId', + 'member_url' => 'setMemberUrl', + 'mute' => 'setMute', + 'hold' => 'setHold', + 'call_ids_to_coach' => 'setCallIdsToCoach' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'call_id' => 'getCallId', + 'conference_id' => 'getConferenceId', + 'member_url' => 'getMemberUrl', + 'mute' => 'getMute', + 'hold' => 'getHold', + 'call_ids_to_coach' => 'getCallIdsToCoach' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('conference_id', $data ?? [], null); + $this->setIfExists('member_url', $data ?? [], null); + $this->setIfExists('mute', $data ?? [], null); + $this->setIfExists('hold', $data ?? [], null); + $this->setIfExists('call_ids_to_coach', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets conference_id + * + * @return string|null + */ + public function getConferenceId(): ?string + { + return $this->container['conference_id']; + } + + /** + * Sets conference_id + * + * @param string|null $conference_id The unique, Bandwidth-generated ID of the conference that was recorded + * + * @return $this + */ + public function setConferenceId(?string $conference_id): static + { + if (is_null($conference_id)) { + throw new InvalidArgumentException('non-nullable conference_id cannot be null'); + } + $this->container['conference_id'] = $conference_id; + + return $this; + } + + /** + * Gets member_url + * + * @return string|null + */ + public function getMemberUrl(): ?string + { + return $this->container['member_url']; + } + + /** + * Sets member_url + * + * @param string|null $member_url A URL that may be used to retrieve information about or update the state of this conference member. This is the URL of this member's [Get Conference Member](/apis/voice-apis/voice/#tag/Conferences/operation/getConferenceMember) endpoint and [Modify Conference Member](/apis/voice-apis/voice/#tag/Conferences/operation/updateConferenceMember) endpoint. + * + * @return $this + */ + public function setMemberUrl(?string $member_url): static + { + if (is_null($member_url)) { + throw new InvalidArgumentException('non-nullable member_url cannot be null'); + } + $this->container['member_url'] = $member_url; + + return $this; + } + + /** + * Gets mute + * + * @return bool|null + */ + public function getMute(): ?bool + { + return $this->container['mute']; + } + + /** + * Sets mute + * + * @param bool|null $mute Whether or not this member is currently muted. Members who are muted are still able to hear other participants. If used in a PUT request, updates this member's mute status. Has no effect if omitted. + * + * @return $this + */ + public function setMute(?bool $mute): static + { + if (is_null($mute)) { + throw new InvalidArgumentException('non-nullable mute cannot be null'); + } + $this->container['mute'] = $mute; + + return $this; + } + + /** + * Gets hold + * + * @return bool|null + */ + public function getHold(): ?bool + { + return $this->container['hold']; + } + + /** + * Sets hold + * + * @param bool|null $hold Whether or not this member is currently on hold. Members who are on hold are not able to hear or speak in the conference. If used in a PUT request, updates this member's hold status. Has no effect if omitted. + * + * @return $this + */ + public function setHold(?bool $hold): static + { + if (is_null($hold)) { + throw new InvalidArgumentException('non-nullable hold cannot be null'); + } + $this->container['hold'] = $hold; + + return $this; + } + + /** + * Gets call_ids_to_coach + * + * @return string[]|null + */ + public function getCallIdsToCoach(): ?array + { + return $this->container['call_ids_to_coach']; + } + + /** + * Sets call_ids_to_coach + * + * @param string[]|null $call_ids_to_coach If this member had a value set for `callIdsToCoach` in its [Conference](/docs/voice/bxml/conference) verb or this list was added with a previous PUT request to modify the member, this is that list of calls. If present in a PUT request, modifies the calls that this member is coaching. Has no effect if omitted. See the documentation for the [Conference](/docs/voice/bxml/conference) verb for more details about coaching. Note that this will not add the matching calls to the conference; each call must individually execute a Conference verb to join. + * + * @return $this + */ + public function setCallIdsToCoach(?array $call_ids_to_coach): static + { + if (is_null($call_ids_to_coach)) { + array_push($this->openAPINullablesSetToNull, 'call_ids_to_coach'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('call_ids_to_coach', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['call_ids_to_coach'] = $call_ids_to_coach; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ConferenceMemberExitCallback.php b/src/Model/ConferenceMemberExitCallback.php new file mode 100644 index 00000000..5184e645 --- /dev/null +++ b/src/Model/ConferenceMemberExitCallback.php @@ -0,0 +1,630 @@ + + */ +class ConferenceMemberExitCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'conferenceMemberExitCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'conference_id' => 'string', + 'name' => 'string', + 'from' => 'string', + 'to' => 'string', + 'call_id' => 'string', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'conference_id' => null, + 'name' => null, + 'from' => null, + 'to' => null, + 'call_id' => null, + 'tag' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'conference_id' => false, + 'name' => false, + 'from' => false, + 'to' => false, + 'call_id' => false, + 'tag' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'conference_id' => 'conferenceId', + 'name' => 'name', + 'from' => 'from', + 'to' => 'to', + 'call_id' => 'callId', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'conference_id' => 'setConferenceId', + 'name' => 'setName', + 'from' => 'setFrom', + 'to' => 'setTo', + 'call_id' => 'setCallId', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'conference_id' => 'getConferenceId', + 'name' => 'getName', + 'from' => 'getFrom', + 'to' => 'getTo', + 'call_id' => 'getCallId', + 'tag' => 'getTag' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('conference_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets conference_id + * + * @return string|null + */ + public function getConferenceId(): ?string + { + return $this->container['conference_id']; + } + + /** + * Sets conference_id + * + * @param string|null $conference_id The unique, Bandwidth-generated ID of the conference that was recorded + * + * @return $this + */ + public function setConferenceId(?string $conference_id): static + { + if (is_null($conference_id)) { + throw new InvalidArgumentException('non-nullable conference_id cannot be null'); + } + $this->container['conference_id'] = $conference_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName(): ?string + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The user-specified name of the conference that was recorded + * + * @return $this + */ + public function setName(?string $name): static + { + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ConferenceMemberJoinCallback.php b/src/Model/ConferenceMemberJoinCallback.php new file mode 100644 index 00000000..112ae433 --- /dev/null +++ b/src/Model/ConferenceMemberJoinCallback.php @@ -0,0 +1,630 @@ + + */ +class ConferenceMemberJoinCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'conferenceMemberJoinCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'conference_id' => 'string', + 'name' => 'string', + 'from' => 'string', + 'to' => 'string', + 'call_id' => 'string', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'conference_id' => null, + 'name' => null, + 'from' => null, + 'to' => null, + 'call_id' => null, + 'tag' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'conference_id' => false, + 'name' => false, + 'from' => false, + 'to' => false, + 'call_id' => false, + 'tag' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'conference_id' => 'conferenceId', + 'name' => 'name', + 'from' => 'from', + 'to' => 'to', + 'call_id' => 'callId', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'conference_id' => 'setConferenceId', + 'name' => 'setName', + 'from' => 'setFrom', + 'to' => 'setTo', + 'call_id' => 'setCallId', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'conference_id' => 'getConferenceId', + 'name' => 'getName', + 'from' => 'getFrom', + 'to' => 'getTo', + 'call_id' => 'getCallId', + 'tag' => 'getTag' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('conference_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets conference_id + * + * @return string|null + */ + public function getConferenceId(): ?string + { + return $this->container['conference_id']; + } + + /** + * Sets conference_id + * + * @param string|null $conference_id The unique, Bandwidth-generated ID of the conference that was recorded + * + * @return $this + */ + public function setConferenceId(?string $conference_id): static + { + if (is_null($conference_id)) { + throw new InvalidArgumentException('non-nullable conference_id cannot be null'); + } + $this->container['conference_id'] = $conference_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName(): ?string + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The user-specified name of the conference that was recorded + * + * @return $this + */ + public function setName(?string $name): static + { + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ConferenceRecordingAvailableCallback.php b/src/Model/ConferenceRecordingAvailableCallback.php new file mode 100644 index 00000000..718b23f8 --- /dev/null +++ b/src/Model/ConferenceRecordingAvailableCallback.php @@ -0,0 +1,841 @@ + + */ +class ConferenceRecordingAvailableCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'conferenceRecordingAvailableCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'conference_id' => 'string', + 'name' => 'string', + 'account_id' => 'string', + 'recording_id' => 'string', + 'channels' => 'int', + 'start_time' => '\DateTime', + 'end_time' => '\DateTime', + 'duration' => 'string', + 'file_format' => '\OpenAPI\Client\Model\FileFormatEnum', + 'media_url' => 'string', + 'tag' => 'string', + 'status' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'conference_id' => null, + 'name' => null, + 'account_id' => null, + 'recording_id' => null, + 'channels' => 'int32', + 'start_time' => 'date-time', + 'end_time' => 'date-time', + 'duration' => null, + 'file_format' => null, + 'media_url' => 'uri', + 'tag' => null, + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'conference_id' => false, + 'name' => false, + 'account_id' => false, + 'recording_id' => false, + 'channels' => false, + 'start_time' => false, + 'end_time' => false, + 'duration' => false, + 'file_format' => false, + 'media_url' => true, + 'tag' => true, + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'conference_id' => 'conferenceId', + 'name' => 'name', + 'account_id' => 'accountId', + 'recording_id' => 'recordingId', + 'channels' => 'channels', + 'start_time' => 'startTime', + 'end_time' => 'endTime', + 'duration' => 'duration', + 'file_format' => 'fileFormat', + 'media_url' => 'mediaUrl', + 'tag' => 'tag', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'conference_id' => 'setConferenceId', + 'name' => 'setName', + 'account_id' => 'setAccountId', + 'recording_id' => 'setRecordingId', + 'channels' => 'setChannels', + 'start_time' => 'setStartTime', + 'end_time' => 'setEndTime', + 'duration' => 'setDuration', + 'file_format' => 'setFileFormat', + 'media_url' => 'setMediaUrl', + 'tag' => 'setTag', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'conference_id' => 'getConferenceId', + 'name' => 'getName', + 'account_id' => 'getAccountId', + 'recording_id' => 'getRecordingId', + 'channels' => 'getChannels', + 'start_time' => 'getStartTime', + 'end_time' => 'getEndTime', + 'duration' => 'getDuration', + 'file_format' => 'getFileFormat', + 'media_url' => 'getMediaUrl', + 'tag' => 'getTag', + 'status' => 'getStatus' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('conference_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('recording_id', $data ?? [], null); + $this->setIfExists('channels', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('end_time', $data ?? [], null); + $this->setIfExists('duration', $data ?? [], null); + $this->setIfExists('file_format', $data ?? [], null); + $this->setIfExists('media_url', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets conference_id + * + * @return string|null + */ + public function getConferenceId(): ?string + { + return $this->container['conference_id']; + } + + /** + * Sets conference_id + * + * @param string|null $conference_id The unique, Bandwidth-generated ID of the conference that was recorded + * + * @return $this + */ + public function setConferenceId(?string $conference_id): static + { + if (is_null($conference_id)) { + throw new InvalidArgumentException('non-nullable conference_id cannot be null'); + } + $this->container['conference_id'] = $conference_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName(): ?string + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The user-specified name of the conference that was recorded + * + * @return $this + */ + public function setName(?string $name): static + { + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets recording_id + * + * @return string|null + */ + public function getRecordingId(): ?string + { + return $this->container['recording_id']; + } + + /** + * Sets recording_id + * + * @param string|null $recording_id The unique ID of this recording + * + * @return $this + */ + public function setRecordingId(?string $recording_id): static + { + if (is_null($recording_id)) { + throw new InvalidArgumentException('non-nullable recording_id cannot be null'); + } + $this->container['recording_id'] = $recording_id; + + return $this; + } + + /** + * Gets channels + * + * @return int|null + */ + public function getChannels(): ?int + { + return $this->container['channels']; + } + + /** + * Sets channels + * + * @param int|null $channels Always `1` for conference recordings; multi-channel recordings are not supported on conferences. + * + * @return $this + */ + public function setChannels(?int $channels): static + { + if (is_null($channels)) { + throw new InvalidArgumentException('non-nullable channels cannot be null'); + } + $this->container['channels'] = $channels; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets end_time + * + * @return \DateTime|null + */ + public function getEndTime(): ?\DateTime + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param \DateTime|null $end_time The time that the recording ended in ISO-8601 format + * + * @return $this + */ + public function setEndTime(?\DateTime $end_time): static + { + if (is_null($end_time)) { + throw new InvalidArgumentException('non-nullable end_time cannot be null'); + } + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets duration + * + * @return string|null + */ + public function getDuration(): ?string + { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param string|null $duration The duration of the recording in ISO-8601 format + * + * @return $this + */ + public function setDuration(?string $duration): static + { + if (is_null($duration)) { + throw new InvalidArgumentException('non-nullable duration cannot be null'); + } + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets file_format + * + * @return \OpenAPI\Client\Model\FileFormatEnum|null + */ + public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum + { + return $this->container['file_format']; + } + + /** + * Sets file_format + * + * @param \OpenAPI\Client\Model\FileFormatEnum|null $file_format file_format + * + * @return $this + */ + public function setFileFormat(?\OpenAPI\Client\Model\FileFormatEnum $file_format): static + { + if (is_null($file_format)) { + throw new InvalidArgumentException('non-nullable file_format cannot be null'); + } + $this->container['file_format'] = $file_format; + + return $this; + } + + /** + * Gets media_url + * + * @return string|null + */ + public function getMediaUrl(): ?string + { + return $this->container['media_url']; + } + + /** + * Sets media_url + * + * @param string|null $media_url The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. + * + * @return $this + */ + public function setMediaUrl(?string $media_url): static + { + if (is_null($media_url)) { + array_push($this->openAPINullablesSetToNull, 'media_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('media_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['media_url'] = $media_url; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus(): ?string + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. + * + * @return $this + */ + public function setStatus(?string $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ConferenceRecordingMetadata.php b/src/Model/ConferenceRecordingMetadata.php new file mode 100644 index 00000000..17533456 --- /dev/null +++ b/src/Model/ConferenceRecordingMetadata.php @@ -0,0 +1,765 @@ + + */ +class ConferenceRecordingMetadata implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'conferenceRecordingMetadata'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'account_id' => 'string', + 'conference_id' => 'string', + 'name' => 'string', + 'recording_id' => 'string', + 'duration' => 'string', + 'channels' => 'int', + 'start_time' => '\DateTime', + 'end_time' => '\DateTime', + 'file_format' => '\OpenAPI\Client\Model\FileFormatEnum', + 'status' => 'string', + 'media_url' => 'string', + 'recording_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'account_id' => null, + 'conference_id' => null, + 'name' => null, + 'recording_id' => null, + 'duration' => null, + 'channels' => 'int32', + 'start_time' => 'date-time', + 'end_time' => 'date-time', + 'file_format' => null, + 'status' => null, + 'media_url' => 'uri', + 'recording_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'account_id' => false, + 'conference_id' => false, + 'name' => false, + 'recording_id' => false, + 'duration' => false, + 'channels' => false, + 'start_time' => false, + 'end_time' => false, + 'file_format' => false, + 'status' => false, + 'media_url' => true, + 'recording_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'account_id' => 'accountId', + 'conference_id' => 'conferenceId', + 'name' => 'name', + 'recording_id' => 'recordingId', + 'duration' => 'duration', + 'channels' => 'channels', + 'start_time' => 'startTime', + 'end_time' => 'endTime', + 'file_format' => 'fileFormat', + 'status' => 'status', + 'media_url' => 'mediaUrl', + 'recording_name' => 'recordingName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'account_id' => 'setAccountId', + 'conference_id' => 'setConferenceId', + 'name' => 'setName', + 'recording_id' => 'setRecordingId', + 'duration' => 'setDuration', + 'channels' => 'setChannels', + 'start_time' => 'setStartTime', + 'end_time' => 'setEndTime', + 'file_format' => 'setFileFormat', + 'status' => 'setStatus', + 'media_url' => 'setMediaUrl', + 'recording_name' => 'setRecordingName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'account_id' => 'getAccountId', + 'conference_id' => 'getConferenceId', + 'name' => 'getName', + 'recording_id' => 'getRecordingId', + 'duration' => 'getDuration', + 'channels' => 'getChannels', + 'start_time' => 'getStartTime', + 'end_time' => 'getEndTime', + 'file_format' => 'getFileFormat', + 'status' => 'getStatus', + 'media_url' => 'getMediaUrl', + 'recording_name' => 'getRecordingName' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('conference_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('recording_id', $data ?? [], null); + $this->setIfExists('duration', $data ?? [], null); + $this->setIfExists('channels', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('end_time', $data ?? [], null); + $this->setIfExists('file_format', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('media_url', $data ?? [], null); + $this->setIfExists('recording_name', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets conference_id + * + * @return string|null + */ + public function getConferenceId(): ?string + { + return $this->container['conference_id']; + } + + /** + * Sets conference_id + * + * @param string|null $conference_id The unique, Bandwidth-generated ID of the conference that was recorded + * + * @return $this + */ + public function setConferenceId(?string $conference_id): static + { + if (is_null($conference_id)) { + throw new InvalidArgumentException('non-nullable conference_id cannot be null'); + } + $this->container['conference_id'] = $conference_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName(): ?string + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The user-specified name of the conference that was recorded + * + * @return $this + */ + public function setName(?string $name): static + { + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets recording_id + * + * @return string|null + */ + public function getRecordingId(): ?string + { + return $this->container['recording_id']; + } + + /** + * Sets recording_id + * + * @param string|null $recording_id The unique ID of this recording + * + * @return $this + */ + public function setRecordingId(?string $recording_id): static + { + if (is_null($recording_id)) { + throw new InvalidArgumentException('non-nullable recording_id cannot be null'); + } + $this->container['recording_id'] = $recording_id; + + return $this; + } + + /** + * Gets duration + * + * @return string|null + */ + public function getDuration(): ?string + { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param string|null $duration The duration of the recording in ISO-8601 format + * + * @return $this + */ + public function setDuration(?string $duration): static + { + if (is_null($duration)) { + throw new InvalidArgumentException('non-nullable duration cannot be null'); + } + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets channels + * + * @return int|null + */ + public function getChannels(): ?int + { + return $this->container['channels']; + } + + /** + * Sets channels + * + * @param int|null $channels Always `1` for conference recordings; multi-channel recordings are not supported on conferences. + * + * @return $this + */ + public function setChannels(?int $channels): static + { + if (is_null($channels)) { + throw new InvalidArgumentException('non-nullable channels cannot be null'); + } + $this->container['channels'] = $channels; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets end_time + * + * @return \DateTime|null + */ + public function getEndTime(): ?\DateTime + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param \DateTime|null $end_time The time that the recording ended in ISO-8601 format + * + * @return $this + */ + public function setEndTime(?\DateTime $end_time): static + { + if (is_null($end_time)) { + throw new InvalidArgumentException('non-nullable end_time cannot be null'); + } + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets file_format + * + * @return \OpenAPI\Client\Model\FileFormatEnum|null + */ + public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum + { + return $this->container['file_format']; + } + + /** + * Sets file_format + * + * @param \OpenAPI\Client\Model\FileFormatEnum|null $file_format file_format + * + * @return $this + */ + public function setFileFormat(?\OpenAPI\Client\Model\FileFormatEnum $file_format): static + { + if (is_null($file_format)) { + throw new InvalidArgumentException('non-nullable file_format cannot be null'); + } + $this->container['file_format'] = $file_format; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus(): ?string + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. + * + * @return $this + */ + public function setStatus(?string $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets media_url + * + * @return string|null + */ + public function getMediaUrl(): ?string + { + return $this->container['media_url']; + } + + /** + * Sets media_url + * + * @param string|null $media_url The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. + * + * @return $this + */ + public function setMediaUrl(?string $media_url): static + { + if (is_null($media_url)) { + array_push($this->openAPINullablesSetToNull, 'media_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('media_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['media_url'] = $media_url; + + return $this; + } + + /** + * Gets recording_name + * + * @return string|null + */ + public function getRecordingName(): ?string + { + return $this->container['recording_name']; + } + + /** + * Sets recording_name + * + * @param string|null $recording_name A name to identify this recording. + * + * @return $this + */ + public function setRecordingName(?string $recording_name): static + { + if (is_null($recording_name)) { + throw new InvalidArgumentException('non-nullable recording_name cannot be null'); + } + $this->container['recording_name'] = $recording_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ConferenceRedirectCallback.php b/src/Model/ConferenceRedirectCallback.php new file mode 100644 index 00000000..38a9aae1 --- /dev/null +++ b/src/Model/ConferenceRedirectCallback.php @@ -0,0 +1,528 @@ + + */ +class ConferenceRedirectCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'conferenceRedirectCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'conference_id' => 'string', + 'name' => 'string', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'conference_id' => null, + 'name' => null, + 'tag' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'conference_id' => false, + 'name' => false, + 'tag' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'conference_id' => 'conferenceId', + 'name' => 'name', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'conference_id' => 'setConferenceId', + 'name' => 'setName', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'conference_id' => 'getConferenceId', + 'name' => 'getName', + 'tag' => 'getTag' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('conference_id', $data ?? [], null); + $this->setIfExists('name', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets conference_id + * + * @return string|null + */ + public function getConferenceId(): ?string + { + return $this->container['conference_id']; + } + + /** + * Sets conference_id + * + * @param string|null $conference_id The unique, Bandwidth-generated ID of the conference that was recorded + * + * @return $this + */ + public function setConferenceId(?string $conference_id): static + { + if (is_null($conference_id)) { + throw new InvalidArgumentException('non-nullable conference_id cannot be null'); + } + $this->container['conference_id'] = $conference_id; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName(): ?string + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name The user-specified name of the conference that was recorded + * + * @return $this + */ + public function setName(?string $name): static + { + if (is_null($name)) { + throw new InvalidArgumentException('non-nullable name cannot be null'); + } + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ConferenceStateEnum.php b/src/Model/ConferenceStateEnum.php new file mode 100644 index 00000000..5ca32929 --- /dev/null +++ b/src/Model/ConferenceStateEnum.php @@ -0,0 +1,46 @@ + + */ +class Contact implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'contact'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'first_name' => 'string', + 'last_name' => 'string', + 'email' => 'string', + 'phone_number' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'first_name' => null, + 'last_name' => null, + 'email' => 'email', + 'phone_number' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'first_name' => false, + 'last_name' => false, + 'email' => false, + 'phone_number' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'first_name' => 'firstName', + 'last_name' => 'lastName', + 'email' => 'email', + 'phone_number' => 'phoneNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'first_name' => 'setFirstName', + 'last_name' => 'setLastName', + 'email' => 'setEmail', + 'phone_number' => 'setPhoneNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'first_name' => 'getFirstName', + 'last_name' => 'getLastName', + 'email' => 'getEmail', + 'phone_number' => 'getPhoneNumber' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('first_name', $data ?? [], null); + $this->setIfExists('last_name', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('phone_number', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['first_name'] === null) { + $invalidProperties[] = "'first_name' can't be null"; + } + if ((mb_strlen($this->container['first_name']) > 500)) { + $invalidProperties[] = "invalid value for 'first_name', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['first_name']) < 1)) { + $invalidProperties[] = "invalid value for 'first_name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['last_name'] === null) { + $invalidProperties[] = "'last_name' can't be null"; + } + if ((mb_strlen($this->container['last_name']) > 500)) { + $invalidProperties[] = "invalid value for 'last_name', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['last_name']) < 1)) { + $invalidProperties[] = "invalid value for 'last_name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ((mb_strlen($this->container['email']) > 500)) { + $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['email']) < 0)) { + $invalidProperties[] = "invalid value for 'email', the character length must be bigger than or equal to 0."; + } + + if (!preg_match("/^(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/", $this->container['email'])) { + $invalidProperties[] = "invalid value for 'email', must be conform to the pattern /^(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/."; + } + + if ($this->container['phone_number'] === null) { + $invalidProperties[] = "'phone_number' can't be null"; + } + if ((mb_strlen($this->container['phone_number']) > 500)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['phone_number']) < 1)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets first_name + * + * @return string + */ + public function getFirstName(): string + { + return $this->container['first_name']; + } + + /** + * Sets first_name + * + * @param string $first_name The first name of the business contact using the toll-free number. + * + * @return $this + */ + public function setFirstName(string $first_name): static + { + if (is_null($first_name)) { + throw new InvalidArgumentException('non-nullable first_name cannot be null'); + } + if ((mb_strlen($first_name) > 500)) { + throw new InvalidArgumentException('invalid length for $first_name when calling Contact., must be smaller than or equal to 500.'); + } + if ((mb_strlen($first_name) < 1)) { + throw new InvalidArgumentException('invalid length for $first_name when calling Contact., must be bigger than or equal to 1.'); + } + + $this->container['first_name'] = $first_name; + + return $this; + } + + /** + * Gets last_name + * + * @return string + */ + public function getLastName(): string + { + return $this->container['last_name']; + } + + /** + * Sets last_name + * + * @param string $last_name The last name of the business contact using the toll-free number. + * + * @return $this + */ + public function setLastName(string $last_name): static + { + if (is_null($last_name)) { + throw new InvalidArgumentException('non-nullable last_name cannot be null'); + } + if ((mb_strlen($last_name) > 500)) { + throw new InvalidArgumentException('invalid length for $last_name when calling Contact., must be smaller than or equal to 500.'); + } + if ((mb_strlen($last_name) < 1)) { + throw new InvalidArgumentException('invalid length for $last_name when calling Contact., must be bigger than or equal to 1.'); + } + + $this->container['last_name'] = $last_name; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail(): string + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email email + * + * @return $this + */ + public function setEmail(string $email): static + { + if (is_null($email)) { + throw new InvalidArgumentException('non-nullable email cannot be null'); + } + if ((mb_strlen($email) > 500)) { + throw new InvalidArgumentException('invalid length for $email when calling Contact., must be smaller than or equal to 500.'); + } + if ((mb_strlen($email) < 0)) { + throw new InvalidArgumentException('invalid length for $email when calling Contact., must be bigger than or equal to 0.'); + } + if ((!preg_match("/^(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/", ObjectSerializer::toString($email)))) { + throw new InvalidArgumentException("invalid value for \$email when calling Contact., must conform to the pattern /^(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/."); + } + + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets phone_number + * + * @return string + */ + public function getPhoneNumber(): string + { + return $this->container['phone_number']; + } + + /** + * Sets phone_number + * + * @param string $phone_number Contact telephone number + * + * @return $this + */ + public function setPhoneNumber(string $phone_number): static + { + if (is_null($phone_number)) { + throw new InvalidArgumentException('non-nullable phone_number cannot be null'); + } + if ((mb_strlen($phone_number) > 500)) { + throw new InvalidArgumentException('invalid length for $phone_number when calling Contact., must be smaller than or equal to 500.'); + } + if ((mb_strlen($phone_number) < 1)) { + throw new InvalidArgumentException('invalid length for $phone_number when calling Contact., must be bigger than or equal to 1.'); + } + + $this->container['phone_number'] = $phone_number; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateAsyncBulkLookupResponse.php b/src/Model/CreateAsyncBulkLookupResponse.php new file mode 100644 index 00000000..4cd0eafa --- /dev/null +++ b/src/Model/CreateAsyncBulkLookupResponse.php @@ -0,0 +1,452 @@ + + */ +class CreateAsyncBulkLookupResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'createAsyncBulkLookupResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'links' => '\OpenAPI\Client\Model\LinkSchema[]', + 'data' => '\OpenAPI\Client\Model\CreateAsyncBulkLookupResponseData', + 'errors' => '\OpenAPI\Client\Model\LookupErrorSchema[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'links' => null, + 'data' => null, + 'errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'links' => false, + 'data' => false, + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'links' => 'links', + 'data' => 'data', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'links' => 'setLinks', + 'data' => 'setData', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'links' => 'getLinks', + 'data' => 'getData', + 'errors' => 'getErrors' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets links + * + * @return \OpenAPI\Client\Model\LinkSchema[]|null + */ + public function getLinks(): ?array + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \OpenAPI\Client\Model\LinkSchema[]|null $links Links for pagination (if applicable) + * + * @return $this + */ + public function setLinks(?array $links): static + { + if (is_null($links)) { + throw new InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + + /** + * Gets data + * + * @return \OpenAPI\Client\Model\CreateAsyncBulkLookupResponseData|null + */ + public function getData(): ?\OpenAPI\Client\Model\CreateAsyncBulkLookupResponseData + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \OpenAPI\Client\Model\CreateAsyncBulkLookupResponseData|null $data data + * + * @return $this + */ + public function setData(?\OpenAPI\Client\Model\CreateAsyncBulkLookupResponseData $data): static + { + if (is_null($data)) { + throw new InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets errors + * + * @return \OpenAPI\Client\Model\LookupErrorSchema[]|null + */ + public function getErrors(): ?array + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \OpenAPI\Client\Model\LookupErrorSchema[]|null $errors errors + * + * @return $this + */ + public function setErrors(?array $errors): static + { + if (is_null($errors)) { + throw new InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateAsyncBulkLookupResponseData.php b/src/Model/CreateAsyncBulkLookupResponseData.php new file mode 100644 index 00000000..036d2265 --- /dev/null +++ b/src/Model/CreateAsyncBulkLookupResponseData.php @@ -0,0 +1,419 @@ + + */ +class CreateAsyncBulkLookupResponseData implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'createAsyncBulkLookupResponse_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'request_id' => 'string', + 'status' => '\OpenAPI\Client\Model\InProgressLookupStatusEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'request_id' => 'uuid', + 'status' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'request_id' => false, + 'status' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'request_id' => 'requestId', + 'status' => 'status' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'request_id' => 'setRequestId', + 'status' => 'setStatus' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'request_id' => 'getRequestId', + 'status' => 'getStatus' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('request_id', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets request_id + * + * @return string|null + */ + public function getRequestId(): ?string + { + return $this->container['request_id']; + } + + /** + * Sets request_id + * + * @param string|null $request_id The phone number lookup request ID from Bandwidth. + * + * @return $this + */ + public function setRequestId(?string $request_id): static + { + if (is_null($request_id)) { + throw new InvalidArgumentException('non-nullable request_id cannot be null'); + } + $this->container['request_id'] = $request_id; + + return $this; + } + + /** + * Gets status + * + * @return \OpenAPI\Client\Model\InProgressLookupStatusEnum|null + */ + public function getStatus(): ?\OpenAPI\Client\Model\InProgressLookupStatusEnum + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\InProgressLookupStatusEnum|null $status status + * + * @return $this + */ + public function setStatus(?\OpenAPI\Client\Model\InProgressLookupStatusEnum $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateCall.php b/src/Model/CreateCall.php new file mode 100644 index 00000000..b0ee285d --- /dev/null +++ b/src/Model/CreateCall.php @@ -0,0 +1,1308 @@ + + */ +class CreateCall implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'createCall'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'to' => 'string', + 'from' => 'string', + 'privacy' => 'bool', + 'display_name' => 'string', + 'uui' => 'string', + 'application_id' => 'string', + 'answer_url' => 'string', + 'answer_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'username' => 'string', + 'password' => 'string', + 'answer_fallback_url' => 'string', + 'answer_fallback_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'fallback_username' => 'string', + 'fallback_password' => 'string', + 'disconnect_url' => 'string', + 'disconnect_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'call_timeout' => 'float', + 'callback_timeout' => 'float', + 'machine_detection' => '\OpenAPI\Client\Model\MachineDetectionConfiguration', + 'priority' => 'int', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'to' => null, + 'from' => null, + 'privacy' => null, + 'display_name' => null, + 'uui' => null, + 'application_id' => null, + 'answer_url' => 'uri', + 'answer_method' => null, + 'username' => null, + 'password' => null, + 'answer_fallback_url' => 'uri', + 'answer_fallback_method' => null, + 'fallback_username' => null, + 'fallback_password' => null, + 'disconnect_url' => 'uri', + 'disconnect_method' => null, + 'call_timeout' => 'double', + 'callback_timeout' => 'double', + 'machine_detection' => null, + 'priority' => null, + 'tag' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'to' => false, + 'from' => false, + 'privacy' => true, + 'display_name' => true, + 'uui' => true, + 'application_id' => false, + 'answer_url' => false, + 'answer_method' => true, + 'username' => true, + 'password' => true, + 'answer_fallback_url' => true, + 'answer_fallback_method' => true, + 'fallback_username' => true, + 'fallback_password' => true, + 'disconnect_url' => true, + 'disconnect_method' => true, + 'call_timeout' => true, + 'callback_timeout' => true, + 'machine_detection' => false, + 'priority' => true, + 'tag' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'to' => 'to', + 'from' => 'from', + 'privacy' => 'privacy', + 'display_name' => 'displayName', + 'uui' => 'uui', + 'application_id' => 'applicationId', + 'answer_url' => 'answerUrl', + 'answer_method' => 'answerMethod', + 'username' => 'username', + 'password' => 'password', + 'answer_fallback_url' => 'answerFallbackUrl', + 'answer_fallback_method' => 'answerFallbackMethod', + 'fallback_username' => 'fallbackUsername', + 'fallback_password' => 'fallbackPassword', + 'disconnect_url' => 'disconnectUrl', + 'disconnect_method' => 'disconnectMethod', + 'call_timeout' => 'callTimeout', + 'callback_timeout' => 'callbackTimeout', + 'machine_detection' => 'machineDetection', + 'priority' => 'priority', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'to' => 'setTo', + 'from' => 'setFrom', + 'privacy' => 'setPrivacy', + 'display_name' => 'setDisplayName', + 'uui' => 'setUui', + 'application_id' => 'setApplicationId', + 'answer_url' => 'setAnswerUrl', + 'answer_method' => 'setAnswerMethod', + 'username' => 'setUsername', + 'password' => 'setPassword', + 'answer_fallback_url' => 'setAnswerFallbackUrl', + 'answer_fallback_method' => 'setAnswerFallbackMethod', + 'fallback_username' => 'setFallbackUsername', + 'fallback_password' => 'setFallbackPassword', + 'disconnect_url' => 'setDisconnectUrl', + 'disconnect_method' => 'setDisconnectMethod', + 'call_timeout' => 'setCallTimeout', + 'callback_timeout' => 'setCallbackTimeout', + 'machine_detection' => 'setMachineDetection', + 'priority' => 'setPriority', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'to' => 'getTo', + 'from' => 'getFrom', + 'privacy' => 'getPrivacy', + 'display_name' => 'getDisplayName', + 'uui' => 'getUui', + 'application_id' => 'getApplicationId', + 'answer_url' => 'getAnswerUrl', + 'answer_method' => 'getAnswerMethod', + 'username' => 'getUsername', + 'password' => 'getPassword', + 'answer_fallback_url' => 'getAnswerFallbackUrl', + 'answer_fallback_method' => 'getAnswerFallbackMethod', + 'fallback_username' => 'getFallbackUsername', + 'fallback_password' => 'getFallbackPassword', + 'disconnect_url' => 'getDisconnectUrl', + 'disconnect_method' => 'getDisconnectMethod', + 'call_timeout' => 'getCallTimeout', + 'callback_timeout' => 'getCallbackTimeout', + 'machine_detection' => 'getMachineDetection', + 'priority' => 'getPriority', + 'tag' => 'getTag' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('privacy', $data ?? [], null); + $this->setIfExists('display_name', $data ?? [], null); + $this->setIfExists('uui', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('answer_url', $data ?? [], null); + $this->setIfExists('answer_method', $data ?? [], null); + $this->setIfExists('username', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('answer_fallback_url', $data ?? [], null); + $this->setIfExists('answer_fallback_method', $data ?? [], null); + $this->setIfExists('fallback_username', $data ?? [], null); + $this->setIfExists('fallback_password', $data ?? [], null); + $this->setIfExists('disconnect_url', $data ?? [], null); + $this->setIfExists('disconnect_method', $data ?? [], null); + $this->setIfExists('call_timeout', $data ?? [], 30); + $this->setIfExists('callback_timeout', $data ?? [], 15); + $this->setIfExists('machine_detection', $data ?? [], null); + $this->setIfExists('priority', $data ?? [], 5); + $this->setIfExists('tag', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + if (!is_null($this->container['display_name']) && (mb_strlen($this->container['display_name']) > 256)) { + $invalidProperties[] = "invalid value for 'display_name', the character length must be smaller than or equal to 256."; + } + + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['answer_url'] === null) { + $invalidProperties[] = "'answer_url' can't be null"; + } + if ((mb_strlen($this->container['answer_url']) > 2048)) { + $invalidProperties[] = "invalid value for 'answer_url', the character length must be smaller than or equal to 2048."; + } + + if (!is_null($this->container['username']) && (mb_strlen($this->container['username']) > 1024)) { + $invalidProperties[] = "invalid value for 'username', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) > 1024)) { + $invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['answer_fallback_url']) && (mb_strlen($this->container['answer_fallback_url']) > 2048)) { + $invalidProperties[] = "invalid value for 'answer_fallback_url', the character length must be smaller than or equal to 2048."; + } + + if (!is_null($this->container['fallback_username']) && (mb_strlen($this->container['fallback_username']) > 1024)) { + $invalidProperties[] = "invalid value for 'fallback_username', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['fallback_password']) && (mb_strlen($this->container['fallback_password']) > 1024)) { + $invalidProperties[] = "invalid value for 'fallback_password', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['disconnect_url']) && (mb_strlen($this->container['disconnect_url']) > 2048)) { + $invalidProperties[] = "invalid value for 'disconnect_url', the character length must be smaller than or equal to 2048."; + } + + if (!is_null($this->container['call_timeout']) && ($this->container['call_timeout'] > 300)) { + $invalidProperties[] = "invalid value for 'call_timeout', must be smaller than or equal to 300."; + } + + if (!is_null($this->container['call_timeout']) && ($this->container['call_timeout'] < 1)) { + $invalidProperties[] = "invalid value for 'call_timeout', must be bigger than or equal to 1."; + } + + if (!is_null($this->container['callback_timeout']) && ($this->container['callback_timeout'] > 25)) { + $invalidProperties[] = "invalid value for 'callback_timeout', must be smaller than or equal to 25."; + } + + if (!is_null($this->container['callback_timeout']) && ($this->container['callback_timeout'] < 1)) { + $invalidProperties[] = "invalid value for 'callback_timeout', must be bigger than or equal to 1."; + } + + if (!is_null($this->container['priority']) && ($this->container['priority'] > 5)) { + $invalidProperties[] = "invalid value for 'priority', must be smaller than or equal to 5."; + } + + if (!is_null($this->container['priority']) && ($this->container['priority'] < 1)) { + $invalidProperties[] = "invalid value for 'priority', must be bigger than or equal to 1."; + } + + if (!is_null($this->container['tag']) && (mb_strlen($this->container['tag']) > 4096)) { + $invalidProperties[] = "invalid value for 'tag', the character length must be smaller than or equal to 4096."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets to + * + * @return string + */ + public function getTo(): string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string $to The destination to call (must be an E.164 formatted number (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.example`)). + * + * @return $this + */ + public function setTo(string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from A Bandwidth phone number on your account the call should come from (must be in E.164 format, like `+15555551212`) even if `privacy` is set to true. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets privacy + * + * @return bool|null + */ + public function getPrivacy(): ?bool + { + return $this->container['privacy']; + } + + /** + * Sets privacy + * + * @param bool|null $privacy Hide the calling number. The `displayName` field can be used to customize the displayed name. + * + * @return $this + */ + public function setPrivacy(?bool $privacy): static + { + if (is_null($privacy)) { + array_push($this->openAPINullablesSetToNull, 'privacy'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('privacy', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['privacy'] = $privacy; + + return $this; + } + + /** + * Gets display_name + * + * @return string|null + */ + public function getDisplayName(): ?string + { + return $this->container['display_name']; + } + + /** + * Sets display_name + * + * @param string|null $display_name The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If `privacy` is true, only the following values are valid: `Restricted`, `Anonymous`, `Private`, or `Unavailable`. + * + * @return $this + */ + public function setDisplayName(?string $display_name): static + { + if (is_null($display_name)) { + array_push($this->openAPINullablesSetToNull, 'display_name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('display_name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($display_name) && (mb_strlen($display_name) > 256)) { + throw new InvalidArgumentException('invalid length for $display_name when calling CreateCall., must be smaller than or equal to 256.'); + } + + $this->container['display_name'] = $display_name; + + return $this; + } + + /** + * Gets uui + * + * @return string|null + */ + public function getUui(): ?string + { + return $this->container['uui']; + } + + /** + * Sets uui + * + * @param string|null $uui A comma-separated list of 'User-To-User' headers to be sent in the INVITE when calling a SIP URI. Each value must end with an 'encoding' parameter as described in RFC 7433. Only 'jwt', 'base64' and 'hex' encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators. + * + * @return $this + */ + public function setUui(?string $uui): static + { + if (is_null($uui)) { + array_push($this->openAPINullablesSetToNull, 'uui'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('uui', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['uui'] = $uui; + + return $this; + } + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The id of the application associated with the `from` number. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets answer_url + * + * @return string + */ + public function getAnswerUrl(): string + { + return $this->container['answer_url']; + } + + /** + * Sets answer_url + * + * @param string $answer_url The full URL to send the Answer event to when the called party answers. This endpoint should return the first BXML document to be executed in the call. Must use `https` if specifying `username` and `password`. + * + * @return $this + */ + public function setAnswerUrl(string $answer_url): static + { + if (is_null($answer_url)) { + throw new InvalidArgumentException('non-nullable answer_url cannot be null'); + } + if ((mb_strlen($answer_url) > 2048)) { + throw new InvalidArgumentException('invalid length for $answer_url when calling CreateCall., must be smaller than or equal to 2048.'); + } + + $this->container['answer_url'] = $answer_url; + + return $this; + } + + /** + * Gets answer_method + * + * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + */ + public function getAnswerMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + { + return $this->container['answer_method']; + } + + /** + * Sets answer_method + * + * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $answer_method answer_method + * + * @return $this + */ + public function setAnswerMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $answer_method): static + { + if (is_null($answer_method)) { + array_push($this->openAPINullablesSetToNull, 'answer_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_method'] = $answer_method; + + return $this; + } + + /** + * Gets username + * + * @return string|null + */ + public function getUsername(): ?string + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string|null $username Basic auth username. + * + * @return $this + */ + public function setUsername(?string $username): static + { + if (is_null($username)) { + array_push($this->openAPINullablesSetToNull, 'username'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('username', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($username) && (mb_strlen($username) > 1024)) { + throw new InvalidArgumentException('invalid length for $username when calling CreateCall., must be smaller than or equal to 1024.'); + } + + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password + * + * @return string|null + */ + public function getPassword(): ?string + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string|null $password Basic auth password. + * + * @return $this + */ + public function setPassword(?string $password): static + { + if (is_null($password)) { + array_push($this->openAPINullablesSetToNull, 'password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($password) && (mb_strlen($password) > 1024)) { + throw new InvalidArgumentException('invalid length for $password when calling CreateCall., must be smaller than or equal to 1024.'); + } + + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets answer_fallback_url + * + * @return string|null + */ + public function getAnswerFallbackUrl(): ?string + { + return $this->container['answer_fallback_url']; + } + + /** + * Sets answer_fallback_url + * + * @param string|null $answer_fallback_url A fallback url which, if provided, will be used to retry the `answer` webhook delivery in case `answerUrl` fails to respond Must use `https` if specifying `fallbackUsername` and `fallbackPassword`. + * + * @return $this + */ + public function setAnswerFallbackUrl(?string $answer_fallback_url): static + { + if (is_null($answer_fallback_url)) { + array_push($this->openAPINullablesSetToNull, 'answer_fallback_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_fallback_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($answer_fallback_url) && (mb_strlen($answer_fallback_url) > 2048)) { + throw new InvalidArgumentException('invalid length for $answer_fallback_url when calling CreateCall., must be smaller than or equal to 2048.'); + } + + $this->container['answer_fallback_url'] = $answer_fallback_url; + + return $this; + } + + /** + * Gets answer_fallback_method + * + * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + */ + public function getAnswerFallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + { + return $this->container['answer_fallback_method']; + } + + /** + * Sets answer_fallback_method + * + * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $answer_fallback_method answer_fallback_method + * + * @return $this + */ + public function setAnswerFallbackMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $answer_fallback_method): static + { + if (is_null($answer_fallback_method)) { + array_push($this->openAPINullablesSetToNull, 'answer_fallback_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_fallback_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_fallback_method'] = $answer_fallback_method; + + return $this; + } + + /** + * Gets fallback_username + * + * @return string|null + */ + public function getFallbackUsername(): ?string + { + return $this->container['fallback_username']; + } + + /** + * Sets fallback_username + * + * @param string|null $fallback_username Basic auth username. + * + * @return $this + */ + public function setFallbackUsername(?string $fallback_username): static + { + if (is_null($fallback_username)) { + array_push($this->openAPINullablesSetToNull, 'fallback_username'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fallback_username', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($fallback_username) && (mb_strlen($fallback_username) > 1024)) { + throw new InvalidArgumentException('invalid length for $fallback_username when calling CreateCall., must be smaller than or equal to 1024.'); + } + + $this->container['fallback_username'] = $fallback_username; + + return $this; + } + + /** + * Gets fallback_password + * + * @return string|null + */ + public function getFallbackPassword(): ?string + { + return $this->container['fallback_password']; + } + + /** + * Sets fallback_password + * + * @param string|null $fallback_password Basic auth password. + * + * @return $this + */ + public function setFallbackPassword(?string $fallback_password): static + { + if (is_null($fallback_password)) { + array_push($this->openAPINullablesSetToNull, 'fallback_password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fallback_password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($fallback_password) && (mb_strlen($fallback_password) > 1024)) { + throw new InvalidArgumentException('invalid length for $fallback_password when calling CreateCall., must be smaller than or equal to 1024.'); + } + + $this->container['fallback_password'] = $fallback_password; + + return $this; + } + + /** + * Gets disconnect_url + * + * @return string|null + */ + public function getDisconnectUrl(): ?string + { + return $this->container['disconnect_url']; + } + + /** + * Sets disconnect_url + * + * @param string|null $disconnect_url The URL to send the Disconnect event to when the call ends. This event does not expect a BXML response. + * + * @return $this + */ + public function setDisconnectUrl(?string $disconnect_url): static + { + if (is_null($disconnect_url)) { + array_push($this->openAPINullablesSetToNull, 'disconnect_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('disconnect_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($disconnect_url) && (mb_strlen($disconnect_url) > 2048)) { + throw new InvalidArgumentException('invalid length for $disconnect_url when calling CreateCall., must be smaller than or equal to 2048.'); + } + + $this->container['disconnect_url'] = $disconnect_url; + + return $this; + } + + /** + * Gets disconnect_method + * + * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + */ + public function getDisconnectMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + { + return $this->container['disconnect_method']; + } + + /** + * Sets disconnect_method + * + * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $disconnect_method disconnect_method + * + * @return $this + */ + public function setDisconnectMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $disconnect_method): static + { + if (is_null($disconnect_method)) { + array_push($this->openAPINullablesSetToNull, 'disconnect_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('disconnect_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['disconnect_method'] = $disconnect_method; + + return $this; + } + + /** + * Gets call_timeout + * + * @return float|null + */ + public function getCallTimeout(): ?float + { + return $this->container['call_timeout']; + } + + /** + * Sets call_timeout + * + * @param float|null $call_timeout The timeout (in seconds) for the callee to answer the call after it starts ringing. If the call does not start ringing within 30s, the call will be cancelled regardless of this value. Can be any numeric value (including decimals) between 1 and 300. + * + * @return $this + */ + public function setCallTimeout(?float $call_timeout): static + { + if (is_null($call_timeout)) { + array_push($this->openAPINullablesSetToNull, 'call_timeout'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('call_timeout', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + if (!is_null($call_timeout) && ($call_timeout > 300)) { + throw new InvalidArgumentException('invalid value for $call_timeout when calling CreateCall., must be smaller than or equal to 300.'); + } + if (!is_null($call_timeout) && ($call_timeout < 1)) { + throw new InvalidArgumentException('invalid value for $call_timeout when calling CreateCall., must be bigger than or equal to 1.'); + } + + $this->container['call_timeout'] = $call_timeout; + + return $this; + } + + /** + * Gets callback_timeout + * + * @return float|null + */ + public function getCallbackTimeout(): ?float + { + return $this->container['callback_timeout']; + } + + /** + * Sets callback_timeout + * + * @param float|null $callback_timeout 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. + * + * @return $this + */ + public function setCallbackTimeout(?float $callback_timeout): static + { + if (is_null($callback_timeout)) { + array_push($this->openAPINullablesSetToNull, 'callback_timeout'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('callback_timeout', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + if (!is_null($callback_timeout) && ($callback_timeout > 25)) { + throw new InvalidArgumentException('invalid value for $callback_timeout when calling CreateCall., must be smaller than or equal to 25.'); + } + if (!is_null($callback_timeout) && ($callback_timeout < 1)) { + throw new InvalidArgumentException('invalid value for $callback_timeout when calling CreateCall., must be bigger than or equal to 1.'); + } + + $this->container['callback_timeout'] = $callback_timeout; + + return $this; + } + + /** + * Gets machine_detection + * + * @return \OpenAPI\Client\Model\MachineDetectionConfiguration|null + */ + public function getMachineDetection(): ?\OpenAPI\Client\Model\MachineDetectionConfiguration + { + return $this->container['machine_detection']; + } + + /** + * Sets machine_detection + * + * @param \OpenAPI\Client\Model\MachineDetectionConfiguration|null $machine_detection machine_detection + * + * @return $this + */ + public function setMachineDetection(?\OpenAPI\Client\Model\MachineDetectionConfiguration $machine_detection): static + { + if (is_null($machine_detection)) { + throw new InvalidArgumentException('non-nullable machine_detection cannot be null'); + } + $this->container['machine_detection'] = $machine_detection; + + return $this; + } + + /** + * Gets priority + * + * @return int|null + */ + public function getPriority(): ?int + { + return $this->container['priority']; + } + + /** + * Sets priority + * + * @param int|null $priority 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. + * + * @return $this + */ + public function setPriority(?int $priority): static + { + if (is_null($priority)) { + array_push($this->openAPINullablesSetToNull, 'priority'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('priority', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + if (!is_null($priority) && ($priority > 5)) { + throw new InvalidArgumentException('invalid value for $priority when calling CreateCall., must be smaller than or equal to 5.'); + } + if (!is_null($priority) && ($priority < 1)) { + throw new InvalidArgumentException('invalid value for $priority when calling CreateCall., must be bigger than or equal to 1.'); + } + + $this->container['priority'] = $priority; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A custom string that will be sent with all webhooks for this call unless overwritten by a future `` verb or `tag` attribute on another verb, or cleared. May be cleared by setting `tag=\"\"` Max length 4096 characters. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($tag) && (mb_strlen($tag) > 4096)) { + throw new InvalidArgumentException('invalid length for $tag when calling CreateCall., must be smaller than or equal to 4096.'); + } + + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateCallResponse.php b/src/Model/CreateCallResponse.php new file mode 100644 index 00000000..8443916f --- /dev/null +++ b/src/Model/CreateCallResponse.php @@ -0,0 +1,1207 @@ + + */ +class CreateCallResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'createCallResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'application_id' => 'string', + 'account_id' => 'string', + 'call_id' => 'string', + 'to' => 'string', + 'from' => 'string', + 'enqueued_time' => '\DateTime', + 'call_url' => 'string', + 'call_timeout' => 'float', + 'callback_timeout' => 'float', + 'tag' => 'string', + 'answer_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'answer_url' => 'string', + 'answer_fallback_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'answer_fallback_url' => 'string', + 'disconnect_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'disconnect_url' => 'string', + 'username' => 'string', + 'password' => 'string', + 'fallback_username' => 'string', + 'fallback_password' => 'string', + 'priority' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'application_id' => null, + 'account_id' => null, + 'call_id' => null, + 'to' => null, + 'from' => null, + 'enqueued_time' => 'date-time', + 'call_url' => 'uri', + 'call_timeout' => 'double', + 'callback_timeout' => 'double', + 'tag' => null, + 'answer_method' => null, + 'answer_url' => 'uri', + 'answer_fallback_method' => null, + 'answer_fallback_url' => 'uri', + 'disconnect_method' => null, + 'disconnect_url' => 'uri', + 'username' => null, + 'password' => null, + 'fallback_username' => null, + 'fallback_password' => null, + 'priority' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'application_id' => false, + 'account_id' => false, + 'call_id' => false, + 'to' => false, + 'from' => false, + 'enqueued_time' => true, + 'call_url' => false, + 'call_timeout' => false, + 'callback_timeout' => false, + 'tag' => true, + 'answer_method' => true, + 'answer_url' => false, + 'answer_fallback_method' => true, + 'answer_fallback_url' => true, + 'disconnect_method' => true, + 'disconnect_url' => true, + 'username' => true, + 'password' => true, + 'fallback_username' => true, + 'fallback_password' => true, + 'priority' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'application_id' => 'applicationId', + 'account_id' => 'accountId', + 'call_id' => 'callId', + 'to' => 'to', + 'from' => 'from', + 'enqueued_time' => 'enqueuedTime', + 'call_url' => 'callUrl', + 'call_timeout' => 'callTimeout', + 'callback_timeout' => 'callbackTimeout', + 'tag' => 'tag', + 'answer_method' => 'answerMethod', + 'answer_url' => 'answerUrl', + 'answer_fallback_method' => 'answerFallbackMethod', + 'answer_fallback_url' => 'answerFallbackUrl', + 'disconnect_method' => 'disconnectMethod', + 'disconnect_url' => 'disconnectUrl', + 'username' => 'username', + 'password' => 'password', + 'fallback_username' => 'fallbackUsername', + 'fallback_password' => 'fallbackPassword', + 'priority' => 'priority' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'application_id' => 'setApplicationId', + 'account_id' => 'setAccountId', + 'call_id' => 'setCallId', + 'to' => 'setTo', + 'from' => 'setFrom', + 'enqueued_time' => 'setEnqueuedTime', + 'call_url' => 'setCallUrl', + 'call_timeout' => 'setCallTimeout', + 'callback_timeout' => 'setCallbackTimeout', + 'tag' => 'setTag', + 'answer_method' => 'setAnswerMethod', + 'answer_url' => 'setAnswerUrl', + 'answer_fallback_method' => 'setAnswerFallbackMethod', + 'answer_fallback_url' => 'setAnswerFallbackUrl', + 'disconnect_method' => 'setDisconnectMethod', + 'disconnect_url' => 'setDisconnectUrl', + 'username' => 'setUsername', + 'password' => 'setPassword', + 'fallback_username' => 'setFallbackUsername', + 'fallback_password' => 'setFallbackPassword', + 'priority' => 'setPriority' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'application_id' => 'getApplicationId', + 'account_id' => 'getAccountId', + 'call_id' => 'getCallId', + 'to' => 'getTo', + 'from' => 'getFrom', + 'enqueued_time' => 'getEnqueuedTime', + 'call_url' => 'getCallUrl', + 'call_timeout' => 'getCallTimeout', + 'callback_timeout' => 'getCallbackTimeout', + 'tag' => 'getTag', + 'answer_method' => 'getAnswerMethod', + 'answer_url' => 'getAnswerUrl', + 'answer_fallback_method' => 'getAnswerFallbackMethod', + 'answer_fallback_url' => 'getAnswerFallbackUrl', + 'disconnect_method' => 'getDisconnectMethod', + 'disconnect_url' => 'getDisconnectUrl', + 'username' => 'getUsername', + 'password' => 'getPassword', + 'fallback_username' => 'getFallbackUsername', + 'fallback_password' => 'getFallbackPassword', + 'priority' => 'getPriority' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('call_timeout', $data ?? [], null); + $this->setIfExists('callback_timeout', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('answer_method', $data ?? [], null); + $this->setIfExists('answer_url', $data ?? [], null); + $this->setIfExists('answer_fallback_method', $data ?? [], null); + $this->setIfExists('answer_fallback_url', $data ?? [], null); + $this->setIfExists('disconnect_method', $data ?? [], null); + $this->setIfExists('disconnect_url', $data ?? [], null); + $this->setIfExists('username', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('fallback_username', $data ?? [], null); + $this->setIfExists('fallback_password', $data ?? [], null); + $this->setIfExists('priority', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['account_id'] === null) { + $invalidProperties[] = "'account_id' can't be null"; + } + if ($this->container['call_id'] === null) { + $invalidProperties[] = "'call_id' can't be null"; + } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + if ($this->container['call_url'] === null) { + $invalidProperties[] = "'call_url' can't be null"; + } + if ($this->container['answer_method'] === null && !$this->isNullableSetToNull('answer_method')) { + $invalidProperties[] = "'answer_method' is required"; + } + if ($this->container['answer_url'] === null) { + $invalidProperties[] = "'answer_url' can't be null"; + } + if ($this->container['disconnect_method'] === null && !$this->isNullableSetToNull('disconnect_method')) { + $invalidProperties[] = "'disconnect_method' is required"; + } + if (!is_null($this->container['username']) && (mb_strlen($this->container['username']) > 1024)) { + $invalidProperties[] = "invalid value for 'username', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) > 1024)) { + $invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['fallback_username']) && (mb_strlen($this->container['fallback_username']) > 1024)) { + $invalidProperties[] = "invalid value for 'fallback_username', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['fallback_password']) && (mb_strlen($this->container['fallback_password']) > 1024)) { + $invalidProperties[] = "invalid value for 'fallback_password', the character length must be smaller than or equal to 1024."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The id of the application associated with the `from` number. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets account_id + * + * @return string + */ + public function getAccountId(): string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string $account_id The bandwidth account ID associated with the call. + * + * @return $this + */ + public function setAccountId(string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets call_id + * + * @return string + */ + public function getCallId(): string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string $call_id Programmable Voice API Call ID. + * + * @return $this + */ + public function setCallId(string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets to + * + * @return string + */ + public function getTo(): string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string $to Recipient of the outgoing call. + * + * @return $this + */ + public function setTo(string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from Phone number that created the outbound call. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time The time at which the call was accepted into the queue. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets call_url + * + * @return string + */ + public function getCallUrl(): string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string $call_url The URL to update this call's state. + * + * @return $this + */ + public function setCallUrl(string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets call_timeout + * + * @return float|null + */ + public function getCallTimeout(): ?float + { + return $this->container['call_timeout']; + } + + /** + * Sets call_timeout + * + * @param float|null $call_timeout The timeout (in seconds) for the callee to answer the call after it starts ringing. + * + * @return $this + */ + public function setCallTimeout(?float $call_timeout): static + { + if (is_null($call_timeout)) { + throw new InvalidArgumentException('non-nullable call_timeout cannot be null'); + } + $this->container['call_timeout'] = $call_timeout; + + return $this; + } + + /** + * Gets callback_timeout + * + * @return float|null + */ + public function getCallbackTimeout(): ?float + { + return $this->container['callback_timeout']; + } + + /** + * Sets callback_timeout + * + * @param float|null $callback_timeout This is the timeout (in seconds) to use when delivering webhooks for the call. + * + * @return $this + */ + public function setCallbackTimeout(?float $callback_timeout): static + { + if (is_null($callback_timeout)) { + throw new InvalidArgumentException('non-nullable callback_timeout cannot be null'); + } + $this->container['callback_timeout'] = $callback_timeout; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag Custom tag value. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets answer_method + * + * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + */ + public function getAnswerMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + { + return $this->container['answer_method']; + } + + /** + * Sets answer_method + * + * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $answer_method answer_method + * + * @return $this + */ + public function setAnswerMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $answer_method): static + { + if (is_null($answer_method)) { + array_push($this->openAPINullablesSetToNull, 'answer_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_method'] = $answer_method; + + return $this; + } + + /** + * Gets answer_url + * + * @return string + */ + public function getAnswerUrl(): string + { + return $this->container['answer_url']; + } + + /** + * Sets answer_url + * + * @param string $answer_url URL to deliver the `answer` event webhook. + * + * @return $this + */ + public function setAnswerUrl(string $answer_url): static + { + if (is_null($answer_url)) { + throw new InvalidArgumentException('non-nullable answer_url cannot be null'); + } + $this->container['answer_url'] = $answer_url; + + return $this; + } + + /** + * Gets answer_fallback_method + * + * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + */ + public function getAnswerFallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + { + return $this->container['answer_fallback_method']; + } + + /** + * Sets answer_fallback_method + * + * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $answer_fallback_method answer_fallback_method + * + * @return $this + */ + public function setAnswerFallbackMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $answer_fallback_method): static + { + if (is_null($answer_fallback_method)) { + array_push($this->openAPINullablesSetToNull, 'answer_fallback_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_fallback_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_fallback_method'] = $answer_fallback_method; + + return $this; + } + + /** + * Gets answer_fallback_url + * + * @return string|null + */ + public function getAnswerFallbackUrl(): ?string + { + return $this->container['answer_fallback_url']; + } + + /** + * Sets answer_fallback_url + * + * @param string|null $answer_fallback_url Fallback URL to deliver the `answer` event webhook. + * + * @return $this + */ + public function setAnswerFallbackUrl(?string $answer_fallback_url): static + { + if (is_null($answer_fallback_url)) { + array_push($this->openAPINullablesSetToNull, 'answer_fallback_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_fallback_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_fallback_url'] = $answer_fallback_url; + + return $this; + } + + /** + * Gets disconnect_method + * + * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + */ + public function getDisconnectMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + { + return $this->container['disconnect_method']; + } + + /** + * Sets disconnect_method + * + * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $disconnect_method disconnect_method + * + * @return $this + */ + public function setDisconnectMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $disconnect_method): static + { + if (is_null($disconnect_method)) { + array_push($this->openAPINullablesSetToNull, 'disconnect_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('disconnect_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['disconnect_method'] = $disconnect_method; + + return $this; + } + + /** + * Gets disconnect_url + * + * @return string|null + */ + public function getDisconnectUrl(): ?string + { + return $this->container['disconnect_url']; + } + + /** + * Sets disconnect_url + * + * @param string|null $disconnect_url URL to deliver the `disconnect` event webhook. + * + * @return $this + */ + public function setDisconnectUrl(?string $disconnect_url): static + { + if (is_null($disconnect_url)) { + array_push($this->openAPINullablesSetToNull, 'disconnect_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('disconnect_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['disconnect_url'] = $disconnect_url; + + return $this; + } + + /** + * Gets username + * + * @return string|null + */ + public function getUsername(): ?string + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string|null $username Basic auth username. + * + * @return $this + */ + public function setUsername(?string $username): static + { + if (is_null($username)) { + array_push($this->openAPINullablesSetToNull, 'username'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('username', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($username) && (mb_strlen($username) > 1024)) { + throw new InvalidArgumentException('invalid length for $username when calling CreateCallResponse., must be smaller than or equal to 1024.'); + } + + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password + * + * @return string|null + */ + public function getPassword(): ?string + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string|null $password Basic auth password. + * + * @return $this + */ + public function setPassword(?string $password): static + { + if (is_null($password)) { + array_push($this->openAPINullablesSetToNull, 'password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($password) && (mb_strlen($password) > 1024)) { + throw new InvalidArgumentException('invalid length for $password when calling CreateCallResponse., must be smaller than or equal to 1024.'); + } + + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets fallback_username + * + * @return string|null + */ + public function getFallbackUsername(): ?string + { + return $this->container['fallback_username']; + } + + /** + * Sets fallback_username + * + * @param string|null $fallback_username Basic auth username. + * + * @return $this + */ + public function setFallbackUsername(?string $fallback_username): static + { + if (is_null($fallback_username)) { + array_push($this->openAPINullablesSetToNull, 'fallback_username'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fallback_username', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($fallback_username) && (mb_strlen($fallback_username) > 1024)) { + throw new InvalidArgumentException('invalid length for $fallback_username when calling CreateCallResponse., must be smaller than or equal to 1024.'); + } + + $this->container['fallback_username'] = $fallback_username; + + return $this; + } + + /** + * Gets fallback_password + * + * @return string|null + */ + public function getFallbackPassword(): ?string + { + return $this->container['fallback_password']; + } + + /** + * Sets fallback_password + * + * @param string|null $fallback_password Basic auth password. + * + * @return $this + */ + public function setFallbackPassword(?string $fallback_password): static + { + if (is_null($fallback_password)) { + array_push($this->openAPINullablesSetToNull, 'fallback_password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fallback_password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($fallback_password) && (mb_strlen($fallback_password) > 1024)) { + throw new InvalidArgumentException('invalid length for $fallback_password when calling CreateCallResponse., must be smaller than or equal to 1024.'); + } + + $this->container['fallback_password'] = $fallback_password; + + return $this; + } + + /** + * Gets priority + * + * @return int|null + */ + public function getPriority(): ?int + { + return $this->container['priority']; + } + + /** + * Sets priority + * + * @param int|null $priority The priority of this call over other calls from your account. + * + * @return $this + */ + public function setPriority(?int $priority): static + { + if (is_null($priority)) { + array_push($this->openAPINullablesSetToNull, 'priority'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('priority', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['priority'] = $priority; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateEndpointRequestBase.php b/src/Model/CreateEndpointRequestBase.php new file mode 100644 index 00000000..395b5fa2 --- /dev/null +++ b/src/Model/CreateEndpointRequestBase.php @@ -0,0 +1,528 @@ + + */ +class CreateEndpointRequestBase implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'createEndpointRequestBase'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'type' => '\OpenAPI\Client\Model\EndpointTypeEnum', + 'direction' => '\OpenAPI\Client\Model\EndpointDirectionEnum', + 'event_callback_url' => 'string', + 'event_fallback_url' => 'string', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'type' => null, + 'direction' => null, + 'event_callback_url' => 'uri', + 'event_fallback_url' => 'uri', + 'tag' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'type' => false, + 'direction' => false, + 'event_callback_url' => false, + 'event_fallback_url' => false, + 'tag' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'type' => 'type', + 'direction' => 'direction', + 'event_callback_url' => 'eventCallbackUrl', + 'event_fallback_url' => 'eventFallbackUrl', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'type' => 'setType', + 'direction' => 'setDirection', + 'event_callback_url' => 'setEventCallbackUrl', + 'event_fallback_url' => 'setEventFallbackUrl', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'type' => 'getType', + 'direction' => 'getDirection', + 'event_callback_url' => 'getEventCallbackUrl', + 'event_fallback_url' => 'getEventFallbackUrl', + 'tag' => 'getTag' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('event_callback_url', $data ?? [], null); + $this->setIfExists('event_fallback_url', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['direction'] === null) { + $invalidProperties[] = "'direction' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\EndpointTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\EndpointTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\EndpointDirectionEnum + */ + public function getDirection(): \OpenAPI\Client\Model\EndpointDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\EndpointDirectionEnum $direction direction + * + * @return $this + */ + public function setDirection(\OpenAPI\Client\Model\EndpointDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets event_callback_url + * + * @return string|null + */ + public function getEventCallbackUrl(): ?string + { + return $this->container['event_callback_url']; + } + + /** + * Sets event_callback_url + * + * @param string|null $event_callback_url The URL to send event callbacks to. + * + * @return $this + */ + public function setEventCallbackUrl(?string $event_callback_url): static + { + if (is_null($event_callback_url)) { + throw new InvalidArgumentException('non-nullable event_callback_url cannot be null'); + } + $this->container['event_callback_url'] = $event_callback_url; + + return $this; + } + + /** + * Gets event_fallback_url + * + * @return string|null + */ + public function getEventFallbackUrl(): ?string + { + return $this->container['event_fallback_url']; + } + + /** + * Sets event_fallback_url + * + * @param string|null $event_fallback_url The URL to send event fallbacks to. + * + * @return $this + */ + public function setEventFallbackUrl(?string $event_fallback_url): static + { + if (is_null($event_fallback_url)) { + throw new InvalidArgumentException('non-nullable event_fallback_url cannot be null'); + } + $this->container['event_fallback_url'] = $event_fallback_url; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A tag for the endpoint. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + throw new InvalidArgumentException('non-nullable tag cannot be null'); + } + + + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateEndpointResponse.php b/src/Model/CreateEndpointResponse.php new file mode 100644 index 00000000..7e3577c9 --- /dev/null +++ b/src/Model/CreateEndpointResponse.php @@ -0,0 +1,461 @@ + + */ +class CreateEndpointResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'createEndpointResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'links' => '\OpenAPI\Client\Model\BrtcLink[]', + 'data' => '\OpenAPI\Client\Model\CreateEndpointResponseData', + 'errors' => '\OpenAPI\Client\Model\BrtcError[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'links' => null, + 'data' => null, + 'errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'links' => false, + 'data' => false, + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'links' => 'links', + 'data' => 'data', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'links' => 'setLinks', + 'data' => 'setData', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'links' => 'getLinks', + 'data' => 'getData', + 'errors' => 'getErrors' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['links'] === null) { + $invalidProperties[] = "'links' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['errors'] === null) { + $invalidProperties[] = "'errors' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets links + * + * @return \OpenAPI\Client\Model\BrtcLink[] + */ + public function getLinks(): array + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \OpenAPI\Client\Model\BrtcLink[] $links links + * + * @return $this + */ + public function setLinks(array $links): static + { + if (is_null($links)) { + throw new InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + + /** + * Gets data + * + * @return \OpenAPI\Client\Model\CreateEndpointResponseData + */ + public function getData(): \OpenAPI\Client\Model\CreateEndpointResponseData + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \OpenAPI\Client\Model\CreateEndpointResponseData $data data + * + * @return $this + */ + public function setData(\OpenAPI\Client\Model\CreateEndpointResponseData $data): static + { + if (is_null($data)) { + throw new InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets errors + * + * @return \OpenAPI\Client\Model\BrtcError[] + */ + public function getErrors(): array + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \OpenAPI\Client\Model\BrtcError[] $errors errors + * + * @return $this + */ + public function setErrors(array $errors): static + { + if (is_null($errors)) { + throw new InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateEndpointResponseData.php b/src/Model/CreateEndpointResponseData.php new file mode 100644 index 00000000..2c754573 --- /dev/null +++ b/src/Model/CreateEndpointResponseData.php @@ -0,0 +1,642 @@ + + */ +class CreateEndpointResponseData implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'createEndpointResponseData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'endpoint_id' => 'string', + 'type' => '\OpenAPI\Client\Model\EndpointTypeEnum', + 'status' => '\OpenAPI\Client\Model\EndpointStatusEnum', + 'creation_timestamp' => '\DateTime', + 'expiration_timestamp' => '\DateTime', + 'tag' => 'string', + 'devices' => '\OpenAPI\Client\Model\Device[]', + 'token' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'endpoint_id' => null, + 'type' => null, + 'status' => null, + 'creation_timestamp' => 'date-time', + 'expiration_timestamp' => 'date-time', + 'tag' => null, + 'devices' => null, + 'token' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'endpoint_id' => false, + 'type' => false, + 'status' => false, + 'creation_timestamp' => false, + 'expiration_timestamp' => false, + 'tag' => false, + 'devices' => false, + 'token' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'endpoint_id' => 'endpointId', + 'type' => 'type', + 'status' => 'status', + 'creation_timestamp' => 'creationTimestamp', + 'expiration_timestamp' => 'expirationTimestamp', + 'tag' => 'tag', + 'devices' => 'devices', + 'token' => 'token' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'endpoint_id' => 'setEndpointId', + 'type' => 'setType', + 'status' => 'setStatus', + 'creation_timestamp' => 'setCreationTimestamp', + 'expiration_timestamp' => 'setExpirationTimestamp', + 'tag' => 'setTag', + 'devices' => 'setDevices', + 'token' => 'setToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'endpoint_id' => 'getEndpointId', + 'type' => 'getType', + 'status' => 'getStatus', + 'creation_timestamp' => 'getCreationTimestamp', + 'expiration_timestamp' => 'getExpirationTimestamp', + 'tag' => 'getTag', + 'devices' => 'getDevices', + 'token' => 'getToken' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('endpoint_id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('creation_timestamp', $data ?? [], null); + $this->setIfExists('expiration_timestamp', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('devices', $data ?? [], null); + $this->setIfExists('token', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['endpoint_id'] === null) { + $invalidProperties[] = "'endpoint_id' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['creation_timestamp'] === null) { + $invalidProperties[] = "'creation_timestamp' can't be null"; + } + if ($this->container['expiration_timestamp'] === null) { + $invalidProperties[] = "'expiration_timestamp' can't be null"; + } + if ($this->container['token'] === null) { + $invalidProperties[] = "'token' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets endpoint_id + * + * @return string + */ + public function getEndpointId(): string + { + return $this->container['endpoint_id']; + } + + /** + * Sets endpoint_id + * + * @param string $endpoint_id The unique ID of the endpoint. + * + * @return $this + */ + public function setEndpointId(string $endpoint_id): static + { + if (is_null($endpoint_id)) { + throw new InvalidArgumentException('non-nullable endpoint_id cannot be null'); + } + $this->container['endpoint_id'] = $endpoint_id; + + return $this; + } + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\EndpointTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\EndpointTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets status + * + * @return \OpenAPI\Client\Model\EndpointStatusEnum + */ + public function getStatus(): \OpenAPI\Client\Model\EndpointStatusEnum + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\EndpointStatusEnum $status status + * + * @return $this + */ + public function setStatus(\OpenAPI\Client\Model\EndpointStatusEnum $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets creation_timestamp + * + * @return \DateTime + */ + public function getCreationTimestamp(): \DateTime + { + return $this->container['creation_timestamp']; + } + + /** + * Sets creation_timestamp + * + * @param \DateTime $creation_timestamp The time the endpoint was created. In ISO-8601 format. + * + * @return $this + */ + public function setCreationTimestamp(\DateTime $creation_timestamp): static + { + if (is_null($creation_timestamp)) { + throw new InvalidArgumentException('non-nullable creation_timestamp cannot be null'); + } + $this->container['creation_timestamp'] = $creation_timestamp; + + return $this; + } + + /** + * Gets expiration_timestamp + * + * @return \DateTime + */ + public function getExpirationTimestamp(): \DateTime + { + return $this->container['expiration_timestamp']; + } + + /** + * Sets expiration_timestamp + * + * @param \DateTime $expiration_timestamp The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. + * + * @return $this + */ + public function setExpirationTimestamp(\DateTime $expiration_timestamp): static + { + if (is_null($expiration_timestamp)) { + throw new InvalidArgumentException('non-nullable expiration_timestamp cannot be null'); + } + $this->container['expiration_timestamp'] = $expiration_timestamp; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A tag for the endpoint. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + throw new InvalidArgumentException('non-nullable tag cannot be null'); + } + + + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets devices + * + * @return \OpenAPI\Client\Model\Device[]|null + */ + public function getDevices(): ?array + { + return $this->container['devices']; + } + + /** + * Sets devices + * + * @param \OpenAPI\Client\Model\Device[]|null $devices devices + * + * @return $this + */ + public function setDevices(?array $devices): static + { + if (is_null($devices)) { + throw new InvalidArgumentException('non-nullable devices cannot be null'); + } + $this->container['devices'] = $devices; + + return $this; + } + + /** + * Gets token + * + * @return string + */ + public function getToken(): string + { + return $this->container['token']; + } + + /** + * Sets token + * + * @param string $token The json web token specific to the endpoint. Used to authenticate the client with the media gateway. + * + * @return $this + */ + public function setToken(string $token): static + { + if (is_null($token)) { + throw new InvalidArgumentException('non-nullable token cannot be null'); + } + $this->container['token'] = $token; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateMessageRequestError.php b/src/Model/CreateMessageRequestError.php new file mode 100644 index 00000000..cfed8fdf --- /dev/null +++ b/src/Model/CreateMessageRequestError.php @@ -0,0 +1,458 @@ + + */ +class CreateMessageRequestError implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'createMessageRequestError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'type' => 'string', + 'description' => 'string', + 'field_errors' => '\OpenAPI\Client\Model\FieldError[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'type' => null, + 'description' => null, + 'field_errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'type' => false, + 'description' => false, + 'field_errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'type' => 'type', + 'description' => 'description', + 'field_errors' => 'fieldErrors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'type' => 'setType', + 'description' => 'setDescription', + 'field_errors' => 'setFieldErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'type' => 'getType', + 'description' => 'getDescription', + 'field_errors' => 'getFieldErrors' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('field_errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType(): string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return $this + */ + public function setType(string $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription(): string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description description + * + * @return $this + */ + public function setDescription(string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets field_errors + * + * @return \OpenAPI\Client\Model\FieldError[]|null + */ + public function getFieldErrors(): ?array + { + return $this->container['field_errors']; + } + + /** + * Sets field_errors + * + * @param \OpenAPI\Client\Model\FieldError[]|null $field_errors field_errors + * + * @return $this + */ + public function setFieldErrors(?array $field_errors): static + { + if (is_null($field_errors)) { + throw new InvalidArgumentException('non-nullable field_errors cannot be null'); + } + $this->container['field_errors'] = $field_errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateMultiChannelMessageResponse.php b/src/Model/CreateMultiChannelMessageResponse.php new file mode 100644 index 00000000..7f7718d6 --- /dev/null +++ b/src/Model/CreateMultiChannelMessageResponse.php @@ -0,0 +1,452 @@ + + */ +class CreateMultiChannelMessageResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'createMultiChannelMessageResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'links' => '\OpenAPI\Client\Model\Link[]', + 'data' => '\OpenAPI\Client\Model\MultiChannelMessageResponseData', + 'errors' => '\OpenAPI\Client\Model\ErrorObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'links' => null, + 'data' => null, + 'errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'links' => false, + 'data' => false, + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'links' => 'links', + 'data' => 'data', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'links' => 'setLinks', + 'data' => 'setData', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'links' => 'getLinks', + 'data' => 'getData', + 'errors' => 'getErrors' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets links + * + * @return \OpenAPI\Client\Model\Link[]|null + */ + public function getLinks(): ?array + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \OpenAPI\Client\Model\Link[]|null $links links + * + * @return $this + */ + public function setLinks(?array $links): static + { + if (is_null($links)) { + throw new InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + + /** + * Gets data + * + * @return \OpenAPI\Client\Model\MultiChannelMessageResponseData|null + */ + public function getData(): ?\OpenAPI\Client\Model\MultiChannelMessageResponseData + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \OpenAPI\Client\Model\MultiChannelMessageResponseData|null $data data + * + * @return $this + */ + public function setData(?\OpenAPI\Client\Model\MultiChannelMessageResponseData $data): static + { + if (is_null($data)) { + throw new InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets errors + * + * @return \OpenAPI\Client\Model\ErrorObject[]|null + */ + public function getErrors(): ?array + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \OpenAPI\Client\Model\ErrorObject[]|null $errors errors + * + * @return $this + */ + public function setErrors(?array $errors): static + { + if (is_null($errors)) { + throw new InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateSyncLookupResponse.php b/src/Model/CreateSyncLookupResponse.php new file mode 100644 index 00000000..0a65a4ea --- /dev/null +++ b/src/Model/CreateSyncLookupResponse.php @@ -0,0 +1,452 @@ + + */ +class CreateSyncLookupResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'createSyncLookupResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'links' => '\OpenAPI\Client\Model\LinkSchema[]', + 'data' => '\OpenAPI\Client\Model\CreateSyncLookupResponseData', + 'errors' => '\OpenAPI\Client\Model\LookupErrorSchema[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'links' => null, + 'data' => null, + 'errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'links' => false, + 'data' => false, + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'links' => 'links', + 'data' => 'data', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'links' => 'setLinks', + 'data' => 'setData', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'links' => 'getLinks', + 'data' => 'getData', + 'errors' => 'getErrors' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets links + * + * @return \OpenAPI\Client\Model\LinkSchema[]|null + */ + public function getLinks(): ?array + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \OpenAPI\Client\Model\LinkSchema[]|null $links links + * + * @return $this + */ + public function setLinks(?array $links): static + { + if (is_null($links)) { + throw new InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + + /** + * Gets data + * + * @return \OpenAPI\Client\Model\CreateSyncLookupResponseData|null + */ + public function getData(): ?\OpenAPI\Client\Model\CreateSyncLookupResponseData + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \OpenAPI\Client\Model\CreateSyncLookupResponseData|null $data data + * + * @return $this + */ + public function setData(?\OpenAPI\Client\Model\CreateSyncLookupResponseData $data): static + { + if (is_null($data)) { + throw new InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets errors + * + * @return \OpenAPI\Client\Model\LookupErrorSchema[]|null + */ + public function getErrors(): ?array + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \OpenAPI\Client\Model\LookupErrorSchema[]|null $errors errors + * + * @return $this + */ + public function setErrors(?array $errors): static + { + if (is_null($errors)) { + throw new InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateSyncLookupResponseData.php b/src/Model/CreateSyncLookupResponseData.php new file mode 100644 index 00000000..4235ce9b --- /dev/null +++ b/src/Model/CreateSyncLookupResponseData.php @@ -0,0 +1,453 @@ + + */ +class CreateSyncLookupResponseData implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'createSyncLookupResponse_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'request_id' => 'string', + 'status' => '\OpenAPI\Client\Model\CompletedLookupStatusEnum', + 'results' => '\OpenAPI\Client\Model\LookupResult[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'request_id' => 'uuid', + 'status' => null, + 'results' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'request_id' => false, + 'status' => false, + 'results' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'request_id' => 'requestId', + 'status' => 'status', + 'results' => 'results' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'request_id' => 'setRequestId', + 'status' => 'setStatus', + 'results' => 'setResults' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'request_id' => 'getRequestId', + 'status' => 'getStatus', + 'results' => 'getResults' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('request_id', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('results', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets request_id + * + * @return string|null + */ + public function getRequestId(): ?string + { + return $this->container['request_id']; + } + + /** + * Sets request_id + * + * @param string|null $request_id The phone number lookup request ID from Bandwidth. + * + * @return $this + */ + public function setRequestId(?string $request_id): static + { + if (is_null($request_id)) { + throw new InvalidArgumentException('non-nullable request_id cannot be null'); + } + $this->container['request_id'] = $request_id; + + return $this; + } + + /** + * Gets status + * + * @return \OpenAPI\Client\Model\CompletedLookupStatusEnum|null + */ + public function getStatus(): ?\OpenAPI\Client\Model\CompletedLookupStatusEnum + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\CompletedLookupStatusEnum|null $status status + * + * @return $this + */ + public function setStatus(?\OpenAPI\Client\Model\CompletedLookupStatusEnum $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets results + * + * @return \OpenAPI\Client\Model\LookupResult[]|null + */ + public function getResults(): ?array + { + return $this->container['results']; + } + + /** + * Sets results + * + * @param \OpenAPI\Client\Model\LookupResult[]|null $results The carrier information results for the specified telephone numbers. + * + * @return $this + */ + public function setResults(?array $results): static + { + if (is_null($results)) { + throw new InvalidArgumentException('non-nullable results cannot be null'); + } + $this->container['results'] = $results; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/CreateWebRtcConnectionRequest.php b/src/Model/CreateWebRtcConnectionRequest.php new file mode 100644 index 00000000..b7fe4c50 --- /dev/null +++ b/src/Model/CreateWebRtcConnectionRequest.php @@ -0,0 +1,562 @@ + + */ +class CreateWebRtcConnectionRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'createWebRtcConnectionRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'type' => '\OpenAPI\Client\Model\EndpointTypeEnum', + 'direction' => '\OpenAPI\Client\Model\EndpointDirectionEnum', + 'event_callback_url' => 'string', + 'event_fallback_url' => 'string', + 'tag' => 'string', + 'connection_metadata' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'type' => null, + 'direction' => null, + 'event_callback_url' => 'uri', + 'event_fallback_url' => 'uri', + 'tag' => null, + 'connection_metadata' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'type' => false, + 'direction' => false, + 'event_callback_url' => false, + 'event_fallback_url' => false, + 'tag' => false, + 'connection_metadata' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'type' => 'type', + 'direction' => 'direction', + 'event_callback_url' => 'eventCallbackUrl', + 'event_fallback_url' => 'eventFallbackUrl', + 'tag' => 'tag', + 'connection_metadata' => 'connectionMetadata' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'type' => 'setType', + 'direction' => 'setDirection', + 'event_callback_url' => 'setEventCallbackUrl', + 'event_fallback_url' => 'setEventFallbackUrl', + 'tag' => 'setTag', + 'connection_metadata' => 'setConnectionMetadata' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'type' => 'getType', + 'direction' => 'getDirection', + 'event_callback_url' => 'getEventCallbackUrl', + 'event_fallback_url' => 'getEventFallbackUrl', + 'tag' => 'getTag', + 'connection_metadata' => 'getConnectionMetadata' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('event_callback_url', $data ?? [], null); + $this->setIfExists('event_fallback_url', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('connection_metadata', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['direction'] === null) { + $invalidProperties[] = "'direction' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\EndpointTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\EndpointTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\EndpointDirectionEnum + */ + public function getDirection(): \OpenAPI\Client\Model\EndpointDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\EndpointDirectionEnum $direction direction + * + * @return $this + */ + public function setDirection(\OpenAPI\Client\Model\EndpointDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets event_callback_url + * + * @return string|null + */ + public function getEventCallbackUrl(): ?string + { + return $this->container['event_callback_url']; + } + + /** + * Sets event_callback_url + * + * @param string|null $event_callback_url The URL to send event callbacks to. + * + * @return $this + */ + public function setEventCallbackUrl(?string $event_callback_url): static + { + if (is_null($event_callback_url)) { + throw new InvalidArgumentException('non-nullable event_callback_url cannot be null'); + } + $this->container['event_callback_url'] = $event_callback_url; + + return $this; + } + + /** + * Gets event_fallback_url + * + * @return string|null + */ + public function getEventFallbackUrl(): ?string + { + return $this->container['event_fallback_url']; + } + + /** + * Sets event_fallback_url + * + * @param string|null $event_fallback_url The URL to send event fallbacks to. + * + * @return $this + */ + public function setEventFallbackUrl(?string $event_fallback_url): static + { + if (is_null($event_fallback_url)) { + throw new InvalidArgumentException('non-nullable event_fallback_url cannot be null'); + } + $this->container['event_fallback_url'] = $event_fallback_url; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A tag for the endpoint. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + throw new InvalidArgumentException('non-nullable tag cannot be null'); + } + + + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets connection_metadata + * + * @return object|null + */ + public function getConnectionMetadata(): ?object + { + return $this->container['connection_metadata']; + } + + /** + * Sets connection_metadata + * + * @param object|null $connection_metadata connection_metadata + * + * @return $this + */ + public function setConnectionMetadata(?object $connection_metadata): static + { + if (is_null($connection_metadata)) { + throw new InvalidArgumentException('non-nullable connection_metadata cannot be null'); + } + $this->container['connection_metadata'] = $connection_metadata; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/DeactivationEventEnum.php b/src/Model/DeactivationEventEnum.php new file mode 100644 index 00000000..53bc9b4e --- /dev/null +++ b/src/Model/DeactivationEventEnum.php @@ -0,0 +1,44 @@ + + */ +class Device implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'device'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'device_id' => 'string', + 'device_name' => 'string', + 'status' => '\OpenAPI\Client\Model\DeviceStatusEnum', + 'creation_timestamp' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'device_id' => null, + 'device_name' => null, + 'status' => null, + 'creation_timestamp' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'device_id' => false, + 'device_name' => false, + 'status' => false, + 'creation_timestamp' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'device_id' => 'deviceId', + 'device_name' => 'deviceName', + 'status' => 'status', + 'creation_timestamp' => 'creationTimestamp' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'device_id' => 'setDeviceId', + 'device_name' => 'setDeviceName', + 'status' => 'setStatus', + 'creation_timestamp' => 'setCreationTimestamp' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'device_id' => 'getDeviceId', + 'device_name' => 'getDeviceName', + 'status' => 'getStatus', + 'creation_timestamp' => 'getCreationTimestamp' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('device_id', $data ?? [], null); + $this->setIfExists('device_name', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('creation_timestamp', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['device_id'] === null) { + $invalidProperties[] = "'device_id' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['creation_timestamp'] === null) { + $invalidProperties[] = "'creation_timestamp' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets device_id + * + * @return string + */ + public function getDeviceId(): string + { + return $this->container['device_id']; + } + + /** + * Sets device_id + * + * @param string $device_id The unique ID of the device. + * + * @return $this + */ + public function setDeviceId(string $device_id): static + { + if (is_null($device_id)) { + throw new InvalidArgumentException('non-nullable device_id cannot be null'); + } + $this->container['device_id'] = $device_id; + + return $this; + } + + /** + * Gets device_name + * + * @return string|null + */ + public function getDeviceName(): ?string + { + return $this->container['device_name']; + } + + /** + * Sets device_name + * + * @param string|null $device_name The name of the device. + * + * @return $this + */ + public function setDeviceName(?string $device_name): static + { + if (is_null($device_name)) { + throw new InvalidArgumentException('non-nullable device_name cannot be null'); + } + + + $this->container['device_name'] = $device_name; + + return $this; + } + + /** + * Gets status + * + * @return \OpenAPI\Client\Model\DeviceStatusEnum + */ + public function getStatus(): \OpenAPI\Client\Model\DeviceStatusEnum + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\DeviceStatusEnum $status status + * + * @return $this + */ + public function setStatus(\OpenAPI\Client\Model\DeviceStatusEnum $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets creation_timestamp + * + * @return \DateTime + */ + public function getCreationTimestamp(): \DateTime + { + return $this->container['creation_timestamp']; + } + + /** + * Sets creation_timestamp + * + * @param \DateTime $creation_timestamp The time the device was created. In ISO-8601 format. + * + * @return $this + */ + public function setCreationTimestamp(\DateTime $creation_timestamp): static + { + if (is_null($creation_timestamp)) { + throw new InvalidArgumentException('non-nullable creation_timestamp cannot be null'); + } + $this->container['creation_timestamp'] = $creation_timestamp; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/DeviceStatusEnum.php b/src/Model/DeviceStatusEnum.php new file mode 100644 index 00000000..a6290257 --- /dev/null +++ b/src/Model/DeviceStatusEnum.php @@ -0,0 +1,45 @@ + + */ +class DisconnectCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'disconnectCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'call_id' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_url' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'end_time' => '\DateTime', + 'cause' => 'string', + 'error_message' => 'string', + 'error_id' => 'string', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'call_id' => null, + 'direction' => null, + 'call_url' => 'uri', + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'end_time' => 'date-time', + 'cause' => null, + 'error_message' => null, + 'error_id' => null, + 'tag' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'call_id' => false, + 'direction' => false, + 'call_url' => false, + 'enqueued_time' => true, + 'start_time' => false, + 'answer_time' => true, + 'end_time' => false, + 'cause' => false, + 'error_message' => true, + 'error_id' => true, + 'tag' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'call_id' => 'callId', + 'direction' => 'direction', + 'call_url' => 'callUrl', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'end_time' => 'endTime', + 'cause' => 'cause', + 'error_message' => 'errorMessage', + 'error_id' => 'errorId', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'call_id' => 'setCallId', + 'direction' => 'setDirection', + 'call_url' => 'setCallUrl', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'end_time' => 'setEndTime', + 'cause' => 'setCause', + 'error_message' => 'setErrorMessage', + 'error_id' => 'setErrorId', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'call_id' => 'getCallId', + 'direction' => 'getDirection', + 'call_url' => 'getCallUrl', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'end_time' => 'getEndTime', + 'cause' => 'getCause', + 'error_message' => 'getErrorMessage', + 'error_id' => 'getErrorId', + 'tag' => 'getTag' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('end_time', $data ?? [], null); + $this->setIfExists('cause', $data ?? [], null); + $this->setIfExists('error_message', $data ?? [], null); + $this->setIfExists('error_id', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Time the call was answered, in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets end_time + * + * @return \DateTime|null + */ + public function getEndTime(): ?\DateTime + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param \DateTime|null $end_time The time that the recording ended in ISO-8601 format + * + * @return $this + */ + public function setEndTime(?\DateTime $end_time): static + { + if (is_null($end_time)) { + throw new InvalidArgumentException('non-nullable end_time cannot be null'); + } + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets cause + * + * @return string|null + */ + public function getCause(): ?string + { + return $this->container['cause']; + } + + /** + * Sets cause + * + * @param string|null $cause Reason the call failed - hangup, busy, timeout, cancel, rejected, callback-error, invalid-bxml, application-error, account-limit, node-capacity-exceeded, error, or unknown. + * + * @return $this + */ + public function setCause(?string $cause): static + { + if (is_null($cause)) { + throw new InvalidArgumentException('non-nullable cause cannot be null'); + } + $this->container['cause'] = $cause; + + return $this; + } + + /** + * Gets error_message + * + * @return string|null + */ + public function getErrorMessage(): ?string + { + return $this->container['error_message']; + } + + /** + * Sets error_message + * + * @param string|null $error_message Text explaining the reason that caused the call to fail in case of errors. + * + * @return $this + */ + public function setErrorMessage(?string $error_message): static + { + if (is_null($error_message)) { + array_push($this->openAPINullablesSetToNull, 'error_message'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('error_message', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['error_message'] = $error_message; + + return $this; + } + + /** + * Gets error_id + * + * @return string|null + */ + public function getErrorId(): ?string + { + return $this->container['error_id']; + } + + /** + * Sets error_id + * + * @param string|null $error_id Bandwidth's internal id that references the error event. + * + * @return $this + */ + public function setErrorId(?string $error_id): static + { + if (is_null($error_id)) { + array_push($this->openAPINullablesSetToNull, 'error_id'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('error_id', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['error_id'] = $error_id; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/Diversion.php b/src/Model/Diversion.php new file mode 100644 index 00000000..836ed955 --- /dev/null +++ b/src/Model/Diversion.php @@ -0,0 +1,588 @@ + + */ +class Diversion implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'diversion'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'reason' => 'string', + 'privacy' => 'string', + 'screen' => 'string', + 'counter' => 'string', + 'limit' => 'string', + 'unknown' => 'string', + 'orig_to' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'reason' => null, + 'privacy' => null, + 'screen' => null, + 'counter' => null, + 'limit' => null, + 'unknown' => null, + 'orig_to' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'reason' => false, + 'privacy' => false, + 'screen' => false, + 'counter' => false, + 'limit' => false, + 'unknown' => false, + 'orig_to' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'reason' => 'reason', + 'privacy' => 'privacy', + 'screen' => 'screen', + 'counter' => 'counter', + 'limit' => 'limit', + 'unknown' => 'unknown', + 'orig_to' => 'origTo' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'reason' => 'setReason', + 'privacy' => 'setPrivacy', + 'screen' => 'setScreen', + 'counter' => 'setCounter', + 'limit' => 'setLimit', + 'unknown' => 'setUnknown', + 'orig_to' => 'setOrigTo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'reason' => 'getReason', + 'privacy' => 'getPrivacy', + 'screen' => 'getScreen', + 'counter' => 'getCounter', + 'limit' => 'getLimit', + 'unknown' => 'getUnknown', + 'orig_to' => 'getOrigTo' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('reason', $data ?? [], null); + $this->setIfExists('privacy', $data ?? [], null); + $this->setIfExists('screen', $data ?? [], null); + $this->setIfExists('counter', $data ?? [], null); + $this->setIfExists('limit', $data ?? [], null); + $this->setIfExists('unknown', $data ?? [], null); + $this->setIfExists('orig_to', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets reason + * + * @return string|null + */ + public function getReason(): ?string + { + return $this->container['reason']; + } + + /** + * Sets reason + * + * @param string|null $reason The reason for the diversion. Common values: unknown, user-busy, no-answer, unavailable, unconditional, time-of-day, do-not-disturb, deflection, follow-me, out-of-service, away. + * + * @return $this + */ + public function setReason(?string $reason): static + { + if (is_null($reason)) { + throw new InvalidArgumentException('non-nullable reason cannot be null'); + } + $this->container['reason'] = $reason; + + return $this; + } + + /** + * Gets privacy + * + * @return string|null + */ + public function getPrivacy(): ?string + { + return $this->container['privacy']; + } + + /** + * Sets privacy + * + * @param string|null $privacy off or full + * + * @return $this + */ + public function setPrivacy(?string $privacy): static + { + if (is_null($privacy)) { + throw new InvalidArgumentException('non-nullable privacy cannot be null'); + } + $this->container['privacy'] = $privacy; + + return $this; + } + + /** + * Gets screen + * + * @return string|null + */ + public function getScreen(): ?string + { + return $this->container['screen']; + } + + /** + * Sets screen + * + * @param string|null $screen No if the number was provided by the user, yes if the number was provided by the network + * + * @return $this + */ + public function setScreen(?string $screen): static + { + if (is_null($screen)) { + throw new InvalidArgumentException('non-nullable screen cannot be null'); + } + $this->container['screen'] = $screen; + + return $this; + } + + /** + * Gets counter + * + * @return string|null + */ + public function getCounter(): ?string + { + return $this->container['counter']; + } + + /** + * Sets counter + * + * @param string|null $counter The number of diversions that have occurred + * + * @return $this + */ + public function setCounter(?string $counter): static + { + if (is_null($counter)) { + throw new InvalidArgumentException('non-nullable counter cannot be null'); + } + $this->container['counter'] = $counter; + + return $this; + } + + /** + * Gets limit + * + * @return string|null + */ + public function getLimit(): ?string + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param string|null $limit The maximum number of diversions allowed for this session + * + * @return $this + */ + public function setLimit(?string $limit): static + { + if (is_null($limit)) { + throw new InvalidArgumentException('non-nullable limit cannot be null'); + } + $this->container['limit'] = $limit; + + return $this; + } + + /** + * Gets unknown + * + * @return string|null + */ + public function getUnknown(): ?string + { + return $this->container['unknown']; + } + + /** + * Sets unknown + * + * @param string|null $unknown The normal list of values is not exhaustive. Your application must be tolerant of unlisted keys and unlisted values of those keys. + * + * @return $this + */ + public function setUnknown(?string $unknown): static + { + if (is_null($unknown)) { + throw new InvalidArgumentException('non-nullable unknown cannot be null'); + } + $this->container['unknown'] = $unknown; + + return $this; + } + + /** + * Gets orig_to + * + * @return string|null + */ + public function getOrigTo(): ?string + { + return $this->container['orig_to']; + } + + /** + * Sets orig_to + * + * @param string|null $orig_to Always present. Indicates the last telephone number that the call was diverted from. + * + * @return $this + */ + public function setOrigTo(?string $orig_to): static + { + if (is_null($orig_to)) { + throw new InvalidArgumentException('non-nullable orig_to cannot be null'); + } + $this->container['orig_to'] = $orig_to; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/DtmfCallback.php b/src/Model/DtmfCallback.php new file mode 100644 index 00000000..6f7e9bac --- /dev/null +++ b/src/Model/DtmfCallback.php @@ -0,0 +1,950 @@ + + */ +class DtmfCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'dtmfCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'call_id' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'digit' => 'string', + 'call_url' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'parent_call_id' => 'string', + 'transfer_caller_id' => 'string', + 'transfer_to' => 'string', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'call_id' => null, + 'direction' => null, + 'digit' => null, + 'call_url' => 'uri', + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'parent_call_id' => null, + 'transfer_caller_id' => null, + 'transfer_to' => null, + 'tag' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'call_id' => false, + 'direction' => false, + 'digit' => false, + 'call_url' => false, + 'enqueued_time' => true, + 'start_time' => false, + 'answer_time' => true, + 'parent_call_id' => false, + 'transfer_caller_id' => false, + 'transfer_to' => false, + 'tag' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'call_id' => 'callId', + 'direction' => 'direction', + 'digit' => 'digit', + 'call_url' => 'callUrl', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'parent_call_id' => 'parentCallId', + 'transfer_caller_id' => 'transferCallerId', + 'transfer_to' => 'transferTo', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'call_id' => 'setCallId', + 'direction' => 'setDirection', + 'digit' => 'setDigit', + 'call_url' => 'setCallUrl', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'parent_call_id' => 'setParentCallId', + 'transfer_caller_id' => 'setTransferCallerId', + 'transfer_to' => 'setTransferTo', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'call_id' => 'getCallId', + 'direction' => 'getDirection', + 'digit' => 'getDigit', + 'call_url' => 'getCallUrl', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'parent_call_id' => 'getParentCallId', + 'transfer_caller_id' => 'getTransferCallerId', + 'transfer_to' => 'getTransferTo', + 'tag' => 'getTag' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('digit', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('parent_call_id', $data ?? [], null); + $this->setIfExists('transfer_caller_id', $data ?? [], null); + $this->setIfExists('transfer_to', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets digit + * + * @return string|null + */ + public function getDigit(): ?string + { + return $this->container['digit']; + } + + /** + * Sets digit + * + * @param string|null $digit The digit collected in the call. + * + * @return $this + */ + public function setDigit(?string $digit): static + { + if (is_null($digit)) { + throw new InvalidArgumentException('non-nullable digit cannot be null'); + } + $this->container['digit'] = $digit; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Time the call was answered, in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets parent_call_id + * + * @return string|null + */ + public function getParentCallId(): ?string + { + return $this->container['parent_call_id']; + } + + /** + * Sets parent_call_id + * + * @param string|null $parent_call_id (optional) If the event is related to the B leg of a , the call id of the original call leg that executed the . Otherwise, this field will not be present. + * + * @return $this + */ + public function setParentCallId(?string $parent_call_id): static + { + if (is_null($parent_call_id)) { + throw new InvalidArgumentException('non-nullable parent_call_id cannot be null'); + } + $this->container['parent_call_id'] = $parent_call_id; + + return $this; + } + + /** + * Gets transfer_caller_id + * + * @return string|null + */ + public function getTransferCallerId(): ?string + { + return $this->container['transfer_caller_id']; + } + + /** + * Sets transfer_caller_id + * + * @param string|null $transfer_caller_id The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferCallerId(?string $transfer_caller_id): static + { + if (is_null($transfer_caller_id)) { + throw new InvalidArgumentException('non-nullable transfer_caller_id cannot be null'); + } + $this->container['transfer_caller_id'] = $transfer_caller_id; + + return $this; + } + + /** + * Gets transfer_to + * + * @return string|null + */ + public function getTransferTo(): ?string + { + return $this->container['transfer_to']; + } + + /** + * Sets transfer_to + * + * @param string|null $transfer_to The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferTo(?string $transfer_to): static + { + if (is_null($transfer_to)) { + throw new InvalidArgumentException('non-nullable transfer_to cannot be null'); + } + $this->container['transfer_to'] = $transfer_to; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/Endpoint.php b/src/Model/Endpoint.php new file mode 100644 index 00000000..fdff2327 --- /dev/null +++ b/src/Model/Endpoint.php @@ -0,0 +1,605 @@ + + */ +class Endpoint implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'endpoint'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'endpoint_id' => 'string', + 'type' => '\OpenAPI\Client\Model\EndpointTypeEnum', + 'status' => '\OpenAPI\Client\Model\EndpointStatusEnum', + 'creation_timestamp' => '\DateTime', + 'expiration_timestamp' => '\DateTime', + 'tag' => 'string', + 'devices' => '\OpenAPI\Client\Model\Device[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'endpoint_id' => null, + 'type' => null, + 'status' => null, + 'creation_timestamp' => 'date-time', + 'expiration_timestamp' => 'date-time', + 'tag' => null, + 'devices' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'endpoint_id' => false, + 'type' => false, + 'status' => false, + 'creation_timestamp' => false, + 'expiration_timestamp' => false, + 'tag' => false, + 'devices' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'endpoint_id' => 'endpointId', + 'type' => 'type', + 'status' => 'status', + 'creation_timestamp' => 'creationTimestamp', + 'expiration_timestamp' => 'expirationTimestamp', + 'tag' => 'tag', + 'devices' => 'devices' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'endpoint_id' => 'setEndpointId', + 'type' => 'setType', + 'status' => 'setStatus', + 'creation_timestamp' => 'setCreationTimestamp', + 'expiration_timestamp' => 'setExpirationTimestamp', + 'tag' => 'setTag', + 'devices' => 'setDevices' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'endpoint_id' => 'getEndpointId', + 'type' => 'getType', + 'status' => 'getStatus', + 'creation_timestamp' => 'getCreationTimestamp', + 'expiration_timestamp' => 'getExpirationTimestamp', + 'tag' => 'getTag', + 'devices' => 'getDevices' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('endpoint_id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('creation_timestamp', $data ?? [], null); + $this->setIfExists('expiration_timestamp', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('devices', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['endpoint_id'] === null) { + $invalidProperties[] = "'endpoint_id' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['creation_timestamp'] === null) { + $invalidProperties[] = "'creation_timestamp' can't be null"; + } + if ($this->container['expiration_timestamp'] === null) { + $invalidProperties[] = "'expiration_timestamp' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets endpoint_id + * + * @return string + */ + public function getEndpointId(): string + { + return $this->container['endpoint_id']; + } + + /** + * Sets endpoint_id + * + * @param string $endpoint_id The unique ID of the endpoint. + * + * @return $this + */ + public function setEndpointId(string $endpoint_id): static + { + if (is_null($endpoint_id)) { + throw new InvalidArgumentException('non-nullable endpoint_id cannot be null'); + } + $this->container['endpoint_id'] = $endpoint_id; + + return $this; + } + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\EndpointTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\EndpointTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets status + * + * @return \OpenAPI\Client\Model\EndpointStatusEnum + */ + public function getStatus(): \OpenAPI\Client\Model\EndpointStatusEnum + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\EndpointStatusEnum $status status + * + * @return $this + */ + public function setStatus(\OpenAPI\Client\Model\EndpointStatusEnum $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets creation_timestamp + * + * @return \DateTime + */ + public function getCreationTimestamp(): \DateTime + { + return $this->container['creation_timestamp']; + } + + /** + * Sets creation_timestamp + * + * @param \DateTime $creation_timestamp The time the endpoint was created. In ISO-8601 format. + * + * @return $this + */ + public function setCreationTimestamp(\DateTime $creation_timestamp): static + { + if (is_null($creation_timestamp)) { + throw new InvalidArgumentException('non-nullable creation_timestamp cannot be null'); + } + $this->container['creation_timestamp'] = $creation_timestamp; + + return $this; + } + + /** + * Gets expiration_timestamp + * + * @return \DateTime + */ + public function getExpirationTimestamp(): \DateTime + { + return $this->container['expiration_timestamp']; + } + + /** + * Sets expiration_timestamp + * + * @param \DateTime $expiration_timestamp The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. + * + * @return $this + */ + public function setExpirationTimestamp(\DateTime $expiration_timestamp): static + { + if (is_null($expiration_timestamp)) { + throw new InvalidArgumentException('non-nullable expiration_timestamp cannot be null'); + } + $this->container['expiration_timestamp'] = $expiration_timestamp; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A tag for the endpoint. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + throw new InvalidArgumentException('non-nullable tag cannot be null'); + } + + + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets devices + * + * @return \OpenAPI\Client\Model\Device[]|null + */ + public function getDevices(): ?array + { + return $this->container['devices']; + } + + /** + * Sets devices + * + * @param \OpenAPI\Client\Model\Device[]|null $devices devices + * + * @return $this + */ + public function setDevices(?array $devices): static + { + if (is_null($devices)) { + throw new InvalidArgumentException('non-nullable devices cannot be null'); + } + $this->container['devices'] = $devices; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/EndpointDirectionEnum.php b/src/Model/EndpointDirectionEnum.php new file mode 100644 index 00000000..5f5471f8 --- /dev/null +++ b/src/Model/EndpointDirectionEnum.php @@ -0,0 +1,47 @@ + + */ +class EndpointEvent implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'endpointEvent'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'endpoint_id' => 'string', + 'type' => '\OpenAPI\Client\Model\EndpointTypeEnum', + 'status' => '\OpenAPI\Client\Model\EndpointStatusEnum', + 'creation_timestamp' => '\DateTime', + 'expiration_timestamp' => '\DateTime', + 'tag' => 'string', + 'event_time' => '\DateTime', + 'event_type' => '\OpenAPI\Client\Model\EndpointEventTypeEnum', + 'device' => '\OpenAPI\Client\Model\Device' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'endpoint_id' => null, + 'type' => null, + 'status' => null, + 'creation_timestamp' => 'date-time', + 'expiration_timestamp' => 'date-time', + 'tag' => null, + 'event_time' => 'date-time', + 'event_type' => null, + 'device' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'endpoint_id' => false, + 'type' => false, + 'status' => false, + 'creation_timestamp' => false, + 'expiration_timestamp' => false, + 'tag' => false, + 'event_time' => false, + 'event_type' => false, + 'device' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'endpoint_id' => 'endpointId', + 'type' => 'type', + 'status' => 'status', + 'creation_timestamp' => 'creationTimestamp', + 'expiration_timestamp' => 'expirationTimestamp', + 'tag' => 'tag', + 'event_time' => 'eventTime', + 'event_type' => 'eventType', + 'device' => 'device' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'endpoint_id' => 'setEndpointId', + 'type' => 'setType', + 'status' => 'setStatus', + 'creation_timestamp' => 'setCreationTimestamp', + 'expiration_timestamp' => 'setExpirationTimestamp', + 'tag' => 'setTag', + 'event_time' => 'setEventTime', + 'event_type' => 'setEventType', + 'device' => 'setDevice' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'endpoint_id' => 'getEndpointId', + 'type' => 'getType', + 'status' => 'getStatus', + 'creation_timestamp' => 'getCreationTimestamp', + 'expiration_timestamp' => 'getExpirationTimestamp', + 'tag' => 'getTag', + 'event_time' => 'getEventTime', + 'event_type' => 'getEventType', + 'device' => 'getDevice' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('endpoint_id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('creation_timestamp', $data ?? [], null); + $this->setIfExists('expiration_timestamp', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('device', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['endpoint_id'] === null) { + $invalidProperties[] = "'endpoint_id' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['creation_timestamp'] === null) { + $invalidProperties[] = "'creation_timestamp' can't be null"; + } + if ($this->container['expiration_timestamp'] === null) { + $invalidProperties[] = "'expiration_timestamp' can't be null"; + } + if ($this->container['event_time'] === null) { + $invalidProperties[] = "'event_time' can't be null"; + } + if ($this->container['event_type'] === null) { + $invalidProperties[] = "'event_type' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets endpoint_id + * + * @return string + */ + public function getEndpointId(): string + { + return $this->container['endpoint_id']; + } + + /** + * Sets endpoint_id + * + * @param string $endpoint_id The unique ID of the endpoint. + * + * @return $this + */ + public function setEndpointId(string $endpoint_id): static + { + if (is_null($endpoint_id)) { + throw new InvalidArgumentException('non-nullable endpoint_id cannot be null'); + } + $this->container['endpoint_id'] = $endpoint_id; + + return $this; + } + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\EndpointTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\EndpointTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets status + * + * @return \OpenAPI\Client\Model\EndpointStatusEnum + */ + public function getStatus(): \OpenAPI\Client\Model\EndpointStatusEnum + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\EndpointStatusEnum $status status + * + * @return $this + */ + public function setStatus(\OpenAPI\Client\Model\EndpointStatusEnum $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets creation_timestamp + * + * @return \DateTime + */ + public function getCreationTimestamp(): \DateTime + { + return $this->container['creation_timestamp']; + } + + /** + * Sets creation_timestamp + * + * @param \DateTime $creation_timestamp The time the endpoint was created. In ISO-8601 format. + * + * @return $this + */ + public function setCreationTimestamp(\DateTime $creation_timestamp): static + { + if (is_null($creation_timestamp)) { + throw new InvalidArgumentException('non-nullable creation_timestamp cannot be null'); + } + $this->container['creation_timestamp'] = $creation_timestamp; + + return $this; + } + + /** + * Gets expiration_timestamp + * + * @return \DateTime + */ + public function getExpirationTimestamp(): \DateTime + { + return $this->container['expiration_timestamp']; + } + + /** + * Sets expiration_timestamp + * + * @param \DateTime $expiration_timestamp The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. + * + * @return $this + */ + public function setExpirationTimestamp(\DateTime $expiration_timestamp): static + { + if (is_null($expiration_timestamp)) { + throw new InvalidArgumentException('non-nullable expiration_timestamp cannot be null'); + } + $this->container['expiration_timestamp'] = $expiration_timestamp; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A tag for the endpoint. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + throw new InvalidArgumentException('non-nullable tag cannot be null'); + } + + + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime + */ + public function getEventTime(): \DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime $event_time The time the event occurred. In ISO-8601 format. + * + * @return $this + */ + public function setEventTime(\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets event_type + * + * @return \OpenAPI\Client\Model\EndpointEventTypeEnum + */ + public function getEventType(): \OpenAPI\Client\Model\EndpointEventTypeEnum + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param \OpenAPI\Client\Model\EndpointEventTypeEnum $event_type event_type + * + * @return $this + */ + public function setEventType(\OpenAPI\Client\Model\EndpointEventTypeEnum $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets device + * + * @return \OpenAPI\Client\Model\Device|null + */ + public function getDevice(): ?\OpenAPI\Client\Model\Device + { + return $this->container['device']; + } + + /** + * Sets device + * + * @param \OpenAPI\Client\Model\Device|null $device device + * + * @return $this + */ + public function setDevice(?\OpenAPI\Client\Model\Device $device): static + { + if (is_null($device)) { + throw new InvalidArgumentException('non-nullable device cannot be null'); + } + $this->container['device'] = $device; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/EndpointEventTypeEnum.php b/src/Model/EndpointEventTypeEnum.php new file mode 100644 index 00000000..040fa18a --- /dev/null +++ b/src/Model/EndpointEventTypeEnum.php @@ -0,0 +1,45 @@ + + */ +class EndpointResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'endpointResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'links' => '\OpenAPI\Client\Model\BrtcLink[]', + 'data' => '\OpenAPI\Client\Model\Endpoint', + 'errors' => '\OpenAPI\Client\Model\BrtcError[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'links' => null, + 'data' => null, + 'errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'links' => false, + 'data' => false, + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'links' => 'links', + 'data' => 'data', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'links' => 'setLinks', + 'data' => 'setData', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'links' => 'getLinks', + 'data' => 'getData', + 'errors' => 'getErrors' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['links'] === null) { + $invalidProperties[] = "'links' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['errors'] === null) { + $invalidProperties[] = "'errors' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets links + * + * @return \OpenAPI\Client\Model\BrtcLink[] + */ + public function getLinks(): array + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \OpenAPI\Client\Model\BrtcLink[] $links links + * + * @return $this + */ + public function setLinks(array $links): static + { + if (is_null($links)) { + throw new InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + + /** + * Gets data + * + * @return \OpenAPI\Client\Model\Endpoint + */ + public function getData(): \OpenAPI\Client\Model\Endpoint + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \OpenAPI\Client\Model\Endpoint $data data + * + * @return $this + */ + public function setData(\OpenAPI\Client\Model\Endpoint $data): static + { + if (is_null($data)) { + throw new InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets errors + * + * @return \OpenAPI\Client\Model\BrtcError[] + */ + public function getErrors(): array + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \OpenAPI\Client\Model\BrtcError[] $errors errors + * + * @return $this + */ + public function setErrors(array $errors): static + { + if (is_null($errors)) { + throw new InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/EndpointStatusEnum.php b/src/Model/EndpointStatusEnum.php new file mode 100644 index 00000000..e6249a3f --- /dev/null +++ b/src/Model/EndpointStatusEnum.php @@ -0,0 +1,45 @@ + + */ +class Endpoints implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'endpoints'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'endpoint_id' => 'string', + 'type' => '\OpenAPI\Client\Model\EndpointTypeEnum', + 'status' => '\OpenAPI\Client\Model\EndpointStatusEnum', + 'creation_timestamp' => '\DateTime', + 'expiration_timestamp' => '\DateTime', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'endpoint_id' => null, + 'type' => null, + 'status' => null, + 'creation_timestamp' => 'date-time', + 'expiration_timestamp' => 'date-time', + 'tag' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'endpoint_id' => false, + 'type' => false, + 'status' => false, + 'creation_timestamp' => false, + 'expiration_timestamp' => false, + 'tag' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'endpoint_id' => 'endpointId', + 'type' => 'type', + 'status' => 'status', + 'creation_timestamp' => 'creationTimestamp', + 'expiration_timestamp' => 'expirationTimestamp', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'endpoint_id' => 'setEndpointId', + 'type' => 'setType', + 'status' => 'setStatus', + 'creation_timestamp' => 'setCreationTimestamp', + 'expiration_timestamp' => 'setExpirationTimestamp', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'endpoint_id' => 'getEndpointId', + 'type' => 'getType', + 'status' => 'getStatus', + 'creation_timestamp' => 'getCreationTimestamp', + 'expiration_timestamp' => 'getExpirationTimestamp', + 'tag' => 'getTag' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('endpoint_id', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('creation_timestamp', $data ?? [], null); + $this->setIfExists('expiration_timestamp', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['endpoint_id'] === null) { + $invalidProperties[] = "'endpoint_id' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['creation_timestamp'] === null) { + $invalidProperties[] = "'creation_timestamp' can't be null"; + } + if ($this->container['expiration_timestamp'] === null) { + $invalidProperties[] = "'expiration_timestamp' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets endpoint_id + * + * @return string + */ + public function getEndpointId(): string + { + return $this->container['endpoint_id']; + } + + /** + * Sets endpoint_id + * + * @param string $endpoint_id The unique ID of the endpoint. + * + * @return $this + */ + public function setEndpointId(string $endpoint_id): static + { + if (is_null($endpoint_id)) { + throw new InvalidArgumentException('non-nullable endpoint_id cannot be null'); + } + $this->container['endpoint_id'] = $endpoint_id; + + return $this; + } + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\EndpointTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\EndpointTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets status + * + * @return \OpenAPI\Client\Model\EndpointStatusEnum + */ + public function getStatus(): \OpenAPI\Client\Model\EndpointStatusEnum + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\EndpointStatusEnum $status status + * + * @return $this + */ + public function setStatus(\OpenAPI\Client\Model\EndpointStatusEnum $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets creation_timestamp + * + * @return \DateTime + */ + public function getCreationTimestamp(): \DateTime + { + return $this->container['creation_timestamp']; + } + + /** + * Sets creation_timestamp + * + * @param \DateTime $creation_timestamp The time the endpoint was created. In ISO-8601 format. + * + * @return $this + */ + public function setCreationTimestamp(\DateTime $creation_timestamp): static + { + if (is_null($creation_timestamp)) { + throw new InvalidArgumentException('non-nullable creation_timestamp cannot be null'); + } + $this->container['creation_timestamp'] = $creation_timestamp; + + return $this; + } + + /** + * Gets expiration_timestamp + * + * @return \DateTime + */ + public function getExpirationTimestamp(): \DateTime + { + return $this->container['expiration_timestamp']; + } + + /** + * Sets expiration_timestamp + * + * @param \DateTime $expiration_timestamp The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. + * + * @return $this + */ + public function setExpirationTimestamp(\DateTime $expiration_timestamp): static + { + if (is_null($expiration_timestamp)) { + throw new InvalidArgumentException('non-nullable expiration_timestamp cannot be null'); + } + $this->container['expiration_timestamp'] = $expiration_timestamp; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A tag for the endpoint. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + throw new InvalidArgumentException('non-nullable tag cannot be null'); + } + + + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ErrorObject.php b/src/Model/ErrorObject.php new file mode 100644 index 00000000..8d65de74 --- /dev/null +++ b/src/Model/ErrorObject.php @@ -0,0 +1,461 @@ + + */ +class ErrorObject implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'errorObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'type' => 'string', + 'description' => 'string', + 'source' => '\OpenAPI\Client\Model\ErrorSource' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'type' => null, + 'description' => null, + 'source' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'type' => false, + 'description' => false, + 'source' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'type' => 'type', + 'description' => 'description', + 'source' => 'source' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'type' => 'setType', + 'description' => 'setDescription', + 'source' => 'setSource' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'type' => 'getType', + 'description' => 'getDescription', + 'source' => 'getSource' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('source', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ($this->container['source'] === null) { + $invalidProperties[] = "'source' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType(): string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type A concise summary of the error used for categorization. + * + * @return $this + */ + public function setType(string $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription(): string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description A detailed explanation of the error. + * + * @return $this + */ + public function setDescription(string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets source + * + * @return \OpenAPI\Client\Model\ErrorSource + */ + public function getSource(): \OpenAPI\Client\Model\ErrorSource + { + return $this->container['source']; + } + + /** + * Sets source + * + * @param \OpenAPI\Client\Model\ErrorSource $source source + * + * @return $this + */ + public function setSource(\OpenAPI\Client\Model\ErrorSource $source): static + { + if (is_null($source)) { + throw new InvalidArgumentException('non-nullable source cannot be null'); + } + $this->container['source'] = $source; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ErrorSource.php b/src/Model/ErrorSource.php new file mode 100644 index 00000000..4788bef1 --- /dev/null +++ b/src/Model/ErrorSource.php @@ -0,0 +1,487 @@ + + */ +class ErrorSource implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'errorSource'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'parameter' => 'string', + 'field' => 'string', + 'header' => 'string', + 'reference' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'parameter' => null, + 'field' => null, + 'header' => null, + 'reference' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'parameter' => false, + 'field' => false, + 'header' => false, + 'reference' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'parameter' => 'parameter', + 'field' => 'field', + 'header' => 'header', + 'reference' => 'reference' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'parameter' => 'setParameter', + 'field' => 'setField', + 'header' => 'setHeader', + 'reference' => 'setReference' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'parameter' => 'getParameter', + 'field' => 'getField', + 'header' => 'getHeader', + 'reference' => 'getReference' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('parameter', $data ?? [], null); + $this->setIfExists('field', $data ?? [], null); + $this->setIfExists('header', $data ?? [], null); + $this->setIfExists('reference', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets parameter + * + * @return string|null + */ + public function getParameter(): ?string + { + return $this->container['parameter']; + } + + /** + * Sets parameter + * + * @param string|null $parameter The relevant URI query parameter causing the error + * + * @return $this + */ + public function setParameter(?string $parameter): static + { + if (is_null($parameter)) { + throw new InvalidArgumentException('non-nullable parameter cannot be null'); + } + $this->container['parameter'] = $parameter; + + return $this; + } + + /** + * Gets field + * + * @return string|null + */ + public function getField(): ?string + { + return $this->container['field']; + } + + /** + * Sets field + * + * @param string|null $field The request body field that led to the error + * + * @return $this + */ + public function setField(?string $field): static + { + if (is_null($field)) { + throw new InvalidArgumentException('non-nullable field cannot be null'); + } + $this->container['field'] = $field; + + return $this; + } + + /** + * Gets header + * + * @return string|null + */ + public function getHeader(): ?string + { + return $this->container['header']; + } + + /** + * Sets header + * + * @param string|null $header The header field that contributed to the error + * + * @return $this + */ + public function setHeader(?string $header): static + { + if (is_null($header)) { + throw new InvalidArgumentException('non-nullable header cannot be null'); + } + $this->container['header'] = $header; + + return $this; + } + + /** + * Gets reference + * + * @return string|null + */ + public function getReference(): ?string + { + return $this->container['reference']; + } + + /** + * Sets reference + * + * @param string|null $reference A resource ID or path linked to the error + * + * @return $this + */ + public function setReference(?string $reference): static + { + if (is_null($reference)) { + throw new InvalidArgumentException('non-nullable reference cannot be null'); + } + $this->container['reference'] = $reference; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/FailureWebhook.php b/src/Model/FailureWebhook.php new file mode 100644 index 00000000..f599341a --- /dev/null +++ b/src/Model/FailureWebhook.php @@ -0,0 +1,576 @@ + + */ +class FailureWebhook implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'failureWebhook'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'account_id' => 'string', + 'phone_number' => 'string', + 'error_code' => 'string', + 'error_message' => 'string', + 'errors' => 'string[]', + 'internal_ticket_number' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'account_id' => null, + 'phone_number' => null, + 'error_code' => null, + 'error_message' => null, + 'errors' => null, + 'internal_ticket_number' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'account_id' => false, + 'phone_number' => false, + 'error_code' => false, + 'error_message' => false, + 'errors' => false, + 'internal_ticket_number' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'account_id' => 'accountId', + 'phone_number' => 'phoneNumber', + 'error_code' => 'errorCode', + 'error_message' => 'errorMessage', + 'errors' => 'errors', + 'internal_ticket_number' => 'internalTicketNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'account_id' => 'setAccountId', + 'phone_number' => 'setPhoneNumber', + 'error_code' => 'setErrorCode', + 'error_message' => 'setErrorMessage', + 'errors' => 'setErrors', + 'internal_ticket_number' => 'setInternalTicketNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'account_id' => 'getAccountId', + 'phone_number' => 'getPhoneNumber', + 'error_code' => 'getErrorCode', + 'error_message' => 'getErrorMessage', + 'errors' => 'getErrors', + 'internal_ticket_number' => 'getInternalTicketNumber' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('phone_number', $data ?? [], null); + $this->setIfExists('error_code', $data ?? [], null); + $this->setIfExists('error_message', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('internal_ticket_number', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) > 12)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be smaller than or equal to 12."; + } + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) < 12)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be bigger than or equal to 12."; + } + + if (!is_null($this->container['phone_number']) && !preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", $this->container['phone_number'])) { + $invalidProperties[] = "invalid value for 'phone_number', must be conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id User's account ID. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets phone_number + * + * @return string|null + */ + public function getPhoneNumber(): ?string + { + return $this->container['phone_number']; + } + + /** + * Sets phone_number + * + * @param string|null $phone_number Toll-free telephone number in E.164 format. + * + * @return $this + */ + public function setPhoneNumber(?string $phone_number): static + { + if (is_null($phone_number)) { + throw new InvalidArgumentException('non-nullable phone_number cannot be null'); + } + if ((mb_strlen($phone_number) > 12)) { + throw new InvalidArgumentException('invalid length for $phone_number when calling FailureWebhook., must be smaller than or equal to 12.'); + } + if ((mb_strlen($phone_number) < 12)) { + throw new InvalidArgumentException('invalid length for $phone_number when calling FailureWebhook., must be bigger than or equal to 12.'); + } + if ((!preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", ObjectSerializer::toString($phone_number)))) { + throw new InvalidArgumentException("invalid value for \$phone_number when calling FailureWebhook., must conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."); + } + + $this->container['phone_number'] = $phone_number; + + return $this; + } + + /** + * Gets error_code + * + * @return string|null + */ + public function getErrorCode(): ?string + { + return $this->container['error_code']; + } + + /** + * Sets error_code + * + * @param string|null $error_code An error code indicating what error was encountered. This code can be interpreted as an HTTP status code in regards to the error that was encountered. + * + * @return $this + */ + public function setErrorCode(?string $error_code): static + { + if (is_null($error_code)) { + throw new InvalidArgumentException('non-nullable error_code cannot be null'); + } + $this->container['error_code'] = $error_code; + + return $this; + } + + /** + * Gets error_message + * + * @return string|null + */ + public function getErrorMessage(): ?string + { + return $this->container['error_message']; + } + + /** + * Sets error_message + * + * @param string|null $error_message A description of the error that was encountered. + * + * @return $this + */ + public function setErrorMessage(?string $error_message): static + { + if (is_null($error_message)) { + throw new InvalidArgumentException('non-nullable error_message cannot be null'); + } + $this->container['error_message'] = $error_message; + + return $this; + } + + /** + * Gets errors + * + * @return string[]|null + */ + public function getErrors(): ?array + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param string[]|null $errors Details of the errors that were encountered when processing the request. + * + * @return $this + */ + public function setErrors(?array $errors): static + { + if (is_null($errors)) { + throw new InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + + /** + * Gets internal_ticket_number + * + * @return string|null + */ + public function getInternalTicketNumber(): ?string + { + return $this->container['internal_ticket_number']; + } + + /** + * Sets internal_ticket_number + * + * @param string|null $internal_ticket_number Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. + * + * @return $this + */ + public function setInternalTicketNumber(?string $internal_ticket_number): static + { + if (is_null($internal_ticket_number)) { + throw new InvalidArgumentException('non-nullable internal_ticket_number cannot be null'); + } + $this->container['internal_ticket_number'] = $internal_ticket_number; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/FieldError.php b/src/Model/FieldError.php new file mode 100644 index 00000000..224e4760 --- /dev/null +++ b/src/Model/FieldError.php @@ -0,0 +1,418 @@ + + */ +class FieldError implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'fieldError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'field_name' => 'string', + 'description' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'field_name' => null, + 'description' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'field_name' => false, + 'description' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'field_name' => 'fieldName', + 'description' => 'description' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'field_name' => 'setFieldName', + 'description' => 'setDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'field_name' => 'getFieldName', + 'description' => 'getDescription' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('field_name', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets field_name + * + * @return string|null + */ + public function getFieldName(): ?string + { + return $this->container['field_name']; + } + + /** + * Sets field_name + * + * @param string|null $field_name The name of the field that contains the error + * + * @return $this + */ + public function setFieldName(?string $field_name): static + { + if (is_null($field_name)) { + throw new InvalidArgumentException('non-nullable field_name cannot be null'); + } + $this->container['field_name'] = $field_name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description The error associated with the field + * + * @return $this + */ + public function setDescription(?string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/FileFormatEnum.php b/src/Model/FileFormatEnum.php new file mode 100644 index 00000000..2ba57c25 --- /dev/null +++ b/src/Model/FileFormatEnum.php @@ -0,0 +1,46 @@ + + */ +class GatherCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'gatherCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_id' => 'string', + 'digits' => 'string', + 'call_url' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'parent_call_id' => 'string', + 'terminating_digit' => 'string', + 'transfer_caller_id' => 'string', + 'transfer_to' => 'string', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'digits' => null, + 'call_url' => 'uri', + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'parent_call_id' => null, + 'terminating_digit' => null, + 'transfer_caller_id' => null, + 'transfer_to' => null, + 'tag' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'digits' => false, + 'call_url' => false, + 'enqueued_time' => true, + 'start_time' => false, + 'answer_time' => true, + 'parent_call_id' => false, + 'terminating_digit' => false, + 'transfer_caller_id' => false, + 'transfer_to' => false, + 'tag' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'digits' => 'digits', + 'call_url' => 'callUrl', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'parent_call_id' => 'parentCallId', + 'terminating_digit' => 'terminatingDigit', + 'transfer_caller_id' => 'transferCallerId', + 'transfer_to' => 'transferTo', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'digits' => 'setDigits', + 'call_url' => 'setCallUrl', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'parent_call_id' => 'setParentCallId', + 'terminating_digit' => 'setTerminatingDigit', + 'transfer_caller_id' => 'setTransferCallerId', + 'transfer_to' => 'setTransferTo', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'digits' => 'getDigits', + 'call_url' => 'getCallUrl', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'parent_call_id' => 'getParentCallId', + 'terminating_digit' => 'getTerminatingDigit', + 'transfer_caller_id' => 'getTransferCallerId', + 'transfer_to' => 'getTransferTo', + 'tag' => 'getTag' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('digits', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('parent_call_id', $data ?? [], null); + $this->setIfExists('terminating_digit', $data ?? [], null); + $this->setIfExists('transfer_caller_id', $data ?? [], null); + $this->setIfExists('transfer_to', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets digits + * + * @return string|null + */ + public function getDigits(): ?string + { + return $this->container['digits']; + } + + /** + * Sets digits + * + * @param string|null $digits (optional) The digits, letters, and/or symbols entered by the user. The string is empty if a timeout occurred before any buttons were pressed. + * + * @return $this + */ + public function setDigits(?string $digits): static + { + if (is_null($digits)) { + throw new InvalidArgumentException('non-nullable digits cannot be null'); + } + $this->container['digits'] = $digits; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Time the call was answered, in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets parent_call_id + * + * @return string|null + */ + public function getParentCallId(): ?string + { + return $this->container['parent_call_id']; + } + + /** + * Sets parent_call_id + * + * @param string|null $parent_call_id (optional) If the event is related to the B leg of a , the call id of the original call leg that executed the . Otherwise, this field will not be present. + * + * @return $this + */ + public function setParentCallId(?string $parent_call_id): static + { + if (is_null($parent_call_id)) { + throw new InvalidArgumentException('non-nullable parent_call_id cannot be null'); + } + $this->container['parent_call_id'] = $parent_call_id; + + return $this; + } + + /** + * Gets terminating_digit + * + * @return string|null + */ + public function getTerminatingDigit(): ?string + { + return $this->container['terminating_digit']; + } + + /** + * Sets terminating_digit + * + * @param string|null $terminating_digit (optional) The digit the user pressed to end the gather. Empty string value if no terminating digit was pressed. + * + * @return $this + */ + public function setTerminatingDigit(?string $terminating_digit): static + { + if (is_null($terminating_digit)) { + throw new InvalidArgumentException('non-nullable terminating_digit cannot be null'); + } + $this->container['terminating_digit'] = $terminating_digit; + + return $this; + } + + /** + * Gets transfer_caller_id + * + * @return string|null + */ + public function getTransferCallerId(): ?string + { + return $this->container['transfer_caller_id']; + } + + /** + * Sets transfer_caller_id + * + * @param string|null $transfer_caller_id The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferCallerId(?string $transfer_caller_id): static + { + if (is_null($transfer_caller_id)) { + throw new InvalidArgumentException('non-nullable transfer_caller_id cannot be null'); + } + $this->container['transfer_caller_id'] = $transfer_caller_id; + + return $this; + } + + /** + * Gets transfer_to + * + * @return string|null + */ + public function getTransferTo(): ?string + { + return $this->container['transfer_to']; + } + + /** + * Sets transfer_to + * + * @param string|null $transfer_to The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferTo(?string $transfer_to): static + { + if (is_null($transfer_to)) { + throw new InvalidArgumentException('non-nullable transfer_to cannot be null'); + } + $this->container['transfer_to'] = $transfer_to; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/GetAsyncBulkLookupResponse.php b/src/Model/GetAsyncBulkLookupResponse.php new file mode 100644 index 00000000..4ab1e534 --- /dev/null +++ b/src/Model/GetAsyncBulkLookupResponse.php @@ -0,0 +1,452 @@ + + */ +class GetAsyncBulkLookupResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'getAsyncBulkLookupResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'links' => '\OpenAPI\Client\Model\LinkSchema[]', + 'data' => '\OpenAPI\Client\Model\GetAsyncBulkLookupResponseData', + 'errors' => '\OpenAPI\Client\Model\LookupErrorSchema[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'links' => null, + 'data' => null, + 'errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'links' => false, + 'data' => false, + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'links' => 'links', + 'data' => 'data', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'links' => 'setLinks', + 'data' => 'setData', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'links' => 'getLinks', + 'data' => 'getData', + 'errors' => 'getErrors' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets links + * + * @return \OpenAPI\Client\Model\LinkSchema[]|null + */ + public function getLinks(): ?array + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \OpenAPI\Client\Model\LinkSchema[]|null $links links + * + * @return $this + */ + public function setLinks(?array $links): static + { + if (is_null($links)) { + throw new InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + + /** + * Gets data + * + * @return \OpenAPI\Client\Model\GetAsyncBulkLookupResponseData|null + */ + public function getData(): ?\OpenAPI\Client\Model\GetAsyncBulkLookupResponseData + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \OpenAPI\Client\Model\GetAsyncBulkLookupResponseData|null $data data + * + * @return $this + */ + public function setData(?\OpenAPI\Client\Model\GetAsyncBulkLookupResponseData $data): static + { + if (is_null($data)) { + throw new InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets errors + * + * @return \OpenAPI\Client\Model\LookupErrorSchema[]|null + */ + public function getErrors(): ?array + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \OpenAPI\Client\Model\LookupErrorSchema[]|null $errors errors + * + * @return $this + */ + public function setErrors(?array $errors): static + { + if (is_null($errors)) { + throw new InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/GetAsyncBulkLookupResponseData.php b/src/Model/GetAsyncBulkLookupResponseData.php new file mode 100644 index 00000000..8af32a2d --- /dev/null +++ b/src/Model/GetAsyncBulkLookupResponseData.php @@ -0,0 +1,453 @@ + + */ +class GetAsyncBulkLookupResponseData implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'getAsyncBulkLookupResponse_data'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'request_id' => 'string', + 'status' => '\OpenAPI\Client\Model\InProgressLookupStatusEnum', + 'results' => '\OpenAPI\Client\Model\LookupResult[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'request_id' => 'uuid', + 'status' => null, + 'results' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'request_id' => false, + 'status' => false, + 'results' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'request_id' => 'requestId', + 'status' => 'status', + 'results' => 'results' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'request_id' => 'setRequestId', + 'status' => 'setStatus', + 'results' => 'setResults' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'request_id' => 'getRequestId', + 'status' => 'getStatus', + 'results' => 'getResults' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('request_id', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('results', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets request_id + * + * @return string|null + */ + public function getRequestId(): ?string + { + return $this->container['request_id']; + } + + /** + * Sets request_id + * + * @param string|null $request_id The phone number lookup request ID from Bandwidth. + * + * @return $this + */ + public function setRequestId(?string $request_id): static + { + if (is_null($request_id)) { + throw new InvalidArgumentException('non-nullable request_id cannot be null'); + } + $this->container['request_id'] = $request_id; + + return $this; + } + + /** + * Gets status + * + * @return \OpenAPI\Client\Model\InProgressLookupStatusEnum|null + */ + public function getStatus(): ?\OpenAPI\Client\Model\InProgressLookupStatusEnum + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\InProgressLookupStatusEnum|null $status status + * + * @return $this + */ + public function setStatus(?\OpenAPI\Client\Model\InProgressLookupStatusEnum $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets results + * + * @return \OpenAPI\Client\Model\LookupResult[]|null + */ + public function getResults(): ?array + { + return $this->container['results']; + } + + /** + * Sets results + * + * @param \OpenAPI\Client\Model\LookupResult[]|null $results The carrier information results for the specified telephone number. + * + * @return $this + */ + public function setResults(?array $results): static + { + if (is_null($results)) { + throw new InvalidArgumentException('non-nullable results cannot be null'); + } + $this->container['results'] = $results; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/InProgressLookupStatusEnum.php b/src/Model/InProgressLookupStatusEnum.php new file mode 100644 index 00000000..984c5f7c --- /dev/null +++ b/src/Model/InProgressLookupStatusEnum.php @@ -0,0 +1,49 @@ + + */ +class InboundCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'inboundCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'time' => '\DateTime', + 'type' => '\OpenAPI\Client\Model\InboundCallbackTypeEnum', + 'to' => 'string', + 'description' => 'string', + 'message' => '\OpenAPI\Client\Model\InboundCallbackMessage', + 'carrier_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'time' => 'date-time', + 'type' => null, + 'to' => null, + 'description' => null, + 'message' => null, + 'carrier_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'time' => false, + 'type' => false, + 'to' => false, + 'description' => false, + 'message' => false, + 'carrier_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'time' => 'time', + 'type' => 'type', + 'to' => 'to', + 'description' => 'description', + 'message' => 'message', + 'carrier_name' => 'carrierName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'time' => 'setTime', + 'type' => 'setType', + 'to' => 'setTo', + 'description' => 'setDescription', + 'message' => 'setMessage', + 'carrier_name' => 'setCarrierName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'time' => 'getTime', + 'type' => 'getType', + 'to' => 'getTo', + 'description' => 'getDescription', + 'message' => 'getMessage', + 'carrier_name' => 'getCarrierName' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('time', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('carrier_name', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['time'] === null) { + $invalidProperties[] = "'time' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets time + * + * @return \DateTime + */ + public function getTime(): \DateTime + { + return $this->container['time']; + } + + /** + * Sets time + * + * @param \DateTime $time time + * + * @return $this + */ + public function setTime(\DateTime $time): static + { + if (is_null($time)) { + throw new InvalidArgumentException('non-nullable time cannot be null'); + } + $this->container['time'] = $time; + + return $this; + } + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\InboundCallbackTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\InboundCallbackTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\InboundCallbackTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\InboundCallbackTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets to + * + * @return string + */ + public function getTo(): string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string $to The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. + * + * @return $this + */ + public function setTo(string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription(): string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description A detailed description of the event described by the callback. + * + * @return $this + */ + public function setDescription(string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets message + * + * @return \OpenAPI\Client\Model\InboundCallbackMessage + */ + public function getMessage(): \OpenAPI\Client\Model\InboundCallbackMessage + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param \OpenAPI\Client\Model\InboundCallbackMessage $message message + * + * @return $this + */ + public function setMessage(\OpenAPI\Client\Model\InboundCallbackMessage $message): static + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets carrier_name + * + * @return string|null + */ + public function getCarrierName(): ?string + { + return $this->container['carrier_name']; + } + + /** + * Sets carrier_name + * + * @param string|null $carrier_name The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. + * + * @return $this + */ + public function setCarrierName(?string $carrier_name): static + { + if (is_null($carrier_name)) { + throw new InvalidArgumentException('non-nullable carrier_name cannot be null'); + } + $this->container['carrier_name'] = $carrier_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/InboundCallbackMessage.php b/src/Model/InboundCallbackMessage.php new file mode 100644 index 00000000..0119a4d5 --- /dev/null +++ b/src/Model/InboundCallbackMessage.php @@ -0,0 +1,920 @@ + + */ +class InboundCallbackMessage implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'inboundCallbackMessage'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'id' => 'string', + 'owner' => 'string', + 'application_id' => 'string', + 'time' => '\DateTime', + 'segment_count' => 'int', + 'direction' => '\OpenAPI\Client\Model\MessageDirectionEnum', + 'to' => 'string[]', + 'from' => 'string', + 'text' => 'string', + 'tag' => 'string', + 'media' => 'string[]', + 'priority' => '\OpenAPI\Client\Model\PriorityEnum', + 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', + 'content' => '\OpenAPI\Client\Model\MultiChannelMessageContent', + 'suggestion_response' => '\OpenAPI\Client\Model\RbmSuggestionResponse', + 'location_response' => '\OpenAPI\Client\Model\RbmLocationResponse' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'id' => null, + 'owner' => null, + 'application_id' => null, + 'time' => 'date-time', + 'segment_count' => null, + 'direction' => null, + 'to' => null, + 'from' => null, + 'text' => null, + 'tag' => null, + 'media' => 'uri', + 'priority' => null, + 'channel' => null, + 'content' => null, + 'suggestion_response' => null, + 'location_response' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'id' => false, + 'owner' => false, + 'application_id' => false, + 'time' => false, + 'segment_count' => false, + 'direction' => false, + 'to' => false, + 'from' => false, + 'text' => false, + 'tag' => false, + 'media' => false, + 'priority' => false, + 'channel' => false, + 'content' => false, + 'suggestion_response' => false, + 'location_response' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'id' => 'id', + 'owner' => 'owner', + 'application_id' => 'applicationId', + 'time' => 'time', + 'segment_count' => 'segmentCount', + 'direction' => 'direction', + 'to' => 'to', + 'from' => 'from', + 'text' => 'text', + 'tag' => 'tag', + 'media' => 'media', + 'priority' => 'priority', + 'channel' => 'channel', + 'content' => 'content', + 'suggestion_response' => 'suggestionResponse', + 'location_response' => 'locationResponse' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'id' => 'setId', + 'owner' => 'setOwner', + 'application_id' => 'setApplicationId', + 'time' => 'setTime', + 'segment_count' => 'setSegmentCount', + 'direction' => 'setDirection', + 'to' => 'setTo', + 'from' => 'setFrom', + 'text' => 'setText', + 'tag' => 'setTag', + 'media' => 'setMedia', + 'priority' => 'setPriority', + 'channel' => 'setChannel', + 'content' => 'setContent', + 'suggestion_response' => 'setSuggestionResponse', + 'location_response' => 'setLocationResponse' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'id' => 'getId', + 'owner' => 'getOwner', + 'application_id' => 'getApplicationId', + 'time' => 'getTime', + 'segment_count' => 'getSegmentCount', + 'direction' => 'getDirection', + 'to' => 'getTo', + 'from' => 'getFrom', + 'text' => 'getText', + 'tag' => 'getTag', + 'media' => 'getMedia', + 'priority' => 'getPriority', + 'channel' => 'getChannel', + 'content' => 'getContent', + 'suggestion_response' => 'getSuggestionResponse', + 'location_response' => 'getLocationResponse' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('time', $data ?? [], null); + $this->setIfExists('segment_count', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('media', $data ?? [], null); + $this->setIfExists('priority', $data ?? [], null); + $this->setIfExists('channel', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('suggestion_response', $data ?? [], null); + $this->setIfExists('location_response', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['owner'] === null) { + $invalidProperties[] = "'owner' can't be null"; + } + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['time'] === null) { + $invalidProperties[] = "'time' can't be null"; + } + if ($this->container['segment_count'] === null) { + $invalidProperties[] = "'segment_count' can't be null"; + } + if ($this->container['direction'] === null) { + $invalidProperties[] = "'direction' can't be null"; + } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId(): string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id A unique identifier of the message. + * + * @return $this + */ + public function setId(string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets owner + * + * @return string + */ + public function getOwner(): string + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner The Bandwidth phone number or alphanumeric identifier associated with the message. + * + * @return $this + */ + public function setOwner(string $owner): static + { + if (is_null($owner)) { + throw new InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets time + * + * @return \DateTime + */ + public function getTime(): \DateTime + { + return $this->container['time']; + } + + /** + * Sets time + * + * @param \DateTime $time time + * + * @return $this + */ + public function setTime(\DateTime $time): static + { + if (is_null($time)) { + throw new InvalidArgumentException('non-nullable time cannot be null'); + } + $this->container['time'] = $time; + + return $this; + } + + /** + * Gets segment_count + * + * @return int + */ + public function getSegmentCount(): int + { + return $this->container['segment_count']; + } + + /** + * Sets segment_count + * + * @param int $segment_count The number of segments the user's message is broken into before sending over carrier networks. + * + * @return $this + */ + public function setSegmentCount(int $segment_count): static + { + if (is_null($segment_count)) { + throw new InvalidArgumentException('non-nullable segment_count cannot be null'); + } + $this->container['segment_count'] = $segment_count; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\MessageDirectionEnum + */ + public function getDirection(): \OpenAPI\Client\Model\MessageDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\MessageDirectionEnum $direction direction + * + * @return $this + */ + public function setDirection(\OpenAPI\Client\Model\MessageDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets to + * + * @return string[] + */ + public function getTo(): array + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string[] $to The phone number recipients of the message. + * + * @return $this + */ + public function setTo(array $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + + + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from The Bandwidth phone number or alphanumeric identifier the message was sent from. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets text + * + * @return string|null + */ + public function getText(): ?string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string|null $text text + * + * @return $this + */ + public function setText(?string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A custom string that will be included in callback events of the message. Max 1024 characters. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + throw new InvalidArgumentException('non-nullable tag cannot be null'); + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets media + * + * @return string[]|null + */ + public function getMedia(): ?array + { + return $this->container['media']; + } + + /** + * Sets media + * + * @param string[]|null $media Optional media, not applicable for sms + * + * @return $this + */ + public function setMedia(?array $media): static + { + if (is_null($media)) { + throw new InvalidArgumentException('non-nullable media cannot be null'); + } + $this->container['media'] = $media; + + return $this; + } + + /** + * Gets priority + * + * @return \OpenAPI\Client\Model\PriorityEnum|null + */ + public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum + { + return $this->container['priority']; + } + + /** + * Sets priority + * + * @param \OpenAPI\Client\Model\PriorityEnum|null $priority priority + * + * @return $this + */ + public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): static + { + if (is_null($priority)) { + throw new InvalidArgumentException('non-nullable priority cannot be null'); + } + $this->container['priority'] = $priority; + + return $this; + } + + /** + * Gets channel + * + * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum|null + */ + public function getChannel(): ?\OpenAPI\Client\Model\MultiChannelMessageChannelEnum + { + return $this->container['channel']; + } + + /** + * Sets channel + * + * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum|null $channel channel + * + * @return $this + */ + public function setChannel(?\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + { + if (is_null($channel)) { + throw new InvalidArgumentException('non-nullable channel cannot be null'); + } + $this->container['channel'] = $channel; + + return $this; + } + + /** + * Gets content + * + * @return \OpenAPI\Client\Model\MultiChannelMessageContent|null + */ + public function getContent(): ?\OpenAPI\Client\Model\MultiChannelMessageContent + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param \OpenAPI\Client\Model\MultiChannelMessageContent|null $content content + * + * @return $this + */ + public function setContent(?\OpenAPI\Client\Model\MultiChannelMessageContent $content): static + { + if (is_null($content)) { + throw new InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets suggestion_response + * + * @return \OpenAPI\Client\Model\RbmSuggestionResponse|null + */ + public function getSuggestionResponse(): ?\OpenAPI\Client\Model\RbmSuggestionResponse + { + return $this->container['suggestion_response']; + } + + /** + * Sets suggestion_response + * + * @param \OpenAPI\Client\Model\RbmSuggestionResponse|null $suggestion_response suggestion_response + * + * @return $this + */ + public function setSuggestionResponse(?\OpenAPI\Client\Model\RbmSuggestionResponse $suggestion_response): static + { + if (is_null($suggestion_response)) { + throw new InvalidArgumentException('non-nullable suggestion_response cannot be null'); + } + $this->container['suggestion_response'] = $suggestion_response; + + return $this; + } + + /** + * Gets location_response + * + * @return \OpenAPI\Client\Model\RbmLocationResponse|null + */ + public function getLocationResponse(): ?\OpenAPI\Client\Model\RbmLocationResponse + { + return $this->container['location_response']; + } + + /** + * Sets location_response + * + * @param \OpenAPI\Client\Model\RbmLocationResponse|null $location_response location_response + * + * @return $this + */ + public function setLocationResponse(?\OpenAPI\Client\Model\RbmLocationResponse $location_response): static + { + if (is_null($location_response)) { + throw new InvalidArgumentException('non-nullable location_response cannot be null'); + } + $this->container['location_response'] = $location_response; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/InboundCallbackTypeEnum.php b/src/Model/InboundCallbackTypeEnum.php new file mode 100644 index 00000000..7ff174d5 --- /dev/null +++ b/src/Model/InboundCallbackTypeEnum.php @@ -0,0 +1,48 @@ + + */ +class InitiateCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'initiateCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_id' => 'string', + 'call_url' => 'string', + 'start_time' => '\DateTime', + 'diversion' => '\OpenAPI\Client\Model\Diversion', + 'stir_shaken' => '\OpenAPI\Client\Model\StirShaken', + 'uui' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'call_url' => 'uri', + 'start_time' => 'date-time', + 'diversion' => null, + 'stir_shaken' => null, + 'uui' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'call_url' => false, + 'start_time' => false, + 'diversion' => false, + 'stir_shaken' => false, + 'uui' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'call_url' => 'callUrl', + 'start_time' => 'startTime', + 'diversion' => 'diversion', + 'stir_shaken' => 'stirShaken', + 'uui' => 'uui' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'call_url' => 'setCallUrl', + 'start_time' => 'setStartTime', + 'diversion' => 'setDiversion', + 'stir_shaken' => 'setStirShaken', + 'uui' => 'setUui' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'call_url' => 'getCallUrl', + 'start_time' => 'getStartTime', + 'diversion' => 'getDiversion', + 'stir_shaken' => 'getStirShaken', + 'uui' => 'getUui' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('diversion', $data ?? [], null); + $this->setIfExists('stir_shaken', $data ?? [], null); + $this->setIfExists('uui', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['uui']) && (mb_strlen($this->container['uui']) > 256)) { + $invalidProperties[] = "invalid value for 'uui', the character length must be smaller than or equal to 256."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets diversion + * + * @return \OpenAPI\Client\Model\Diversion|null + */ + public function getDiversion(): ?\OpenAPI\Client\Model\Diversion + { + return $this->container['diversion']; + } + + /** + * Sets diversion + * + * @param \OpenAPI\Client\Model\Diversion|null $diversion diversion + * + * @return $this + */ + public function setDiversion(?\OpenAPI\Client\Model\Diversion $diversion): static + { + if (is_null($diversion)) { + throw new InvalidArgumentException('non-nullable diversion cannot be null'); + } + $this->container['diversion'] = $diversion; + + return $this; + } + + /** + * Gets stir_shaken + * + * @return \OpenAPI\Client\Model\StirShaken|null + */ + public function getStirShaken(): ?\OpenAPI\Client\Model\StirShaken + { + return $this->container['stir_shaken']; + } + + /** + * Sets stir_shaken + * + * @param \OpenAPI\Client\Model\StirShaken|null $stir_shaken stir_shaken + * + * @return $this + */ + public function setStirShaken(?\OpenAPI\Client\Model\StirShaken $stir_shaken): static + { + if (is_null($stir_shaken)) { + throw new InvalidArgumentException('non-nullable stir_shaken cannot be null'); + } + $this->container['stir_shaken'] = $stir_shaken; + + return $this; + } + + /** + * Gets uui + * + * @return string|null + */ + public function getUui(): ?string + { + return $this->container['uui']; + } + + /** + * Sets uui + * + * @param string|null $uui The value of the `User-To-User` header to send within the initial `INVITE`. Must include the encoding parameter as specified in RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. + * + * @return $this + */ + public function setUui(?string $uui): static + { + if (is_null($uui)) { + throw new InvalidArgumentException('non-nullable uui cannot be null'); + } + if ((mb_strlen($uui) > 256)) { + throw new InvalidArgumentException('invalid length for $uui when calling InitiateCallback., must be smaller than or equal to 256.'); + } + + $this->container['uui'] = $uui; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/LatestMessageDeliveryStatusEnum.php b/src/Model/LatestMessageDeliveryStatusEnum.php new file mode 100644 index 00000000..788b30f7 --- /dev/null +++ b/src/Model/LatestMessageDeliveryStatusEnum.php @@ -0,0 +1,50 @@ + + */ +class Link implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'link'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'rel' => 'string', + 'href' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'rel' => null, + 'href' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'rel' => false, + 'href' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'rel' => 'rel', + 'href' => 'href' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'rel' => 'setRel', + 'href' => 'setHref' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'rel' => 'getRel', + 'href' => 'getHref' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('rel', $data ?? [], null); + $this->setIfExists('href', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets rel + * + * @return string|null + */ + public function getRel(): ?string + { + return $this->container['rel']; + } + + /** + * Sets rel + * + * @param string|null $rel rel + * + * @return $this + */ + public function setRel(?string $rel): static + { + if (is_null($rel)) { + throw new InvalidArgumentException('non-nullable rel cannot be null'); + } + $this->container['rel'] = $rel; + + return $this; + } + + /** + * Gets href + * + * @return string|null + */ + public function getHref(): ?string + { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string|null $href href + * + * @return $this + */ + public function setHref(?string $href): static + { + if (is_null($href)) { + throw new InvalidArgumentException('non-nullable href cannot be null'); + } + $this->container['href'] = $href; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/LinkSchema.php b/src/Model/LinkSchema.php new file mode 100644 index 00000000..de7298c6 --- /dev/null +++ b/src/Model/LinkSchema.php @@ -0,0 +1,452 @@ + + */ +class LinkSchema implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'linkSchema'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'href' => 'string', + 'rel' => 'string', + 'method' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'href' => null, + 'rel' => null, + 'method' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'href' => false, + 'rel' => false, + 'method' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'href' => 'href', + 'rel' => 'rel', + 'method' => 'method' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'href' => 'setHref', + 'rel' => 'setRel', + 'method' => 'setMethod' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'href' => 'getHref', + 'rel' => 'getRel', + 'method' => 'getMethod' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('href', $data ?? [], null); + $this->setIfExists('rel', $data ?? [], null); + $this->setIfExists('method', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets href + * + * @return string|null + */ + public function getHref(): ?string + { + return $this->container['href']; + } + + /** + * Sets href + * + * @param string|null $href URI of the link. + * + * @return $this + */ + public function setHref(?string $href): static + { + if (is_null($href)) { + throw new InvalidArgumentException('non-nullable href cannot be null'); + } + $this->container['href'] = $href; + + return $this; + } + + /** + * Gets rel + * + * @return string|null + */ + public function getRel(): ?string + { + return $this->container['rel']; + } + + /** + * Sets rel + * + * @param string|null $rel Specifies the relationship between this link and the resource. + * + * @return $this + */ + public function setRel(?string $rel): static + { + if (is_null($rel)) { + throw new InvalidArgumentException('non-nullable rel cannot be null'); + } + $this->container['rel'] = $rel; + + return $this; + } + + /** + * Gets method + * + * @return string|null + */ + public function getMethod(): ?string + { + return $this->container['method']; + } + + /** + * Sets method + * + * @param string|null $method HTTP method to be used. + * + * @return $this + */ + public function setMethod(?string $method): static + { + if (is_null($method)) { + throw new InvalidArgumentException('non-nullable method cannot be null'); + } + $this->container['method'] = $method; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/LinksObject.php b/src/Model/LinksObject.php new file mode 100644 index 00000000..20bc4282 --- /dev/null +++ b/src/Model/LinksObject.php @@ -0,0 +1,486 @@ + + */ +class LinksObject implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'linksObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'first' => 'string', + 'next' => 'string', + 'previous' => 'string', + 'last' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'first' => null, + 'next' => null, + 'previous' => null, + 'last' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'first' => false, + 'next' => false, + 'previous' => false, + 'last' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'first' => 'first', + 'next' => 'next', + 'previous' => 'previous', + 'last' => 'last' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'first' => 'setFirst', + 'next' => 'setNext', + 'previous' => 'setPrevious', + 'last' => 'setLast' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'first' => 'getFirst', + 'next' => 'getNext', + 'previous' => 'getPrevious', + 'last' => 'getLast' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('first', $data ?? [], null); + $this->setIfExists('next', $data ?? [], null); + $this->setIfExists('previous', $data ?? [], null); + $this->setIfExists('last', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets first + * + * @return string|null + */ + public function getFirst(): ?string + { + return $this->container['first']; + } + + /** + * Sets first + * + * @param string|null $first The first (or only) page of results matching the query. + * + * @return $this + */ + public function setFirst(?string $first): static + { + if (is_null($first)) { + throw new InvalidArgumentException('non-nullable first cannot be null'); + } + $this->container['first'] = $first; + + return $this; + } + + /** + * Gets next + * + * @return string|null + */ + public function getNext(): ?string + { + return $this->container['next']; + } + + /** + * Sets next + * + * @param string|null $next If more results exist than specified by 'size', this link returns the next page of 'size' results. + * + * @return $this + */ + public function setNext(?string $next): static + { + if (is_null($next)) { + throw new InvalidArgumentException('non-nullable next cannot be null'); + } + $this->container['next'] = $next; + + return $this; + } + + /** + * Gets previous + * + * @return string|null + */ + public function getPrevious(): ?string + { + return $this->container['previous']; + } + + /** + * Sets previous + * + * @param string|null $previous If the results are more than one page, this link returns the previous page of 'size' results. + * + * @return $this + */ + public function setPrevious(?string $previous): static + { + if (is_null($previous)) { + throw new InvalidArgumentException('non-nullable previous cannot be null'); + } + $this->container['previous'] = $previous; + + return $this; + } + + /** + * Gets last + * + * @return string|null + */ + public function getLast(): ?string + { + return $this->container['last']; + } + + /** + * Sets last + * + * @param string|null $last If more results exist than specified by 'size', this link return the last page of result. + * + * @return $this + */ + public function setLast(?string $last): static + { + if (is_null($last)) { + throw new InvalidArgumentException('non-nullable last cannot be null'); + } + $this->container['last'] = $last; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ListEndpointsResponse.php b/src/Model/ListEndpointsResponse.php new file mode 100644 index 00000000..4a6a35a2 --- /dev/null +++ b/src/Model/ListEndpointsResponse.php @@ -0,0 +1,495 @@ + + */ +class ListEndpointsResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'listEndpointsResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'links' => '\OpenAPI\Client\Model\BrtcLink[]', + 'page' => '\OpenAPI\Client\Model\Page', + 'data' => '\OpenAPI\Client\Model\Endpoints[]', + 'errors' => '\OpenAPI\Client\Model\BrtcError[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'links' => null, + 'page' => null, + 'data' => null, + 'errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'links' => false, + 'page' => false, + 'data' => false, + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'links' => 'links', + 'page' => 'page', + 'data' => 'data', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'links' => 'setLinks', + 'page' => 'setPage', + 'data' => 'setData', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'links' => 'getLinks', + 'page' => 'getPage', + 'data' => 'getData', + 'errors' => 'getErrors' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('page', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['links'] === null) { + $invalidProperties[] = "'links' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + if ($this->container['errors'] === null) { + $invalidProperties[] = "'errors' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets links + * + * @return \OpenAPI\Client\Model\BrtcLink[] + */ + public function getLinks(): array + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \OpenAPI\Client\Model\BrtcLink[] $links links + * + * @return $this + */ + public function setLinks(array $links): static + { + if (is_null($links)) { + throw new InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + + /** + * Gets page + * + * @return \OpenAPI\Client\Model\Page|null + */ + public function getPage(): ?\OpenAPI\Client\Model\Page + { + return $this->container['page']; + } + + /** + * Sets page + * + * @param \OpenAPI\Client\Model\Page|null $page page + * + * @return $this + */ + public function setPage(?\OpenAPI\Client\Model\Page $page): static + { + if (is_null($page)) { + throw new InvalidArgumentException('non-nullable page cannot be null'); + } + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets data + * + * @return \OpenAPI\Client\Model\Endpoints[] + */ + public function getData(): array + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \OpenAPI\Client\Model\Endpoints[] $data data + * + * @return $this + */ + public function setData(array $data): static + { + if (is_null($data)) { + throw new InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets errors + * + * @return \OpenAPI\Client\Model\BrtcError[] + */ + public function getErrors(): array + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \OpenAPI\Client\Model\BrtcError[] $errors errors + * + * @return $this + */ + public function setErrors(array $errors): static + { + if (is_null($errors)) { + throw new InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ListMessageDirectionEnum.php b/src/Model/ListMessageDirectionEnum.php new file mode 100644 index 00000000..674da8dc --- /dev/null +++ b/src/Model/ListMessageDirectionEnum.php @@ -0,0 +1,46 @@ + + */ +class ListMessageItem implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'listMessageItem'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'message_id' => 'string', + 'account_id' => 'string', + 'source_tn' => 'string', + 'destination_tn' => 'string', + 'message_status' => '\OpenAPI\Client\Model\MessageStatusEnum', + 'message_direction' => '\OpenAPI\Client\Model\ListMessageDirectionEnum', + 'message_type' => '\OpenAPI\Client\Model\MessageTypeEnum', + 'segment_count' => 'int', + 'error_code' => 'int', + 'receive_time' => '\DateTime', + 'carrier_name' => 'string', + 'message_size' => 'int', + 'message_length' => 'int', + 'attachment_count' => 'int', + 'recipient_count' => 'int', + 'campaign_class' => 'string', + 'campaign_id' => 'string', + 'bw_latency' => 'int', + 'carrier_latency' => 'int', + 'calling_number_country_a3' => 'string', + 'called_number_country_a3' => 'string', + 'product' => 'string', + 'location' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'message_id' => null, + 'account_id' => null, + 'source_tn' => null, + 'destination_tn' => null, + 'message_status' => null, + 'message_direction' => null, + 'message_type' => null, + 'segment_count' => null, + 'error_code' => null, + 'receive_time' => 'date-time', + 'carrier_name' => null, + 'message_size' => null, + 'message_length' => null, + 'attachment_count' => null, + 'recipient_count' => null, + 'campaign_class' => null, + 'campaign_id' => null, + 'bw_latency' => null, + 'carrier_latency' => null, + 'calling_number_country_a3' => null, + 'called_number_country_a3' => null, + 'product' => null, + 'location' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'message_id' => false, + 'account_id' => false, + 'source_tn' => false, + 'destination_tn' => false, + 'message_status' => false, + 'message_direction' => false, + 'message_type' => false, + 'segment_count' => false, + 'error_code' => false, + 'receive_time' => false, + 'carrier_name' => true, + 'message_size' => true, + 'message_length' => false, + 'attachment_count' => true, + 'recipient_count' => true, + 'campaign_class' => true, + 'campaign_id' => true, + 'bw_latency' => true, + 'carrier_latency' => true, + 'calling_number_country_a3' => true, + 'called_number_country_a3' => true, + 'product' => true, + 'location' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'message_id' => 'messageId', + 'account_id' => 'accountId', + 'source_tn' => 'sourceTn', + 'destination_tn' => 'destinationTn', + 'message_status' => 'messageStatus', + 'message_direction' => 'messageDirection', + 'message_type' => 'messageType', + 'segment_count' => 'segmentCount', + 'error_code' => 'errorCode', + 'receive_time' => 'receiveTime', + 'carrier_name' => 'carrierName', + 'message_size' => 'messageSize', + 'message_length' => 'messageLength', + 'attachment_count' => 'attachmentCount', + 'recipient_count' => 'recipientCount', + 'campaign_class' => 'campaignClass', + 'campaign_id' => 'campaignId', + 'bw_latency' => 'bwLatency', + 'carrier_latency' => 'carrierLatency', + 'calling_number_country_a3' => 'callingNumberCountryA3', + 'called_number_country_a3' => 'calledNumberCountryA3', + 'product' => 'product', + 'location' => 'location' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'message_id' => 'setMessageId', + 'account_id' => 'setAccountId', + 'source_tn' => 'setSourceTn', + 'destination_tn' => 'setDestinationTn', + 'message_status' => 'setMessageStatus', + 'message_direction' => 'setMessageDirection', + 'message_type' => 'setMessageType', + 'segment_count' => 'setSegmentCount', + 'error_code' => 'setErrorCode', + 'receive_time' => 'setReceiveTime', + 'carrier_name' => 'setCarrierName', + 'message_size' => 'setMessageSize', + 'message_length' => 'setMessageLength', + 'attachment_count' => 'setAttachmentCount', + 'recipient_count' => 'setRecipientCount', + 'campaign_class' => 'setCampaignClass', + 'campaign_id' => 'setCampaignId', + 'bw_latency' => 'setBwLatency', + 'carrier_latency' => 'setCarrierLatency', + 'calling_number_country_a3' => 'setCallingNumberCountryA3', + 'called_number_country_a3' => 'setCalledNumberCountryA3', + 'product' => 'setProduct', + 'location' => 'setLocation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'message_id' => 'getMessageId', + 'account_id' => 'getAccountId', + 'source_tn' => 'getSourceTn', + 'destination_tn' => 'getDestinationTn', + 'message_status' => 'getMessageStatus', + 'message_direction' => 'getMessageDirection', + 'message_type' => 'getMessageType', + 'segment_count' => 'getSegmentCount', + 'error_code' => 'getErrorCode', + 'receive_time' => 'getReceiveTime', + 'carrier_name' => 'getCarrierName', + 'message_size' => 'getMessageSize', + 'message_length' => 'getMessageLength', + 'attachment_count' => 'getAttachmentCount', + 'recipient_count' => 'getRecipientCount', + 'campaign_class' => 'getCampaignClass', + 'campaign_id' => 'getCampaignId', + 'bw_latency' => 'getBwLatency', + 'carrier_latency' => 'getCarrierLatency', + 'calling_number_country_a3' => 'getCallingNumberCountryA3', + 'called_number_country_a3' => 'getCalledNumberCountryA3', + 'product' => 'getProduct', + 'location' => 'getLocation' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('message_id', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('source_tn', $data ?? [], null); + $this->setIfExists('destination_tn', $data ?? [], null); + $this->setIfExists('message_status', $data ?? [], null); + $this->setIfExists('message_direction', $data ?? [], null); + $this->setIfExists('message_type', $data ?? [], null); + $this->setIfExists('segment_count', $data ?? [], null); + $this->setIfExists('error_code', $data ?? [], null); + $this->setIfExists('receive_time', $data ?? [], null); + $this->setIfExists('carrier_name', $data ?? [], null); + $this->setIfExists('message_size', $data ?? [], null); + $this->setIfExists('message_length', $data ?? [], null); + $this->setIfExists('attachment_count', $data ?? [], null); + $this->setIfExists('recipient_count', $data ?? [], null); + $this->setIfExists('campaign_class', $data ?? [], null); + $this->setIfExists('campaign_id', $data ?? [], null); + $this->setIfExists('bw_latency', $data ?? [], null); + $this->setIfExists('carrier_latency', $data ?? [], null); + $this->setIfExists('calling_number_country_a3', $data ?? [], null); + $this->setIfExists('called_number_country_a3', $data ?? [], null); + $this->setIfExists('product', $data ?? [], null); + $this->setIfExists('location', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets message_id + * + * @return string|null + */ + public function getMessageId(): ?string + { + return $this->container['message_id']; + } + + /** + * Sets message_id + * + * @param string|null $message_id The message id + * + * @return $this + */ + public function setMessageId(?string $message_id): static + { + if (is_null($message_id)) { + throw new InvalidArgumentException('non-nullable message_id cannot be null'); + } + $this->container['message_id'] = $message_id; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The account id associated with this message. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets source_tn + * + * @return string|null + */ + public function getSourceTn(): ?string + { + return $this->container['source_tn']; + } + + /** + * Sets source_tn + * + * @param string|null $source_tn The source phone number of the message. + * + * @return $this + */ + public function setSourceTn(?string $source_tn): static + { + if (is_null($source_tn)) { + throw new InvalidArgumentException('non-nullable source_tn cannot be null'); + } + $this->container['source_tn'] = $source_tn; + + return $this; + } + + /** + * Gets destination_tn + * + * @return string|null + */ + public function getDestinationTn(): ?string + { + return $this->container['destination_tn']; + } + + /** + * Sets destination_tn + * + * @param string|null $destination_tn The recipient phone number of the message. + * + * @return $this + */ + public function setDestinationTn(?string $destination_tn): static + { + if (is_null($destination_tn)) { + throw new InvalidArgumentException('non-nullable destination_tn cannot be null'); + } + $this->container['destination_tn'] = $destination_tn; + + return $this; + } + + /** + * Gets message_status + * + * @return \OpenAPI\Client\Model\MessageStatusEnum|null + */ + public function getMessageStatus(): ?\OpenAPI\Client\Model\MessageStatusEnum + { + return $this->container['message_status']; + } + + /** + * Sets message_status + * + * @param \OpenAPI\Client\Model\MessageStatusEnum|null $message_status message_status + * + * @return $this + */ + public function setMessageStatus(?\OpenAPI\Client\Model\MessageStatusEnum $message_status): static + { + if (is_null($message_status)) { + throw new InvalidArgumentException('non-nullable message_status cannot be null'); + } + $this->container['message_status'] = $message_status; + + return $this; + } + + /** + * Gets message_direction + * + * @return \OpenAPI\Client\Model\ListMessageDirectionEnum|null + */ + public function getMessageDirection(): ?\OpenAPI\Client\Model\ListMessageDirectionEnum + { + return $this->container['message_direction']; + } + + /** + * Sets message_direction + * + * @param \OpenAPI\Client\Model\ListMessageDirectionEnum|null $message_direction message_direction + * + * @return $this + */ + public function setMessageDirection(?\OpenAPI\Client\Model\ListMessageDirectionEnum $message_direction): static + { + if (is_null($message_direction)) { + throw new InvalidArgumentException('non-nullable message_direction cannot be null'); + } + $this->container['message_direction'] = $message_direction; + + return $this; + } + + /** + * Gets message_type + * + * @return \OpenAPI\Client\Model\MessageTypeEnum|null + */ + public function getMessageType(): ?\OpenAPI\Client\Model\MessageTypeEnum + { + return $this->container['message_type']; + } + + /** + * Sets message_type + * + * @param \OpenAPI\Client\Model\MessageTypeEnum|null $message_type message_type + * + * @return $this + */ + public function setMessageType(?\OpenAPI\Client\Model\MessageTypeEnum $message_type): static + { + if (is_null($message_type)) { + throw new InvalidArgumentException('non-nullable message_type cannot be null'); + } + $this->container['message_type'] = $message_type; + + return $this; + } + + /** + * Gets segment_count + * + * @return int|null + */ + public function getSegmentCount(): ?int + { + return $this->container['segment_count']; + } + + /** + * Sets segment_count + * + * @param int|null $segment_count The number of segments the user's message is broken into before sending over carrier networks. + * + * @return $this + */ + public function setSegmentCount(?int $segment_count): static + { + if (is_null($segment_count)) { + throw new InvalidArgumentException('non-nullable segment_count cannot be null'); + } + $this->container['segment_count'] = $segment_count; + + return $this; + } + + /** + * Gets error_code + * + * @return int|null + */ + public function getErrorCode(): ?int + { + return $this->container['error_code']; + } + + /** + * Sets error_code + * + * @param int|null $error_code The numeric error code of the message. + * + * @return $this + */ + public function setErrorCode(?int $error_code): static + { + if (is_null($error_code)) { + throw new InvalidArgumentException('non-nullable error_code cannot be null'); + } + $this->container['error_code'] = $error_code; + + return $this; + } + + /** + * Gets receive_time + * + * @return \DateTime|null + */ + public function getReceiveTime(): ?\DateTime + { + return $this->container['receive_time']; + } + + /** + * Sets receive_time + * + * @param \DateTime|null $receive_time The ISO 8601 datetime of the message. + * + * @return $this + */ + public function setReceiveTime(?\DateTime $receive_time): static + { + if (is_null($receive_time)) { + throw new InvalidArgumentException('non-nullable receive_time cannot be null'); + } + $this->container['receive_time'] = $receive_time; + + return $this; + } + + /** + * Gets carrier_name + * + * @return string|null + */ + public function getCarrierName(): ?string + { + return $this->container['carrier_name']; + } + + /** + * Sets carrier_name + * + * @param string|null $carrier_name The name of the carrier. Not currently supported for MMS coming soon. + * + * @return $this + */ + public function setCarrierName(?string $carrier_name): static + { + if (is_null($carrier_name)) { + array_push($this->openAPINullablesSetToNull, 'carrier_name'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('carrier_name', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['carrier_name'] = $carrier_name; + + return $this; + } + + /** + * Gets message_size + * + * @return int|null + */ + public function getMessageSize(): ?int + { + return $this->container['message_size']; + } + + /** + * Sets message_size + * + * @param int|null $message_size The size of the message including message content and headers. + * + * @return $this + */ + public function setMessageSize(?int $message_size): static + { + if (is_null($message_size)) { + array_push($this->openAPINullablesSetToNull, 'message_size'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('message_size', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['message_size'] = $message_size; + + return $this; + } + + /** + * Gets message_length + * + * @return int|null + */ + public function getMessageLength(): ?int + { + return $this->container['message_length']; + } + + /** + * Sets message_length + * + * @param int|null $message_length The length of the message content. + * + * @return $this + */ + public function setMessageLength(?int $message_length): static + { + if (is_null($message_length)) { + throw new InvalidArgumentException('non-nullable message_length cannot be null'); + } + $this->container['message_length'] = $message_length; + + return $this; + } + + /** + * Gets attachment_count + * + * @return int|null + */ + public function getAttachmentCount(): ?int + { + return $this->container['attachment_count']; + } + + /** + * Sets attachment_count + * + * @param int|null $attachment_count The number of attachments the message has. + * + * @return $this + */ + public function setAttachmentCount(?int $attachment_count): static + { + if (is_null($attachment_count)) { + array_push($this->openAPINullablesSetToNull, 'attachment_count'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('attachment_count', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['attachment_count'] = $attachment_count; + + return $this; + } + + /** + * Gets recipient_count + * + * @return int|null + */ + public function getRecipientCount(): ?int + { + return $this->container['recipient_count']; + } + + /** + * Sets recipient_count + * + * @param int|null $recipient_count The number of recipients the message has. + * + * @return $this + */ + public function setRecipientCount(?int $recipient_count): static + { + if (is_null($recipient_count)) { + array_push($this->openAPINullablesSetToNull, 'recipient_count'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('recipient_count', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['recipient_count'] = $recipient_count; + + return $this; + } + + /** + * Gets campaign_class + * + * @return string|null + */ + public function getCampaignClass(): ?string + { + return $this->container['campaign_class']; + } + + /** + * Sets campaign_class + * + * @param string|null $campaign_class The campaign class of the message if it has one. + * + * @return $this + */ + public function setCampaignClass(?string $campaign_class): static + { + if (is_null($campaign_class)) { + array_push($this->openAPINullablesSetToNull, 'campaign_class'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('campaign_class', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['campaign_class'] = $campaign_class; + + return $this; + } + + /** + * Gets campaign_id + * + * @return string|null + */ + public function getCampaignId(): ?string + { + return $this->container['campaign_id']; + } + + /** + * Sets campaign_id + * + * @param string|null $campaign_id The campaign ID of the message if it has one. + * + * @return $this + */ + public function setCampaignId(?string $campaign_id): static + { + if (is_null($campaign_id)) { + array_push($this->openAPINullablesSetToNull, 'campaign_id'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('campaign_id', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['campaign_id'] = $campaign_id; + + return $this; + } + + /** + * Gets bw_latency + * + * @return int|null + */ + public function getBwLatency(): ?int + { + return $this->container['bw_latency']; + } + + /** + * Sets bw_latency + * + * @param int|null $bw_latency The Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. + * + * @return $this + */ + public function setBwLatency(?int $bw_latency): static + { + if (is_null($bw_latency)) { + array_push($this->openAPINullablesSetToNull, 'bw_latency'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('bw_latency', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['bw_latency'] = $bw_latency; + + return $this; + } + + /** + * Gets carrier_latency + * + * @return int|null + */ + public function getCarrierLatency(): ?int + { + return $this->container['carrier_latency']; + } + + /** + * Sets carrier_latency + * + * @param int|null $carrier_latency The carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. + * + * @return $this + */ + public function setCarrierLatency(?int $carrier_latency): static + { + if (is_null($carrier_latency)) { + array_push($this->openAPINullablesSetToNull, 'carrier_latency'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('carrier_latency', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['carrier_latency'] = $carrier_latency; + + return $this; + } + + /** + * Gets calling_number_country_a3 + * + * @return string|null + */ + public function getCallingNumberCountryA3(): ?string + { + return $this->container['calling_number_country_a3']; + } + + /** + * Sets calling_number_country_a3 + * + * @param string|null $calling_number_country_a3 The A3 country code of the calling number. + * + * @return $this + */ + public function setCallingNumberCountryA3(?string $calling_number_country_a3): static + { + if (is_null($calling_number_country_a3)) { + array_push($this->openAPINullablesSetToNull, 'calling_number_country_a3'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('calling_number_country_a3', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['calling_number_country_a3'] = $calling_number_country_a3; + + return $this; + } + + /** + * Gets called_number_country_a3 + * + * @return string|null + */ + public function getCalledNumberCountryA3(): ?string + { + return $this->container['called_number_country_a3']; + } + + /** + * Sets called_number_country_a3 + * + * @param string|null $called_number_country_a3 The A3 country code of the called number. + * + * @return $this + */ + public function setCalledNumberCountryA3(?string $called_number_country_a3): static + { + if (is_null($called_number_country_a3)) { + array_push($this->openAPINullablesSetToNull, 'called_number_country_a3'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('called_number_country_a3', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['called_number_country_a3'] = $called_number_country_a3; + + return $this; + } + + /** + * Gets product + * + * @return string|null + */ + public function getProduct(): ?string + { + return $this->container['product']; + } + + /** + * Sets product + * + * @param string|null $product The messaging product associated with the message. + * + * @return $this + */ + public function setProduct(?string $product): static + { + if (is_null($product)) { + array_push($this->openAPINullablesSetToNull, 'product'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('product', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['product'] = $product; + + return $this; + } + + /** + * Gets location + * + * @return string|null + */ + public function getLocation(): ?string + { + return $this->container['location']; + } + + /** + * Sets location + * + * @param string|null $location The location ID associated with this message. + * + * @return $this + */ + public function setLocation(?string $location): static + { + if (is_null($location)) { + array_push($this->openAPINullablesSetToNull, 'location'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('location', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['location'] = $location; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/LookupErrorResponse.php b/src/Model/LookupErrorResponse.php new file mode 100644 index 00000000..10987aef --- /dev/null +++ b/src/Model/LookupErrorResponse.php @@ -0,0 +1,452 @@ + + */ +class LookupErrorResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'lookupErrorResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'links' => '\OpenAPI\Client\Model\LinkSchema[]', + 'data' => 'object', + 'errors' => '\OpenAPI\Client\Model\LookupErrorSchema[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'links' => null, + 'data' => null, + 'errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'links' => false, + 'data' => false, + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'links' => 'links', + 'data' => 'data', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'links' => 'setLinks', + 'data' => 'setData', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'links' => 'getLinks', + 'data' => 'getData', + 'errors' => 'getErrors' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets links + * + * @return \OpenAPI\Client\Model\LinkSchema[]|null + */ + public function getLinks(): ?array + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \OpenAPI\Client\Model\LinkSchema[]|null $links links + * + * @return $this + */ + public function setLinks(?array $links): static + { + if (is_null($links)) { + throw new InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + + /** + * Gets data + * + * @return object|null + */ + public function getData(): ?object + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param object|null $data The phone number lookup response data + * + * @return $this + */ + public function setData(?object $data): static + { + if (is_null($data)) { + throw new InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets errors + * + * @return \OpenAPI\Client\Model\LookupErrorSchema[]|null + */ + public function getErrors(): ?array + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \OpenAPI\Client\Model\LookupErrorSchema[]|null $errors errors + * + * @return $this + */ + public function setErrors(?array $errors): static + { + if (is_null($errors)) { + throw new InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/LookupErrorSchema.php b/src/Model/LookupErrorSchema.php new file mode 100644 index 00000000..9561fae5 --- /dev/null +++ b/src/Model/LookupErrorSchema.php @@ -0,0 +1,495 @@ + + */ +class LookupErrorSchema implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'lookupErrorSchema'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'code' => 'string', + 'description' => 'string', + 'type' => 'string', + 'meta' => '\OpenAPI\Client\Model\LookupErrorSchemaMeta' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'code' => null, + 'description' => null, + 'type' => null, + 'meta' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'code' => false, + 'description' => false, + 'type' => false, + 'meta' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'code' => 'code', + 'description' => 'description', + 'type' => 'type', + 'meta' => 'meta' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'code' => 'setCode', + 'description' => 'setDescription', + 'type' => 'setType', + 'meta' => 'setMeta' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'code' => 'getCode', + 'description' => 'getDescription', + 'type' => 'getType', + 'meta' => 'getMeta' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('meta', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['code'] === null) { + $invalidProperties[] = "'code' can't be null"; + } + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets code + * + * @return string + */ + public function getCode(): string + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string $code Validation error code + * + * @return $this + */ + public function setCode(string $code): static + { + if (is_null($code)) { + throw new InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription(): string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description Description of validation error + * + * @return $this + */ + public function setDescription(string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType(): string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of validation error + * + * @return $this + */ + public function setType(string $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets meta + * + * @return \OpenAPI\Client\Model\LookupErrorSchemaMeta|null + */ + public function getMeta(): ?\OpenAPI\Client\Model\LookupErrorSchemaMeta + { + return $this->container['meta']; + } + + /** + * Sets meta + * + * @param \OpenAPI\Client\Model\LookupErrorSchemaMeta|null $meta meta + * + * @return $this + */ + public function setMeta(?\OpenAPI\Client\Model\LookupErrorSchemaMeta $meta): static + { + if (is_null($meta)) { + throw new InvalidArgumentException('non-nullable meta cannot be null'); + } + $this->container['meta'] = $meta; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/LookupErrorSchemaMeta.php b/src/Model/LookupErrorSchemaMeta.php new file mode 100644 index 00000000..c8df17c3 --- /dev/null +++ b/src/Model/LookupErrorSchemaMeta.php @@ -0,0 +1,452 @@ + + */ +class LookupErrorSchemaMeta implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'lookupErrorSchema_meta'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'phone_numbers' => 'string[]', + 'message' => 'string', + 'code' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'phone_numbers' => null, + 'message' => null, + 'code' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'phone_numbers' => false, + 'message' => false, + 'code' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'phone_numbers' => 'phoneNumbers', + 'message' => 'message', + 'code' => 'code' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'phone_numbers' => 'setPhoneNumbers', + 'message' => 'setMessage', + 'code' => 'setCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'phone_numbers' => 'getPhoneNumbers', + 'message' => 'getMessage', + 'code' => 'getCode' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('phone_numbers', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('code', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets phone_numbers + * + * @return string[]|null + */ + public function getPhoneNumbers(): ?array + { + return $this->container['phone_numbers']; + } + + /** + * Sets phone_numbers + * + * @param string[]|null $phone_numbers phone_numbers + * + * @return $this + */ + public function setPhoneNumbers(?array $phone_numbers): static + { + if (is_null($phone_numbers)) { + throw new InvalidArgumentException('non-nullable phone_numbers cannot be null'); + } + $this->container['phone_numbers'] = $phone_numbers; + + return $this; + } + + /** + * Gets message + * + * @return string|null + */ + public function getMessage(): ?string + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message Message describing the error + * + * @return $this + */ + public function setMessage(?string $message): static + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets code + * + * @return int|null + */ + public function getCode(): ?int + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int|null $code Error code associated with the message + * + * @return $this + */ + public function setCode(?int $code): static + { + if (is_null($code)) { + throw new InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/LookupResult.php b/src/Model/LookupResult.php new file mode 100644 index 00000000..4b12517e --- /dev/null +++ b/src/Model/LookupResult.php @@ -0,0 +1,759 @@ + + */ +class LookupResult implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'lookupResult'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'phone_number' => 'string', + 'line_type' => '\OpenAPI\Client\Model\LineTypeEnum', + 'messaging_provider' => 'string', + 'voice_provider' => 'string', + 'country_code_a3' => 'string', + 'deactivation_reporter' => 'string', + 'deactivation_date' => 'string', + 'deactivation_event' => '\OpenAPI\Client\Model\DeactivationEventEnum', + 'latest_message_delivery_status' => '\OpenAPI\Client\Model\LatestMessageDeliveryStatusEnum', + 'initial_message_delivery_status_date' => '\DateTime', + 'latest_message_delivery_status_date' => '\DateTime', + 'rcs_enabled' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'phone_number' => null, + 'line_type' => null, + 'messaging_provider' => null, + 'voice_provider' => null, + 'country_code_a3' => null, + 'deactivation_reporter' => null, + 'deactivation_date' => 'date-time-local', + 'deactivation_event' => null, + 'latest_message_delivery_status' => null, + 'initial_message_delivery_status_date' => 'date', + 'latest_message_delivery_status_date' => 'date', + 'rcs_enabled' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'phone_number' => false, + 'line_type' => false, + 'messaging_provider' => false, + 'voice_provider' => false, + 'country_code_a3' => false, + 'deactivation_reporter' => false, + 'deactivation_date' => false, + 'deactivation_event' => false, + 'latest_message_delivery_status' => false, + 'initial_message_delivery_status_date' => false, + 'latest_message_delivery_status_date' => false, + 'rcs_enabled' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'phone_number' => 'phoneNumber', + 'line_type' => 'lineType', + 'messaging_provider' => 'messagingProvider', + 'voice_provider' => 'voiceProvider', + 'country_code_a3' => 'countryCodeA3', + 'deactivation_reporter' => 'deactivationReporter', + 'deactivation_date' => 'deactivationDate', + 'deactivation_event' => 'deactivationEvent', + 'latest_message_delivery_status' => 'latestMessageDeliveryStatus', + 'initial_message_delivery_status_date' => 'initialMessageDeliveryStatusDate', + 'latest_message_delivery_status_date' => 'latestMessageDeliveryStatusDate', + 'rcs_enabled' => 'rcsEnabled' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'phone_number' => 'setPhoneNumber', + 'line_type' => 'setLineType', + 'messaging_provider' => 'setMessagingProvider', + 'voice_provider' => 'setVoiceProvider', + 'country_code_a3' => 'setCountryCodeA3', + 'deactivation_reporter' => 'setDeactivationReporter', + 'deactivation_date' => 'setDeactivationDate', + 'deactivation_event' => 'setDeactivationEvent', + 'latest_message_delivery_status' => 'setLatestMessageDeliveryStatus', + 'initial_message_delivery_status_date' => 'setInitialMessageDeliveryStatusDate', + 'latest_message_delivery_status_date' => 'setLatestMessageDeliveryStatusDate', + 'rcs_enabled' => 'setRcsEnabled' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'phone_number' => 'getPhoneNumber', + 'line_type' => 'getLineType', + 'messaging_provider' => 'getMessagingProvider', + 'voice_provider' => 'getVoiceProvider', + 'country_code_a3' => 'getCountryCodeA3', + 'deactivation_reporter' => 'getDeactivationReporter', + 'deactivation_date' => 'getDeactivationDate', + 'deactivation_event' => 'getDeactivationEvent', + 'latest_message_delivery_status' => 'getLatestMessageDeliveryStatus', + 'initial_message_delivery_status_date' => 'getInitialMessageDeliveryStatusDate', + 'latest_message_delivery_status_date' => 'getLatestMessageDeliveryStatusDate', + 'rcs_enabled' => 'getRcsEnabled' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('phone_number', $data ?? [], null); + $this->setIfExists('line_type', $data ?? [], null); + $this->setIfExists('messaging_provider', $data ?? [], null); + $this->setIfExists('voice_provider', $data ?? [], null); + $this->setIfExists('country_code_a3', $data ?? [], null); + $this->setIfExists('deactivation_reporter', $data ?? [], null); + $this->setIfExists('deactivation_date', $data ?? [], null); + $this->setIfExists('deactivation_event', $data ?? [], null); + $this->setIfExists('latest_message_delivery_status', $data ?? [], null); + $this->setIfExists('initial_message_delivery_status_date', $data ?? [], null); + $this->setIfExists('latest_message_delivery_status_date', $data ?? [], null); + $this->setIfExists('rcs_enabled', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets phone_number + * + * @return string|null + */ + public function getPhoneNumber(): ?string + { + return $this->container['phone_number']; + } + + /** + * Sets phone_number + * + * @param string|null $phone_number The telephone number in E.164 format. + * + * @return $this + */ + public function setPhoneNumber(?string $phone_number): static + { + if (is_null($phone_number)) { + throw new InvalidArgumentException('non-nullable phone_number cannot be null'); + } + $this->container['phone_number'] = $phone_number; + + return $this; + } + + /** + * Gets line_type + * + * @return \OpenAPI\Client\Model\LineTypeEnum|null + */ + public function getLineType(): ?\OpenAPI\Client\Model\LineTypeEnum + { + return $this->container['line_type']; + } + + /** + * Sets line_type + * + * @param \OpenAPI\Client\Model\LineTypeEnum|null $line_type line_type + * + * @return $this + */ + public function setLineType(?\OpenAPI\Client\Model\LineTypeEnum $line_type): static + { + if (is_null($line_type)) { + throw new InvalidArgumentException('non-nullable line_type cannot be null'); + } + $this->container['line_type'] = $line_type; + + return $this; + } + + /** + * Gets messaging_provider + * + * @return string|null + */ + public function getMessagingProvider(): ?string + { + return $this->container['messaging_provider']; + } + + /** + * Sets messaging_provider + * + * @param string|null $messaging_provider The messaging service provider of the telephone number. + * + * @return $this + */ + public function setMessagingProvider(?string $messaging_provider): static + { + if (is_null($messaging_provider)) { + throw new InvalidArgumentException('non-nullable messaging_provider cannot be null'); + } + $this->container['messaging_provider'] = $messaging_provider; + + return $this; + } + + /** + * Gets voice_provider + * + * @return string|null + */ + public function getVoiceProvider(): ?string + { + return $this->container['voice_provider']; + } + + /** + * Sets voice_provider + * + * @param string|null $voice_provider The voice service provider of the telephone number. + * + * @return $this + */ + public function setVoiceProvider(?string $voice_provider): static + { + if (is_null($voice_provider)) { + throw new InvalidArgumentException('non-nullable voice_provider cannot be null'); + } + $this->container['voice_provider'] = $voice_provider; + + return $this; + } + + /** + * Gets country_code_a3 + * + * @return string|null + */ + public function getCountryCodeA3(): ?string + { + return $this->container['country_code_a3']; + } + + /** + * Sets country_code_a3 + * + * @param string|null $country_code_a3 The country code of the telephone number in ISO 3166-1 alpha-3 format. + * + * @return $this + */ + public function setCountryCodeA3(?string $country_code_a3): static + { + if (is_null($country_code_a3)) { + throw new InvalidArgumentException('non-nullable country_code_a3 cannot be null'); + } + $this->container['country_code_a3'] = $country_code_a3; + + return $this; + } + + /** + * Gets deactivation_reporter + * + * @return string|null + */ + public function getDeactivationReporter(): ?string + { + return $this->container['deactivation_reporter']; + } + + /** + * Sets deactivation_reporter + * + * @param string|null $deactivation_reporter [DNI-Only](#section/DNI-Only). The carrier that reported a deactivation event for this phone number. + * + * @return $this + */ + public function setDeactivationReporter(?string $deactivation_reporter): static + { + if (is_null($deactivation_reporter)) { + throw new InvalidArgumentException('non-nullable deactivation_reporter cannot be null'); + } + $this->container['deactivation_reporter'] = $deactivation_reporter; + + return $this; + } + + /** + * Gets deactivation_date + * + * @return string|null + */ + public function getDeactivationDate(): ?string + { + return $this->container['deactivation_date']; + } + + /** + * Sets deactivation_date + * + * @param string|null $deactivation_date [DNI-Only](#section/DNI-Only). The datetime the carrier reported a deactivation event. + * + * @return $this + */ + public function setDeactivationDate(?string $deactivation_date): static + { + if (is_null($deactivation_date)) { + throw new InvalidArgumentException('non-nullable deactivation_date cannot be null'); + } + $this->container['deactivation_date'] = $deactivation_date; + + return $this; + } + + /** + * Gets deactivation_event + * + * @return \OpenAPI\Client\Model\DeactivationEventEnum|null + */ + public function getDeactivationEvent(): ?\OpenAPI\Client\Model\DeactivationEventEnum + { + return $this->container['deactivation_event']; + } + + /** + * Sets deactivation_event + * + * @param \OpenAPI\Client\Model\DeactivationEventEnum|null $deactivation_event deactivation_event + * + * @return $this + */ + public function setDeactivationEvent(?\OpenAPI\Client\Model\DeactivationEventEnum $deactivation_event): static + { + if (is_null($deactivation_event)) { + throw new InvalidArgumentException('non-nullable deactivation_event cannot be null'); + } + $this->container['deactivation_event'] = $deactivation_event; + + return $this; + } + + /** + * Gets latest_message_delivery_status + * + * @return \OpenAPI\Client\Model\LatestMessageDeliveryStatusEnum|null + */ + public function getLatestMessageDeliveryStatus(): ?\OpenAPI\Client\Model\LatestMessageDeliveryStatusEnum + { + return $this->container['latest_message_delivery_status']; + } + + /** + * Sets latest_message_delivery_status + * + * @param \OpenAPI\Client\Model\LatestMessageDeliveryStatusEnum|null $latest_message_delivery_status latest_message_delivery_status + * + * @return $this + */ + public function setLatestMessageDeliveryStatus(?\OpenAPI\Client\Model\LatestMessageDeliveryStatusEnum $latest_message_delivery_status): static + { + if (is_null($latest_message_delivery_status)) { + throw new InvalidArgumentException('non-nullable latest_message_delivery_status cannot be null'); + } + $this->container['latest_message_delivery_status'] = $latest_message_delivery_status; + + return $this; + } + + /** + * Gets initial_message_delivery_status_date + * + * @return \DateTime|null + */ + public function getInitialMessageDeliveryStatusDate(): ?\DateTime + { + return $this->container['initial_message_delivery_status_date']; + } + + /** + * Sets initial_message_delivery_status_date + * + * @param \DateTime|null $initial_message_delivery_status_date [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. + * + * @return $this + */ + public function setInitialMessageDeliveryStatusDate(?\DateTime $initial_message_delivery_status_date): static + { + if (is_null($initial_message_delivery_status_date)) { + throw new InvalidArgumentException('non-nullable initial_message_delivery_status_date cannot be null'); + } + $this->container['initial_message_delivery_status_date'] = $initial_message_delivery_status_date; + + return $this; + } + + /** + * Gets latest_message_delivery_status_date + * + * @return \DateTime|null + */ + public function getLatestMessageDeliveryStatusDate(): ?\DateTime + { + return $this->container['latest_message_delivery_status_date']; + } + + /** + * Sets latest_message_delivery_status_date + * + * @param \DateTime|null $latest_message_delivery_status_date [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. + * + * @return $this + */ + public function setLatestMessageDeliveryStatusDate(?\DateTime $latest_message_delivery_status_date): static + { + if (is_null($latest_message_delivery_status_date)) { + throw new InvalidArgumentException('non-nullable latest_message_delivery_status_date cannot be null'); + } + $this->container['latest_message_delivery_status_date'] = $latest_message_delivery_status_date; + + return $this; + } + + /** + * Gets rcs_enabled + * + * @return bool|null + */ + public function getRcsEnabled(): ?bool + { + return $this->container['rcs_enabled']; + } + + /** + * Sets rcs_enabled + * + * @param bool|null $rcs_enabled [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. + * + * @return $this + */ + public function setRcsEnabled(?bool $rcs_enabled): static + { + if (is_null($rcs_enabled)) { + throw new InvalidArgumentException('non-nullable rcs_enabled cannot be null'); + } + $this->container['rcs_enabled'] = $rcs_enabled; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MachineDetectionCompleteCallback.php b/src/Model/MachineDetectionCompleteCallback.php new file mode 100644 index 00000000..d4c9aab8 --- /dev/null +++ b/src/Model/MachineDetectionCompleteCallback.php @@ -0,0 +1,855 @@ + + */ +class MachineDetectionCompleteCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'machineDetectionCompleteCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_id' => 'string', + 'call_url' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'tag' => 'string', + 'machine_detection_result' => '\OpenAPI\Client\Model\MachineDetectionResult' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'call_url' => 'uri', + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'tag' => null, + 'machine_detection_result' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'call_url' => false, + 'enqueued_time' => true, + 'start_time' => false, + 'answer_time' => true, + 'tag' => true, + 'machine_detection_result' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'call_url' => 'callUrl', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'tag' => 'tag', + 'machine_detection_result' => 'machineDetectionResult' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'call_url' => 'setCallUrl', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'tag' => 'setTag', + 'machine_detection_result' => 'setMachineDetectionResult' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'call_url' => 'getCallUrl', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'tag' => 'getTag', + 'machine_detection_result' => 'getMachineDetectionResult' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('machine_detection_result', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Time the call was answered, in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets machine_detection_result + * + * @return \OpenAPI\Client\Model\MachineDetectionResult|null + */ + public function getMachineDetectionResult(): ?\OpenAPI\Client\Model\MachineDetectionResult + { + return $this->container['machine_detection_result']; + } + + /** + * Sets machine_detection_result + * + * @param \OpenAPI\Client\Model\MachineDetectionResult|null $machine_detection_result machine_detection_result + * + * @return $this + */ + public function setMachineDetectionResult(?\OpenAPI\Client\Model\MachineDetectionResult $machine_detection_result): static + { + if (is_null($machine_detection_result)) { + array_push($this->openAPINullablesSetToNull, 'machine_detection_result'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('machine_detection_result', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['machine_detection_result'] = $machine_detection_result; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MachineDetectionConfiguration.php b/src/Model/MachineDetectionConfiguration.php new file mode 100644 index 00000000..68e45493 --- /dev/null +++ b/src/Model/MachineDetectionConfiguration.php @@ -0,0 +1,1007 @@ + + */ +class MachineDetectionConfiguration implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'machineDetectionConfiguration'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'mode' => '\OpenAPI\Client\Model\MachineDetectionModeEnum', + 'detection_timeout' => 'float', + 'silence_timeout' => 'float', + 'speech_threshold' => 'float', + 'speech_end_threshold' => 'float', + 'machine_speech_end_threshold' => 'float', + 'delay_result' => 'bool', + 'callback_url' => 'string', + 'callback_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'username' => 'string', + 'password' => 'string', + 'fallback_url' => 'string', + 'fallback_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'fallback_username' => 'string', + 'fallback_password' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'mode' => null, + 'detection_timeout' => 'double', + 'silence_timeout' => 'double', + 'speech_threshold' => 'double', + 'speech_end_threshold' => 'double', + 'machine_speech_end_threshold' => 'double', + 'delay_result' => null, + 'callback_url' => 'uri', + 'callback_method' => null, + 'username' => null, + 'password' => null, + 'fallback_url' => 'uri', + 'fallback_method' => null, + 'fallback_username' => null, + 'fallback_password' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'mode' => false, + 'detection_timeout' => true, + 'silence_timeout' => true, + 'speech_threshold' => true, + 'speech_end_threshold' => true, + 'machine_speech_end_threshold' => true, + 'delay_result' => true, + 'callback_url' => true, + 'callback_method' => true, + 'username' => true, + 'password' => true, + 'fallback_url' => true, + 'fallback_method' => true, + 'fallback_username' => true, + 'fallback_password' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'mode' => 'mode', + 'detection_timeout' => 'detectionTimeout', + 'silence_timeout' => 'silenceTimeout', + 'speech_threshold' => 'speechThreshold', + 'speech_end_threshold' => 'speechEndThreshold', + 'machine_speech_end_threshold' => 'machineSpeechEndThreshold', + 'delay_result' => 'delayResult', + 'callback_url' => 'callbackUrl', + 'callback_method' => 'callbackMethod', + 'username' => 'username', + 'password' => 'password', + 'fallback_url' => 'fallbackUrl', + 'fallback_method' => 'fallbackMethod', + 'fallback_username' => 'fallbackUsername', + 'fallback_password' => 'fallbackPassword' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'mode' => 'setMode', + 'detection_timeout' => 'setDetectionTimeout', + 'silence_timeout' => 'setSilenceTimeout', + 'speech_threshold' => 'setSpeechThreshold', + 'speech_end_threshold' => 'setSpeechEndThreshold', + 'machine_speech_end_threshold' => 'setMachineSpeechEndThreshold', + 'delay_result' => 'setDelayResult', + 'callback_url' => 'setCallbackUrl', + 'callback_method' => 'setCallbackMethod', + 'username' => 'setUsername', + 'password' => 'setPassword', + 'fallback_url' => 'setFallbackUrl', + 'fallback_method' => 'setFallbackMethod', + 'fallback_username' => 'setFallbackUsername', + 'fallback_password' => 'setFallbackPassword' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'mode' => 'getMode', + 'detection_timeout' => 'getDetectionTimeout', + 'silence_timeout' => 'getSilenceTimeout', + 'speech_threshold' => 'getSpeechThreshold', + 'speech_end_threshold' => 'getSpeechEndThreshold', + 'machine_speech_end_threshold' => 'getMachineSpeechEndThreshold', + 'delay_result' => 'getDelayResult', + 'callback_url' => 'getCallbackUrl', + 'callback_method' => 'getCallbackMethod', + 'username' => 'getUsername', + 'password' => 'getPassword', + 'fallback_url' => 'getFallbackUrl', + 'fallback_method' => 'getFallbackMethod', + 'fallback_username' => 'getFallbackUsername', + 'fallback_password' => 'getFallbackPassword' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('mode', $data ?? [], null); + $this->setIfExists('detection_timeout', $data ?? [], 15); + $this->setIfExists('silence_timeout', $data ?? [], 10); + $this->setIfExists('speech_threshold', $data ?? [], 10); + $this->setIfExists('speech_end_threshold', $data ?? [], 5); + $this->setIfExists('machine_speech_end_threshold', $data ?? [], null); + $this->setIfExists('delay_result', $data ?? [], false); + $this->setIfExists('callback_url', $data ?? [], null); + $this->setIfExists('callback_method', $data ?? [], null); + $this->setIfExists('username', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('fallback_url', $data ?? [], null); + $this->setIfExists('fallback_method', $data ?? [], null); + $this->setIfExists('fallback_username', $data ?? [], null); + $this->setIfExists('fallback_password', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['callback_url']) && (mb_strlen($this->container['callback_url']) > 2048)) { + $invalidProperties[] = "invalid value for 'callback_url', the character length must be smaller than or equal to 2048."; + } + + if (!is_null($this->container['username']) && (mb_strlen($this->container['username']) > 1024)) { + $invalidProperties[] = "invalid value for 'username', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) > 1024)) { + $invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['fallback_url']) && (mb_strlen($this->container['fallback_url']) > 2048)) { + $invalidProperties[] = "invalid value for 'fallback_url', the character length must be smaller than or equal to 2048."; + } + + if (!is_null($this->container['fallback_username']) && (mb_strlen($this->container['fallback_username']) > 1024)) { + $invalidProperties[] = "invalid value for 'fallback_username', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['fallback_password']) && (mb_strlen($this->container['fallback_password']) > 1024)) { + $invalidProperties[] = "invalid value for 'fallback_password', the character length must be smaller than or equal to 1024."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets mode + * + * @return \OpenAPI\Client\Model\MachineDetectionModeEnum|null + */ + public function getMode(): ?\OpenAPI\Client\Model\MachineDetectionModeEnum + { + return $this->container['mode']; + } + + /** + * Sets mode + * + * @param \OpenAPI\Client\Model\MachineDetectionModeEnum|null $mode mode + * + * @return $this + */ + public function setMode(?\OpenAPI\Client\Model\MachineDetectionModeEnum $mode): static + { + if (is_null($mode)) { + throw new InvalidArgumentException('non-nullable mode cannot be null'); + } + $this->container['mode'] = $mode; + + return $this; + } + + /** + * Gets detection_timeout + * + * @return float|null + */ + public function getDetectionTimeout(): ?float + { + return $this->container['detection_timeout']; + } + + /** + * Sets detection_timeout + * + * @param float|null $detection_timeout The timeout used for the whole operation, in seconds. If no result is determined in this period, a callback with a `timeout` result is sent. + * + * @return $this + */ + public function setDetectionTimeout(?float $detection_timeout): static + { + if (is_null($detection_timeout)) { + array_push($this->openAPINullablesSetToNull, 'detection_timeout'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('detection_timeout', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['detection_timeout'] = $detection_timeout; + + return $this; + } + + /** + * Gets silence_timeout + * + * @return float|null + */ + public function getSilenceTimeout(): ?float + { + return $this->container['silence_timeout']; + } + + /** + * Sets silence_timeout + * + * @param float|null $silence_timeout If no speech is detected in this period, a callback with a 'silence' result is sent. + * + * @return $this + */ + public function setSilenceTimeout(?float $silence_timeout): static + { + if (is_null($silence_timeout)) { + array_push($this->openAPINullablesSetToNull, 'silence_timeout'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('silence_timeout', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['silence_timeout'] = $silence_timeout; + + return $this; + } + + /** + * Gets speech_threshold + * + * @return float|null + */ + public function getSpeechThreshold(): ?float + { + return $this->container['speech_threshold']; + } + + /** + * Sets speech_threshold + * + * @param float|null $speech_threshold When speech has ended and a result couldn't be determined based on the audio content itself, this value is used to determine if the speaker is a machine based on the speech duration. If the length of the speech detected is greater than or equal to this threshold, the result will be 'answering-machine'. If the length of speech detected is below this threshold, the result will be 'human'. + * + * @return $this + */ + public function setSpeechThreshold(?float $speech_threshold): static + { + if (is_null($speech_threshold)) { + array_push($this->openAPINullablesSetToNull, 'speech_threshold'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('speech_threshold', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['speech_threshold'] = $speech_threshold; + + return $this; + } + + /** + * Gets speech_end_threshold + * + * @return float|null + */ + public function getSpeechEndThreshold(): ?float + { + return $this->container['speech_end_threshold']; + } + + /** + * Sets speech_end_threshold + * + * @param float|null $speech_end_threshold Amount of silence (in seconds) before assuming the callee has finished speaking. + * + * @return $this + */ + public function setSpeechEndThreshold(?float $speech_end_threshold): static + { + if (is_null($speech_end_threshold)) { + array_push($this->openAPINullablesSetToNull, 'speech_end_threshold'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('speech_end_threshold', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['speech_end_threshold'] = $speech_end_threshold; + + return $this; + } + + /** + * Gets machine_speech_end_threshold + * + * @return float|null + */ + public function getMachineSpeechEndThreshold(): ?float + { + return $this->container['machine_speech_end_threshold']; + } + + /** + * Sets machine_speech_end_threshold + * + * @param float|null $machine_speech_end_threshold When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value. + * + * @return $this + */ + public function setMachineSpeechEndThreshold(?float $machine_speech_end_threshold): static + { + if (is_null($machine_speech_end_threshold)) { + array_push($this->openAPINullablesSetToNull, 'machine_speech_end_threshold'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('machine_speech_end_threshold', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['machine_speech_end_threshold'] = $machine_speech_end_threshold; + + return $this; + } + + /** + * Gets delay_result + * + * @return bool|null + */ + public function getDelayResult(): ?bool + { + return $this->container['delay_result']; + } + + /** + * Sets delay_result + * + * @param bool|null $delay_result If set to 'true' and if an answering machine is detected, the 'answering-machine' callback will be delayed until the machine is done speaking, or an end of message tone is detected, or until the 'detectionTimeout' is exceeded. If false, the 'answering-machine' result is sent immediately. + * + * @return $this + */ + public function setDelayResult(?bool $delay_result): static + { + if (is_null($delay_result)) { + array_push($this->openAPINullablesSetToNull, 'delay_result'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('delay_result', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['delay_result'] = $delay_result; + + return $this; + } + + /** + * Gets callback_url + * + * @return string|null + */ + public function getCallbackUrl(): ?string + { + return $this->container['callback_url']; + } + + /** + * Sets callback_url + * + * @param string|null $callback_url The URL to send the 'machineDetectionComplete' webhook when the detection is completed. Only for 'async' mode. + * + * @return $this + */ + public function setCallbackUrl(?string $callback_url): static + { + if (is_null($callback_url)) { + array_push($this->openAPINullablesSetToNull, 'callback_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('callback_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($callback_url) && (mb_strlen($callback_url) > 2048)) { + throw new InvalidArgumentException('invalid length for $callback_url when calling MachineDetectionConfiguration., must be smaller than or equal to 2048.'); + } + + $this->container['callback_url'] = $callback_url; + + return $this; + } + + /** + * Gets callback_method + * + * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + */ + public function getCallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + { + return $this->container['callback_method']; + } + + /** + * Sets callback_method + * + * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $callback_method callback_method + * + * @return $this + */ + public function setCallbackMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $callback_method): static + { + if (is_null($callback_method)) { + array_push($this->openAPINullablesSetToNull, 'callback_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('callback_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['callback_method'] = $callback_method; + + return $this; + } + + /** + * Gets username + * + * @return string|null + */ + public function getUsername(): ?string + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string|null $username Basic auth username. + * + * @return $this + */ + public function setUsername(?string $username): static + { + if (is_null($username)) { + array_push($this->openAPINullablesSetToNull, 'username'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('username', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($username) && (mb_strlen($username) > 1024)) { + throw new InvalidArgumentException('invalid length for $username when calling MachineDetectionConfiguration., must be smaller than or equal to 1024.'); + } + + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password + * + * @return string|null + */ + public function getPassword(): ?string + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string|null $password Basic auth password. + * + * @return $this + */ + public function setPassword(?string $password): static + { + if (is_null($password)) { + array_push($this->openAPINullablesSetToNull, 'password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($password) && (mb_strlen($password) > 1024)) { + throw new InvalidArgumentException('invalid length for $password when calling MachineDetectionConfiguration., must be smaller than or equal to 1024.'); + } + + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets fallback_url + * + * @return string|null + */ + public function getFallbackUrl(): ?string + { + return $this->container['fallback_url']; + } + + /** + * Sets fallback_url + * + * @param string|null $fallback_url A fallback URL which, if provided, will be used to retry the machine detection complete webhook delivery in case `callbackUrl` fails to respond + * + * @return $this + */ + public function setFallbackUrl(?string $fallback_url): static + { + if (is_null($fallback_url)) { + array_push($this->openAPINullablesSetToNull, 'fallback_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fallback_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($fallback_url) && (mb_strlen($fallback_url) > 2048)) { + throw new InvalidArgumentException('invalid length for $fallback_url when calling MachineDetectionConfiguration., must be smaller than or equal to 2048.'); + } + + $this->container['fallback_url'] = $fallback_url; + + return $this; + } + + /** + * Gets fallback_method + * + * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + */ + public function getFallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + { + return $this->container['fallback_method']; + } + + /** + * Sets fallback_method + * + * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $fallback_method fallback_method + * + * @return $this + */ + public function setFallbackMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $fallback_method): static + { + if (is_null($fallback_method)) { + array_push($this->openAPINullablesSetToNull, 'fallback_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fallback_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['fallback_method'] = $fallback_method; + + return $this; + } + + /** + * Gets fallback_username + * + * @return string|null + */ + public function getFallbackUsername(): ?string + { + return $this->container['fallback_username']; + } + + /** + * Sets fallback_username + * + * @param string|null $fallback_username Basic auth username. + * + * @return $this + */ + public function setFallbackUsername(?string $fallback_username): static + { + if (is_null($fallback_username)) { + array_push($this->openAPINullablesSetToNull, 'fallback_username'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fallback_username', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($fallback_username) && (mb_strlen($fallback_username) > 1024)) { + throw new InvalidArgumentException('invalid length for $fallback_username when calling MachineDetectionConfiguration., must be smaller than or equal to 1024.'); + } + + $this->container['fallback_username'] = $fallback_username; + + return $this; + } + + /** + * Gets fallback_password + * + * @return string|null + */ + public function getFallbackPassword(): ?string + { + return $this->container['fallback_password']; + } + + /** + * Sets fallback_password + * + * @param string|null $fallback_password Basic auth password. + * + * @return $this + */ + public function setFallbackPassword(?string $fallback_password): static + { + if (is_null($fallback_password)) { + array_push($this->openAPINullablesSetToNull, 'fallback_password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fallback_password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($fallback_password) && (mb_strlen($fallback_password) > 1024)) { + throw new InvalidArgumentException('invalid length for $fallback_password when calling MachineDetectionConfiguration., must be smaller than or equal to 1024.'); + } + + $this->container['fallback_password'] = $fallback_password; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MachineDetectionModeEnum.php b/src/Model/MachineDetectionModeEnum.php new file mode 100644 index 00000000..40b806e5 --- /dev/null +++ b/src/Model/MachineDetectionModeEnum.php @@ -0,0 +1,46 @@ + + */ +class MachineDetectionResult implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'machineDetectionResult'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'value' => 'string', + 'duration' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'value' => null, + 'duration' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'value' => false, + 'duration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'value' => 'value', + 'duration' => 'duration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'value' => 'setValue', + 'duration' => 'setDuration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'value' => 'getValue', + 'duration' => 'getDuration' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('value', $data ?? [], null); + $this->setIfExists('duration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets value + * + * @return string|null + */ + public function getValue(): ?string + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string|null $value Possible values are answering-machine, human, silence, timeout, or error. + * + * @return $this + */ + public function setValue(?string $value): static + { + if (is_null($value)) { + throw new InvalidArgumentException('non-nullable value cannot be null'); + } + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets duration + * + * @return string|null + */ + public function getDuration(): ?string + { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param string|null $duration The amount of time it took to determine the result. + * + * @return $this + */ + public function setDuration(?string $duration): static + { + if (is_null($duration)) { + throw new InvalidArgumentException('non-nullable duration cannot be null'); + } + $this->container['duration'] = $duration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/Media.php b/src/Model/Media.php new file mode 100644 index 00000000..43626ef4 --- /dev/null +++ b/src/Model/Media.php @@ -0,0 +1,452 @@ + + */ +class Media implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'media'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'content' => 'string', + 'content_length' => 'int', + 'media_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'content' => null, + 'content_length' => null, + 'media_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'content' => false, + 'content_length' => false, + 'media_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'content' => 'content', + 'content_length' => 'contentLength', + 'media_name' => 'mediaName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'content' => 'setContent', + 'content_length' => 'setContentLength', + 'media_name' => 'setMediaName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'content' => 'getContent', + 'content_length' => 'getContentLength', + 'media_name' => 'getMediaName' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('content_length', $data ?? [], null); + $this->setIfExists('media_name', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets content + * + * @return string|null + */ + public function getContent(): ?string + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param string|null $content content + * + * @return $this + */ + public function setContent(?string $content): static + { + if (is_null($content)) { + throw new InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets content_length + * + * @return int|null + */ + public function getContentLength(): ?int + { + return $this->container['content_length']; + } + + /** + * Sets content_length + * + * @param int|null $content_length content_length + * + * @return $this + */ + public function setContentLength(?int $content_length): static + { + if (is_null($content_length)) { + throw new InvalidArgumentException('non-nullable content_length cannot be null'); + } + $this->container['content_length'] = $content_length; + + return $this; + } + + /** + * Gets media_name + * + * @return string|null + */ + public function getMediaName(): ?string + { + return $this->container['media_name']; + } + + /** + * Sets media_name + * + * @param string|null $media_name media_name + * + * @return $this + */ + public function setMediaName(?string $media_name): static + { + if (is_null($media_name)) { + throw new InvalidArgumentException('non-nullable media_name cannot be null'); + } + $this->container['media_name'] = $media_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/Message.php b/src/Model/Message.php new file mode 100644 index 00000000..811f95b5 --- /dev/null +++ b/src/Model/Message.php @@ -0,0 +1,796 @@ + + */ +class Message implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'message'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'id' => 'string', + 'owner' => 'string', + 'application_id' => 'string', + 'time' => '\DateTime', + 'segment_count' => 'int', + 'direction' => '\OpenAPI\Client\Model\MessageDirectionEnum', + 'to' => 'string[]', + 'from' => 'string', + 'media' => 'string[]', + 'text' => 'string', + 'tag' => 'string', + 'priority' => '\OpenAPI\Client\Model\PriorityEnum', + 'expiration' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'id' => null, + 'owner' => null, + 'application_id' => null, + 'time' => 'date-time', + 'segment_count' => null, + 'direction' => null, + 'to' => null, + 'from' => null, + 'media' => null, + 'text' => null, + 'tag' => null, + 'priority' => null, + 'expiration' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'id' => false, + 'owner' => false, + 'application_id' => false, + 'time' => false, + 'segment_count' => false, + 'direction' => false, + 'to' => false, + 'from' => false, + 'media' => false, + 'text' => false, + 'tag' => false, + 'priority' => false, + 'expiration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'id' => 'id', + 'owner' => 'owner', + 'application_id' => 'applicationId', + 'time' => 'time', + 'segment_count' => 'segmentCount', + 'direction' => 'direction', + 'to' => 'to', + 'from' => 'from', + 'media' => 'media', + 'text' => 'text', + 'tag' => 'tag', + 'priority' => 'priority', + 'expiration' => 'expiration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'id' => 'setId', + 'owner' => 'setOwner', + 'application_id' => 'setApplicationId', + 'time' => 'setTime', + 'segment_count' => 'setSegmentCount', + 'direction' => 'setDirection', + 'to' => 'setTo', + 'from' => 'setFrom', + 'media' => 'setMedia', + 'text' => 'setText', + 'tag' => 'setTag', + 'priority' => 'setPriority', + 'expiration' => 'setExpiration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'id' => 'getId', + 'owner' => 'getOwner', + 'application_id' => 'getApplicationId', + 'time' => 'getTime', + 'segment_count' => 'getSegmentCount', + 'direction' => 'getDirection', + 'to' => 'getTo', + 'from' => 'getFrom', + 'media' => 'getMedia', + 'text' => 'getText', + 'tag' => 'getTag', + 'priority' => 'getPriority', + 'expiration' => 'getExpiration' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('time', $data ?? [], null); + $this->setIfExists('segment_count', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('media', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('priority', $data ?? [], null); + $this->setIfExists('expiration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId(): ?string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The id of the message. + * + * @return $this + */ + public function setId(?string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets owner + * + * @return string|null + */ + public function getOwner(): ?string + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string|null $owner The Bandwidth phone number associated with the message. + * + * @return $this + */ + public function setOwner(?string $owner): static + { + if (is_null($owner)) { + throw new InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets time + * + * @return \DateTime|null + */ + public function getTime(): ?\DateTime + { + return $this->container['time']; + } + + /** + * Sets time + * + * @param \DateTime|null $time The datetime stamp of the message in ISO 8601 + * + * @return $this + */ + public function setTime(?\DateTime $time): static + { + if (is_null($time)) { + throw new InvalidArgumentException('non-nullable time cannot be null'); + } + $this->container['time'] = $time; + + return $this; + } + + /** + * Gets segment_count + * + * @return int|null + */ + public function getSegmentCount(): ?int + { + return $this->container['segment_count']; + } + + /** + * Sets segment_count + * + * @param int|null $segment_count The number of segments the user's message is broken into before sending over carrier networks. + * + * @return $this + */ + public function setSegmentCount(?int $segment_count): static + { + if (is_null($segment_count)) { + throw new InvalidArgumentException('non-nullable segment_count cannot be null'); + } + $this->container['segment_count'] = $segment_count; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\MessageDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\MessageDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\MessageDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\MessageDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets to + * + * @return string[]|null + */ + public function getTo(): ?array + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string[]|null $to The phone number recipients of the message. + * + * @return $this + */ + public function setTo(?array $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + + + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The phone number the message was sent from. + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets media + * + * @return string[]|null + */ + public function getMedia(): ?array + { + return $this->container['media']; + } + + /** + * Sets media + * + * @param string[]|null $media The list of media URLs sent in the message. Including a `filename` field in the `Content-Disposition` header of the media linked with a URL will set the displayed file name. This is a best practice to ensure that your media has a readable file name. + * + * @return $this + */ + public function setMedia(?array $media): static + { + if (is_null($media)) { + throw new InvalidArgumentException('non-nullable media cannot be null'); + } + + + $this->container['media'] = $media; + + return $this; + } + + /** + * Gets text + * + * @return string|null + */ + public function getText(): ?string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string|null $text The contents of the message. + * + * @return $this + */ + public function setText(?string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A custom string that will be included in callback events of the message. Max 1024 characters. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + throw new InvalidArgumentException('non-nullable tag cannot be null'); + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets priority + * + * @return \OpenAPI\Client\Model\PriorityEnum|null + */ + public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum + { + return $this->container['priority']; + } + + /** + * Sets priority + * + * @param \OpenAPI\Client\Model\PriorityEnum|null $priority priority + * + * @return $this + */ + public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): static + { + if (is_null($priority)) { + throw new InvalidArgumentException('non-nullable priority cannot be null'); + } + $this->container['priority'] = $priority; + + return $this; + } + + /** + * Gets expiration + * + * @return \DateTime|null + */ + public function getExpiration(): ?\DateTime + { + return $this->container['expiration']; + } + + /** + * Sets expiration + * + * @param \DateTime|null $expiration A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. + * + * @return $this + */ + public function setExpiration(?\DateTime $expiration): static + { + if (is_null($expiration)) { + throw new InvalidArgumentException('non-nullable expiration cannot be null'); + } + $this->container['expiration'] = $expiration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MessageDirectionEnum.php b/src/Model/MessageDirectionEnum.php new file mode 100644 index 00000000..7f5b7021 --- /dev/null +++ b/src/Model/MessageDirectionEnum.php @@ -0,0 +1,46 @@ + + */ +class MessageRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'messageRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'application_id' => 'string', + 'to' => 'string[]', + 'from' => 'string', + 'text' => 'string', + 'media' => 'string[]', + 'tag' => 'string', + 'priority' => '\OpenAPI\Client\Model\PriorityEnum', + 'expiration' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'application_id' => null, + 'to' => null, + 'from' => null, + 'text' => null, + 'media' => 'uri', + 'tag' => null, + 'priority' => null, + 'expiration' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'application_id' => false, + 'to' => false, + 'from' => false, + 'text' => false, + 'media' => false, + 'tag' => false, + 'priority' => false, + 'expiration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'application_id' => 'applicationId', + 'to' => 'to', + 'from' => 'from', + 'text' => 'text', + 'media' => 'media', + 'tag' => 'tag', + 'priority' => 'priority', + 'expiration' => 'expiration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'application_id' => 'setApplicationId', + 'to' => 'setTo', + 'from' => 'setFrom', + 'text' => 'setText', + 'media' => 'setMedia', + 'tag' => 'setTag', + 'priority' => 'setPriority', + 'expiration' => 'setExpiration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'application_id' => 'getApplicationId', + 'to' => 'getTo', + 'from' => 'getFrom', + 'text' => 'getText', + 'media' => 'getMedia', + 'tag' => 'getTag', + 'priority' => 'getPriority', + 'expiration' => 'getExpiration' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('media', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('priority', $data ?? [], null); + $this->setIfExists('expiration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + if (!is_null($this->container['text']) && (mb_strlen($this->container['text']) > 2048)) { + $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 2048."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets to + * + * @return string[] + */ + public function getTo(): array + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string[] $to The phone number(s) the message should be sent to in E164 format. + * + * @return $this + */ + public function setTo(array $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + + + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from Either an alphanumeric sender ID or the sender's Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets text + * + * @return string|null + */ + public function getText(): ?string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string|null $text The contents of the text message. Must be 2048 characters or less. + * + * @return $this + */ + public function setText(?string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + if ((mb_strlen($text) > 2048)) { + throw new InvalidArgumentException('invalid length for $text when calling MessageRequest., must be smaller than or equal to 2048.'); + } + + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets media + * + * @return string[]|null + */ + public function getMedia(): ?array + { + return $this->container['media']; + } + + /** + * Sets media + * + * @param string[]|null $media A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters. + * + * @return $this + */ + public function setMedia(?array $media): static + { + if (is_null($media)) { + throw new InvalidArgumentException('non-nullable media cannot be null'); + } + $this->container['media'] = $media; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A custom string that will be included in callback events of the message. Max 1024 characters. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + throw new InvalidArgumentException('non-nullable tag cannot be null'); + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets priority + * + * @return \OpenAPI\Client\Model\PriorityEnum|null + */ + public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum + { + return $this->container['priority']; + } + + /** + * Sets priority + * + * @param \OpenAPI\Client\Model\PriorityEnum|null $priority priority + * + * @return $this + */ + public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): static + { + if (is_null($priority)) { + throw new InvalidArgumentException('non-nullable priority cannot be null'); + } + $this->container['priority'] = $priority; + + return $this; + } + + /** + * Gets expiration + * + * @return \DateTime|null + */ + public function getExpiration(): ?\DateTime + { + return $this->container['expiration']; + } + + /** + * Sets expiration + * + * @param \DateTime|null $expiration A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. + * + * @return $this + */ + public function setExpiration(?\DateTime $expiration): static + { + if (is_null($expiration)) { + throw new InvalidArgumentException('non-nullable expiration cannot be null'); + } + $this->container['expiration'] = $expiration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MessageStatusEnum.php b/src/Model/MessageStatusEnum.php new file mode 100644 index 00000000..aa1756fb --- /dev/null +++ b/src/Model/MessageStatusEnum.php @@ -0,0 +1,58 @@ + + */ +class MessagesList implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'messagesList'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'total_count' => 'int', + 'page_info' => '\OpenAPI\Client\Model\PageInfo', + 'messages' => '\OpenAPI\Client\Model\ListMessageItem[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'total_count' => null, + 'page_info' => null, + 'messages' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'total_count' => false, + 'page_info' => false, + 'messages' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'total_count' => 'totalCount', + 'page_info' => 'pageInfo', + 'messages' => 'messages' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'total_count' => 'setTotalCount', + 'page_info' => 'setPageInfo', + 'messages' => 'setMessages' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'total_count' => 'getTotalCount', + 'page_info' => 'getPageInfo', + 'messages' => 'getMessages' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('total_count', $data ?? [], null); + $this->setIfExists('page_info', $data ?? [], null); + $this->setIfExists('messages', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets total_count + * + * @return int|null + */ + public function getTotalCount(): ?int + { + return $this->container['total_count']; + } + + /** + * Sets total_count + * + * @param int|null $total_count The total number of messages matched by the search. When the request has limitTotalCount set to true this value is limited to 10,000. + * + * @return $this + */ + public function setTotalCount(?int $total_count): static + { + if (is_null($total_count)) { + throw new InvalidArgumentException('non-nullable total_count cannot be null'); + } + $this->container['total_count'] = $total_count; + + return $this; + } + + /** + * Gets page_info + * + * @return \OpenAPI\Client\Model\PageInfo|null + */ + public function getPageInfo(): ?\OpenAPI\Client\Model\PageInfo + { + return $this->container['page_info']; + } + + /** + * Sets page_info + * + * @param \OpenAPI\Client\Model\PageInfo|null $page_info page_info + * + * @return $this + */ + public function setPageInfo(?\OpenAPI\Client\Model\PageInfo $page_info): static + { + if (is_null($page_info)) { + throw new InvalidArgumentException('non-nullable page_info cannot be null'); + } + $this->container['page_info'] = $page_info; + + return $this; + } + + /** + * Gets messages + * + * @return \OpenAPI\Client\Model\ListMessageItem[]|null + */ + public function getMessages(): ?array + { + return $this->container['messages']; + } + + /** + * Sets messages + * + * @param \OpenAPI\Client\Model\ListMessageItem[]|null $messages messages + * + * @return $this + */ + public function setMessages(?array $messages): static + { + if (is_null($messages)) { + throw new InvalidArgumentException('non-nullable messages cannot be null'); + } + $this->container['messages'] = $messages; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MessagingCodeResponse.php b/src/Model/MessagingCodeResponse.php new file mode 100644 index 00000000..581e27b1 --- /dev/null +++ b/src/Model/MessagingCodeResponse.php @@ -0,0 +1,384 @@ + + */ +class MessagingCodeResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'messagingCodeResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'message_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'message_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'message_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'message_id' => 'messageId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'message_id' => 'setMessageId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'message_id' => 'getMessageId' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('message_id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets message_id + * + * @return string|null + */ + public function getMessageId(): ?string + { + return $this->container['message_id']; + } + + /** + * Sets message_id + * + * @param string|null $message_id Messaging API Message ID. + * + * @return $this + */ + public function setMessageId(?string $message_id): static + { + if (is_null($message_id)) { + throw new InvalidArgumentException('non-nullable message_id cannot be null'); + } + $this->container['message_id'] = $message_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MessagingRequestError.php b/src/Model/MessagingRequestError.php new file mode 100644 index 00000000..b96cb649 --- /dev/null +++ b/src/Model/MessagingRequestError.php @@ -0,0 +1,424 @@ + + */ +class MessagingRequestError implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'messagingRequestError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'type' => 'string', + 'description' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'type' => null, + 'description' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'type' => false, + 'description' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'type' => 'type', + 'description' => 'description' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'type' => 'setType', + 'description' => 'setDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'type' => 'getType', + 'description' => 'getDescription' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string + */ + public function getType(): string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type type + * + * @return $this + */ + public function setType(string $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription(): string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description description + * + * @return $this + */ + public function setDescription(string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MfaForbiddenRequestError.php b/src/Model/MfaForbiddenRequestError.php new file mode 100644 index 00000000..0dedab5c --- /dev/null +++ b/src/Model/MfaForbiddenRequestError.php @@ -0,0 +1,384 @@ + + */ +class MfaForbiddenRequestError implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'mfaForbiddenRequestError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'message' => 'getMessage' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets message + * + * @return string|null + */ + public function getMessage(): ?string + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message The message containing the reason behind the request being forbidden. + * + * @return $this + */ + public function setMessage(?string $message): static + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MfaRequestError.php b/src/Model/MfaRequestError.php new file mode 100644 index 00000000..e02cc463 --- /dev/null +++ b/src/Model/MfaRequestError.php @@ -0,0 +1,418 @@ + + */ +class MfaRequestError implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'mfaRequestError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'error' => 'string', + 'request_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'error' => null, + 'request_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'error' => false, + 'request_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'error' => 'error', + 'request_id' => 'requestId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'error' => 'setError', + 'request_id' => 'setRequestId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'error' => 'getError', + 'request_id' => 'getRequestId' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('error', $data ?? [], null); + $this->setIfExists('request_id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets error + * + * @return string|null + */ + public function getError(): ?string + { + return $this->container['error']; + } + + /** + * Sets error + * + * @param string|null $error A message describing the error with your request. + * + * @return $this + */ + public function setError(?string $error): static + { + if (is_null($error)) { + throw new InvalidArgumentException('non-nullable error cannot be null'); + } + $this->container['error'] = $error; + + return $this; + } + + /** + * Gets request_id + * + * @return string|null + */ + public function getRequestId(): ?string + { + return $this->container['request_id']; + } + + /** + * Sets request_id + * + * @param string|null $request_id The associated requestId from AWS. + * + * @return $this + */ + public function setRequestId(?string $request_id): static + { + if (is_null($request_id)) { + throw new InvalidArgumentException('non-nullable request_id cannot be null'); + } + $this->container['request_id'] = $request_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MfaUnauthorizedRequestError.php b/src/Model/MfaUnauthorizedRequestError.php new file mode 100644 index 00000000..39dea859 --- /dev/null +++ b/src/Model/MfaUnauthorizedRequestError.php @@ -0,0 +1,384 @@ + + */ +class MfaUnauthorizedRequestError implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'mfaUnauthorizedRequestError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'message' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'message' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'message' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'message' => 'message' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'message' => 'setMessage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'message' => 'getMessage' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('message', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets message + * + * @return string|null + */ + public function getMessage(): ?string + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param string|null $message Unauthorized + * + * @return $this + */ + public function setMessage(?string $message): static + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MmsMessageContent.php b/src/Model/MmsMessageContent.php new file mode 100644 index 00000000..f255b293 --- /dev/null +++ b/src/Model/MmsMessageContent.php @@ -0,0 +1,426 @@ + + */ +class MmsMessageContent implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'mmsMessageContent'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'text' => 'string', + 'media' => '\OpenAPI\Client\Model\MmsMessageContentFile[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'text' => null, + 'media' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'text' => false, + 'media' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'text' => 'text', + 'media' => 'media' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'text' => 'setText', + 'media' => 'setMedia' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'text' => 'getText', + 'media' => 'getMedia' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('media', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['text']) && (mb_strlen($this->container['text']) > 2048)) { + $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 2048."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets text + * + * @return string|null + */ + public function getText(): ?string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string|null $text The contents of the text message. Must be 2048 characters or less. + * + * @return $this + */ + public function setText(?string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + if ((mb_strlen($text) > 2048)) { + throw new InvalidArgumentException('invalid length for $text when calling MmsMessageContent., must be smaller than or equal to 2048.'); + } + + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets media + * + * @return \OpenAPI\Client\Model\MmsMessageContentFile[]|null + */ + public function getMedia(): ?array + { + return $this->container['media']; + } + + /** + * Sets media + * + * @param \OpenAPI\Client\Model\MmsMessageContentFile[]|null $media media + * + * @return $this + */ + public function setMedia(?array $media): static + { + if (is_null($media)) { + throw new InvalidArgumentException('non-nullable media cannot be null'); + } + $this->container['media'] = $media; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MmsMessageContentFile.php b/src/Model/MmsMessageContentFile.php new file mode 100644 index 00000000..4948e3c6 --- /dev/null +++ b/src/Model/MmsMessageContentFile.php @@ -0,0 +1,395 @@ + + */ +class MmsMessageContentFile implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'mmsMessageContentFile'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'file_url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'file_url' => 'uri' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'file_url' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'file_url' => 'fileUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'file_url' => 'setFileUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'file_url' => 'getFileUrl' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('file_url', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['file_url'] === null) { + $invalidProperties[] = "'file_url' can't be null"; + } + if ((mb_strlen($this->container['file_url']) > 1000)) { + $invalidProperties[] = "invalid value for 'file_url', the character length must be smaller than or equal to 1000."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets file_url + * + * @return string + */ + public function getFileUrl(): string + { + return $this->container['file_url']; + } + + /** + * Sets file_url + * + * @param string $file_url The URL of a media attachment. For MMS, the API limits file size to 3.5MB. Specific carriers and channels may have a smaller limit that could cause a large file to fail, see more at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823216-what-are-the-mms-file-size-limits) for more details. + * + * @return $this + */ + public function setFileUrl(string $file_url): static + { + if (is_null($file_url)) { + throw new InvalidArgumentException('non-nullable file_url cannot be null'); + } + if ((mb_strlen($file_url) > 1000)) { + throw new InvalidArgumentException('invalid length for $file_url when calling MmsMessageContentFile., must be smaller than or equal to 1000.'); + } + + $this->container['file_url'] = $file_url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php new file mode 100644 index 00000000..2ec30f63 --- /dev/null +++ b/src/Model/ModelInterface.php @@ -0,0 +1,112 @@ + + */ + public static function openAPITypes(): array; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats(): array; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap(): array; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters(): array; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters(): array; + + /** + * Show all the invalid properties with reasons. + * + * @return string[] invalid properties with reasons + */ + public function listInvalidProperties(): array; + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid(): bool; + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool; + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool; +} diff --git a/src/Model/MultiChannelAction.php b/src/Model/MultiChannelAction.php new file mode 100644 index 00000000..1bf63d2e --- /dev/null +++ b/src/Model/MultiChannelAction.php @@ -0,0 +1,913 @@ + + */ +class MultiChannelAction implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = 'type'; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelAction'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'type' => '\OpenAPI\Client\Model\RbmActionTypeEnum', + 'text' => 'string', + 'postback_data' => 'string', + 'phone_number' => 'string', + 'latitude' => 'float', + 'longitude' => 'float', + 'label' => 'string', + 'title' => 'string', + 'start_time' => '\DateTime', + 'end_time' => '\DateTime', + 'description' => 'string', + 'url' => 'string', + 'application' => '\OpenAPI\Client\Model\RbmOpenUrlEnum', + 'webview_view_mode' => '\OpenAPI\Client\Model\RbmWebViewEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'type' => null, + 'text' => null, + 'postback_data' => 'byte', + 'phone_number' => null, + 'latitude' => 'double', + 'longitude' => 'double', + 'label' => null, + 'title' => null, + 'start_time' => 'date-time', + 'end_time' => 'date-time', + 'description' => null, + 'url' => 'uri', + 'application' => null, + 'webview_view_mode' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'type' => false, + 'text' => false, + 'postback_data' => false, + 'phone_number' => false, + 'latitude' => false, + 'longitude' => false, + 'label' => false, + 'title' => false, + 'start_time' => false, + 'end_time' => false, + 'description' => false, + 'url' => false, + 'application' => false, + 'webview_view_mode' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'type' => 'type', + 'text' => 'text', + 'postback_data' => 'postbackData', + 'phone_number' => 'phoneNumber', + 'latitude' => 'latitude', + 'longitude' => 'longitude', + 'label' => 'label', + 'title' => 'title', + 'start_time' => 'startTime', + 'end_time' => 'endTime', + 'description' => 'description', + 'url' => 'url', + 'application' => 'application', + 'webview_view_mode' => 'webviewViewMode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'type' => 'setType', + 'text' => 'setText', + 'postback_data' => 'setPostbackData', + 'phone_number' => 'setPhoneNumber', + 'latitude' => 'setLatitude', + 'longitude' => 'setLongitude', + 'label' => 'setLabel', + 'title' => 'setTitle', + 'start_time' => 'setStartTime', + 'end_time' => 'setEndTime', + 'description' => 'setDescription', + 'url' => 'setUrl', + 'application' => 'setApplication', + 'webview_view_mode' => 'setWebviewViewMode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'type' => 'getType', + 'text' => 'getText', + 'postback_data' => 'getPostbackData', + 'phone_number' => 'getPhoneNumber', + 'latitude' => 'getLatitude', + 'longitude' => 'getLongitude', + 'label' => 'getLabel', + 'title' => 'getTitle', + 'start_time' => 'getStartTime', + 'end_time' => 'getEndTime', + 'description' => 'getDescription', + 'url' => 'getUrl', + 'application' => 'getApplication', + 'webview_view_mode' => 'getWebviewViewMode' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + public const TYPE_CREATE_CALENDAR_EVENT = 'CREATE_CALENDAR_EVENT'; + public const TYPE_DIAL_PHONE = 'DIAL_PHONE'; + public const TYPE_OPEN_URL = 'OPEN_URL'; + public const TYPE_REPLY = 'REPLY'; + public const TYPE_REQUEST_LOCATION = 'REQUEST_LOCATION'; + public const TYPE_SHOW_LOCATION = 'SHOW_LOCATION'; + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + // Initialize discriminator property with the model name. + $this->container['type'] = static::$openAPIModelName; + + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('postback_data', $data ?? [], null); + $this->setIfExists('phone_number', $data ?? [], null); + $this->setIfExists('latitude', $data ?? [], null); + $this->setIfExists('longitude', $data ?? [], null); + $this->setIfExists('label', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('end_time', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('application', $data ?? [], null); + $this->setIfExists('webview_view_mode', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + if ((mb_strlen($this->container['text']) > 25)) { + $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 25."; + } + + if ($this->container['postback_data'] === null) { + $invalidProperties[] = "'postback_data' can't be null"; + } + if ((mb_strlen($this->container['postback_data']) > 2048)) { + $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; + } + + if ($this->container['phone_number'] === null) { + $invalidProperties[] = "'phone_number' can't be null"; + } + if ($this->container['latitude'] === null) { + $invalidProperties[] = "'latitude' can't be null"; + } + if ($this->container['longitude'] === null) { + $invalidProperties[] = "'longitude' can't be null"; + } + if (!is_null($this->container['label']) && (mb_strlen($this->container['label']) > 100)) { + $invalidProperties[] = "invalid value for 'label', the character length must be smaller than or equal to 100."; + } + + if ($this->container['title'] === null) { + $invalidProperties[] = "'title' can't be null"; + } + if ((mb_strlen($this->container['title']) > 100)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 100."; + } + + if ($this->container['start_time'] === null) { + $invalidProperties[] = "'start_time' can't be null"; + } + if ($this->container['end_time'] === null) { + $invalidProperties[] = "'end_time' can't be null"; + } + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 500)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 500."; + } + + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; + } + if ((mb_strlen($this->container['url']) > 2048)) { + $invalidProperties[] = "invalid value for 'url', the character length must be smaller than or equal to 2048."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\RbmActionTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\RbmActionTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\RbmActionTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText(): string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text Displayed text for user to click + * + * @return $this + */ + public function setText(string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + if ((mb_strlen($text) > 25)) { + throw new InvalidArgumentException('invalid length for $text when calling MultiChannelAction., must be smaller than or equal to 25.'); + } + + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets postback_data + * + * @return string + */ + public function getPostbackData(): string + { + return $this->container['postback_data']; + } + + /** + * Sets postback_data + * + * @param string $postback_data Base64 payload the customer receives when the reply is clicked. + * + * @return $this + */ + public function setPostbackData(string $postback_data): static + { + if (is_null($postback_data)) { + throw new InvalidArgumentException('non-nullable postback_data cannot be null'); + } + if ((mb_strlen($postback_data) > 2048)) { + throw new InvalidArgumentException('invalid length for $postback_data when calling MultiChannelAction., must be smaller than or equal to 2048.'); + } + + $this->container['postback_data'] = $postback_data; + + return $this; + } + + /** + * Gets phone_number + * + * @return string + */ + public function getPhoneNumber(): string + { + return $this->container['phone_number']; + } + + /** + * Sets phone_number + * + * @param string $phone_number The phone number to dial. Must be E164 format. + * + * @return $this + */ + public function setPhoneNumber(string $phone_number): static + { + if (is_null($phone_number)) { + throw new InvalidArgumentException('non-nullable phone_number cannot be null'); + } + $this->container['phone_number'] = $phone_number; + + return $this; + } + + /** + * Gets latitude + * + * @return float + */ + public function getLatitude(): float + { + return $this->container['latitude']; + } + + /** + * Sets latitude + * + * @param float $latitude The latitude of the location. Must be in range [-90.000000, 90.000000]. + * + * @return $this + */ + public function setLatitude(float $latitude): static + { + if (is_null($latitude)) { + throw new InvalidArgumentException('non-nullable latitude cannot be null'); + } + $this->container['latitude'] = $latitude; + + return $this; + } + + /** + * Gets longitude + * + * @return float + */ + public function getLongitude(): float + { + return $this->container['longitude']; + } + + /** + * Sets longitude + * + * @param float $longitude The longitude of the location. Must be in range [-180.000000, 180.000000]. + * + * @return $this + */ + public function setLongitude(float $longitude): static + { + if (is_null($longitude)) { + throw new InvalidArgumentException('non-nullable longitude cannot be null'); + } + $this->container['longitude'] = $longitude; + + return $this; + } + + /** + * Gets label + * + * @return string|null + */ + public function getLabel(): ?string + { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label The label of the location. + * + * @return $this + */ + public function setLabel(?string $label): static + { + if (is_null($label)) { + throw new InvalidArgumentException('non-nullable label cannot be null'); + } + if ((mb_strlen($label) > 100)) { + throw new InvalidArgumentException('invalid length for $label when calling MultiChannelAction., must be smaller than or equal to 100.'); + } + + $this->container['label'] = $label; + + return $this; + } + + /** + * Gets title + * + * @return string + */ + public function getTitle(): string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title The title of the event. + * + * @return $this + */ + public function setTitle(string $title): static + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if ((mb_strlen($title) > 100)) { + throw new InvalidArgumentException('invalid length for $title when calling MultiChannelAction., must be smaller than or equal to 100.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime + */ + public function getStartTime(): \DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime $start_time The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. + * + * @return $this + */ + public function setStartTime(\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets end_time + * + * @return \DateTime + */ + public function getEndTime(): \DateTime + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param \DateTime $end_time The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. + * + * @return $this + */ + public function setEndTime(\DateTime $end_time): static + { + if (is_null($end_time)) { + throw new InvalidArgumentException('non-nullable end_time cannot be null'); + } + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description The description of the event. + * + * @return $this + */ + public function setDescription(?string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + if ((mb_strlen($description) > 500)) { + throw new InvalidArgumentException('invalid length for $description when calling MultiChannelAction., must be smaller than or equal to 500.'); + } + + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl(): string + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url The URL to open in browser. Must use http:// or https:// scheme. + * + * @return $this + */ + public function setUrl(string $url): static + { + if (is_null($url)) { + throw new InvalidArgumentException('non-nullable url cannot be null'); + } + if ((mb_strlen($url) > 2048)) { + throw new InvalidArgumentException('invalid length for $url when calling MultiChannelAction., must be smaller than or equal to 2048.'); + } + + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets application + * + * @return \OpenAPI\Client\Model\RbmOpenUrlEnum|null + */ + public function getApplication(): ?\OpenAPI\Client\Model\RbmOpenUrlEnum + { + return $this->container['application']; + } + + /** + * Sets application + * + * @param \OpenAPI\Client\Model\RbmOpenUrlEnum|null $application application + * + * @return $this + */ + public function setApplication(?\OpenAPI\Client\Model\RbmOpenUrlEnum $application): static + { + if (is_null($application)) { + throw new InvalidArgumentException('non-nullable application cannot be null'); + } + $this->container['application'] = $application; + + return $this; + } + + /** + * Gets webview_view_mode + * + * @return \OpenAPI\Client\Model\RbmWebViewEnum|null + */ + public function getWebviewViewMode(): ?\OpenAPI\Client\Model\RbmWebViewEnum + { + return $this->container['webview_view_mode']; + } + + /** + * Sets webview_view_mode + * + * @param \OpenAPI\Client\Model\RbmWebViewEnum|null $webview_view_mode webview_view_mode + * + * @return $this + */ + public function setWebviewViewMode(?\OpenAPI\Client\Model\RbmWebViewEnum $webview_view_mode): static + { + if (is_null($webview_view_mode)) { + throw new InvalidArgumentException('non-nullable webview_view_mode cannot be null'); + } + $this->container['webview_view_mode'] = $webview_view_mode; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelActionCalendarEvent.php b/src/Model/MultiChannelActionCalendarEvent.php new file mode 100644 index 00000000..991d9f49 --- /dev/null +++ b/src/Model/MultiChannelActionCalendarEvent.php @@ -0,0 +1,638 @@ + + */ +class MultiChannelActionCalendarEvent implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelActionCalendarEvent'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'type' => '\OpenAPI\Client\Model\RbmActionTypeEnum', + 'text' => 'string', + 'postback_data' => 'string', + 'title' => 'string', + 'start_time' => '\DateTime', + 'end_time' => '\DateTime', + 'description' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'type' => null, + 'text' => null, + 'postback_data' => 'byte', + 'title' => null, + 'start_time' => 'date-time', + 'end_time' => 'date-time', + 'description' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'type' => false, + 'text' => false, + 'postback_data' => false, + 'title' => false, + 'start_time' => false, + 'end_time' => false, + 'description' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'type' => 'type', + 'text' => 'text', + 'postback_data' => 'postbackData', + 'title' => 'title', + 'start_time' => 'startTime', + 'end_time' => 'endTime', + 'description' => 'description' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'type' => 'setType', + 'text' => 'setText', + 'postback_data' => 'setPostbackData', + 'title' => 'setTitle', + 'start_time' => 'setStartTime', + 'end_time' => 'setEndTime', + 'description' => 'setDescription' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'type' => 'getType', + 'text' => 'getText', + 'postback_data' => 'getPostbackData', + 'title' => 'getTitle', + 'start_time' => 'getStartTime', + 'end_time' => 'getEndTime', + 'description' => 'getDescription' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('postback_data', $data ?? [], null); + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('end_time', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + if ((mb_strlen($this->container['text']) > 25)) { + $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 25."; + } + + if ($this->container['postback_data'] === null) { + $invalidProperties[] = "'postback_data' can't be null"; + } + if ((mb_strlen($this->container['postback_data']) > 2048)) { + $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; + } + + if ($this->container['title'] === null) { + $invalidProperties[] = "'title' can't be null"; + } + if ((mb_strlen($this->container['title']) > 100)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 100."; + } + + if ($this->container['start_time'] === null) { + $invalidProperties[] = "'start_time' can't be null"; + } + if ($this->container['end_time'] === null) { + $invalidProperties[] = "'end_time' can't be null"; + } + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 500)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 500."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\RbmActionTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\RbmActionTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\RbmActionTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText(): string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text Displayed text for user to click + * + * @return $this + */ + public function setText(string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + if ((mb_strlen($text) > 25)) { + throw new InvalidArgumentException('invalid length for $text when calling MultiChannelActionCalendarEvent., must be smaller than or equal to 25.'); + } + + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets postback_data + * + * @return string + */ + public function getPostbackData(): string + { + return $this->container['postback_data']; + } + + /** + * Sets postback_data + * + * @param string $postback_data Base64 payload the customer receives when the reply is clicked. + * + * @return $this + */ + public function setPostbackData(string $postback_data): static + { + if (is_null($postback_data)) { + throw new InvalidArgumentException('non-nullable postback_data cannot be null'); + } + if ((mb_strlen($postback_data) > 2048)) { + throw new InvalidArgumentException('invalid length for $postback_data when calling MultiChannelActionCalendarEvent., must be smaller than or equal to 2048.'); + } + + $this->container['postback_data'] = $postback_data; + + return $this; + } + + /** + * Gets title + * + * @return string + */ + public function getTitle(): string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title The title of the event. + * + * @return $this + */ + public function setTitle(string $title): static + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if ((mb_strlen($title) > 100)) { + throw new InvalidArgumentException('invalid length for $title when calling MultiChannelActionCalendarEvent., must be smaller than or equal to 100.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime + */ + public function getStartTime(): \DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime $start_time The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. + * + * @return $this + */ + public function setStartTime(\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets end_time + * + * @return \DateTime + */ + public function getEndTime(): \DateTime + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param \DateTime $end_time The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. + * + * @return $this + */ + public function setEndTime(\DateTime $end_time): static + { + if (is_null($end_time)) { + throw new InvalidArgumentException('non-nullable end_time cannot be null'); + } + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description The description of the event. + * + * @return $this + */ + public function setDescription(?string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + if ((mb_strlen($description) > 500)) { + throw new InvalidArgumentException('invalid length for $description when calling MultiChannelActionCalendarEvent., must be smaller than or equal to 500.'); + } + + $this->container['description'] = $description; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelChannelListMMSObject.php b/src/Model/MultiChannelChannelListMMSObject.php new file mode 100644 index 00000000..902b6858 --- /dev/null +++ b/src/Model/MultiChannelChannelListMMSObject.php @@ -0,0 +1,498 @@ + + */ +class MultiChannelChannelListMMSObject implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelChannelListMMSObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'from' => 'string', + 'application_id' => 'string', + 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', + 'content' => '\OpenAPI\Client\Model\MmsMessageContent' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'from' => null, + 'application_id' => null, + 'channel' => null, + 'content' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'from' => false, + 'application_id' => false, + 'channel' => false, + 'content' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'from' => 'from', + 'application_id' => 'applicationId', + 'channel' => 'channel', + 'content' => 'content' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'from' => 'setFrom', + 'application_id' => 'setApplicationId', + 'channel' => 'setChannel', + 'content' => 'setContent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'from' => 'getFrom', + 'application_id' => 'getApplicationId', + 'channel' => 'getChannel', + 'content' => 'getContent' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('channel', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['channel'] === null) { + $invalidProperties[] = "'channel' can't be null"; + } + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from The sender ID of the message. This could be an alphanumeric sender ID. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets channel + * + * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + */ + public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + { + return $this->container['channel']; + } + + /** + * Sets channel + * + * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * + * @return $this + */ + public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + { + if (is_null($channel)) { + throw new InvalidArgumentException('non-nullable channel cannot be null'); + } + $this->container['channel'] = $channel; + + return $this; + } + + /** + * Gets content + * + * @return \OpenAPI\Client\Model\MmsMessageContent + */ + public function getContent(): \OpenAPI\Client\Model\MmsMessageContent + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param \OpenAPI\Client\Model\MmsMessageContent $content content + * + * @return $this + */ + public function setContent(\OpenAPI\Client\Model\MmsMessageContent $content): static + { + if (is_null($content)) { + throw new InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelChannelListMMSResponseObject.php b/src/Model/MultiChannelChannelListMMSResponseObject.php new file mode 100644 index 00000000..fb406129 --- /dev/null +++ b/src/Model/MultiChannelChannelListMMSResponseObject.php @@ -0,0 +1,535 @@ + + */ +class MultiChannelChannelListMMSResponseObject implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelChannelListMMSResponseObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'from' => 'string', + 'application_id' => 'string', + 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', + 'content' => '\OpenAPI\Client\Model\MmsMessageContent', + 'owner' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'from' => null, + 'application_id' => null, + 'channel' => null, + 'content' => null, + 'owner' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'from' => false, + 'application_id' => false, + 'channel' => false, + 'content' => false, + 'owner' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'from' => 'from', + 'application_id' => 'applicationId', + 'channel' => 'channel', + 'content' => 'content', + 'owner' => 'owner' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'from' => 'setFrom', + 'application_id' => 'setApplicationId', + 'channel' => 'setChannel', + 'content' => 'setContent', + 'owner' => 'setOwner' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'from' => 'getFrom', + 'application_id' => 'getApplicationId', + 'channel' => 'getChannel', + 'content' => 'getContent', + 'owner' => 'getOwner' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('channel', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['channel'] === null) { + $invalidProperties[] = "'channel' can't be null"; + } + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + if ($this->container['owner'] === null) { + $invalidProperties[] = "'owner' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from The sender ID of the message. This could be an alphanumeric sender ID. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets channel + * + * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + */ + public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + { + return $this->container['channel']; + } + + /** + * Sets channel + * + * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * + * @return $this + */ + public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + { + if (is_null($channel)) { + throw new InvalidArgumentException('non-nullable channel cannot be null'); + } + $this->container['channel'] = $channel; + + return $this; + } + + /** + * Gets content + * + * @return \OpenAPI\Client\Model\MmsMessageContent + */ + public function getContent(): \OpenAPI\Client\Model\MmsMessageContent + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param \OpenAPI\Client\Model\MmsMessageContent $content content + * + * @return $this + */ + public function setContent(\OpenAPI\Client\Model\MmsMessageContent $content): static + { + if (is_null($content)) { + throw new InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets owner + * + * @return string + */ + public function getOwner(): string + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner The Bandwidth senderId associated with the message. Identical to 'from'. + * + * @return $this + */ + public function setOwner(string $owner): static + { + if (is_null($owner)) { + throw new InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelChannelListObjectBase.php b/src/Model/MultiChannelChannelListObjectBase.php new file mode 100644 index 00000000..acc08da9 --- /dev/null +++ b/src/Model/MultiChannelChannelListObjectBase.php @@ -0,0 +1,461 @@ + + */ +class MultiChannelChannelListObjectBase implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelChannelListObjectBase'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'from' => 'string', + 'application_id' => 'string', + 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'from' => null, + 'application_id' => null, + 'channel' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'from' => false, + 'application_id' => false, + 'channel' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'from' => 'from', + 'application_id' => 'applicationId', + 'channel' => 'channel' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'from' => 'setFrom', + 'application_id' => 'setApplicationId', + 'channel' => 'setChannel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'from' => 'getFrom', + 'application_id' => 'getApplicationId', + 'channel' => 'getChannel' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('channel', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['channel'] === null) { + $invalidProperties[] = "'channel' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from The sender ID of the message. This could be an alphanumeric sender ID. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets channel + * + * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + */ + public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + { + return $this->container['channel']; + } + + /** + * Sets channel + * + * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * + * @return $this + */ + public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + { + if (is_null($channel)) { + throw new InvalidArgumentException('non-nullable channel cannot be null'); + } + $this->container['channel'] = $channel; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelChannelListOwnerObject.php b/src/Model/MultiChannelChannelListOwnerObject.php new file mode 100644 index 00000000..ea86e0dc --- /dev/null +++ b/src/Model/MultiChannelChannelListOwnerObject.php @@ -0,0 +1,387 @@ + + */ +class MultiChannelChannelListOwnerObject implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelChannelListOwnerObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'owner' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'owner' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'owner' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'owner' => 'owner' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'owner' => 'setOwner' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'owner' => 'getOwner' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('owner', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['owner'] === null) { + $invalidProperties[] = "'owner' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets owner + * + * @return string + */ + public function getOwner(): string + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner The Bandwidth senderId associated with the message. Identical to 'from'. + * + * @return $this + */ + public function setOwner(string $owner): static + { + if (is_null($owner)) { + throw new InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelChannelListRBMObject.php b/src/Model/MultiChannelChannelListRBMObject.php new file mode 100644 index 00000000..9a3e97c4 --- /dev/null +++ b/src/Model/MultiChannelChannelListRBMObject.php @@ -0,0 +1,498 @@ + + */ +class MultiChannelChannelListRBMObject implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelChannelListRBMObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'from' => 'string', + 'application_id' => 'string', + 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', + 'content' => '\OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'from' => null, + 'application_id' => null, + 'channel' => null, + 'content' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'from' => false, + 'application_id' => false, + 'channel' => false, + 'content' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'from' => 'from', + 'application_id' => 'applicationId', + 'channel' => 'channel', + 'content' => 'content' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'from' => 'setFrom', + 'application_id' => 'setApplicationId', + 'channel' => 'setChannel', + 'content' => 'setContent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'from' => 'getFrom', + 'application_id' => 'getApplicationId', + 'channel' => 'getChannel', + 'content' => 'getContent' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('channel', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['channel'] === null) { + $invalidProperties[] = "'channel' can't be null"; + } + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from The sender ID of the message. This could be an alphanumeric sender ID. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets channel + * + * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + */ + public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + { + return $this->container['channel']; + } + + /** + * Sets channel + * + * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * + * @return $this + */ + public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + { + if (is_null($channel)) { + throw new InvalidArgumentException('non-nullable channel cannot be null'); + } + $this->container['channel'] = $channel; + + return $this; + } + + /** + * Gets content + * + * @return \OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent + */ + public function getContent(): \OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param \OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent $content content + * + * @return $this + */ + public function setContent(\OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent $content): static + { + if (is_null($content)) { + throw new InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php b/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php new file mode 100644 index 00000000..e7b18bb3 --- /dev/null +++ b/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php @@ -0,0 +1,672 @@ + + */ +class MultiChannelChannelListRBMObjectAllOfContent implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelChannelListRBMObject_allOf_content'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'text' => 'string', + 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]', + 'media' => '\OpenAPI\Client\Model\RbmMessageContentFile[]', + 'orientation' => '\OpenAPI\Client\Model\StandaloneCardOrientationEnum', + 'thumbnail_image_alignment' => '\OpenAPI\Client\Model\ThumbnailAlignmentEnum', + 'card_content' => '\OpenAPI\Client\Model\RbmCardContent', + 'card_width' => '\OpenAPI\Client\Model\CardWidthEnum', + 'card_contents' => '\OpenAPI\Client\Model\RbmCardContent[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'text' => null, + 'suggestions' => null, + 'media' => null, + 'orientation' => null, + 'thumbnail_image_alignment' => null, + 'card_content' => null, + 'card_width' => null, + 'card_contents' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'text' => false, + 'suggestions' => false, + 'media' => false, + 'orientation' => false, + 'thumbnail_image_alignment' => false, + 'card_content' => false, + 'card_width' => false, + 'card_contents' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'text' => 'text', + 'suggestions' => 'suggestions', + 'media' => 'media', + 'orientation' => 'orientation', + 'thumbnail_image_alignment' => 'thumbnailImageAlignment', + 'card_content' => 'cardContent', + 'card_width' => 'cardWidth', + 'card_contents' => 'cardContents' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'text' => 'setText', + 'suggestions' => 'setSuggestions', + 'media' => 'setMedia', + 'orientation' => 'setOrientation', + 'thumbnail_image_alignment' => 'setThumbnailImageAlignment', + 'card_content' => 'setCardContent', + 'card_width' => 'setCardWidth', + 'card_contents' => 'setCardContents' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'text' => 'getText', + 'suggestions' => 'getSuggestions', + 'media' => 'getMedia', + 'orientation' => 'getOrientation', + 'thumbnail_image_alignment' => 'getThumbnailImageAlignment', + 'card_content' => 'getCardContent', + 'card_width' => 'getCardWidth', + 'card_contents' => 'getCardContents' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('suggestions', $data ?? [], null); + $this->setIfExists('media', $data ?? [], null); + $this->setIfExists('orientation', $data ?? [], null); + $this->setIfExists('thumbnail_image_alignment', $data ?? [], null); + $this->setIfExists('card_content', $data ?? [], null); + $this->setIfExists('card_width', $data ?? [], null); + $this->setIfExists('card_contents', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + if ((mb_strlen($this->container['text']) > 3270)) { + $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 3270."; + } + + if (!is_null($this->container['suggestions']) && (count($this->container['suggestions']) > 11)) { + $invalidProperties[] = "invalid value for 'suggestions', number of items must be less than or equal to 11."; + } + + if ($this->container['media'] === null) { + $invalidProperties[] = "'media' can't be null"; + } + if ($this->container['orientation'] === null) { + $invalidProperties[] = "'orientation' can't be null"; + } + if ($this->container['card_content'] === null) { + $invalidProperties[] = "'card_content' can't be null"; + } + if ($this->container['card_width'] === null) { + $invalidProperties[] = "'card_width' can't be null"; + } + if ($this->container['card_contents'] === null) { + $invalidProperties[] = "'card_contents' can't be null"; + } + if ((count($this->container['card_contents']) > 10)) { + $invalidProperties[] = "invalid value for 'card_contents', number of items must be less than or equal to 10."; + } + + if ((count($this->container['card_contents']) < 2)) { + $invalidProperties[] = "invalid value for 'card_contents', number of items must be greater than or equal to 2."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets text + * + * @return string + */ + public function getText(): string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text The text associated with the message. Must be 3270 characters or less + * + * @return $this + */ + public function setText(string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + if ((mb_strlen($text) > 3270)) { + throw new InvalidArgumentException('invalid length for $text when calling MultiChannelChannelListRBMObjectAllOfContent., must be smaller than or equal to 3270.'); + } + + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets suggestions + * + * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + */ + public function getSuggestions(): ?array + { + return $this->container['suggestions']; + } + + /** + * Sets suggestions + * + * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * + * @return $this + */ + public function setSuggestions(?array $suggestions): static + { + if (is_null($suggestions)) { + throw new InvalidArgumentException('non-nullable suggestions cannot be null'); + } + + if ((count($suggestions) > 11)) { + throw new InvalidArgumentException('invalid value for $suggestions when calling MultiChannelChannelListRBMObjectAllOfContent., number of items must be less than or equal to 11.'); + } + $this->container['suggestions'] = $suggestions; + + return $this; + } + + /** + * Gets media + * + * @return \OpenAPI\Client\Model\RbmMessageContentFile[] + */ + public function getMedia(): array + { + return $this->container['media']; + } + + /** + * Sets media + * + * @param \OpenAPI\Client\Model\RbmMessageContentFile[] $media media + * + * @return $this + */ + public function setMedia(array $media): static + { + if (is_null($media)) { + throw new InvalidArgumentException('non-nullable media cannot be null'); + } + $this->container['media'] = $media; + + return $this; + } + + /** + * Gets orientation + * + * @return \OpenAPI\Client\Model\StandaloneCardOrientationEnum + */ + public function getOrientation(): \OpenAPI\Client\Model\StandaloneCardOrientationEnum + { + return $this->container['orientation']; + } + + /** + * Sets orientation + * + * @param \OpenAPI\Client\Model\StandaloneCardOrientationEnum $orientation orientation + * + * @return $this + */ + public function setOrientation(\OpenAPI\Client\Model\StandaloneCardOrientationEnum $orientation): static + { + if (is_null($orientation)) { + throw new InvalidArgumentException('non-nullable orientation cannot be null'); + } + $this->container['orientation'] = $orientation; + + return $this; + } + + /** + * Gets thumbnail_image_alignment + * + * @return \OpenAPI\Client\Model\ThumbnailAlignmentEnum|null + */ + public function getThumbnailImageAlignment(): ?\OpenAPI\Client\Model\ThumbnailAlignmentEnum + { + return $this->container['thumbnail_image_alignment']; + } + + /** + * Sets thumbnail_image_alignment + * + * @param \OpenAPI\Client\Model\ThumbnailAlignmentEnum|null $thumbnail_image_alignment thumbnail_image_alignment + * + * @return $this + */ + public function setThumbnailImageAlignment(?\OpenAPI\Client\Model\ThumbnailAlignmentEnum $thumbnail_image_alignment): static + { + if (is_null($thumbnail_image_alignment)) { + throw new InvalidArgumentException('non-nullable thumbnail_image_alignment cannot be null'); + } + $this->container['thumbnail_image_alignment'] = $thumbnail_image_alignment; + + return $this; + } + + /** + * Gets card_content + * + * @return \OpenAPI\Client\Model\RbmCardContent + */ + public function getCardContent(): \OpenAPI\Client\Model\RbmCardContent + { + return $this->container['card_content']; + } + + /** + * Sets card_content + * + * @param \OpenAPI\Client\Model\RbmCardContent $card_content card_content + * + * @return $this + */ + public function setCardContent(\OpenAPI\Client\Model\RbmCardContent $card_content): static + { + if (is_null($card_content)) { + throw new InvalidArgumentException('non-nullable card_content cannot be null'); + } + $this->container['card_content'] = $card_content; + + return $this; + } + + /** + * Gets card_width + * + * @return \OpenAPI\Client\Model\CardWidthEnum + */ + public function getCardWidth(): \OpenAPI\Client\Model\CardWidthEnum + { + return $this->container['card_width']; + } + + /** + * Sets card_width + * + * @param \OpenAPI\Client\Model\CardWidthEnum $card_width card_width + * + * @return $this + */ + public function setCardWidth(\OpenAPI\Client\Model\CardWidthEnum $card_width): static + { + if (is_null($card_width)) { + throw new InvalidArgumentException('non-nullable card_width cannot be null'); + } + $this->container['card_width'] = $card_width; + + return $this; + } + + /** + * Gets card_contents + * + * @return \OpenAPI\Client\Model\RbmCardContent[] + */ + public function getCardContents(): array + { + return $this->container['card_contents']; + } + + /** + * Sets card_contents + * + * @param \OpenAPI\Client\Model\RbmCardContent[] $card_contents card_contents + * + * @return $this + */ + public function setCardContents(array $card_contents): static + { + if (is_null($card_contents)) { + throw new InvalidArgumentException('non-nullable card_contents cannot be null'); + } + + if ((count($card_contents) > 10)) { + throw new InvalidArgumentException('invalid value for $card_contents when calling MultiChannelChannelListRBMObjectAllOfContent., number of items must be less than or equal to 10.'); + } + if ((count($card_contents) < 2)) { + throw new InvalidArgumentException('invalid length for $card_contents when calling MultiChannelChannelListRBMObjectAllOfContent., number of items must be greater than or equal to 2.'); + } + $this->container['card_contents'] = $card_contents; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelChannelListRBMResponseObject.php b/src/Model/MultiChannelChannelListRBMResponseObject.php new file mode 100644 index 00000000..48298d40 --- /dev/null +++ b/src/Model/MultiChannelChannelListRBMResponseObject.php @@ -0,0 +1,535 @@ + + */ +class MultiChannelChannelListRBMResponseObject implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelChannelListRBMResponseObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'from' => 'string', + 'application_id' => 'string', + 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', + 'content' => '\OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent', + 'owner' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'from' => null, + 'application_id' => null, + 'channel' => null, + 'content' => null, + 'owner' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'from' => false, + 'application_id' => false, + 'channel' => false, + 'content' => false, + 'owner' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'from' => 'from', + 'application_id' => 'applicationId', + 'channel' => 'channel', + 'content' => 'content', + 'owner' => 'owner' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'from' => 'setFrom', + 'application_id' => 'setApplicationId', + 'channel' => 'setChannel', + 'content' => 'setContent', + 'owner' => 'setOwner' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'from' => 'getFrom', + 'application_id' => 'getApplicationId', + 'channel' => 'getChannel', + 'content' => 'getContent', + 'owner' => 'getOwner' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('channel', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['channel'] === null) { + $invalidProperties[] = "'channel' can't be null"; + } + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + if ($this->container['owner'] === null) { + $invalidProperties[] = "'owner' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from The sender ID of the message. This could be an alphanumeric sender ID. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets channel + * + * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + */ + public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + { + return $this->container['channel']; + } + + /** + * Sets channel + * + * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * + * @return $this + */ + public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + { + if (is_null($channel)) { + throw new InvalidArgumentException('non-nullable channel cannot be null'); + } + $this->container['channel'] = $channel; + + return $this; + } + + /** + * Gets content + * + * @return \OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent + */ + public function getContent(): \OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param \OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent $content content + * + * @return $this + */ + public function setContent(\OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent $content): static + { + if (is_null($content)) { + throw new InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets owner + * + * @return string + */ + public function getOwner(): string + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner The Bandwidth senderId associated with the message. Identical to 'from'. + * + * @return $this + */ + public function setOwner(string $owner): static + { + if (is_null($owner)) { + throw new InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelChannelListRequestObject.php b/src/Model/MultiChannelChannelListRequestObject.php new file mode 100644 index 00000000..681e2ac9 --- /dev/null +++ b/src/Model/MultiChannelChannelListRequestObject.php @@ -0,0 +1,504 @@ + + */ +class MultiChannelChannelListRequestObject implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = 'channel'; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelChannelListRequestObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'from' => 'string', + 'application_id' => 'string', + 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', + 'content' => '\OpenAPI\Client\Model\MmsMessageContent' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'from' => null, + 'application_id' => null, + 'channel' => null, + 'content' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'from' => false, + 'application_id' => false, + 'channel' => false, + 'content' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'from' => 'from', + 'application_id' => 'applicationId', + 'channel' => 'channel', + 'content' => 'content' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'from' => 'setFrom', + 'application_id' => 'setApplicationId', + 'channel' => 'setChannel', + 'content' => 'setContent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'from' => 'getFrom', + 'application_id' => 'getApplicationId', + 'channel' => 'getChannel', + 'content' => 'getContent' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + public const CHANNEL_MMS = 'MMS'; + public const CHANNEL_RBM = 'RBM'; + public const CHANNEL_SMS = 'SMS'; + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + // Initialize discriminator property with the model name. + $this->container['channel'] = static::$openAPIModelName; + + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('channel', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['channel'] === null) { + $invalidProperties[] = "'channel' can't be null"; + } + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from The sender ID of the message. This could be an alphanumeric sender ID. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets channel + * + * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + */ + public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + { + return $this->container['channel']; + } + + /** + * Sets channel + * + * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * + * @return $this + */ + public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + { + if (is_null($channel)) { + throw new InvalidArgumentException('non-nullable channel cannot be null'); + } + $this->container['channel'] = $channel; + + return $this; + } + + /** + * Gets content + * + * @return \OpenAPI\Client\Model\MmsMessageContent + */ + public function getContent(): \OpenAPI\Client\Model\MmsMessageContent + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param \OpenAPI\Client\Model\MmsMessageContent $content content + * + * @return $this + */ + public function setContent(\OpenAPI\Client\Model\MmsMessageContent $content): static + { + if (is_null($content)) { + throw new InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelChannelListResponseObject.php b/src/Model/MultiChannelChannelListResponseObject.php new file mode 100644 index 00000000..038544bf --- /dev/null +++ b/src/Model/MultiChannelChannelListResponseObject.php @@ -0,0 +1,541 @@ + + */ +class MultiChannelChannelListResponseObject implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = 'channel'; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelChannelListResponseObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'from' => 'string', + 'application_id' => 'string', + 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', + 'content' => '\OpenAPI\Client\Model\MmsMessageContent', + 'owner' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'from' => null, + 'application_id' => null, + 'channel' => null, + 'content' => null, + 'owner' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'from' => false, + 'application_id' => false, + 'channel' => false, + 'content' => false, + 'owner' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'from' => 'from', + 'application_id' => 'applicationId', + 'channel' => 'channel', + 'content' => 'content', + 'owner' => 'owner' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'from' => 'setFrom', + 'application_id' => 'setApplicationId', + 'channel' => 'setChannel', + 'content' => 'setContent', + 'owner' => 'setOwner' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'from' => 'getFrom', + 'application_id' => 'getApplicationId', + 'channel' => 'getChannel', + 'content' => 'getContent', + 'owner' => 'getOwner' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + public const CHANNEL_MMS = 'MMS'; + public const CHANNEL_RBM = 'RBM'; + public const CHANNEL_SMS = 'SMS'; + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + // Initialize discriminator property with the model name. + $this->container['channel'] = static::$openAPIModelName; + + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('channel', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['channel'] === null) { + $invalidProperties[] = "'channel' can't be null"; + } + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + if ($this->container['owner'] === null) { + $invalidProperties[] = "'owner' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from The sender ID of the message. This could be an alphanumeric sender ID. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets channel + * + * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + */ + public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + { + return $this->container['channel']; + } + + /** + * Sets channel + * + * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * + * @return $this + */ + public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + { + if (is_null($channel)) { + throw new InvalidArgumentException('non-nullable channel cannot be null'); + } + $this->container['channel'] = $channel; + + return $this; + } + + /** + * Gets content + * + * @return \OpenAPI\Client\Model\MmsMessageContent + */ + public function getContent(): \OpenAPI\Client\Model\MmsMessageContent + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param \OpenAPI\Client\Model\MmsMessageContent $content content + * + * @return $this + */ + public function setContent(\OpenAPI\Client\Model\MmsMessageContent $content): static + { + if (is_null($content)) { + throw new InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets owner + * + * @return string + */ + public function getOwner(): string + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner The Bandwidth senderId associated with the message. Identical to 'from'. + * + * @return $this + */ + public function setOwner(string $owner): static + { + if (is_null($owner)) { + throw new InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelChannelListSMSObject.php b/src/Model/MultiChannelChannelListSMSObject.php new file mode 100644 index 00000000..535094eb --- /dev/null +++ b/src/Model/MultiChannelChannelListSMSObject.php @@ -0,0 +1,498 @@ + + */ +class MultiChannelChannelListSMSObject implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelChannelListSMSObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'from' => 'string', + 'application_id' => 'string', + 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', + 'content' => '\OpenAPI\Client\Model\SmsMessageContent' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'from' => null, + 'application_id' => null, + 'channel' => null, + 'content' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'from' => false, + 'application_id' => false, + 'channel' => false, + 'content' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'from' => 'from', + 'application_id' => 'applicationId', + 'channel' => 'channel', + 'content' => 'content' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'from' => 'setFrom', + 'application_id' => 'setApplicationId', + 'channel' => 'setChannel', + 'content' => 'setContent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'from' => 'getFrom', + 'application_id' => 'getApplicationId', + 'channel' => 'getChannel', + 'content' => 'getContent' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('channel', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['channel'] === null) { + $invalidProperties[] = "'channel' can't be null"; + } + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from The sender ID of the message. This could be an alphanumeric sender ID. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets channel + * + * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + */ + public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + { + return $this->container['channel']; + } + + /** + * Sets channel + * + * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * + * @return $this + */ + public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + { + if (is_null($channel)) { + throw new InvalidArgumentException('non-nullable channel cannot be null'); + } + $this->container['channel'] = $channel; + + return $this; + } + + /** + * Gets content + * + * @return \OpenAPI\Client\Model\SmsMessageContent + */ + public function getContent(): \OpenAPI\Client\Model\SmsMessageContent + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param \OpenAPI\Client\Model\SmsMessageContent $content content + * + * @return $this + */ + public function setContent(\OpenAPI\Client\Model\SmsMessageContent $content): static + { + if (is_null($content)) { + throw new InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelChannelListSMSResponseObject.php b/src/Model/MultiChannelChannelListSMSResponseObject.php new file mode 100644 index 00000000..ba2c4fce --- /dev/null +++ b/src/Model/MultiChannelChannelListSMSResponseObject.php @@ -0,0 +1,535 @@ + + */ +class MultiChannelChannelListSMSResponseObject implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelChannelListSMSResponseObject'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'from' => 'string', + 'application_id' => 'string', + 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', + 'content' => '\OpenAPI\Client\Model\SmsMessageContent', + 'owner' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'from' => null, + 'application_id' => null, + 'channel' => null, + 'content' => null, + 'owner' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'from' => false, + 'application_id' => false, + 'channel' => false, + 'content' => false, + 'owner' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'from' => 'from', + 'application_id' => 'applicationId', + 'channel' => 'channel', + 'content' => 'content', + 'owner' => 'owner' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'from' => 'setFrom', + 'application_id' => 'setApplicationId', + 'channel' => 'setChannel', + 'content' => 'setContent', + 'owner' => 'setOwner' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'from' => 'getFrom', + 'application_id' => 'getApplicationId', + 'channel' => 'getChannel', + 'content' => 'getContent', + 'owner' => 'getOwner' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('channel', $data ?? [], null); + $this->setIfExists('content', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['channel'] === null) { + $invalidProperties[] = "'channel' can't be null"; + } + if ($this->container['content'] === null) { + $invalidProperties[] = "'content' can't be null"; + } + if ($this->container['owner'] === null) { + $invalidProperties[] = "'owner' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from The sender ID of the message. This could be an alphanumeric sender ID. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets channel + * + * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + */ + public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + { + return $this->container['channel']; + } + + /** + * Sets channel + * + * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * + * @return $this + */ + public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + { + if (is_null($channel)) { + throw new InvalidArgumentException('non-nullable channel cannot be null'); + } + $this->container['channel'] = $channel; + + return $this; + } + + /** + * Gets content + * + * @return \OpenAPI\Client\Model\SmsMessageContent + */ + public function getContent(): \OpenAPI\Client\Model\SmsMessageContent + { + return $this->container['content']; + } + + /** + * Sets content + * + * @param \OpenAPI\Client\Model\SmsMessageContent $content content + * + * @return $this + */ + public function setContent(\OpenAPI\Client\Model\SmsMessageContent $content): static + { + if (is_null($content)) { + throw new InvalidArgumentException('non-nullable content cannot be null'); + } + $this->container['content'] = $content; + + return $this; + } + + /** + * Gets owner + * + * @return string + */ + public function getOwner(): string + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner The Bandwidth senderId associated with the message. Identical to 'from'. + * + * @return $this + */ + public function setOwner(string $owner): static + { + if (is_null($owner)) { + throw new InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelError.php b/src/Model/MultiChannelError.php new file mode 100644 index 00000000..28abd251 --- /dev/null +++ b/src/Model/MultiChannelError.php @@ -0,0 +1,459 @@ + + */ +class MultiChannelError implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'links' => '\OpenAPI\Client\Model\Link[]', + 'data' => 'object', + 'errors' => '\OpenAPI\Client\Model\ErrorObject[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'links' => null, + 'data' => null, + 'errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'links' => false, + 'data' => true, + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'links' => 'links', + 'data' => 'data', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'links' => 'setLinks', + 'data' => 'setData', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'links' => 'getLinks', + 'data' => 'getData', + 'errors' => 'getErrors' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets links + * + * @return \OpenAPI\Client\Model\Link[]|null + */ + public function getLinks(): ?array + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \OpenAPI\Client\Model\Link[]|null $links links + * + * @return $this + */ + public function setLinks(?array $links): static + { + if (is_null($links)) { + throw new InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + + /** + * Gets data + * + * @return object|null + */ + public function getData(): ?object + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param object|null $data data + * + * @return $this + */ + public function setData(?object $data): static + { + if (is_null($data)) { + array_push($this->openAPINullablesSetToNull, 'data'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('data', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['data'] = $data; + + return $this; + } + + /** + * Gets errors + * + * @return \OpenAPI\Client\Model\ErrorObject[]|null + */ + public function getErrors(): ?array + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \OpenAPI\Client\Model\ErrorObject[]|null $errors errors + * + * @return $this + */ + public function setErrors(?array $errors): static + { + if (is_null($errors)) { + throw new InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelMessageChannelEnum.php b/src/Model/MultiChannelMessageChannelEnum.php new file mode 100644 index 00000000..3ca97007 --- /dev/null +++ b/src/Model/MultiChannelMessageChannelEnum.php @@ -0,0 +1,48 @@ + + */ +class MultiChannelMessageContent implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelMessageContent'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'text' => 'string', + 'media' => '\OpenAPI\Client\Model\RbmMessageContentFile' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'text' => null, + 'media' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'text' => false, + 'media' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'text' => 'text', + 'media' => 'media' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'text' => 'setText', + 'media' => 'setMedia' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'text' => 'getText', + 'media' => 'getMedia' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('media', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets text + * + * @return string|null + */ + public function getText(): ?string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string|null $text text + * + * @return $this + */ + public function setText(?string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets media + * + * @return \OpenAPI\Client\Model\RbmMessageContentFile|null + */ + public function getMedia(): ?\OpenAPI\Client\Model\RbmMessageContentFile + { + return $this->container['media']; + } + + /** + * Sets media + * + * @param \OpenAPI\Client\Model\RbmMessageContentFile|null $media media + * + * @return $this + */ + public function setMedia(?\OpenAPI\Client\Model\RbmMessageContentFile $media): static + { + if (is_null($media)) { + throw new InvalidArgumentException('non-nullable media cannot be null'); + } + $this->container['media'] = $media; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelMessageRequest.php b/src/Model/MultiChannelMessageRequest.php new file mode 100644 index 00000000..946646bb --- /dev/null +++ b/src/Model/MultiChannelMessageRequest.php @@ -0,0 +1,535 @@ + + */ +class MultiChannelMessageRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelMessageRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'to' => 'string', + 'channel_list' => '\OpenAPI\Client\Model\MultiChannelChannelListRequestObject[]', + 'tag' => 'string', + 'priority' => '\OpenAPI\Client\Model\PriorityEnum', + 'expiration' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'to' => null, + 'channel_list' => null, + 'tag' => null, + 'priority' => null, + 'expiration' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'to' => false, + 'channel_list' => false, + 'tag' => false, + 'priority' => false, + 'expiration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'to' => 'to', + 'channel_list' => 'channelList', + 'tag' => 'tag', + 'priority' => 'priority', + 'expiration' => 'expiration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'to' => 'setTo', + 'channel_list' => 'setChannelList', + 'tag' => 'setTag', + 'priority' => 'setPriority', + 'expiration' => 'setExpiration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'to' => 'getTo', + 'channel_list' => 'getChannelList', + 'tag' => 'getTag', + 'priority' => 'getPriority', + 'expiration' => 'getExpiration' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('channel_list', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('priority', $data ?? [], null); + $this->setIfExists('expiration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + if ($this->container['channel_list'] === null) { + $invalidProperties[] = "'channel_list' can't be null"; + } + if ((count($this->container['channel_list']) > 4)) { + $invalidProperties[] = "invalid value for 'channel_list', number of items must be less than or equal to 4."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets to + * + * @return string + */ + public function getTo(): string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string $to The phone number the message should be sent to in E164 format. + * + * @return $this + */ + public function setTo(string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets channel_list + * + * @return \OpenAPI\Client\Model\MultiChannelChannelListRequestObject[] + */ + public function getChannelList(): array + { + return $this->container['channel_list']; + } + + /** + * Sets channel_list + * + * @param \OpenAPI\Client\Model\MultiChannelChannelListRequestObject[] $channel_list A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. + * + * @return $this + */ + public function setChannelList(array $channel_list): static + { + if (is_null($channel_list)) { + throw new InvalidArgumentException('non-nullable channel_list cannot be null'); + } + + if ((count($channel_list) > 4)) { + throw new InvalidArgumentException('invalid value for $channel_list when calling MultiChannelMessageRequest., number of items must be less than or equal to 4.'); + } + $this->container['channel_list'] = $channel_list; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A custom string that will be included in callback events of the message. Max 1024 characters. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + throw new InvalidArgumentException('non-nullable tag cannot be null'); + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets priority + * + * @return \OpenAPI\Client\Model\PriorityEnum|null + */ + public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum + { + return $this->container['priority']; + } + + /** + * Sets priority + * + * @param \OpenAPI\Client\Model\PriorityEnum|null $priority priority + * + * @return $this + */ + public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): static + { + if (is_null($priority)) { + throw new InvalidArgumentException('non-nullable priority cannot be null'); + } + $this->container['priority'] = $priority; + + return $this; + } + + /** + * Gets expiration + * + * @return \DateTime|null + */ + public function getExpiration(): ?\DateTime + { + return $this->container['expiration']; + } + + /** + * Sets expiration + * + * @param \DateTime|null $expiration A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. + * + * @return $this + */ + public function setExpiration(?\DateTime $expiration): static + { + if (is_null($expiration)) { + throw new InvalidArgumentException('non-nullable expiration cannot be null'); + } + $this->container['expiration'] = $expiration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/MultiChannelMessageResponseData.php b/src/Model/MultiChannelMessageResponseData.php new file mode 100644 index 00000000..a922b82e --- /dev/null +++ b/src/Model/MultiChannelMessageResponseData.php @@ -0,0 +1,648 @@ + + */ +class MultiChannelMessageResponseData implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'multiChannelMessageResponseData'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'id' => 'string', + 'time' => '\DateTime', + 'direction' => '\OpenAPI\Client\Model\MessageDirectionEnum', + 'to' => 'string[]', + 'channel_list' => '\OpenAPI\Client\Model\MultiChannelChannelListResponseObject[]', + 'tag' => 'string', + 'priority' => '\OpenAPI\Client\Model\PriorityEnum', + 'expiration' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'id' => null, + 'time' => 'date-time', + 'direction' => null, + 'to' => null, + 'channel_list' => null, + 'tag' => null, + 'priority' => null, + 'expiration' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'id' => false, + 'time' => false, + 'direction' => false, + 'to' => false, + 'channel_list' => false, + 'tag' => false, + 'priority' => false, + 'expiration' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'id' => 'id', + 'time' => 'time', + 'direction' => 'direction', + 'to' => 'to', + 'channel_list' => 'channelList', + 'tag' => 'tag', + 'priority' => 'priority', + 'expiration' => 'expiration' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'id' => 'setId', + 'time' => 'setTime', + 'direction' => 'setDirection', + 'to' => 'setTo', + 'channel_list' => 'setChannelList', + 'tag' => 'setTag', + 'priority' => 'setPriority', + 'expiration' => 'setExpiration' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'id' => 'getId', + 'time' => 'getTime', + 'direction' => 'getDirection', + 'to' => 'getTo', + 'channel_list' => 'getChannelList', + 'tag' => 'getTag', + 'priority' => 'getPriority', + 'expiration' => 'getExpiration' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('time', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('channel_list', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('priority', $data ?? [], null); + $this->setIfExists('expiration', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['time'] === null) { + $invalidProperties[] = "'time' can't be null"; + } + if ($this->container['direction'] === null) { + $invalidProperties[] = "'direction' can't be null"; + } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + if ($this->container['channel_list'] === null) { + $invalidProperties[] = "'channel_list' can't be null"; + } + if ((count($this->container['channel_list']) > 4)) { + $invalidProperties[] = "invalid value for 'channel_list', number of items must be less than or equal to 4."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId(): string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id The ID of the message. + * + * @return $this + */ + public function setId(string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets time + * + * @return \DateTime + */ + public function getTime(): \DateTime + { + return $this->container['time']; + } + + /** + * Sets time + * + * @param \DateTime $time The time the message was received by the Bandwidth API. + * + * @return $this + */ + public function setTime(\DateTime $time): static + { + if (is_null($time)) { + throw new InvalidArgumentException('non-nullable time cannot be null'); + } + $this->container['time'] = $time; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\MessageDirectionEnum + */ + public function getDirection(): \OpenAPI\Client\Model\MessageDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\MessageDirectionEnum $direction direction + * + * @return $this + */ + public function setDirection(\OpenAPI\Client\Model\MessageDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets to + * + * @return string[] + */ + public function getTo(): array + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string[] $to The destination phone number(s) of the message, in E164 format. + * + * @return $this + */ + public function setTo(array $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + + + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets channel_list + * + * @return \OpenAPI\Client\Model\MultiChannelChannelListResponseObject[] + */ + public function getChannelList(): array + { + return $this->container['channel_list']; + } + + /** + * Sets channel_list + * + * @param \OpenAPI\Client\Model\MultiChannelChannelListResponseObject[] $channel_list A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. + * + * @return $this + */ + public function setChannelList(array $channel_list): static + { + if (is_null($channel_list)) { + throw new InvalidArgumentException('non-nullable channel_list cannot be null'); + } + + if ((count($channel_list) > 4)) { + throw new InvalidArgumentException('invalid value for $channel_list when calling MultiChannelMessageResponseData., number of items must be less than or equal to 4.'); + } + $this->container['channel_list'] = $channel_list; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A custom string that will be included in callback events of the message. Max 1024 characters. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + throw new InvalidArgumentException('non-nullable tag cannot be null'); + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets priority + * + * @return \OpenAPI\Client\Model\PriorityEnum|null + */ + public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum + { + return $this->container['priority']; + } + + /** + * Sets priority + * + * @param \OpenAPI\Client\Model\PriorityEnum|null $priority priority + * + * @return $this + */ + public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): static + { + if (is_null($priority)) { + throw new InvalidArgumentException('non-nullable priority cannot be null'); + } + $this->container['priority'] = $priority; + + return $this; + } + + /** + * Gets expiration + * + * @return \DateTime|null + */ + public function getExpiration(): ?\DateTime + { + return $this->container['expiration']; + } + + /** + * Sets expiration + * + * @param \DateTime|null $expiration A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. + * + * @return $this + */ + public function setExpiration(?\DateTime $expiration): static + { + if (is_null($expiration)) { + throw new InvalidArgumentException('non-nullable expiration cannot be null'); + } + $this->container['expiration'] = $expiration; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/OptInWorkflow.php b/src/Model/OptInWorkflow.php new file mode 100644 index 00000000..c2bea953 --- /dev/null +++ b/src/Model/OptInWorkflow.php @@ -0,0 +1,495 @@ + + */ +class OptInWorkflow implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'optInWorkflow'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'description' => 'string', + 'image_urls' => 'string[]', + 'confirmation_response' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'description' => null, + 'image_urls' => null, + 'confirmation_response' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'description' => false, + 'image_urls' => false, + 'confirmation_response' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'description' => 'description', + 'image_urls' => 'imageUrls', + 'confirmation_response' => 'confirmationResponse' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'description' => 'setDescription', + 'image_urls' => 'setImageUrls', + 'confirmation_response' => 'setConfirmationResponse' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'description' => 'getDescription', + 'image_urls' => 'getImageUrls', + 'confirmation_response' => 'getConfirmationResponse' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('image_urls', $data ?? [], null); + $this->setIfExists('confirmation_response', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ((mb_strlen($this->container['description']) > 500)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['description']) < 1)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 1."; + } + + if ($this->container['image_urls'] === null) { + $invalidProperties[] = "'image_urls' can't be null"; + } + if (!is_null($this->container['confirmation_response']) && (mb_strlen($this->container['confirmation_response']) > 500)) { + $invalidProperties[] = "invalid value for 'confirmation_response', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['confirmation_response']) && (mb_strlen($this->container['confirmation_response']) < 0)) { + $invalidProperties[] = "invalid value for 'confirmation_response', the character length must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets description + * + * @return string + */ + public function getDescription(): string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description description + * + * @return $this + */ + public function setDescription(string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + if ((mb_strlen($description) > 500)) { + throw new InvalidArgumentException('invalid length for $description when calling OptInWorkflow., must be smaller than or equal to 500.'); + } + if ((mb_strlen($description) < 1)) { + throw new InvalidArgumentException('invalid length for $description when calling OptInWorkflow., must be bigger than or equal to 1.'); + } + + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets image_urls + * + * @return string[] + */ + public function getImageUrls(): array + { + return $this->container['image_urls']; + } + + /** + * Sets image_urls + * + * @param string[] $image_urls image_urls + * + * @return $this + */ + public function setImageUrls(array $image_urls): static + { + if (is_null($image_urls)) { + throw new InvalidArgumentException('non-nullable image_urls cannot be null'); + } + $this->container['image_urls'] = $image_urls; + + return $this; + } + + /** + * Gets confirmation_response + * + * @return string|null + */ + public function getConfirmationResponse(): ?string + { + return $this->container['confirmation_response']; + } + + /** + * Sets confirmation_response + * + * @param string|null $confirmation_response confirmation_response + * + * @return $this + */ + public function setConfirmationResponse(?string $confirmation_response): static + { + if (is_null($confirmation_response)) { + array_push($this->openAPINullablesSetToNull, 'confirmation_response'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('confirmation_response', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($confirmation_response) && (mb_strlen($confirmation_response) > 500)) { + throw new InvalidArgumentException('invalid length for $confirmation_response when calling OptInWorkflow., must be smaller than or equal to 500.'); + } + if (!is_null($confirmation_response) && (mb_strlen($confirmation_response) < 0)) { + throw new InvalidArgumentException('invalid length for $confirmation_response when calling OptInWorkflow., must be bigger than or equal to 0.'); + } + + $this->container['confirmation_response'] = $confirmation_response; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/Page.php b/src/Model/Page.php new file mode 100644 index 00000000..b6bf2228 --- /dev/null +++ b/src/Model/Page.php @@ -0,0 +1,525 @@ + + */ +class Page implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'page'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'page_size' => 'int', + 'total_elements' => 'int', + 'total_pages' => 'int', + 'page_number' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'page_size' => null, + 'total_elements' => null, + 'total_pages' => null, + 'page_number' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'page_size' => false, + 'total_elements' => false, + 'total_pages' => false, + 'page_number' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'page_size' => 'pageSize', + 'total_elements' => 'totalElements', + 'total_pages' => 'totalPages', + 'page_number' => 'pageNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'page_size' => 'setPageSize', + 'total_elements' => 'setTotalElements', + 'total_pages' => 'setTotalPages', + 'page_number' => 'setPageNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'page_size' => 'getPageSize', + 'total_elements' => 'getTotalElements', + 'total_pages' => 'getTotalPages', + 'page_number' => 'getPageNumber' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('page_size', $data ?? [], null); + $this->setIfExists('total_elements', $data ?? [], null); + $this->setIfExists('total_pages', $data ?? [], null); + $this->setIfExists('page_number', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['page_size'] === null) { + $invalidProperties[] = "'page_size' can't be null"; + } + if (($this->container['page_size'] < 0)) { + $invalidProperties[] = "invalid value for 'page_size', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['total_elements']) && ($this->container['total_elements'] < 0)) { + $invalidProperties[] = "invalid value for 'total_elements', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['total_pages']) && ($this->container['total_pages'] < 0)) { + $invalidProperties[] = "invalid value for 'total_pages', must be bigger than or equal to 0."; + } + + if (!is_null($this->container['page_number']) && ($this->container['page_number'] < 0)) { + $invalidProperties[] = "invalid value for 'page_number', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets page_size + * + * @return int + */ + public function getPageSize(): int + { + return $this->container['page_size']; + } + + /** + * Sets page_size + * + * @param int $page_size The number of items per page. + * + * @return $this + */ + public function setPageSize(int $page_size): static + { + if (is_null($page_size)) { + throw new InvalidArgumentException('non-nullable page_size cannot be null'); + } + + if (($page_size < 0)) { + throw new InvalidArgumentException('invalid value for $page_size when calling Page., must be bigger than or equal to 0.'); + } + + $this->container['page_size'] = $page_size; + + return $this; + } + + /** + * Gets total_elements + * + * @return int|null + */ + public function getTotalElements(): ?int + { + return $this->container['total_elements']; + } + + /** + * Sets total_elements + * + * @param int|null $total_elements The total number of items. + * + * @return $this + */ + public function setTotalElements(?int $total_elements): static + { + if (is_null($total_elements)) { + throw new InvalidArgumentException('non-nullable total_elements cannot be null'); + } + + if (($total_elements < 0)) { + throw new InvalidArgumentException('invalid value for $total_elements when calling Page., must be bigger than or equal to 0.'); + } + + $this->container['total_elements'] = $total_elements; + + return $this; + } + + /** + * Gets total_pages + * + * @return int|null + */ + public function getTotalPages(): ?int + { + return $this->container['total_pages']; + } + + /** + * Sets total_pages + * + * @param int|null $total_pages The total number of pages. + * + * @return $this + */ + public function setTotalPages(?int $total_pages): static + { + if (is_null($total_pages)) { + throw new InvalidArgumentException('non-nullable total_pages cannot be null'); + } + + if (($total_pages < 0)) { + throw new InvalidArgumentException('invalid value for $total_pages when calling Page., must be bigger than or equal to 0.'); + } + + $this->container['total_pages'] = $total_pages; + + return $this; + } + + /** + * Gets page_number + * + * @return int|null + */ + public function getPageNumber(): ?int + { + return $this->container['page_number']; + } + + /** + * Sets page_number + * + * @param int|null $page_number The current page number. + * + * @return $this + */ + public function setPageNumber(?int $page_number): static + { + if (is_null($page_number)) { + throw new InvalidArgumentException('non-nullable page_number cannot be null'); + } + + if (($page_number < 0)) { + throw new InvalidArgumentException('invalid value for $page_number when calling Page., must be bigger than or equal to 0.'); + } + + $this->container['page_number'] = $page_number; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/PageInfo.php b/src/Model/PageInfo.php new file mode 100644 index 00000000..a189b58f --- /dev/null +++ b/src/Model/PageInfo.php @@ -0,0 +1,486 @@ + + */ +class PageInfo implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'pageInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'prev_page' => 'string', + 'next_page' => 'string', + 'prev_page_token' => 'string', + 'next_page_token' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'prev_page' => null, + 'next_page' => null, + 'prev_page_token' => null, + 'next_page_token' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'prev_page' => false, + 'next_page' => false, + 'prev_page_token' => false, + 'next_page_token' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'prev_page' => 'prevPage', + 'next_page' => 'nextPage', + 'prev_page_token' => 'prevPageToken', + 'next_page_token' => 'nextPageToken' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'prev_page' => 'setPrevPage', + 'next_page' => 'setNextPage', + 'prev_page_token' => 'setPrevPageToken', + 'next_page_token' => 'setNextPageToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'prev_page' => 'getPrevPage', + 'next_page' => 'getNextPage', + 'prev_page_token' => 'getPrevPageToken', + 'next_page_token' => 'getNextPageToken' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('prev_page', $data ?? [], null); + $this->setIfExists('next_page', $data ?? [], null); + $this->setIfExists('prev_page_token', $data ?? [], null); + $this->setIfExists('next_page_token', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets prev_page + * + * @return string|null + */ + public function getPrevPage(): ?string + { + return $this->container['prev_page']; + } + + /** + * Sets prev_page + * + * @param string|null $prev_page The link to the previous page for pagination. + * + * @return $this + */ + public function setPrevPage(?string $prev_page): static + { + if (is_null($prev_page)) { + throw new InvalidArgumentException('non-nullable prev_page cannot be null'); + } + $this->container['prev_page'] = $prev_page; + + return $this; + } + + /** + * Gets next_page + * + * @return string|null + */ + public function getNextPage(): ?string + { + return $this->container['next_page']; + } + + /** + * Sets next_page + * + * @param string|null $next_page The link to the next page for pagination. + * + * @return $this + */ + public function setNextPage(?string $next_page): static + { + if (is_null($next_page)) { + throw new InvalidArgumentException('non-nullable next_page cannot be null'); + } + $this->container['next_page'] = $next_page; + + return $this; + } + + /** + * Gets prev_page_token + * + * @return string|null + */ + public function getPrevPageToken(): ?string + { + return $this->container['prev_page_token']; + } + + /** + * Sets prev_page_token + * + * @param string|null $prev_page_token The isolated pagination token for the previous page. + * + * @return $this + */ + public function setPrevPageToken(?string $prev_page_token): static + { + if (is_null($prev_page_token)) { + throw new InvalidArgumentException('non-nullable prev_page_token cannot be null'); + } + $this->container['prev_page_token'] = $prev_page_token; + + return $this; + } + + /** + * Gets next_page_token + * + * @return string|null + */ + public function getNextPageToken(): ?string + { + return $this->container['next_page_token']; + } + + /** + * Sets next_page_token + * + * @param string|null $next_page_token The isolated pagination token for the next page. + * + * @return $this + */ + public function setNextPageToken(?string $next_page_token): static + { + if (is_null($next_page_token)) { + throw new InvalidArgumentException('non-nullable next_page_token cannot be null'); + } + $this->container['next_page_token'] = $next_page_token; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/PriorityEnum.php b/src/Model/PriorityEnum.php new file mode 100644 index 00000000..69a4272d --- /dev/null +++ b/src/Model/PriorityEnum.php @@ -0,0 +1,46 @@ + + */ +class RbmActionBase implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmActionBase'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'type' => '\OpenAPI\Client\Model\RbmActionTypeEnum', + 'text' => 'string', + 'postback_data' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'type' => null, + 'text' => null, + 'postback_data' => 'byte' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'type' => false, + 'text' => false, + 'postback_data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'type' => 'type', + 'text' => 'text', + 'postback_data' => 'postbackData' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'type' => 'setType', + 'text' => 'setText', + 'postback_data' => 'setPostbackData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'type' => 'getType', + 'text' => 'getText', + 'postback_data' => 'getPostbackData' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('postback_data', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + if ((mb_strlen($this->container['text']) > 25)) { + $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 25."; + } + + if ($this->container['postback_data'] === null) { + $invalidProperties[] = "'postback_data' can't be null"; + } + if ((mb_strlen($this->container['postback_data']) > 2048)) { + $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\RbmActionTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\RbmActionTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\RbmActionTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText(): string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text Displayed text for user to click + * + * @return $this + */ + public function setText(string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + if ((mb_strlen($text) > 25)) { + throw new InvalidArgumentException('invalid length for $text when calling RbmActionBase., must be smaller than or equal to 25.'); + } + + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets postback_data + * + * @return string + */ + public function getPostbackData(): string + { + return $this->container['postback_data']; + } + + /** + * Sets postback_data + * + * @param string $postback_data Base64 payload the customer receives when the reply is clicked. + * + * @return $this + */ + public function setPostbackData(string $postback_data): static + { + if (is_null($postback_data)) { + throw new InvalidArgumentException('non-nullable postback_data cannot be null'); + } + if ((mb_strlen($postback_data) > 2048)) { + throw new InvalidArgumentException('invalid length for $postback_data when calling RbmActionBase., must be smaller than or equal to 2048.'); + } + + $this->container['postback_data'] = $postback_data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmActionDial.php b/src/Model/RbmActionDial.php new file mode 100644 index 00000000..5ee6effb --- /dev/null +++ b/src/Model/RbmActionDial.php @@ -0,0 +1,514 @@ + + */ +class RbmActionDial implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmActionDial'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'type' => '\OpenAPI\Client\Model\RbmActionTypeEnum', + 'text' => 'string', + 'postback_data' => 'string', + 'phone_number' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'type' => null, + 'text' => null, + 'postback_data' => 'byte', + 'phone_number' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'type' => false, + 'text' => false, + 'postback_data' => false, + 'phone_number' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'type' => 'type', + 'text' => 'text', + 'postback_data' => 'postbackData', + 'phone_number' => 'phoneNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'type' => 'setType', + 'text' => 'setText', + 'postback_data' => 'setPostbackData', + 'phone_number' => 'setPhoneNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'type' => 'getType', + 'text' => 'getText', + 'postback_data' => 'getPostbackData', + 'phone_number' => 'getPhoneNumber' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('postback_data', $data ?? [], null); + $this->setIfExists('phone_number', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + if ((mb_strlen($this->container['text']) > 25)) { + $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 25."; + } + + if ($this->container['postback_data'] === null) { + $invalidProperties[] = "'postback_data' can't be null"; + } + if ((mb_strlen($this->container['postback_data']) > 2048)) { + $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; + } + + if ($this->container['phone_number'] === null) { + $invalidProperties[] = "'phone_number' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\RbmActionTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\RbmActionTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\RbmActionTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText(): string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text Displayed text for user to click + * + * @return $this + */ + public function setText(string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + if ((mb_strlen($text) > 25)) { + throw new InvalidArgumentException('invalid length for $text when calling RbmActionDial., must be smaller than or equal to 25.'); + } + + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets postback_data + * + * @return string + */ + public function getPostbackData(): string + { + return $this->container['postback_data']; + } + + /** + * Sets postback_data + * + * @param string $postback_data Base64 payload the customer receives when the reply is clicked. + * + * @return $this + */ + public function setPostbackData(string $postback_data): static + { + if (is_null($postback_data)) { + throw new InvalidArgumentException('non-nullable postback_data cannot be null'); + } + if ((mb_strlen($postback_data) > 2048)) { + throw new InvalidArgumentException('invalid length for $postback_data when calling RbmActionDial., must be smaller than or equal to 2048.'); + } + + $this->container['postback_data'] = $postback_data; + + return $this; + } + + /** + * Gets phone_number + * + * @return string + */ + public function getPhoneNumber(): string + { + return $this->container['phone_number']; + } + + /** + * Sets phone_number + * + * @param string $phone_number The phone number to dial. Must be E164 format. + * + * @return $this + */ + public function setPhoneNumber(string $phone_number): static + { + if (is_null($phone_number)) { + throw new InvalidArgumentException('non-nullable phone_number cannot be null'); + } + $this->container['phone_number'] = $phone_number; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmActionOpenUrl.php b/src/Model/RbmActionOpenUrl.php new file mode 100644 index 00000000..b536cf5d --- /dev/null +++ b/src/Model/RbmActionOpenUrl.php @@ -0,0 +1,590 @@ + + */ +class RbmActionOpenUrl implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmActionOpenUrl'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'type' => '\OpenAPI\Client\Model\RbmActionTypeEnum', + 'text' => 'string', + 'postback_data' => 'string', + 'url' => 'string', + 'application' => '\OpenAPI\Client\Model\RbmOpenUrlEnum', + 'webview_view_mode' => '\OpenAPI\Client\Model\RbmWebViewEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'type' => null, + 'text' => null, + 'postback_data' => 'byte', + 'url' => 'uri', + 'application' => null, + 'webview_view_mode' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'type' => false, + 'text' => false, + 'postback_data' => false, + 'url' => false, + 'application' => false, + 'webview_view_mode' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'type' => 'type', + 'text' => 'text', + 'postback_data' => 'postbackData', + 'url' => 'url', + 'application' => 'application', + 'webview_view_mode' => 'webviewViewMode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'type' => 'setType', + 'text' => 'setText', + 'postback_data' => 'setPostbackData', + 'url' => 'setUrl', + 'application' => 'setApplication', + 'webview_view_mode' => 'setWebviewViewMode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'type' => 'getType', + 'text' => 'getText', + 'postback_data' => 'getPostbackData', + 'url' => 'getUrl', + 'application' => 'getApplication', + 'webview_view_mode' => 'getWebviewViewMode' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('postback_data', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + $this->setIfExists('application', $data ?? [], null); + $this->setIfExists('webview_view_mode', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + if ((mb_strlen($this->container['text']) > 25)) { + $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 25."; + } + + if ($this->container['postback_data'] === null) { + $invalidProperties[] = "'postback_data' can't be null"; + } + if ((mb_strlen($this->container['postback_data']) > 2048)) { + $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; + } + + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; + } + if ((mb_strlen($this->container['url']) > 2048)) { + $invalidProperties[] = "invalid value for 'url', the character length must be smaller than or equal to 2048."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\RbmActionTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\RbmActionTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\RbmActionTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText(): string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text Displayed text for user to click + * + * @return $this + */ + public function setText(string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + if ((mb_strlen($text) > 25)) { + throw new InvalidArgumentException('invalid length for $text when calling RbmActionOpenUrl., must be smaller than or equal to 25.'); + } + + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets postback_data + * + * @return string + */ + public function getPostbackData(): string + { + return $this->container['postback_data']; + } + + /** + * Sets postback_data + * + * @param string $postback_data Base64 payload the customer receives when the reply is clicked. + * + * @return $this + */ + public function setPostbackData(string $postback_data): static + { + if (is_null($postback_data)) { + throw new InvalidArgumentException('non-nullable postback_data cannot be null'); + } + if ((mb_strlen($postback_data) > 2048)) { + throw new InvalidArgumentException('invalid length for $postback_data when calling RbmActionOpenUrl., must be smaller than or equal to 2048.'); + } + + $this->container['postback_data'] = $postback_data; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl(): string + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url The URL to open in browser. Must use http:// or https:// scheme. + * + * @return $this + */ + public function setUrl(string $url): static + { + if (is_null($url)) { + throw new InvalidArgumentException('non-nullable url cannot be null'); + } + if ((mb_strlen($url) > 2048)) { + throw new InvalidArgumentException('invalid length for $url when calling RbmActionOpenUrl., must be smaller than or equal to 2048.'); + } + + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets application + * + * @return \OpenAPI\Client\Model\RbmOpenUrlEnum|null + */ + public function getApplication(): ?\OpenAPI\Client\Model\RbmOpenUrlEnum + { + return $this->container['application']; + } + + /** + * Sets application + * + * @param \OpenAPI\Client\Model\RbmOpenUrlEnum|null $application application + * + * @return $this + */ + public function setApplication(?\OpenAPI\Client\Model\RbmOpenUrlEnum $application): static + { + if (is_null($application)) { + throw new InvalidArgumentException('non-nullable application cannot be null'); + } + $this->container['application'] = $application; + + return $this; + } + + /** + * Gets webview_view_mode + * + * @return \OpenAPI\Client\Model\RbmWebViewEnum|null + */ + public function getWebviewViewMode(): ?\OpenAPI\Client\Model\RbmWebViewEnum + { + return $this->container['webview_view_mode']; + } + + /** + * Sets webview_view_mode + * + * @param \OpenAPI\Client\Model\RbmWebViewEnum|null $webview_view_mode webview_view_mode + * + * @return $this + */ + public function setWebviewViewMode(?\OpenAPI\Client\Model\RbmWebViewEnum $webview_view_mode): static + { + if (is_null($webview_view_mode)) { + throw new InvalidArgumentException('non-nullable webview_view_mode cannot be null'); + } + $this->container['webview_view_mode'] = $webview_view_mode; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmActionTypeEnum.php b/src/Model/RbmActionTypeEnum.php new file mode 100644 index 00000000..377f3c2c --- /dev/null +++ b/src/Model/RbmActionTypeEnum.php @@ -0,0 +1,53 @@ + + */ +class RbmActionViewLocation implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmActionViewLocation'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'type' => '\OpenAPI\Client\Model\RbmActionTypeEnum', + 'text' => 'string', + 'postback_data' => 'string', + 'latitude' => 'float', + 'longitude' => 'float', + 'label' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'type' => null, + 'text' => null, + 'postback_data' => 'byte', + 'latitude' => 'double', + 'longitude' => 'double', + 'label' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'type' => false, + 'text' => false, + 'postback_data' => false, + 'latitude' => false, + 'longitude' => false, + 'label' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'type' => 'type', + 'text' => 'text', + 'postback_data' => 'postbackData', + 'latitude' => 'latitude', + 'longitude' => 'longitude', + 'label' => 'label' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'type' => 'setType', + 'text' => 'setText', + 'postback_data' => 'setPostbackData', + 'latitude' => 'setLatitude', + 'longitude' => 'setLongitude', + 'label' => 'setLabel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'type' => 'getType', + 'text' => 'getText', + 'postback_data' => 'getPostbackData', + 'latitude' => 'getLatitude', + 'longitude' => 'getLongitude', + 'label' => 'getLabel' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('postback_data', $data ?? [], null); + $this->setIfExists('latitude', $data ?? [], null); + $this->setIfExists('longitude', $data ?? [], null); + $this->setIfExists('label', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + if ((mb_strlen($this->container['text']) > 25)) { + $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 25."; + } + + if ($this->container['postback_data'] === null) { + $invalidProperties[] = "'postback_data' can't be null"; + } + if ((mb_strlen($this->container['postback_data']) > 2048)) { + $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; + } + + if ($this->container['latitude'] === null) { + $invalidProperties[] = "'latitude' can't be null"; + } + if ($this->container['longitude'] === null) { + $invalidProperties[] = "'longitude' can't be null"; + } + if (!is_null($this->container['label']) && (mb_strlen($this->container['label']) > 100)) { + $invalidProperties[] = "invalid value for 'label', the character length must be smaller than or equal to 100."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\RbmActionTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\RbmActionTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\RbmActionTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets text + * + * @return string + */ + public function getText(): string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text Displayed text for user to click + * + * @return $this + */ + public function setText(string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + if ((mb_strlen($text) > 25)) { + throw new InvalidArgumentException('invalid length for $text when calling RbmActionViewLocation., must be smaller than or equal to 25.'); + } + + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets postback_data + * + * @return string + */ + public function getPostbackData(): string + { + return $this->container['postback_data']; + } + + /** + * Sets postback_data + * + * @param string $postback_data Base64 payload the customer receives when the reply is clicked. + * + * @return $this + */ + public function setPostbackData(string $postback_data): static + { + if (is_null($postback_data)) { + throw new InvalidArgumentException('non-nullable postback_data cannot be null'); + } + if ((mb_strlen($postback_data) > 2048)) { + throw new InvalidArgumentException('invalid length for $postback_data when calling RbmActionViewLocation., must be smaller than or equal to 2048.'); + } + + $this->container['postback_data'] = $postback_data; + + return $this; + } + + /** + * Gets latitude + * + * @return float + */ + public function getLatitude(): float + { + return $this->container['latitude']; + } + + /** + * Sets latitude + * + * @param float $latitude The latitude of the location. Must be in range [-90.000000, 90.000000]. + * + * @return $this + */ + public function setLatitude(float $latitude): static + { + if (is_null($latitude)) { + throw new InvalidArgumentException('non-nullable latitude cannot be null'); + } + $this->container['latitude'] = $latitude; + + return $this; + } + + /** + * Gets longitude + * + * @return float + */ + public function getLongitude(): float + { + return $this->container['longitude']; + } + + /** + * Sets longitude + * + * @param float $longitude The longitude of the location. Must be in range [-180.000000, 180.000000]. + * + * @return $this + */ + public function setLongitude(float $longitude): static + { + if (is_null($longitude)) { + throw new InvalidArgumentException('non-nullable longitude cannot be null'); + } + $this->container['longitude'] = $longitude; + + return $this; + } + + /** + * Gets label + * + * @return string|null + */ + public function getLabel(): ?string + { + return $this->container['label']; + } + + /** + * Sets label + * + * @param string|null $label The label of the location. + * + * @return $this + */ + public function setLabel(?string $label): static + { + if (is_null($label)) { + throw new InvalidArgumentException('non-nullable label cannot be null'); + } + if ((mb_strlen($label) > 100)) { + throw new InvalidArgumentException('invalid length for $label when calling RbmActionViewLocation., must be smaller than or equal to 100.'); + } + + $this->container['label'] = $label; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmCardContent.php b/src/Model/RbmCardContent.php new file mode 100644 index 00000000..8a228a75 --- /dev/null +++ b/src/Model/RbmCardContent.php @@ -0,0 +1,511 @@ + + */ +class RbmCardContent implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmCardContent'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'title' => 'string', + 'description' => 'string', + 'media' => '\OpenAPI\Client\Model\RbmCardContentMedia', + 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'title' => null, + 'description' => null, + 'media' => null, + 'suggestions' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'title' => false, + 'description' => false, + 'media' => false, + 'suggestions' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'title' => 'title', + 'description' => 'description', + 'media' => 'media', + 'suggestions' => 'suggestions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'title' => 'setTitle', + 'description' => 'setDescription', + 'media' => 'setMedia', + 'suggestions' => 'setSuggestions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'title' => 'getTitle', + 'description' => 'getDescription', + 'media' => 'getMedia', + 'suggestions' => 'getSuggestions' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('title', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('media', $data ?? [], null); + $this->setIfExists('suggestions', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 200)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 200."; + } + + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 2000)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 2000."; + } + + if (!is_null($this->container['suggestions']) && (count($this->container['suggestions']) > 4)) { + $invalidProperties[] = "invalid value for 'suggestions', number of items must be less than or equal to 4."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets title + * + * @return string|null + */ + public function getTitle(): ?string + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title The title of the card. Must be 200 characters or less. + * + * @return $this + */ + public function setTitle(?string $title): static + { + if (is_null($title)) { + throw new InvalidArgumentException('non-nullable title cannot be null'); + } + if ((mb_strlen($title) > 200)) { + throw new InvalidArgumentException('invalid length for $title when calling RbmCardContent., must be smaller than or equal to 200.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description The description of the card. Must be 2000 characters or less. + * + * @return $this + */ + public function setDescription(?string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + if ((mb_strlen($description) > 2000)) { + throw new InvalidArgumentException('invalid length for $description when calling RbmCardContent., must be smaller than or equal to 2000.'); + } + + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets media + * + * @return \OpenAPI\Client\Model\RbmCardContentMedia|null + */ + public function getMedia(): ?\OpenAPI\Client\Model\RbmCardContentMedia + { + return $this->container['media']; + } + + /** + * Sets media + * + * @param \OpenAPI\Client\Model\RbmCardContentMedia|null $media media + * + * @return $this + */ + public function setMedia(?\OpenAPI\Client\Model\RbmCardContentMedia $media): static + { + if (is_null($media)) { + throw new InvalidArgumentException('non-nullable media cannot be null'); + } + $this->container['media'] = $media; + + return $this; + } + + /** + * Gets suggestions + * + * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + */ + public function getSuggestions(): ?array + { + return $this->container['suggestions']; + } + + /** + * Sets suggestions + * + * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient that will be displayed on the rich card. + * + * @return $this + */ + public function setSuggestions(?array $suggestions): static + { + if (is_null($suggestions)) { + throw new InvalidArgumentException('non-nullable suggestions cannot be null'); + } + + if ((count($suggestions) > 4)) { + throw new InvalidArgumentException('invalid value for $suggestions when calling RbmCardContent., number of items must be less than or equal to 4.'); + } + $this->container['suggestions'] = $suggestions; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmCardContentMedia.php b/src/Model/RbmCardContentMedia.php new file mode 100644 index 00000000..038404fc --- /dev/null +++ b/src/Model/RbmCardContentMedia.php @@ -0,0 +1,474 @@ + + */ +class RbmCardContentMedia implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmCardContent_media'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'file_url' => 'string', + 'thumbnail_url' => 'string', + 'height' => '\OpenAPI\Client\Model\RbmMediaHeightEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'file_url' => 'uri', + 'thumbnail_url' => 'uri', + 'height' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'file_url' => false, + 'thumbnail_url' => false, + 'height' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'file_url' => 'fileUrl', + 'thumbnail_url' => 'thumbnailUrl', + 'height' => 'height' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'file_url' => 'setFileUrl', + 'thumbnail_url' => 'setThumbnailUrl', + 'height' => 'setHeight' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'file_url' => 'getFileUrl', + 'thumbnail_url' => 'getThumbnailUrl', + 'height' => 'getHeight' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('file_url', $data ?? [], null); + $this->setIfExists('thumbnail_url', $data ?? [], null); + $this->setIfExists('height', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['file_url'] === null) { + $invalidProperties[] = "'file_url' can't be null"; + } + if ((mb_strlen($this->container['file_url']) > 1000)) { + $invalidProperties[] = "invalid value for 'file_url', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['thumbnail_url']) && (mb_strlen($this->container['thumbnail_url']) > 1000)) { + $invalidProperties[] = "invalid value for 'thumbnail_url', the character length must be smaller than or equal to 1000."; + } + + if ($this->container['height'] === null) { + $invalidProperties[] = "'height' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets file_url + * + * @return string + */ + public function getFileUrl(): string + { + return $this->container['file_url']; + } + + /** + * Sets file_url + * + * @param string $file_url The URL of the media file. 100MB is the maximum file size. + * + * @return $this + */ + public function setFileUrl(string $file_url): static + { + if (is_null($file_url)) { + throw new InvalidArgumentException('non-nullable file_url cannot be null'); + } + if ((mb_strlen($file_url) > 1000)) { + throw new InvalidArgumentException('invalid length for $file_url when calling RbmCardContentMedia., must be smaller than or equal to 1000.'); + } + + $this->container['file_url'] = $file_url; + + return $this; + } + + /** + * Gets thumbnail_url + * + * @return string|null + */ + public function getThumbnailUrl(): ?string + { + return $this->container['thumbnail_url']; + } + + /** + * Sets thumbnail_url + * + * @param string|null $thumbnail_url The URL of the thumbnail image. Applies only to video file media. + * + * @return $this + */ + public function setThumbnailUrl(?string $thumbnail_url): static + { + if (is_null($thumbnail_url)) { + throw new InvalidArgumentException('non-nullable thumbnail_url cannot be null'); + } + if ((mb_strlen($thumbnail_url) > 1000)) { + throw new InvalidArgumentException('invalid length for $thumbnail_url when calling RbmCardContentMedia., must be smaller than or equal to 1000.'); + } + + $this->container['thumbnail_url'] = $thumbnail_url; + + return $this; + } + + /** + * Gets height + * + * @return \OpenAPI\Client\Model\RbmMediaHeightEnum + */ + public function getHeight(): \OpenAPI\Client\Model\RbmMediaHeightEnum + { + return $this->container['height']; + } + + /** + * Sets height + * + * @param \OpenAPI\Client\Model\RbmMediaHeightEnum $height height + * + * @return $this + */ + public function setHeight(\OpenAPI\Client\Model\RbmMediaHeightEnum $height): static + { + if (is_null($height)) { + throw new InvalidArgumentException('non-nullable height cannot be null'); + } + $this->container['height'] = $height; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmLocationResponse.php b/src/Model/RbmLocationResponse.php new file mode 100644 index 00000000..e625c543 --- /dev/null +++ b/src/Model/RbmLocationResponse.php @@ -0,0 +1,418 @@ + + */ +class RbmLocationResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmLocationResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'latitude' => 'float', + 'longitude' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'latitude' => 'double', + 'longitude' => 'double' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'latitude' => false, + 'longitude' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'latitude' => 'latitude', + 'longitude' => 'longitude' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'latitude' => 'setLatitude', + 'longitude' => 'setLongitude' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'latitude' => 'getLatitude', + 'longitude' => 'getLongitude' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('latitude', $data ?? [], null); + $this->setIfExists('longitude', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets latitude + * + * @return float|null + */ + public function getLatitude(): ?float + { + return $this->container['latitude']; + } + + /** + * Sets latitude + * + * @param float|null $latitude The latitude of the client's location. + * + * @return $this + */ + public function setLatitude(?float $latitude): static + { + if (is_null($latitude)) { + throw new InvalidArgumentException('non-nullable latitude cannot be null'); + } + $this->container['latitude'] = $latitude; + + return $this; + } + + /** + * Gets longitude + * + * @return float|null + */ + public function getLongitude(): ?float + { + return $this->container['longitude']; + } + + /** + * Sets longitude + * + * @param float|null $longitude The longitude of the client's location. + * + * @return $this + */ + public function setLongitude(?float $longitude): static + { + if (is_null($longitude)) { + throw new InvalidArgumentException('non-nullable longitude cannot be null'); + } + $this->container['longitude'] = $longitude; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmMediaHeightEnum.php b/src/Model/RbmMediaHeightEnum.php new file mode 100644 index 00000000..31380061 --- /dev/null +++ b/src/Model/RbmMediaHeightEnum.php @@ -0,0 +1,48 @@ + + */ +class RbmMessageCarouselCard implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmMessageCarouselCard'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'card_width' => '\OpenAPI\Client\Model\CardWidthEnum', + 'card_contents' => '\OpenAPI\Client\Model\RbmCardContent[]', + 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'card_width' => null, + 'card_contents' => null, + 'suggestions' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'card_width' => false, + 'card_contents' => false, + 'suggestions' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'card_width' => 'cardWidth', + 'card_contents' => 'cardContents', + 'suggestions' => 'suggestions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'card_width' => 'setCardWidth', + 'card_contents' => 'setCardContents', + 'suggestions' => 'setSuggestions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'card_width' => 'getCardWidth', + 'card_contents' => 'getCardContents', + 'suggestions' => 'getSuggestions' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('card_width', $data ?? [], null); + $this->setIfExists('card_contents', $data ?? [], null); + $this->setIfExists('suggestions', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['card_width'] === null) { + $invalidProperties[] = "'card_width' can't be null"; + } + if ($this->container['card_contents'] === null) { + $invalidProperties[] = "'card_contents' can't be null"; + } + if ((count($this->container['card_contents']) > 10)) { + $invalidProperties[] = "invalid value for 'card_contents', number of items must be less than or equal to 10."; + } + + if ((count($this->container['card_contents']) < 2)) { + $invalidProperties[] = "invalid value for 'card_contents', number of items must be greater than or equal to 2."; + } + + if (!is_null($this->container['suggestions']) && (count($this->container['suggestions']) > 11)) { + $invalidProperties[] = "invalid value for 'suggestions', number of items must be less than or equal to 11."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets card_width + * + * @return \OpenAPI\Client\Model\CardWidthEnum + */ + public function getCardWidth(): \OpenAPI\Client\Model\CardWidthEnum + { + return $this->container['card_width']; + } + + /** + * Sets card_width + * + * @param \OpenAPI\Client\Model\CardWidthEnum $card_width card_width + * + * @return $this + */ + public function setCardWidth(\OpenAPI\Client\Model\CardWidthEnum $card_width): static + { + if (is_null($card_width)) { + throw new InvalidArgumentException('non-nullable card_width cannot be null'); + } + $this->container['card_width'] = $card_width; + + return $this; + } + + /** + * Gets card_contents + * + * @return \OpenAPI\Client\Model\RbmCardContent[] + */ + public function getCardContents(): array + { + return $this->container['card_contents']; + } + + /** + * Sets card_contents + * + * @param \OpenAPI\Client\Model\RbmCardContent[] $card_contents card_contents + * + * @return $this + */ + public function setCardContents(array $card_contents): static + { + if (is_null($card_contents)) { + throw new InvalidArgumentException('non-nullable card_contents cannot be null'); + } + + if ((count($card_contents) > 10)) { + throw new InvalidArgumentException('invalid value for $card_contents when calling RbmMessageCarouselCard., number of items must be less than or equal to 10.'); + } + if ((count($card_contents) < 2)) { + throw new InvalidArgumentException('invalid length for $card_contents when calling RbmMessageCarouselCard., number of items must be greater than or equal to 2.'); + } + $this->container['card_contents'] = $card_contents; + + return $this; + } + + /** + * Gets suggestions + * + * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + */ + public function getSuggestions(): ?array + { + return $this->container['suggestions']; + } + + /** + * Sets suggestions + * + * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * + * @return $this + */ + public function setSuggestions(?array $suggestions): static + { + if (is_null($suggestions)) { + throw new InvalidArgumentException('non-nullable suggestions cannot be null'); + } + + if ((count($suggestions) > 11)) { + throw new InvalidArgumentException('invalid value for $suggestions when calling RbmMessageCarouselCard., number of items must be less than or equal to 11.'); + } + $this->container['suggestions'] = $suggestions; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmMessageContentFile.php b/src/Model/RbmMessageContentFile.php new file mode 100644 index 00000000..47eb1c2f --- /dev/null +++ b/src/Model/RbmMessageContentFile.php @@ -0,0 +1,437 @@ + + */ +class RbmMessageContentFile implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmMessageContentFile'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'file_url' => 'string', + 'thumbnail_url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'file_url' => 'uri', + 'thumbnail_url' => 'uri' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'file_url' => false, + 'thumbnail_url' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'file_url' => 'fileUrl', + 'thumbnail_url' => 'thumbnailUrl' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'file_url' => 'setFileUrl', + 'thumbnail_url' => 'setThumbnailUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'file_url' => 'getFileUrl', + 'thumbnail_url' => 'getThumbnailUrl' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('file_url', $data ?? [], null); + $this->setIfExists('thumbnail_url', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['file_url'] === null) { + $invalidProperties[] = "'file_url' can't be null"; + } + if ((mb_strlen($this->container['file_url']) > 1000)) { + $invalidProperties[] = "invalid value for 'file_url', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['thumbnail_url']) && (mb_strlen($this->container['thumbnail_url']) > 1000)) { + $invalidProperties[] = "invalid value for 'thumbnail_url', the character length must be smaller than or equal to 1000."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets file_url + * + * @return string + */ + public function getFileUrl(): string + { + return $this->container['file_url']; + } + + /** + * Sets file_url + * + * @param string $file_url The URL of the media file. 100MB is the maximum file size. + * + * @return $this + */ + public function setFileUrl(string $file_url): static + { + if (is_null($file_url)) { + throw new InvalidArgumentException('non-nullable file_url cannot be null'); + } + if ((mb_strlen($file_url) > 1000)) { + throw new InvalidArgumentException('invalid length for $file_url when calling RbmMessageContentFile., must be smaller than or equal to 1000.'); + } + + $this->container['file_url'] = $file_url; + + return $this; + } + + /** + * Gets thumbnail_url + * + * @return string|null + */ + public function getThumbnailUrl(): ?string + { + return $this->container['thumbnail_url']; + } + + /** + * Sets thumbnail_url + * + * @param string|null $thumbnail_url The URL of the thumbnail image. Applies only to video file media. + * + * @return $this + */ + public function setThumbnailUrl(?string $thumbnail_url): static + { + if (is_null($thumbnail_url)) { + throw new InvalidArgumentException('non-nullable thumbnail_url cannot be null'); + } + if ((mb_strlen($thumbnail_url) > 1000)) { + throw new InvalidArgumentException('invalid length for $thumbnail_url when calling RbmMessageContentFile., must be smaller than or equal to 1000.'); + } + + $this->container['thumbnail_url'] = $thumbnail_url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmMessageContentRichCard.php b/src/Model/RbmMessageContentRichCard.php new file mode 100644 index 00000000..4f43bd2a --- /dev/null +++ b/src/Model/RbmMessageContentRichCard.php @@ -0,0 +1,589 @@ + + */ +class RbmMessageContentRichCard implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmMessageContentRichCard'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'orientation' => '\OpenAPI\Client\Model\StandaloneCardOrientationEnum', + 'thumbnail_image_alignment' => '\OpenAPI\Client\Model\ThumbnailAlignmentEnum', + 'card_content' => '\OpenAPI\Client\Model\RbmCardContent', + 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]', + 'card_width' => '\OpenAPI\Client\Model\CardWidthEnum', + 'card_contents' => '\OpenAPI\Client\Model\RbmCardContent[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'orientation' => null, + 'thumbnail_image_alignment' => null, + 'card_content' => null, + 'suggestions' => null, + 'card_width' => null, + 'card_contents' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'orientation' => false, + 'thumbnail_image_alignment' => false, + 'card_content' => false, + 'suggestions' => false, + 'card_width' => false, + 'card_contents' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'orientation' => 'orientation', + 'thumbnail_image_alignment' => 'thumbnailImageAlignment', + 'card_content' => 'cardContent', + 'suggestions' => 'suggestions', + 'card_width' => 'cardWidth', + 'card_contents' => 'cardContents' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'orientation' => 'setOrientation', + 'thumbnail_image_alignment' => 'setThumbnailImageAlignment', + 'card_content' => 'setCardContent', + 'suggestions' => 'setSuggestions', + 'card_width' => 'setCardWidth', + 'card_contents' => 'setCardContents' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'orientation' => 'getOrientation', + 'thumbnail_image_alignment' => 'getThumbnailImageAlignment', + 'card_content' => 'getCardContent', + 'suggestions' => 'getSuggestions', + 'card_width' => 'getCardWidth', + 'card_contents' => 'getCardContents' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('orientation', $data ?? [], null); + $this->setIfExists('thumbnail_image_alignment', $data ?? [], null); + $this->setIfExists('card_content', $data ?? [], null); + $this->setIfExists('suggestions', $data ?? [], null); + $this->setIfExists('card_width', $data ?? [], null); + $this->setIfExists('card_contents', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['orientation'] === null) { + $invalidProperties[] = "'orientation' can't be null"; + } + if ($this->container['card_content'] === null) { + $invalidProperties[] = "'card_content' can't be null"; + } + if (!is_null($this->container['suggestions']) && (count($this->container['suggestions']) > 11)) { + $invalidProperties[] = "invalid value for 'suggestions', number of items must be less than or equal to 11."; + } + + if ($this->container['card_width'] === null) { + $invalidProperties[] = "'card_width' can't be null"; + } + if ($this->container['card_contents'] === null) { + $invalidProperties[] = "'card_contents' can't be null"; + } + if ((count($this->container['card_contents']) > 10)) { + $invalidProperties[] = "invalid value for 'card_contents', number of items must be less than or equal to 10."; + } + + if ((count($this->container['card_contents']) < 2)) { + $invalidProperties[] = "invalid value for 'card_contents', number of items must be greater than or equal to 2."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets orientation + * + * @return \OpenAPI\Client\Model\StandaloneCardOrientationEnum + */ + public function getOrientation(): \OpenAPI\Client\Model\StandaloneCardOrientationEnum + { + return $this->container['orientation']; + } + + /** + * Sets orientation + * + * @param \OpenAPI\Client\Model\StandaloneCardOrientationEnum $orientation orientation + * + * @return $this + */ + public function setOrientation(\OpenAPI\Client\Model\StandaloneCardOrientationEnum $orientation): static + { + if (is_null($orientation)) { + throw new InvalidArgumentException('non-nullable orientation cannot be null'); + } + $this->container['orientation'] = $orientation; + + return $this; + } + + /** + * Gets thumbnail_image_alignment + * + * @return \OpenAPI\Client\Model\ThumbnailAlignmentEnum|null + */ + public function getThumbnailImageAlignment(): ?\OpenAPI\Client\Model\ThumbnailAlignmentEnum + { + return $this->container['thumbnail_image_alignment']; + } + + /** + * Sets thumbnail_image_alignment + * + * @param \OpenAPI\Client\Model\ThumbnailAlignmentEnum|null $thumbnail_image_alignment thumbnail_image_alignment + * + * @return $this + */ + public function setThumbnailImageAlignment(?\OpenAPI\Client\Model\ThumbnailAlignmentEnum $thumbnail_image_alignment): static + { + if (is_null($thumbnail_image_alignment)) { + throw new InvalidArgumentException('non-nullable thumbnail_image_alignment cannot be null'); + } + $this->container['thumbnail_image_alignment'] = $thumbnail_image_alignment; + + return $this; + } + + /** + * Gets card_content + * + * @return \OpenAPI\Client\Model\RbmCardContent + */ + public function getCardContent(): \OpenAPI\Client\Model\RbmCardContent + { + return $this->container['card_content']; + } + + /** + * Sets card_content + * + * @param \OpenAPI\Client\Model\RbmCardContent $card_content card_content + * + * @return $this + */ + public function setCardContent(\OpenAPI\Client\Model\RbmCardContent $card_content): static + { + if (is_null($card_content)) { + throw new InvalidArgumentException('non-nullable card_content cannot be null'); + } + $this->container['card_content'] = $card_content; + + return $this; + } + + /** + * Gets suggestions + * + * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + */ + public function getSuggestions(): ?array + { + return $this->container['suggestions']; + } + + /** + * Sets suggestions + * + * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * + * @return $this + */ + public function setSuggestions(?array $suggestions): static + { + if (is_null($suggestions)) { + throw new InvalidArgumentException('non-nullable suggestions cannot be null'); + } + + if ((count($suggestions) > 11)) { + throw new InvalidArgumentException('invalid value for $suggestions when calling RbmMessageContentRichCard., number of items must be less than or equal to 11.'); + } + $this->container['suggestions'] = $suggestions; + + return $this; + } + + /** + * Gets card_width + * + * @return \OpenAPI\Client\Model\CardWidthEnum + */ + public function getCardWidth(): \OpenAPI\Client\Model\CardWidthEnum + { + return $this->container['card_width']; + } + + /** + * Sets card_width + * + * @param \OpenAPI\Client\Model\CardWidthEnum $card_width card_width + * + * @return $this + */ + public function setCardWidth(\OpenAPI\Client\Model\CardWidthEnum $card_width): static + { + if (is_null($card_width)) { + throw new InvalidArgumentException('non-nullable card_width cannot be null'); + } + $this->container['card_width'] = $card_width; + + return $this; + } + + /** + * Gets card_contents + * + * @return \OpenAPI\Client\Model\RbmCardContent[] + */ + public function getCardContents(): array + { + return $this->container['card_contents']; + } + + /** + * Sets card_contents + * + * @param \OpenAPI\Client\Model\RbmCardContent[] $card_contents card_contents + * + * @return $this + */ + public function setCardContents(array $card_contents): static + { + if (is_null($card_contents)) { + throw new InvalidArgumentException('non-nullable card_contents cannot be null'); + } + + if ((count($card_contents) > 10)) { + throw new InvalidArgumentException('invalid value for $card_contents when calling RbmMessageContentRichCard., number of items must be less than or equal to 10.'); + } + if ((count($card_contents) < 2)) { + throw new InvalidArgumentException('invalid length for $card_contents when calling RbmMessageContentRichCard., number of items must be greater than or equal to 2.'); + } + $this->container['card_contents'] = $card_contents; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmMessageContentText.php b/src/Model/RbmMessageContentText.php new file mode 100644 index 00000000..73a0f889 --- /dev/null +++ b/src/Model/RbmMessageContentText.php @@ -0,0 +1,437 @@ + + */ +class RbmMessageContentText implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmMessageContentText'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'text' => 'string', + 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'text' => null, + 'suggestions' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'text' => false, + 'suggestions' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'text' => 'text', + 'suggestions' => 'suggestions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'text' => 'setText', + 'suggestions' => 'setSuggestions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'text' => 'getText', + 'suggestions' => 'getSuggestions' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('suggestions', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + if ((mb_strlen($this->container['text']) > 3270)) { + $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 3270."; + } + + if (!is_null($this->container['suggestions']) && (count($this->container['suggestions']) > 11)) { + $invalidProperties[] = "invalid value for 'suggestions', number of items must be less than or equal to 11."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets text + * + * @return string + */ + public function getText(): string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text The text associated with the message. Must be 3270 characters or less + * + * @return $this + */ + public function setText(string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + if ((mb_strlen($text) > 3270)) { + throw new InvalidArgumentException('invalid length for $text when calling RbmMessageContentText., must be smaller than or equal to 3270.'); + } + + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets suggestions + * + * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + */ + public function getSuggestions(): ?array + { + return $this->container['suggestions']; + } + + /** + * Sets suggestions + * + * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * + * @return $this + */ + public function setSuggestions(?array $suggestions): static + { + if (is_null($suggestions)) { + throw new InvalidArgumentException('non-nullable suggestions cannot be null'); + } + + if ((count($suggestions) > 11)) { + throw new InvalidArgumentException('invalid value for $suggestions when calling RbmMessageContentText., number of items must be less than or equal to 11.'); + } + $this->container['suggestions'] = $suggestions; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmMessageMedia.php b/src/Model/RbmMessageMedia.php new file mode 100644 index 00000000..481f0a9e --- /dev/null +++ b/src/Model/RbmMessageMedia.php @@ -0,0 +1,429 @@ + + */ +class RbmMessageMedia implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmMessageMedia'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'media' => '\OpenAPI\Client\Model\RbmMessageContentFile[]', + 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'media' => null, + 'suggestions' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'media' => false, + 'suggestions' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'media' => 'media', + 'suggestions' => 'suggestions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'media' => 'setMedia', + 'suggestions' => 'setSuggestions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'media' => 'getMedia', + 'suggestions' => 'getSuggestions' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('media', $data ?? [], null); + $this->setIfExists('suggestions', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['media'] === null) { + $invalidProperties[] = "'media' can't be null"; + } + if (!is_null($this->container['suggestions']) && (count($this->container['suggestions']) > 11)) { + $invalidProperties[] = "invalid value for 'suggestions', number of items must be less than or equal to 11."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets media + * + * @return \OpenAPI\Client\Model\RbmMessageContentFile[] + */ + public function getMedia(): array + { + return $this->container['media']; + } + + /** + * Sets media + * + * @param \OpenAPI\Client\Model\RbmMessageContentFile[] $media media + * + * @return $this + */ + public function setMedia(array $media): static + { + if (is_null($media)) { + throw new InvalidArgumentException('non-nullable media cannot be null'); + } + $this->container['media'] = $media; + + return $this; + } + + /** + * Gets suggestions + * + * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + */ + public function getSuggestions(): ?array + { + return $this->container['suggestions']; + } + + /** + * Sets suggestions + * + * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * + * @return $this + */ + public function setSuggestions(?array $suggestions): static + { + if (is_null($suggestions)) { + throw new InvalidArgumentException('non-nullable suggestions cannot be null'); + } + + if ((count($suggestions) > 11)) { + throw new InvalidArgumentException('invalid value for $suggestions when calling RbmMessageMedia., number of items must be less than or equal to 11.'); + } + $this->container['suggestions'] = $suggestions; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmOpenUrlEnum.php b/src/Model/RbmOpenUrlEnum.php new file mode 100644 index 00000000..31cec292 --- /dev/null +++ b/src/Model/RbmOpenUrlEnum.php @@ -0,0 +1,46 @@ + + */ +class RbmStandaloneCard implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmStandaloneCard'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'orientation' => '\OpenAPI\Client\Model\StandaloneCardOrientationEnum', + 'thumbnail_image_alignment' => '\OpenAPI\Client\Model\ThumbnailAlignmentEnum', + 'card_content' => '\OpenAPI\Client\Model\RbmCardContent', + 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'orientation' => null, + 'thumbnail_image_alignment' => null, + 'card_content' => null, + 'suggestions' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'orientation' => false, + 'thumbnail_image_alignment' => false, + 'card_content' => false, + 'suggestions' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'orientation' => 'orientation', + 'thumbnail_image_alignment' => 'thumbnailImageAlignment', + 'card_content' => 'cardContent', + 'suggestions' => 'suggestions' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'orientation' => 'setOrientation', + 'thumbnail_image_alignment' => 'setThumbnailImageAlignment', + 'card_content' => 'setCardContent', + 'suggestions' => 'setSuggestions' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'orientation' => 'getOrientation', + 'thumbnail_image_alignment' => 'getThumbnailImageAlignment', + 'card_content' => 'getCardContent', + 'suggestions' => 'getSuggestions' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('orientation', $data ?? [], null); + $this->setIfExists('thumbnail_image_alignment', $data ?? [], null); + $this->setIfExists('card_content', $data ?? [], null); + $this->setIfExists('suggestions', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['orientation'] === null) { + $invalidProperties[] = "'orientation' can't be null"; + } + if ($this->container['card_content'] === null) { + $invalidProperties[] = "'card_content' can't be null"; + } + if (!is_null($this->container['suggestions']) && (count($this->container['suggestions']) > 11)) { + $invalidProperties[] = "invalid value for 'suggestions', number of items must be less than or equal to 11."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets orientation + * + * @return \OpenAPI\Client\Model\StandaloneCardOrientationEnum + */ + public function getOrientation(): \OpenAPI\Client\Model\StandaloneCardOrientationEnum + { + return $this->container['orientation']; + } + + /** + * Sets orientation + * + * @param \OpenAPI\Client\Model\StandaloneCardOrientationEnum $orientation orientation + * + * @return $this + */ + public function setOrientation(\OpenAPI\Client\Model\StandaloneCardOrientationEnum $orientation): static + { + if (is_null($orientation)) { + throw new InvalidArgumentException('non-nullable orientation cannot be null'); + } + $this->container['orientation'] = $orientation; + + return $this; + } + + /** + * Gets thumbnail_image_alignment + * + * @return \OpenAPI\Client\Model\ThumbnailAlignmentEnum|null + */ + public function getThumbnailImageAlignment(): ?\OpenAPI\Client\Model\ThumbnailAlignmentEnum + { + return $this->container['thumbnail_image_alignment']; + } + + /** + * Sets thumbnail_image_alignment + * + * @param \OpenAPI\Client\Model\ThumbnailAlignmentEnum|null $thumbnail_image_alignment thumbnail_image_alignment + * + * @return $this + */ + public function setThumbnailImageAlignment(?\OpenAPI\Client\Model\ThumbnailAlignmentEnum $thumbnail_image_alignment): static + { + if (is_null($thumbnail_image_alignment)) { + throw new InvalidArgumentException('non-nullable thumbnail_image_alignment cannot be null'); + } + $this->container['thumbnail_image_alignment'] = $thumbnail_image_alignment; + + return $this; + } + + /** + * Gets card_content + * + * @return \OpenAPI\Client\Model\RbmCardContent + */ + public function getCardContent(): \OpenAPI\Client\Model\RbmCardContent + { + return $this->container['card_content']; + } + + /** + * Sets card_content + * + * @param \OpenAPI\Client\Model\RbmCardContent $card_content card_content + * + * @return $this + */ + public function setCardContent(\OpenAPI\Client\Model\RbmCardContent $card_content): static + { + if (is_null($card_content)) { + throw new InvalidArgumentException('non-nullable card_content cannot be null'); + } + $this->container['card_content'] = $card_content; + + return $this; + } + + /** + * Gets suggestions + * + * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + */ + public function getSuggestions(): ?array + { + return $this->container['suggestions']; + } + + /** + * Sets suggestions + * + * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * + * @return $this + */ + public function setSuggestions(?array $suggestions): static + { + if (is_null($suggestions)) { + throw new InvalidArgumentException('non-nullable suggestions cannot be null'); + } + + if ((count($suggestions) > 11)) { + throw new InvalidArgumentException('invalid value for $suggestions when calling RbmStandaloneCard., number of items must be less than or equal to 11.'); + } + $this->container['suggestions'] = $suggestions; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmSuggestionResponse.php b/src/Model/RbmSuggestionResponse.php new file mode 100644 index 00000000..15e1d461 --- /dev/null +++ b/src/Model/RbmSuggestionResponse.php @@ -0,0 +1,467 @@ + + */ +class RbmSuggestionResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'rbmSuggestionResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'text' => 'string', + 'postback_data' => 'string', + 'paired_message_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'text' => null, + 'postback_data' => 'byte', + 'paired_message_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'text' => false, + 'postback_data' => false, + 'paired_message_id' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'text' => 'text', + 'postback_data' => 'postbackData', + 'paired_message_id' => 'pairedMessageId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'text' => 'setText', + 'postback_data' => 'setPostbackData', + 'paired_message_id' => 'setPairedMessageId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'text' => 'getText', + 'postback_data' => 'getPostbackData', + 'paired_message_id' => 'getPairedMessageId' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('postback_data', $data ?? [], null); + $this->setIfExists('paired_message_id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['postback_data']) && (mb_strlen($this->container['postback_data']) > 2048)) { + $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets text + * + * @return string|null + */ + public function getText(): ?string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string|null $text The text associated with the suggestion response. + * + * @return $this + */ + public function setText(?string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets postback_data + * + * @return string|null + */ + public function getPostbackData(): ?string + { + return $this->container['postback_data']; + } + + /** + * Sets postback_data + * + * @param string|null $postback_data Base64 payload the customer receives when the reply is clicked. + * + * @return $this + */ + public function setPostbackData(?string $postback_data): static + { + if (is_null($postback_data)) { + throw new InvalidArgumentException('non-nullable postback_data cannot be null'); + } + if ((mb_strlen($postback_data) > 2048)) { + throw new InvalidArgumentException('invalid length for $postback_data when calling RbmSuggestionResponse., must be smaller than or equal to 2048.'); + } + + $this->container['postback_data'] = $postback_data; + + return $this; + } + + /** + * Gets paired_message_id + * + * @return string|null + */ + public function getPairedMessageId(): ?string + { + return $this->container['paired_message_id']; + } + + /** + * Sets paired_message_id + * + * @param string|null $paired_message_id Corresponding parent message ID (MT). + * + * @return $this + */ + public function setPairedMessageId(?string $paired_message_id): static + { + if (is_null($paired_message_id)) { + array_push($this->openAPINullablesSetToNull, 'paired_message_id'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('paired_message_id', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['paired_message_id'] = $paired_message_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RbmWebViewEnum.php b/src/Model/RbmWebViewEnum.php new file mode 100644 index 00000000..8a716c4b --- /dev/null +++ b/src/Model/RbmWebViewEnum.php @@ -0,0 +1,48 @@ + + */ +class RecordingAvailableCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'recordingAvailableCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_id' => 'string', + 'call_url' => 'string', + 'parent_call_id' => 'string', + 'recording_id' => 'string', + 'media_url' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'end_time' => '\DateTime', + 'duration' => 'string', + 'file_format' => '\OpenAPI\Client\Model\FileFormatEnum', + 'channels' => 'int', + 'tag' => 'string', + 'status' => 'string', + 'transfer_caller_id' => 'string', + 'transfer_to' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'call_url' => 'uri', + 'parent_call_id' => null, + 'recording_id' => null, + 'media_url' => 'uri', + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'end_time' => 'date-time', + 'duration' => null, + 'file_format' => null, + 'channels' => 'int32', + 'tag' => null, + 'status' => null, + 'transfer_caller_id' => null, + 'transfer_to' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'call_url' => false, + 'parent_call_id' => false, + 'recording_id' => false, + 'media_url' => true, + 'enqueued_time' => true, + 'start_time' => false, + 'end_time' => false, + 'duration' => false, + 'file_format' => false, + 'channels' => false, + 'tag' => true, + 'status' => false, + 'transfer_caller_id' => false, + 'transfer_to' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'call_url' => 'callUrl', + 'parent_call_id' => 'parentCallId', + 'recording_id' => 'recordingId', + 'media_url' => 'mediaUrl', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'end_time' => 'endTime', + 'duration' => 'duration', + 'file_format' => 'fileFormat', + 'channels' => 'channels', + 'tag' => 'tag', + 'status' => 'status', + 'transfer_caller_id' => 'transferCallerId', + 'transfer_to' => 'transferTo' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'call_url' => 'setCallUrl', + 'parent_call_id' => 'setParentCallId', + 'recording_id' => 'setRecordingId', + 'media_url' => 'setMediaUrl', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'end_time' => 'setEndTime', + 'duration' => 'setDuration', + 'file_format' => 'setFileFormat', + 'channels' => 'setChannels', + 'tag' => 'setTag', + 'status' => 'setStatus', + 'transfer_caller_id' => 'setTransferCallerId', + 'transfer_to' => 'setTransferTo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'call_url' => 'getCallUrl', + 'parent_call_id' => 'getParentCallId', + 'recording_id' => 'getRecordingId', + 'media_url' => 'getMediaUrl', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'end_time' => 'getEndTime', + 'duration' => 'getDuration', + 'file_format' => 'getFileFormat', + 'channels' => 'getChannels', + 'tag' => 'getTag', + 'status' => 'getStatus', + 'transfer_caller_id' => 'getTransferCallerId', + 'transfer_to' => 'getTransferTo' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('parent_call_id', $data ?? [], null); + $this->setIfExists('recording_id', $data ?? [], null); + $this->setIfExists('media_url', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('end_time', $data ?? [], null); + $this->setIfExists('duration', $data ?? [], null); + $this->setIfExists('file_format', $data ?? [], null); + $this->setIfExists('channels', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('transfer_caller_id', $data ?? [], null); + $this->setIfExists('transfer_to', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets parent_call_id + * + * @return string|null + */ + public function getParentCallId(): ?string + { + return $this->container['parent_call_id']; + } + + /** + * Sets parent_call_id + * + * @param string|null $parent_call_id (optional) If the event is related to the B leg of a , the call id of the original call leg that executed the . Otherwise, this field will not be present. + * + * @return $this + */ + public function setParentCallId(?string $parent_call_id): static + { + if (is_null($parent_call_id)) { + throw new InvalidArgumentException('non-nullable parent_call_id cannot be null'); + } + $this->container['parent_call_id'] = $parent_call_id; + + return $this; + } + + /** + * Gets recording_id + * + * @return string|null + */ + public function getRecordingId(): ?string + { + return $this->container['recording_id']; + } + + /** + * Sets recording_id + * + * @param string|null $recording_id The unique ID of this recording + * + * @return $this + */ + public function setRecordingId(?string $recording_id): static + { + if (is_null($recording_id)) { + throw new InvalidArgumentException('non-nullable recording_id cannot be null'); + } + $this->container['recording_id'] = $recording_id; + + return $this; + } + + /** + * Gets media_url + * + * @return string|null + */ + public function getMediaUrl(): ?string + { + return $this->container['media_url']; + } + + /** + * Sets media_url + * + * @param string|null $media_url The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. + * + * @return $this + */ + public function setMediaUrl(?string $media_url): static + { + if (is_null($media_url)) { + array_push($this->openAPINullablesSetToNull, 'media_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('media_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['media_url'] = $media_url; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets end_time + * + * @return \DateTime|null + */ + public function getEndTime(): ?\DateTime + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param \DateTime|null $end_time The time that the recording ended in ISO-8601 format + * + * @return $this + */ + public function setEndTime(?\DateTime $end_time): static + { + if (is_null($end_time)) { + throw new InvalidArgumentException('non-nullable end_time cannot be null'); + } + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets duration + * + * @return string|null + */ + public function getDuration(): ?string + { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param string|null $duration The duration of the recording in ISO-8601 format + * + * @return $this + */ + public function setDuration(?string $duration): static + { + if (is_null($duration)) { + throw new InvalidArgumentException('non-nullable duration cannot be null'); + } + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets file_format + * + * @return \OpenAPI\Client\Model\FileFormatEnum|null + */ + public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum + { + return $this->container['file_format']; + } + + /** + * Sets file_format + * + * @param \OpenAPI\Client\Model\FileFormatEnum|null $file_format file_format + * + * @return $this + */ + public function setFileFormat(?\OpenAPI\Client\Model\FileFormatEnum $file_format): static + { + if (is_null($file_format)) { + throw new InvalidArgumentException('non-nullable file_format cannot be null'); + } + $this->container['file_format'] = $file_format; + + return $this; + } + + /** + * Gets channels + * + * @return int|null + */ + public function getChannels(): ?int + { + return $this->container['channels']; + } + + /** + * Sets channels + * + * @param int|null $channels Always `1` for conference recordings; multi-channel recordings are not supported on conferences. + * + * @return $this + */ + public function setChannels(?int $channels): static + { + if (is_null($channels)) { + throw new InvalidArgumentException('non-nullable channels cannot be null'); + } + $this->container['channels'] = $channels; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus(): ?string + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. + * + * @return $this + */ + public function setStatus(?string $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets transfer_caller_id + * + * @return string|null + */ + public function getTransferCallerId(): ?string + { + return $this->container['transfer_caller_id']; + } + + /** + * Sets transfer_caller_id + * + * @param string|null $transfer_caller_id The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferCallerId(?string $transfer_caller_id): static + { + if (is_null($transfer_caller_id)) { + throw new InvalidArgumentException('non-nullable transfer_caller_id cannot be null'); + } + $this->container['transfer_caller_id'] = $transfer_caller_id; + + return $this; + } + + /** + * Gets transfer_to + * + * @return string|null + */ + public function getTransferTo(): ?string + { + return $this->container['transfer_to']; + } + + /** + * Sets transfer_to + * + * @param string|null $transfer_to The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferTo(?string $transfer_to): static + { + if (is_null($transfer_to)) { + throw new InvalidArgumentException('non-nullable transfer_to cannot be null'); + } + $this->container['transfer_to'] = $transfer_to; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RecordingCompleteCallback.php b/src/Model/RecordingCompleteCallback.php new file mode 100644 index 00000000..8532d4b1 --- /dev/null +++ b/src/Model/RecordingCompleteCallback.php @@ -0,0 +1,1127 @@ + + */ +class RecordingCompleteCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'recordingCompleteCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_id' => 'string', + 'call_url' => 'string', + 'parent_call_id' => 'string', + 'recording_id' => 'string', + 'media_url' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'end_time' => '\DateTime', + 'duration' => 'string', + 'file_format' => '\OpenAPI\Client\Model\FileFormatEnum', + 'channels' => 'int', + 'tag' => 'string', + 'transfer_caller_id' => 'string', + 'transfer_to' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'call_url' => 'uri', + 'parent_call_id' => null, + 'recording_id' => null, + 'media_url' => 'uri', + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'end_time' => 'date-time', + 'duration' => null, + 'file_format' => null, + 'channels' => 'int32', + 'tag' => null, + 'transfer_caller_id' => null, + 'transfer_to' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'call_url' => false, + 'parent_call_id' => false, + 'recording_id' => false, + 'media_url' => true, + 'enqueued_time' => true, + 'start_time' => false, + 'answer_time' => true, + 'end_time' => false, + 'duration' => false, + 'file_format' => false, + 'channels' => false, + 'tag' => true, + 'transfer_caller_id' => false, + 'transfer_to' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'call_url' => 'callUrl', + 'parent_call_id' => 'parentCallId', + 'recording_id' => 'recordingId', + 'media_url' => 'mediaUrl', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'end_time' => 'endTime', + 'duration' => 'duration', + 'file_format' => 'fileFormat', + 'channels' => 'channels', + 'tag' => 'tag', + 'transfer_caller_id' => 'transferCallerId', + 'transfer_to' => 'transferTo' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'call_url' => 'setCallUrl', + 'parent_call_id' => 'setParentCallId', + 'recording_id' => 'setRecordingId', + 'media_url' => 'setMediaUrl', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'end_time' => 'setEndTime', + 'duration' => 'setDuration', + 'file_format' => 'setFileFormat', + 'channels' => 'setChannels', + 'tag' => 'setTag', + 'transfer_caller_id' => 'setTransferCallerId', + 'transfer_to' => 'setTransferTo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'call_url' => 'getCallUrl', + 'parent_call_id' => 'getParentCallId', + 'recording_id' => 'getRecordingId', + 'media_url' => 'getMediaUrl', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'end_time' => 'getEndTime', + 'duration' => 'getDuration', + 'file_format' => 'getFileFormat', + 'channels' => 'getChannels', + 'tag' => 'getTag', + 'transfer_caller_id' => 'getTransferCallerId', + 'transfer_to' => 'getTransferTo' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('parent_call_id', $data ?? [], null); + $this->setIfExists('recording_id', $data ?? [], null); + $this->setIfExists('media_url', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('end_time', $data ?? [], null); + $this->setIfExists('duration', $data ?? [], null); + $this->setIfExists('file_format', $data ?? [], null); + $this->setIfExists('channels', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('transfer_caller_id', $data ?? [], null); + $this->setIfExists('transfer_to', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets parent_call_id + * + * @return string|null + */ + public function getParentCallId(): ?string + { + return $this->container['parent_call_id']; + } + + /** + * Sets parent_call_id + * + * @param string|null $parent_call_id (optional) If the event is related to the B leg of a , the call id of the original call leg that executed the . Otherwise, this field will not be present. + * + * @return $this + */ + public function setParentCallId(?string $parent_call_id): static + { + if (is_null($parent_call_id)) { + throw new InvalidArgumentException('non-nullable parent_call_id cannot be null'); + } + $this->container['parent_call_id'] = $parent_call_id; + + return $this; + } + + /** + * Gets recording_id + * + * @return string|null + */ + public function getRecordingId(): ?string + { + return $this->container['recording_id']; + } + + /** + * Sets recording_id + * + * @param string|null $recording_id The unique ID of this recording + * + * @return $this + */ + public function setRecordingId(?string $recording_id): static + { + if (is_null($recording_id)) { + throw new InvalidArgumentException('non-nullable recording_id cannot be null'); + } + $this->container['recording_id'] = $recording_id; + + return $this; + } + + /** + * Gets media_url + * + * @return string|null + */ + public function getMediaUrl(): ?string + { + return $this->container['media_url']; + } + + /** + * Sets media_url + * + * @param string|null $media_url The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. + * + * @return $this + */ + public function setMediaUrl(?string $media_url): static + { + if (is_null($media_url)) { + array_push($this->openAPINullablesSetToNull, 'media_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('media_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['media_url'] = $media_url; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Time the call was answered, in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets end_time + * + * @return \DateTime|null + */ + public function getEndTime(): ?\DateTime + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param \DateTime|null $end_time The time that the recording ended in ISO-8601 format + * + * @return $this + */ + public function setEndTime(?\DateTime $end_time): static + { + if (is_null($end_time)) { + throw new InvalidArgumentException('non-nullable end_time cannot be null'); + } + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets duration + * + * @return string|null + */ + public function getDuration(): ?string + { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param string|null $duration The duration of the recording in ISO-8601 format + * + * @return $this + */ + public function setDuration(?string $duration): static + { + if (is_null($duration)) { + throw new InvalidArgumentException('non-nullable duration cannot be null'); + } + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets file_format + * + * @return \OpenAPI\Client\Model\FileFormatEnum|null + */ + public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum + { + return $this->container['file_format']; + } + + /** + * Sets file_format + * + * @param \OpenAPI\Client\Model\FileFormatEnum|null $file_format file_format + * + * @return $this + */ + public function setFileFormat(?\OpenAPI\Client\Model\FileFormatEnum $file_format): static + { + if (is_null($file_format)) { + throw new InvalidArgumentException('non-nullable file_format cannot be null'); + } + $this->container['file_format'] = $file_format; + + return $this; + } + + /** + * Gets channels + * + * @return int|null + */ + public function getChannels(): ?int + { + return $this->container['channels']; + } + + /** + * Sets channels + * + * @param int|null $channels Always `1` for conference recordings; multi-channel recordings are not supported on conferences. + * + * @return $this + */ + public function setChannels(?int $channels): static + { + if (is_null($channels)) { + throw new InvalidArgumentException('non-nullable channels cannot be null'); + } + $this->container['channels'] = $channels; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets transfer_caller_id + * + * @return string|null + */ + public function getTransferCallerId(): ?string + { + return $this->container['transfer_caller_id']; + } + + /** + * Sets transfer_caller_id + * + * @param string|null $transfer_caller_id The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferCallerId(?string $transfer_caller_id): static + { + if (is_null($transfer_caller_id)) { + throw new InvalidArgumentException('non-nullable transfer_caller_id cannot be null'); + } + $this->container['transfer_caller_id'] = $transfer_caller_id; + + return $this; + } + + /** + * Gets transfer_to + * + * @return string|null + */ + public function getTransferTo(): ?string + { + return $this->container['transfer_to']; + } + + /** + * Sets transfer_to + * + * @param string|null $transfer_to The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferTo(?string $transfer_to): static + { + if (is_null($transfer_to)) { + throw new InvalidArgumentException('non-nullable transfer_to cannot be null'); + } + $this->container['transfer_to'] = $transfer_to; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RecordingStateEnum.php b/src/Model/RecordingStateEnum.php new file mode 100644 index 00000000..b1f96f0a --- /dev/null +++ b/src/Model/RecordingStateEnum.php @@ -0,0 +1,46 @@ + + */ +class RecordingTranscriptionClip implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'recordingTranscriptionClip'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'speaker' => 'int', + 'text' => 'string', + 'confidence' => 'float', + 'start_time_seconds' => 'float', + 'end_time_seconds' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'speaker' => null, + 'text' => null, + 'confidence' => 'double', + 'start_time_seconds' => 'double', + 'end_time_seconds' => 'double' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'speaker' => false, + 'text' => false, + 'confidence' => false, + 'start_time_seconds' => false, + 'end_time_seconds' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'speaker' => 'speaker', + 'text' => 'text', + 'confidence' => 'confidence', + 'start_time_seconds' => 'startTimeSeconds', + 'end_time_seconds' => 'endTimeSeconds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'speaker' => 'setSpeaker', + 'text' => 'setText', + 'confidence' => 'setConfidence', + 'start_time_seconds' => 'setStartTimeSeconds', + 'end_time_seconds' => 'setEndTimeSeconds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'speaker' => 'getSpeaker', + 'text' => 'getText', + 'confidence' => 'getConfidence', + 'start_time_seconds' => 'getStartTimeSeconds', + 'end_time_seconds' => 'getEndTimeSeconds' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('speaker', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('confidence', $data ?? [], null); + $this->setIfExists('start_time_seconds', $data ?? [], null); + $this->setIfExists('end_time_seconds', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['confidence']) && ($this->container['confidence'] > 1)) { + $invalidProperties[] = "invalid value for 'confidence', must be smaller than or equal to 1."; + } + + if (!is_null($this->container['confidence']) && ($this->container['confidence'] < 0)) { + $invalidProperties[] = "invalid value for 'confidence', must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets speaker + * + * @return int|null + */ + public function getSpeaker(): ?int + { + return $this->container['speaker']; + } + + /** + * Sets speaker + * + * @param int|null $speaker Zero-based index identifying the speaker. + * + * @return $this + */ + public function setSpeaker(?int $speaker): static + { + if (is_null($speaker)) { + throw new InvalidArgumentException('non-nullable speaker cannot be null'); + } + $this->container['speaker'] = $speaker; + + return $this; + } + + /** + * Gets text + * + * @return string|null + */ + public function getText(): ?string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string|null $text The transcribed text of this clip. + * + * @return $this + */ + public function setText(?string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets confidence + * + * @return float|null + */ + public function getConfidence(): ?float + { + return $this->container['confidence']; + } + + /** + * Sets confidence + * + * @param float|null $confidence How confident the transcription engine was in transcribing this clip (from `0.0` to `1.0`). + * + * @return $this + */ + public function setConfidence(?float $confidence): static + { + if (is_null($confidence)) { + throw new InvalidArgumentException('non-nullable confidence cannot be null'); + } + + if (($confidence > 1)) { + throw new InvalidArgumentException('invalid value for $confidence when calling RecordingTranscriptionClip., must be smaller than or equal to 1.'); + } + if (($confidence < 0)) { + throw new InvalidArgumentException('invalid value for $confidence when calling RecordingTranscriptionClip., must be bigger than or equal to 0.'); + } + + $this->container['confidence'] = $confidence; + + return $this; + } + + /** + * Gets start_time_seconds + * + * @return float|null + */ + public function getStartTimeSeconds(): ?float + { + return $this->container['start_time_seconds']; + } + + /** + * Sets start_time_seconds + * + * @param float|null $start_time_seconds The start time of this clip within the recording, in seconds. + * + * @return $this + */ + public function setStartTimeSeconds(?float $start_time_seconds): static + { + if (is_null($start_time_seconds)) { + throw new InvalidArgumentException('non-nullable start_time_seconds cannot be null'); + } + $this->container['start_time_seconds'] = $start_time_seconds; + + return $this; + } + + /** + * Gets end_time_seconds + * + * @return float|null + */ + public function getEndTimeSeconds(): ?float + { + return $this->container['end_time_seconds']; + } + + /** + * Sets end_time_seconds + * + * @param float|null $end_time_seconds The end time of this clip within the recording, in seconds. + * + * @return $this + */ + public function setEndTimeSeconds(?float $end_time_seconds): static + { + if (is_null($end_time_seconds)) { + throw new InvalidArgumentException('non-nullable end_time_seconds cannot be null'); + } + $this->container['end_time_seconds'] = $end_time_seconds; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RecordingTranscriptionMetadata.php b/src/Model/RecordingTranscriptionMetadata.php new file mode 100644 index 00000000..f4962035 --- /dev/null +++ b/src/Model/RecordingTranscriptionMetadata.php @@ -0,0 +1,487 @@ + + */ +class RecordingTranscriptionMetadata implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'recordingTranscriptionMetadata'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'id' => 'string', + 'status' => 'string', + 'completed_time' => '\DateTime', + 'url' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'id' => null, + 'status' => null, + 'completed_time' => 'date-time', + 'url' => 'uri' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'id' => false, + 'status' => false, + 'completed_time' => false, + 'url' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'id' => 'id', + 'status' => 'status', + 'completed_time' => 'completedTime', + 'url' => 'url' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'id' => 'setId', + 'status' => 'setStatus', + 'completed_time' => 'setCompletedTime', + 'url' => 'setUrl' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'id' => 'getId', + 'status' => 'getStatus', + 'completed_time' => 'getCompletedTime', + 'url' => 'getUrl' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('completed_time', $data ?? [], null); + $this->setIfExists('url', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId(): ?string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id The unique transcription ID + * + * @return $this + */ + public function setId(?string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus(): ?string + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. + * + * @return $this + */ + public function setStatus(?string $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets completed_time + * + * @return \DateTime|null + */ + public function getCompletedTime(): ?\DateTime + { + return $this->container['completed_time']; + } + + /** + * Sets completed_time + * + * @param \DateTime|null $completed_time The time that the transcription was completed + * + * @return $this + */ + public function setCompletedTime(?\DateTime $completed_time): static + { + if (is_null($completed_time)) { + throw new InvalidArgumentException('non-nullable completed_time cannot be null'); + } + $this->container['completed_time'] = $completed_time; + + return $this; + } + + /** + * Gets url + * + * @return string|null + */ + public function getUrl(): ?string + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string|null $url The URL of the [transcription](#operation/getCallTranscription) + * + * @return $this + */ + public function setUrl(?string $url): static + { + if (is_null($url)) { + throw new InvalidArgumentException('non-nullable url cannot be null'); + } + $this->container['url'] = $url; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RecordingTranscriptions.php b/src/Model/RecordingTranscriptions.php new file mode 100644 index 00000000..5baa8a50 --- /dev/null +++ b/src/Model/RecordingTranscriptions.php @@ -0,0 +1,418 @@ + + */ +class RecordingTranscriptions implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'recordingTranscriptions'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'transcripts' => '\OpenAPI\Client\Model\Transcription[]', + 'clips' => '\OpenAPI\Client\Model\RecordingTranscriptionClip[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'transcripts' => null, + 'clips' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'transcripts' => false, + 'clips' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'transcripts' => 'transcripts', + 'clips' => 'clips' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'transcripts' => 'setTranscripts', + 'clips' => 'setClips' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'transcripts' => 'getTranscripts', + 'clips' => 'getClips' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('transcripts', $data ?? [], null); + $this->setIfExists('clips', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets transcripts + * + * @return \OpenAPI\Client\Model\Transcription[]|null + */ + public function getTranscripts(): ?array + { + return $this->container['transcripts']; + } + + /** + * Sets transcripts + * + * @param \OpenAPI\Client\Model\Transcription[]|null $transcripts transcripts + * + * @return $this + */ + public function setTranscripts(?array $transcripts): static + { + if (is_null($transcripts)) { + throw new InvalidArgumentException('non-nullable transcripts cannot be null'); + } + $this->container['transcripts'] = $transcripts; + + return $this; + } + + /** + * Gets clips + * + * @return \OpenAPI\Client\Model\RecordingTranscriptionClip[]|null + */ + public function getClips(): ?array + { + return $this->container['clips']; + } + + /** + * Sets clips + * + * @param \OpenAPI\Client\Model\RecordingTranscriptionClip[]|null $clips A list of individual speech clips with speaker, timing, and confidence information. + * + * @return $this + */ + public function setClips(?array $clips): static + { + if (is_null($clips)) { + throw new InvalidArgumentException('non-nullable clips cannot be null'); + } + $this->container['clips'] = $clips; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RedirectCallback.php b/src/Model/RedirectCallback.php new file mode 100644 index 00000000..f3d77aae --- /dev/null +++ b/src/Model/RedirectCallback.php @@ -0,0 +1,916 @@ + + */ +class RedirectCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'redirectCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_id' => 'string', + 'call_url' => 'string', + 'parent_call_id' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'tag' => 'string', + 'transfer_caller_id' => 'string', + 'transfer_to' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'call_url' => 'uri', + 'parent_call_id' => null, + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'tag' => null, + 'transfer_caller_id' => null, + 'transfer_to' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'call_url' => false, + 'parent_call_id' => false, + 'enqueued_time' => true, + 'start_time' => false, + 'answer_time' => true, + 'tag' => true, + 'transfer_caller_id' => false, + 'transfer_to' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'call_url' => 'callUrl', + 'parent_call_id' => 'parentCallId', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'tag' => 'tag', + 'transfer_caller_id' => 'transferCallerId', + 'transfer_to' => 'transferTo' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'call_url' => 'setCallUrl', + 'parent_call_id' => 'setParentCallId', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'tag' => 'setTag', + 'transfer_caller_id' => 'setTransferCallerId', + 'transfer_to' => 'setTransferTo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'call_url' => 'getCallUrl', + 'parent_call_id' => 'getParentCallId', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'tag' => 'getTag', + 'transfer_caller_id' => 'getTransferCallerId', + 'transfer_to' => 'getTransferTo' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('parent_call_id', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('transfer_caller_id', $data ?? [], null); + $this->setIfExists('transfer_to', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets parent_call_id + * + * @return string|null + */ + public function getParentCallId(): ?string + { + return $this->container['parent_call_id']; + } + + /** + * Sets parent_call_id + * + * @param string|null $parent_call_id (optional) If the event is related to the B leg of a , the call id of the original call leg that executed the . Otherwise, this field will not be present. + * + * @return $this + */ + public function setParentCallId(?string $parent_call_id): static + { + if (is_null($parent_call_id)) { + throw new InvalidArgumentException('non-nullable parent_call_id cannot be null'); + } + $this->container['parent_call_id'] = $parent_call_id; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Time the call was answered, in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets transfer_caller_id + * + * @return string|null + */ + public function getTransferCallerId(): ?string + { + return $this->container['transfer_caller_id']; + } + + /** + * Sets transfer_caller_id + * + * @param string|null $transfer_caller_id The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferCallerId(?string $transfer_caller_id): static + { + if (is_null($transfer_caller_id)) { + throw new InvalidArgumentException('non-nullable transfer_caller_id cannot be null'); + } + $this->container['transfer_caller_id'] = $transfer_caller_id; + + return $this; + } + + /** + * Gets transfer_to + * + * @return string|null + */ + public function getTransferTo(): ?string + { + return $this->container['transfer_to']; + } + + /** + * Sets transfer_to + * + * @param string|null $transfer_to The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferTo(?string $transfer_to): static + { + if (is_null($transfer_to)) { + throw new InvalidArgumentException('non-nullable transfer_to cannot be null'); + } + $this->container['transfer_to'] = $transfer_to; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/RedirectMethodEnum.php b/src/Model/RedirectMethodEnum.php new file mode 100644 index 00000000..c026e434 --- /dev/null +++ b/src/Model/RedirectMethodEnum.php @@ -0,0 +1,46 @@ + + */ +class SipConnectionMetadata implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'sipConnectionMetadata'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'ip_address' => 'string', + 'port' => 'int', + 'credentials' => '\OpenAPI\Client\Model\SipCredentials', + 'uui_header' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'ip_address' => 'ipv4', + 'port' => null, + 'credentials' => null, + 'uui_header' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'ip_address' => false, + 'port' => false, + 'credentials' => false, + 'uui_header' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'ip_address' => 'ipAddress', + 'port' => 'port', + 'credentials' => 'credentials', + 'uui_header' => 'uuiHeader' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'ip_address' => 'setIpAddress', + 'port' => 'setPort', + 'credentials' => 'setCredentials', + 'uui_header' => 'setUuiHeader' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'ip_address' => 'getIpAddress', + 'port' => 'getPort', + 'credentials' => 'getCredentials', + 'uui_header' => 'getUuiHeader' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('ip_address', $data ?? [], null); + $this->setIfExists('port', $data ?? [], null); + $this->setIfExists('credentials', $data ?? [], null); + $this->setIfExists('uui_header', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets ip_address + * + * @return string|null + */ + public function getIpAddress(): ?string + { + return $this->container['ip_address']; + } + + /** + * Sets ip_address + * + * @param string|null $ip_address The IP address of the SIP connection. + * + * @return $this + */ + public function setIpAddress(?string $ip_address): static + { + if (is_null($ip_address)) { + throw new InvalidArgumentException('non-nullable ip_address cannot be null'); + } + $this->container['ip_address'] = $ip_address; + + return $this; + } + + /** + * Gets port + * + * @return int|null + */ + public function getPort(): ?int + { + return $this->container['port']; + } + + /** + * Sets port + * + * @param int|null $port The port of the SIP connection. + * + * @return $this + */ + public function setPort(?int $port): static + { + if (is_null($port)) { + throw new InvalidArgumentException('non-nullable port cannot be null'); + } + $this->container['port'] = $port; + + return $this; + } + + /** + * Gets credentials + * + * @return \OpenAPI\Client\Model\SipCredentials|null + */ + public function getCredentials(): ?\OpenAPI\Client\Model\SipCredentials + { + return $this->container['credentials']; + } + + /** + * Sets credentials + * + * @param \OpenAPI\Client\Model\SipCredentials|null $credentials credentials + * + * @return $this + */ + public function setCredentials(?\OpenAPI\Client\Model\SipCredentials $credentials): static + { + if (is_null($credentials)) { + throw new InvalidArgumentException('non-nullable credentials cannot be null'); + } + $this->container['credentials'] = $credentials; + + return $this; + } + + /** + * Gets uui_header + * + * @return string|null + */ + public function getUuiHeader(): ?string + { + return $this->container['uui_header']; + } + + /** + * Sets uui_header + * + * @param string|null $uui_header The User-to-User Information header for the SIP connection. + * + * @return $this + */ + public function setUuiHeader(?string $uui_header): static + { + if (is_null($uui_header)) { + throw new InvalidArgumentException('non-nullable uui_header cannot be null'); + } + $this->container['uui_header'] = $uui_header; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/SipCredentials.php b/src/Model/SipCredentials.php new file mode 100644 index 00000000..05494c56 --- /dev/null +++ b/src/Model/SipCredentials.php @@ -0,0 +1,418 @@ + + */ +class SipCredentials implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'sipCredentials'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'username' => 'string', + 'password' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'username' => null, + 'password' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'username' => false, + 'password' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'username' => 'username', + 'password' => 'password' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'username' => 'setUsername', + 'password' => 'setPassword' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'username' => 'getUsername', + 'password' => 'getPassword' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('username', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets username + * + * @return string|null + */ + public function getUsername(): ?string + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string|null $username The username for the SIP connection. + * + * @return $this + */ + public function setUsername(?string $username): static + { + if (is_null($username)) { + throw new InvalidArgumentException('non-nullable username cannot be null'); + } + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password + * + * @return string|null + */ + public function getPassword(): ?string + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string|null $password The password for the SIP connection. + * + * @return $this + */ + public function setPassword(?string $password): static + { + if (is_null($password)) { + throw new InvalidArgumentException('non-nullable password cannot be null'); + } + $this->container['password'] = $password; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/SmsMessageContent.php b/src/Model/SmsMessageContent.php new file mode 100644 index 00000000..b0d0fb56 --- /dev/null +++ b/src/Model/SmsMessageContent.php @@ -0,0 +1,395 @@ + + */ +class SmsMessageContent implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'smsMessageContent'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'text' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'text' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'text' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'text' => 'text' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'text' => 'setText' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'text' => 'getText' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('text', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['text'] === null) { + $invalidProperties[] = "'text' can't be null"; + } + if ((mb_strlen($this->container['text']) > 2048)) { + $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 2048."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets text + * + * @return string + */ + public function getText(): string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string $text The contents of the text message. Must be 2048 characters or less. + * + * @return $this + */ + public function setText(string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + if ((mb_strlen($text) > 2048)) { + throw new InvalidArgumentException('invalid length for $text when calling SmsMessageContent., must be smaller than or equal to 2048.'); + } + + $this->container['text'] = $text; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/StandaloneCardOrientationEnum.php b/src/Model/StandaloneCardOrientationEnum.php new file mode 100644 index 00000000..a6ed040d --- /dev/null +++ b/src/Model/StandaloneCardOrientationEnum.php @@ -0,0 +1,45 @@ + + */ +class StatusCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'statusCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'time' => '\DateTime', + 'event_time' => '\DateTime', + 'type' => '\OpenAPI\Client\Model\StatusCallbackTypeEnum', + 'to' => 'string', + 'description' => 'string', + 'message' => '\OpenAPI\Client\Model\StatusCallbackMessage', + 'error_code' => 'int', + 'carrier_name' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'time' => 'date-time', + 'event_time' => 'date-time', + 'type' => null, + 'to' => null, + 'description' => null, + 'message' => null, + 'error_code' => null, + 'carrier_name' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'time' => false, + 'event_time' => false, + 'type' => false, + 'to' => false, + 'description' => false, + 'message' => false, + 'error_code' => false, + 'carrier_name' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'time' => 'time', + 'event_time' => 'eventTime', + 'type' => 'type', + 'to' => 'to', + 'description' => 'description', + 'message' => 'message', + 'error_code' => 'errorCode', + 'carrier_name' => 'carrierName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'time' => 'setTime', + 'event_time' => 'setEventTime', + 'type' => 'setType', + 'to' => 'setTo', + 'description' => 'setDescription', + 'message' => 'setMessage', + 'error_code' => 'setErrorCode', + 'carrier_name' => 'setCarrierName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'time' => 'getTime', + 'event_time' => 'getEventTime', + 'type' => 'getType', + 'to' => 'getTo', + 'description' => 'getDescription', + 'message' => 'getMessage', + 'error_code' => 'getErrorCode', + 'carrier_name' => 'getCarrierName' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('time', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('message', $data ?? [], null); + $this->setIfExists('error_code', $data ?? [], null); + $this->setIfExists('carrier_name', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['time'] === null) { + $invalidProperties[] = "'time' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ($this->container['message'] === null) { + $invalidProperties[] = "'message' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets time + * + * @return \DateTime + */ + public function getTime(): \DateTime + { + return $this->container['time']; + } + + /** + * Sets time + * + * @param \DateTime $time time + * + * @return $this + */ + public function setTime(\DateTime $time): static + { + if (is_null($time)) { + throw new InvalidArgumentException('non-nullable time cannot be null'); + } + $this->container['time'] = $time; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time Represents the time at which the message was read, for `message-read` callbacks. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\StatusCallbackTypeEnum + */ + public function getType(): \OpenAPI\Client\Model\StatusCallbackTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\StatusCallbackTypeEnum $type type + * + * @return $this + */ + public function setType(\OpenAPI\Client\Model\StatusCallbackTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets to + * + * @return string + */ + public function getTo(): string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string $to The destination phone number the message was sent to. For status callbacks, this the the Bandwidth user's client phone number. + * + * @return $this + */ + public function setTo(string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription(): string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description A detailed description of the event described by the callback. + * + * @return $this + */ + public function setDescription(string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets message + * + * @return \OpenAPI\Client\Model\StatusCallbackMessage + */ + public function getMessage(): \OpenAPI\Client\Model\StatusCallbackMessage + { + return $this->container['message']; + } + + /** + * Sets message + * + * @param \OpenAPI\Client\Model\StatusCallbackMessage $message message + * + * @return $this + */ + public function setMessage(\OpenAPI\Client\Model\StatusCallbackMessage $message): static + { + if (is_null($message)) { + throw new InvalidArgumentException('non-nullable message cannot be null'); + } + $this->container['message'] = $message; + + return $this; + } + + /** + * Gets error_code + * + * @return int|null + */ + public function getErrorCode(): ?int + { + return $this->container['error_code']; + } + + /** + * Sets error_code + * + * @param int|null $error_code Optional error code, applicable only when type is `message-failed`. + * + * @return $this + */ + public function setErrorCode(?int $error_code): static + { + if (is_null($error_code)) { + throw new InvalidArgumentException('non-nullable error_code cannot be null'); + } + $this->container['error_code'] = $error_code; + + return $this; + } + + /** + * Gets carrier_name + * + * @return string|null + */ + public function getCarrierName(): ?string + { + return $this->container['carrier_name']; + } + + /** + * Sets carrier_name + * + * @param string|null $carrier_name The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. + * + * @return $this + */ + public function setCarrierName(?string $carrier_name): static + { + if (is_null($carrier_name)) { + throw new InvalidArgumentException('non-nullable carrier_name cannot be null'); + } + $this->container['carrier_name'] = $carrier_name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/StatusCallbackMessage.php b/src/Model/StatusCallbackMessage.php new file mode 100644 index 00000000..57000e33 --- /dev/null +++ b/src/Model/StatusCallbackMessage.php @@ -0,0 +1,819 @@ + + */ +class StatusCallbackMessage implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'statusCallbackMessage'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'id' => 'string', + 'owner' => 'string', + 'application_id' => 'string', + 'time' => '\DateTime', + 'segment_count' => 'int', + 'direction' => '\OpenAPI\Client\Model\MessageDirectionEnum', + 'to' => 'string[]', + 'from' => 'string', + 'text' => 'string', + 'tag' => 'string', + 'media' => 'string[]', + 'priority' => '\OpenAPI\Client\Model\PriorityEnum', + 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'id' => null, + 'owner' => null, + 'application_id' => null, + 'time' => 'date-time', + 'segment_count' => null, + 'direction' => null, + 'to' => null, + 'from' => null, + 'text' => null, + 'tag' => null, + 'media' => 'uri', + 'priority' => null, + 'channel' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'id' => false, + 'owner' => false, + 'application_id' => false, + 'time' => false, + 'segment_count' => false, + 'direction' => false, + 'to' => false, + 'from' => false, + 'text' => false, + 'tag' => false, + 'media' => false, + 'priority' => false, + 'channel' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'id' => 'id', + 'owner' => 'owner', + 'application_id' => 'applicationId', + 'time' => 'time', + 'segment_count' => 'segmentCount', + 'direction' => 'direction', + 'to' => 'to', + 'from' => 'from', + 'text' => 'text', + 'tag' => 'tag', + 'media' => 'media', + 'priority' => 'priority', + 'channel' => 'channel' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'id' => 'setId', + 'owner' => 'setOwner', + 'application_id' => 'setApplicationId', + 'time' => 'setTime', + 'segment_count' => 'setSegmentCount', + 'direction' => 'setDirection', + 'to' => 'setTo', + 'from' => 'setFrom', + 'text' => 'setText', + 'tag' => 'setTag', + 'media' => 'setMedia', + 'priority' => 'setPriority', + 'channel' => 'setChannel' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'id' => 'getId', + 'owner' => 'getOwner', + 'application_id' => 'getApplicationId', + 'time' => 'getTime', + 'segment_count' => 'getSegmentCount', + 'direction' => 'getDirection', + 'to' => 'getTo', + 'from' => 'getFrom', + 'text' => 'getText', + 'tag' => 'getTag', + 'media' => 'getMedia', + 'priority' => 'getPriority', + 'channel' => 'getChannel' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('owner', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('time', $data ?? [], null); + $this->setIfExists('segment_count', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('media', $data ?? [], null); + $this->setIfExists('priority', $data ?? [], null); + $this->setIfExists('channel', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['owner'] === null) { + $invalidProperties[] = "'owner' can't be null"; + } + if ($this->container['application_id'] === null) { + $invalidProperties[] = "'application_id' can't be null"; + } + if ($this->container['time'] === null) { + $invalidProperties[] = "'time' can't be null"; + } + if ($this->container['segment_count'] === null) { + $invalidProperties[] = "'segment_count' can't be null"; + } + if ($this->container['direction'] === null) { + $invalidProperties[] = "'direction' can't be null"; + } + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + if ($this->container['from'] === null) { + $invalidProperties[] = "'from' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string + */ + public function getId(): string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id A unique identifier of the message. + * + * @return $this + */ + public function setId(string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets owner + * + * @return string + */ + public function getOwner(): string + { + return $this->container['owner']; + } + + /** + * Sets owner + * + * @param string $owner The Bandwidth phone number or alphanumeric identifier associated with the message. + * + * @return $this + */ + public function setOwner(string $owner): static + { + if (is_null($owner)) { + throw new InvalidArgumentException('non-nullable owner cannot be null'); + } + $this->container['owner'] = $owner; + + return $this; + } + + /** + * Gets application_id + * + * @return string + */ + public function getApplicationId(): string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. + * + * @return $this + */ + public function setApplicationId(string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets time + * + * @return \DateTime + */ + public function getTime(): \DateTime + { + return $this->container['time']; + } + + /** + * Sets time + * + * @param \DateTime $time time + * + * @return $this + */ + public function setTime(\DateTime $time): static + { + if (is_null($time)) { + throw new InvalidArgumentException('non-nullable time cannot be null'); + } + $this->container['time'] = $time; + + return $this; + } + + /** + * Gets segment_count + * + * @return int + */ + public function getSegmentCount(): int + { + return $this->container['segment_count']; + } + + /** + * Sets segment_count + * + * @param int $segment_count The number of segments the user's message is broken into before sending over carrier networks. + * + * @return $this + */ + public function setSegmentCount(int $segment_count): static + { + if (is_null($segment_count)) { + throw new InvalidArgumentException('non-nullable segment_count cannot be null'); + } + $this->container['segment_count'] = $segment_count; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\MessageDirectionEnum + */ + public function getDirection(): \OpenAPI\Client\Model\MessageDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\MessageDirectionEnum $direction direction + * + * @return $this + */ + public function setDirection(\OpenAPI\Client\Model\MessageDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets to + * + * @return string[] + */ + public function getTo(): array + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string[] $to The phone number recipients of the message. + * + * @return $this + */ + public function setTo(array $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + + + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets from + * + * @return string + */ + public function getFrom(): string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string $from The Bandwidth phone number or alphanumeric identifier the message was sent from. + * + * @return $this + */ + public function setFrom(string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets text + * + * @return string|null + */ + public function getText(): ?string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string|null $text text + * + * @return $this + */ + public function setText(?string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A custom string that will be included in callback events of the message. Max 1024 characters. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + throw new InvalidArgumentException('non-nullable tag cannot be null'); + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets media + * + * @return string[]|null + */ + public function getMedia(): ?array + { + return $this->container['media']; + } + + /** + * Sets media + * + * @param string[]|null $media Optional media, not applicable for sms + * + * @return $this + */ + public function setMedia(?array $media): static + { + if (is_null($media)) { + throw new InvalidArgumentException('non-nullable media cannot be null'); + } + $this->container['media'] = $media; + + return $this; + } + + /** + * Gets priority + * + * @return \OpenAPI\Client\Model\PriorityEnum|null + */ + public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum + { + return $this->container['priority']; + } + + /** + * Sets priority + * + * @param \OpenAPI\Client\Model\PriorityEnum|null $priority priority + * + * @return $this + */ + public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): static + { + if (is_null($priority)) { + throw new InvalidArgumentException('non-nullable priority cannot be null'); + } + $this->container['priority'] = $priority; + + return $this; + } + + /** + * Gets channel + * + * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum|null + */ + public function getChannel(): ?\OpenAPI\Client\Model\MultiChannelMessageChannelEnum + { + return $this->container['channel']; + } + + /** + * Sets channel + * + * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum|null $channel channel + * + * @return $this + */ + public function setChannel(?\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + { + if (is_null($channel)) { + throw new InvalidArgumentException('non-nullable channel cannot be null'); + } + $this->container['channel'] = $channel; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/StatusCallbackTypeEnum.php b/src/Model/StatusCallbackTypeEnum.php new file mode 100644 index 00000000..ccc75797 --- /dev/null +++ b/src/Model/StatusCallbackTypeEnum.php @@ -0,0 +1,52 @@ + + */ +class StirShaken implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'stirShaken'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'verstat' => 'string', + 'attestation_indicator' => 'string', + 'originating_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'verstat' => null, + 'attestation_indicator' => null, + 'originating_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'verstat' => false, + 'attestation_indicator' => false, + 'originating_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'verstat' => 'verstat', + 'attestation_indicator' => 'attestationIndicator', + 'originating_id' => 'originatingId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'verstat' => 'setVerstat', + 'attestation_indicator' => 'setAttestationIndicator', + 'originating_id' => 'setOriginatingId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'verstat' => 'getVerstat', + 'attestation_indicator' => 'getAttestationIndicator', + 'originating_id' => 'getOriginatingId' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('verstat', $data ?? [], null); + $this->setIfExists('attestation_indicator', $data ?? [], null); + $this->setIfExists('originating_id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets verstat + * + * @return string|null + */ + public function getVerstat(): ?string + { + return $this->container['verstat']; + } + + /** + * Sets verstat + * + * @param string|null $verstat (optional) The verification status indicating whether the verification was successful or not. Possible values are TN-Validation-Passed and TN-Validation-Failed. + * + * @return $this + */ + public function setVerstat(?string $verstat): static + { + if (is_null($verstat)) { + throw new InvalidArgumentException('non-nullable verstat cannot be null'); + } + $this->container['verstat'] = $verstat; + + return $this; + } + + /** + * Gets attestation_indicator + * + * @return string|null + */ + public function getAttestationIndicator(): ?string + { + return $this->container['attestation_indicator']; + } + + /** + * Sets attestation_indicator + * + * @param string|null $attestation_indicator (optional) The attestation level verified by Bandwidth. Possible values are A (full), B (partial) or C (gateway). + * + * @return $this + */ + public function setAttestationIndicator(?string $attestation_indicator): static + { + if (is_null($attestation_indicator)) { + throw new InvalidArgumentException('non-nullable attestation_indicator cannot be null'); + } + $this->container['attestation_indicator'] = $attestation_indicator; + + return $this; + } + + /** + * Gets originating_id + * + * @return string|null + */ + public function getOriginatingId(): ?string + { + return $this->container['originating_id']; + } + + /** + * Sets originating_id + * + * @param string|null $originating_id (optional) A unique origination identifier. + * + * @return $this + */ + public function setOriginatingId(?string $originating_id): static + { + if (is_null($originating_id)) { + throw new InvalidArgumentException('non-nullable originating_id cannot be null'); + } + $this->container['originating_id'] = $originating_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/SyncLookupRequest.php b/src/Model/SyncLookupRequest.php new file mode 100644 index 00000000..ac9cec90 --- /dev/null +++ b/src/Model/SyncLookupRequest.php @@ -0,0 +1,432 @@ + + */ +class SyncLookupRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'syncLookupRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'phone_numbers' => 'string[]', + 'rcs_agent' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'phone_numbers' => null, + 'rcs_agent' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'phone_numbers' => false, + 'rcs_agent' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'phone_numbers' => 'phoneNumbers', + 'rcs_agent' => 'rcsAgent' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'phone_numbers' => 'setPhoneNumbers', + 'rcs_agent' => 'setRcsAgent' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'phone_numbers' => 'getPhoneNumbers', + 'rcs_agent' => 'getRcsAgent' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('phone_numbers', $data ?? [], null); + $this->setIfExists('rcs_agent', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['phone_numbers'] === null) { + $invalidProperties[] = "'phone_numbers' can't be null"; + } + if (!is_null($this->container['rcs_agent']) && !preg_match("/^[A-Za-z0-9_-]{1,40}$/", $this->container['rcs_agent'])) { + $invalidProperties[] = "invalid value for 'rcs_agent', must be conform to the pattern /^[A-Za-z0-9_-]{1,40}$/."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets phone_numbers + * + * @return string[] + */ + public function getPhoneNumbers(): array + { + return $this->container['phone_numbers']; + } + + /** + * Sets phone_numbers + * + * @param string[] $phone_numbers Telephone numbers in E.164 format. + * + * @return $this + */ + public function setPhoneNumbers(array $phone_numbers): static + { + if (is_null($phone_numbers)) { + throw new InvalidArgumentException('non-nullable phone_numbers cannot be null'); + } + + + $this->container['phone_numbers'] = $phone_numbers; + + return $this; + } + + /** + * Gets rcs_agent + * + * @return string|null + */ + public function getRcsAgent(): ?string + { + return $this->container['rcs_agent']; + } + + /** + * Sets rcs_agent + * + * @param string|null $rcs_agent Override the default RCS sender/agent ID used when checking RCS capabilities. When provided, this value is used as the `sender` in the RCS capability-check request instead of the account default. Must be 1–40 characters and contain only letters, digits, underscores, or hyphens. + * + * @return $this + */ + public function setRcsAgent(?string $rcs_agent): static + { + if (is_null($rcs_agent)) { + throw new InvalidArgumentException('non-nullable rcs_agent cannot be null'); + } + + if ((!preg_match("/^[A-Za-z0-9_-]{1,40}$/", ObjectSerializer::toString($rcs_agent)))) { + throw new InvalidArgumentException("invalid value for \$rcs_agent when calling SyncLookupRequest., must conform to the pattern /^[A-Za-z0-9_-]{1,40}$/."); + } + + $this->container['rcs_agent'] = $rcs_agent; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/TelephoneNumber.php b/src/Model/TelephoneNumber.php new file mode 100644 index 00000000..4739ed86 --- /dev/null +++ b/src/Model/TelephoneNumber.php @@ -0,0 +1,384 @@ + + */ +class TelephoneNumber implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'telephoneNumber'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'telephone_number' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'telephone_number' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'telephone_number' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'telephone_number' => 'telephoneNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'telephone_number' => 'setTelephoneNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'telephone_number' => 'getTelephoneNumber' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('telephone_number', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets telephone_number + * + * @return string|null + */ + public function getTelephoneNumber(): ?string + { + return $this->container['telephone_number']; + } + + /** + * Sets telephone_number + * + * @param string|null $telephone_number Simple Telephone Number. + * + * @return $this + */ + public function setTelephoneNumber(?string $telephone_number): static + { + if (is_null($telephone_number)) { + throw new InvalidArgumentException('non-nullable telephone_number cannot be null'); + } + $this->container['telephone_number'] = $telephone_number; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/TfvBasicAuthentication.php b/src/Model/TfvBasicAuthentication.php new file mode 100644 index 00000000..7fe8b8ce --- /dev/null +++ b/src/Model/TfvBasicAuthentication.php @@ -0,0 +1,440 @@ + + */ +class TfvBasicAuthentication implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'tfvBasicAuthentication'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'username' => 'string', + 'password' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'username' => null, + 'password' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'username' => false, + 'password' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'username' => 'username', + 'password' => 'password' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'username' => 'setUsername', + 'password' => 'setPassword' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'username' => 'getUsername', + 'password' => 'getPassword' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('username', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['username'] === null) { + $invalidProperties[] = "'username' can't be null"; + } + if ((mb_strlen($this->container['username']) > 100)) { + $invalidProperties[] = "invalid value for 'username', the character length must be smaller than or equal to 100."; + } + + if ($this->container['password'] === null) { + $invalidProperties[] = "'password' can't be null"; + } + if ((mb_strlen($this->container['password']) > 200)) { + $invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 200."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets username + * + * @return string + */ + public function getUsername(): string + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string $username username + * + * @return $this + */ + public function setUsername(string $username): static + { + if (is_null($username)) { + throw new InvalidArgumentException('non-nullable username cannot be null'); + } + if ((mb_strlen($username) > 100)) { + throw new InvalidArgumentException('invalid length for $username when calling TfvBasicAuthentication., must be smaller than or equal to 100.'); + } + + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password + * + * @return string + */ + public function getPassword(): string + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string $password password + * + * @return $this + */ + public function setPassword(string $password): static + { + if (is_null($password)) { + throw new InvalidArgumentException('non-nullable password cannot be null'); + } + if ((mb_strlen($password) > 200)) { + throw new InvalidArgumentException('invalid length for $password when calling TfvBasicAuthentication., must be smaller than or equal to 200.'); + } + + $this->container['password'] = $password; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/TfvCallbackStatusEnum.php b/src/Model/TfvCallbackStatusEnum.php new file mode 100644 index 00000000..0bbf9cc7 --- /dev/null +++ b/src/Model/TfvCallbackStatusEnum.php @@ -0,0 +1,45 @@ + + */ +class TfvError implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'tfvError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'type' => 'string', + 'description' => 'string', + 'errors' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'type' => null, + 'description' => null, + 'errors' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'type' => false, + 'description' => false, + 'errors' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'type' => 'type', + 'description' => 'description', + 'errors' => 'errors' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'type' => 'setType', + 'description' => 'setDescription', + 'errors' => 'setErrors' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'type' => 'getType', + 'description' => 'getDescription', + 'errors' => 'getErrors' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type type + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return $this + */ + public function setDescription(?string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets errors + * + * @return object|null + */ + public function getErrors(): ?object + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param object|null $errors Each key of this errors object refers to a field of the submitted object (using dot notation for nested objects), with the field being a key to an array of one or more errors for that field. + * + * @return $this + */ + public function setErrors(?object $errors): static + { + if (is_null($errors)) { + throw new InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/TfvStatus.php b/src/Model/TfvStatus.php new file mode 100644 index 00000000..ae167646 --- /dev/null +++ b/src/Model/TfvStatus.php @@ -0,0 +1,850 @@ + + */ +class TfvStatus implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'tfvStatus'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'phone_number' => 'string', + 'status' => '\OpenAPI\Client\Model\TfvStatusEnum', + 'internal_ticket_number' => 'string', + 'decline_reason_description' => 'string', + 'denial_status_code' => 'int', + 'additional_denial_reasons' => '\OpenAPI\Client\Model\AdditionalDenialReason[]', + 'resubmit_allowed' => 'bool', + 'created_date_time' => '\DateTime', + 'modified_date_time' => '\DateTime', + 'submission' => '\OpenAPI\Client\Model\TfvSubmissionInfo', + 'blocked' => 'bool', + 'blocked_reason' => 'string', + 'cv_token' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'phone_number' => null, + 'status' => null, + 'internal_ticket_number' => null, + 'decline_reason_description' => null, + 'denial_status_code' => null, + 'additional_denial_reasons' => null, + 'resubmit_allowed' => null, + 'created_date_time' => 'date-time', + 'modified_date_time' => 'date-time', + 'submission' => null, + 'blocked' => null, + 'blocked_reason' => null, + 'cv_token' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'phone_number' => false, + 'status' => false, + 'internal_ticket_number' => false, + 'decline_reason_description' => false, + 'denial_status_code' => true, + 'additional_denial_reasons' => true, + 'resubmit_allowed' => false, + 'created_date_time' => false, + 'modified_date_time' => false, + 'submission' => false, + 'blocked' => false, + 'blocked_reason' => false, + 'cv_token' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'phone_number' => 'phoneNumber', + 'status' => 'status', + 'internal_ticket_number' => 'internalTicketNumber', + 'decline_reason_description' => 'declineReasonDescription', + 'denial_status_code' => 'denialStatusCode', + 'additional_denial_reasons' => 'additionalDenialReasons', + 'resubmit_allowed' => 'resubmitAllowed', + 'created_date_time' => 'createdDateTime', + 'modified_date_time' => 'modifiedDateTime', + 'submission' => 'submission', + 'blocked' => 'blocked', + 'blocked_reason' => 'blockedReason', + 'cv_token' => 'cvToken' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'phone_number' => 'setPhoneNumber', + 'status' => 'setStatus', + 'internal_ticket_number' => 'setInternalTicketNumber', + 'decline_reason_description' => 'setDeclineReasonDescription', + 'denial_status_code' => 'setDenialStatusCode', + 'additional_denial_reasons' => 'setAdditionalDenialReasons', + 'resubmit_allowed' => 'setResubmitAllowed', + 'created_date_time' => 'setCreatedDateTime', + 'modified_date_time' => 'setModifiedDateTime', + 'submission' => 'setSubmission', + 'blocked' => 'setBlocked', + 'blocked_reason' => 'setBlockedReason', + 'cv_token' => 'setCvToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'phone_number' => 'getPhoneNumber', + 'status' => 'getStatus', + 'internal_ticket_number' => 'getInternalTicketNumber', + 'decline_reason_description' => 'getDeclineReasonDescription', + 'denial_status_code' => 'getDenialStatusCode', + 'additional_denial_reasons' => 'getAdditionalDenialReasons', + 'resubmit_allowed' => 'getResubmitAllowed', + 'created_date_time' => 'getCreatedDateTime', + 'modified_date_time' => 'getModifiedDateTime', + 'submission' => 'getSubmission', + 'blocked' => 'getBlocked', + 'blocked_reason' => 'getBlockedReason', + 'cv_token' => 'getCvToken' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('phone_number', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('internal_ticket_number', $data ?? [], null); + $this->setIfExists('decline_reason_description', $data ?? [], null); + $this->setIfExists('denial_status_code', $data ?? [], null); + $this->setIfExists('additional_denial_reasons', $data ?? [], null); + $this->setIfExists('resubmit_allowed', $data ?? [], null); + $this->setIfExists('created_date_time', $data ?? [], null); + $this->setIfExists('modified_date_time', $data ?? [], null); + $this->setIfExists('submission', $data ?? [], null); + $this->setIfExists('blocked', $data ?? [], null); + $this->setIfExists('blocked_reason', $data ?? [], null); + $this->setIfExists('cv_token', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) > 12)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be smaller than or equal to 12."; + } + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) < 12)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be bigger than or equal to 12."; + } + + if (!is_null($this->container['phone_number']) && !preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", $this->container['phone_number'])) { + $invalidProperties[] = "invalid value for 'phone_number', must be conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."; + } + + if (!is_null($this->container['cv_token']) && (mb_strlen($this->container['cv_token']) > 500)) { + $invalidProperties[] = "invalid value for 'cv_token', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['cv_token']) && (mb_strlen($this->container['cv_token']) < 0)) { + $invalidProperties[] = "invalid value for 'cv_token', the character length must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets phone_number + * + * @return string|null + */ + public function getPhoneNumber(): ?string + { + return $this->container['phone_number']; + } + + /** + * Sets phone_number + * + * @param string|null $phone_number Toll-free telephone number in E.164 format. + * + * @return $this + */ + public function setPhoneNumber(?string $phone_number): static + { + if (is_null($phone_number)) { + throw new InvalidArgumentException('non-nullable phone_number cannot be null'); + } + if ((mb_strlen($phone_number) > 12)) { + throw new InvalidArgumentException('invalid length for $phone_number when calling TfvStatus., must be smaller than or equal to 12.'); + } + if ((mb_strlen($phone_number) < 12)) { + throw new InvalidArgumentException('invalid length for $phone_number when calling TfvStatus., must be bigger than or equal to 12.'); + } + if ((!preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", ObjectSerializer::toString($phone_number)))) { + throw new InvalidArgumentException("invalid value for \$phone_number when calling TfvStatus., must conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."); + } + + $this->container['phone_number'] = $phone_number; + + return $this; + } + + /** + * Gets status + * + * @return \OpenAPI\Client\Model\TfvStatusEnum|null + */ + public function getStatus(): ?\OpenAPI\Client\Model\TfvStatusEnum + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\TfvStatusEnum|null $status status + * + * @return $this + */ + public function setStatus(?\OpenAPI\Client\Model\TfvStatusEnum $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets internal_ticket_number + * + * @return string|null + */ + public function getInternalTicketNumber(): ?string + { + return $this->container['internal_ticket_number']; + } + + /** + * Sets internal_ticket_number + * + * @param string|null $internal_ticket_number Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number - included in all webhook payloads. + * + * @return $this + */ + public function setInternalTicketNumber(?string $internal_ticket_number): static + { + if (is_null($internal_ticket_number)) { + throw new InvalidArgumentException('non-nullable internal_ticket_number cannot be null'); + } + $this->container['internal_ticket_number'] = $internal_ticket_number; + + return $this; + } + + /** + * Gets decline_reason_description + * + * @return string|null + */ + public function getDeclineReasonDescription(): ?string + { + return $this->container['decline_reason_description']; + } + + /** + * Sets decline_reason_description + * + * @param string|null $decline_reason_description Explanation for why a verification request was declined. + * + * @return $this + */ + public function setDeclineReasonDescription(?string $decline_reason_description): static + { + if (is_null($decline_reason_description)) { + throw new InvalidArgumentException('non-nullable decline_reason_description cannot be null'); + } + $this->container['decline_reason_description'] = $decline_reason_description; + + return $this; + } + + /** + * Gets denial_status_code + * + * @return int|null + */ + public function getDenialStatusCode(): ?int + { + return $this->container['denial_status_code']; + } + + /** + * Sets denial_status_code + * + * @param int|null $denial_status_code Reason code for denial. + * + * @return $this + */ + public function setDenialStatusCode(?int $denial_status_code): static + { + if (is_null($denial_status_code)) { + array_push($this->openAPINullablesSetToNull, 'denial_status_code'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('denial_status_code', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['denial_status_code'] = $denial_status_code; + + return $this; + } + + /** + * Gets additional_denial_reasons + * + * @return \OpenAPI\Client\Model\AdditionalDenialReason[]|null + */ + public function getAdditionalDenialReasons(): ?array + { + return $this->container['additional_denial_reasons']; + } + + /** + * Sets additional_denial_reasons + * + * @param \OpenAPI\Client\Model\AdditionalDenialReason[]|null $additional_denial_reasons An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. + * + * @return $this + */ + public function setAdditionalDenialReasons(?array $additional_denial_reasons): static + { + if (is_null($additional_denial_reasons)) { + array_push($this->openAPINullablesSetToNull, 'additional_denial_reasons'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('additional_denial_reasons', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['additional_denial_reasons'] = $additional_denial_reasons; + + return $this; + } + + /** + * Gets resubmit_allowed + * + * @return bool|null + */ + public function getResubmitAllowed(): ?bool + { + return $this->container['resubmit_allowed']; + } + + /** + * Sets resubmit_allowed + * + * @param bool|null $resubmit_allowed Whether a Toll-Free Verification request qualifies for resubmission via PUT. + * + * @return $this + */ + public function setResubmitAllowed(?bool $resubmit_allowed): static + { + if (is_null($resubmit_allowed)) { + throw new InvalidArgumentException('non-nullable resubmit_allowed cannot be null'); + } + $this->container['resubmit_allowed'] = $resubmit_allowed; + + return $this; + } + + /** + * Gets created_date_time + * + * @return \DateTime|null + */ + public function getCreatedDateTime(): ?\DateTime + { + return $this->container['created_date_time']; + } + + /** + * Sets created_date_time + * + * @param \DateTime|null $created_date_time Date and time the verification request was created. + * + * @return $this + */ + public function setCreatedDateTime(?\DateTime $created_date_time): static + { + if (is_null($created_date_time)) { + throw new InvalidArgumentException('non-nullable created_date_time cannot be null'); + } + $this->container['created_date_time'] = $created_date_time; + + return $this; + } + + /** + * Gets modified_date_time + * + * @return \DateTime|null + */ + public function getModifiedDateTime(): ?\DateTime + { + return $this->container['modified_date_time']; + } + + /** + * Sets modified_date_time + * + * @param \DateTime|null $modified_date_time Date and time the verification request was last modified. + * + * @return $this + */ + public function setModifiedDateTime(?\DateTime $modified_date_time): static + { + if (is_null($modified_date_time)) { + throw new InvalidArgumentException('non-nullable modified_date_time cannot be null'); + } + $this->container['modified_date_time'] = $modified_date_time; + + return $this; + } + + /** + * Gets submission + * + * @return \OpenAPI\Client\Model\TfvSubmissionInfo|null + */ + public function getSubmission(): ?\OpenAPI\Client\Model\TfvSubmissionInfo + { + return $this->container['submission']; + } + + /** + * Sets submission + * + * @param \OpenAPI\Client\Model\TfvSubmissionInfo|null $submission submission + * + * @return $this + */ + public function setSubmission(?\OpenAPI\Client\Model\TfvSubmissionInfo $submission): static + { + if (is_null($submission)) { + throw new InvalidArgumentException('non-nullable submission cannot be null'); + } + $this->container['submission'] = $submission; + + return $this; + } + + /** + * Gets blocked + * + * @return bool|null + */ + public function getBlocked(): ?bool + { + return $this->container['blocked']; + } + + /** + * Sets blocked + * + * @param bool|null $blocked Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. + * + * @return $this + */ + public function setBlocked(?bool $blocked): static + { + if (is_null($blocked)) { + throw new InvalidArgumentException('non-nullable blocked cannot be null'); + } + $this->container['blocked'] = $blocked; + + return $this; + } + + /** + * Gets blocked_reason + * + * @return string|null + */ + public function getBlockedReason(): ?string + { + return $this->container['blocked_reason']; + } + + /** + * Sets blocked_reason + * + * @param string|null $blocked_reason The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. + * + * @return $this + */ + public function setBlockedReason(?string $blocked_reason): static + { + if (is_null($blocked_reason)) { + throw new InvalidArgumentException('non-nullable blocked_reason cannot be null'); + } + $this->container['blocked_reason'] = $blocked_reason; + + return $this; + } + + /** + * Gets cv_token + * + * @return string|null + */ + public function getCvToken(): ?string + { + return $this->container['cv_token']; + } + + /** + * Sets cv_token + * + * @param string|null $cv_token The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection. + * + * @return $this + */ + public function setCvToken(?string $cv_token): static + { + if (is_null($cv_token)) { + array_push($this->openAPINullablesSetToNull, 'cv_token'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('cv_token', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($cv_token) && (mb_strlen($cv_token) > 500)) { + throw new InvalidArgumentException('invalid length for $cv_token when calling TfvStatus., must be smaller than or equal to 500.'); + } + if (!is_null($cv_token) && (mb_strlen($cv_token) < 0)) { + throw new InvalidArgumentException('invalid length for $cv_token when calling TfvStatus., must be bigger than or equal to 0.'); + } + + $this->container['cv_token'] = $cv_token; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/TfvStatusEnum.php b/src/Model/TfvStatusEnum.php new file mode 100644 index 00000000..d307f98e --- /dev/null +++ b/src/Model/TfvStatusEnum.php @@ -0,0 +1,47 @@ + + */ +class TfvSubmissionInfo implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'tfvSubmissionInfo'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'business_address' => '\OpenAPI\Client\Model\Address', + 'business_contact' => '\OpenAPI\Client\Model\Contact', + 'message_volume' => 'int', + 'use_case' => 'string', + 'use_case_summary' => 'string', + 'production_message_content' => 'string', + 'opt_in_workflow' => '\OpenAPI\Client\Model\OptInWorkflow', + 'additional_information' => 'string', + 'isv_reseller' => 'string', + 'privacy_policy_url' => 'string', + 'terms_and_conditions_url' => 'string', + 'business_dba' => 'string', + 'business_registration_number' => 'string', + 'business_registration_type' => '\OpenAPI\Client\Model\BusinessRegistrationTypeEnum', + 'business_registration_issuing_country' => 'string', + 'business_entity_type' => '\OpenAPI\Client\Model\BusinessEntityTypeEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'business_address' => null, + 'business_contact' => null, + 'message_volume' => null, + 'use_case' => null, + 'use_case_summary' => null, + 'production_message_content' => null, + 'opt_in_workflow' => null, + 'additional_information' => null, + 'isv_reseller' => null, + 'privacy_policy_url' => null, + 'terms_and_conditions_url' => null, + 'business_dba' => null, + 'business_registration_number' => null, + 'business_registration_type' => null, + 'business_registration_issuing_country' => null, + 'business_entity_type' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'business_address' => false, + 'business_contact' => false, + 'message_volume' => false, + 'use_case' => false, + 'use_case_summary' => false, + 'production_message_content' => false, + 'opt_in_workflow' => false, + 'additional_information' => true, + 'isv_reseller' => true, + 'privacy_policy_url' => false, + 'terms_and_conditions_url' => false, + 'business_dba' => false, + 'business_registration_number' => true, + 'business_registration_type' => true, + 'business_registration_issuing_country' => true, + 'business_entity_type' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'business_address' => 'businessAddress', + 'business_contact' => 'businessContact', + 'message_volume' => 'messageVolume', + 'use_case' => 'useCase', + 'use_case_summary' => 'useCaseSummary', + 'production_message_content' => 'productionMessageContent', + 'opt_in_workflow' => 'optInWorkflow', + 'additional_information' => 'additionalInformation', + 'isv_reseller' => 'isvReseller', + 'privacy_policy_url' => 'privacyPolicyUrl', + 'terms_and_conditions_url' => 'termsAndConditionsUrl', + 'business_dba' => 'businessDba', + 'business_registration_number' => 'businessRegistrationNumber', + 'business_registration_type' => 'businessRegistrationType', + 'business_registration_issuing_country' => 'businessRegistrationIssuingCountry', + 'business_entity_type' => 'businessEntityType' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'business_address' => 'setBusinessAddress', + 'business_contact' => 'setBusinessContact', + 'message_volume' => 'setMessageVolume', + 'use_case' => 'setUseCase', + 'use_case_summary' => 'setUseCaseSummary', + 'production_message_content' => 'setProductionMessageContent', + 'opt_in_workflow' => 'setOptInWorkflow', + 'additional_information' => 'setAdditionalInformation', + 'isv_reseller' => 'setIsvReseller', + 'privacy_policy_url' => 'setPrivacyPolicyUrl', + 'terms_and_conditions_url' => 'setTermsAndConditionsUrl', + 'business_dba' => 'setBusinessDba', + 'business_registration_number' => 'setBusinessRegistrationNumber', + 'business_registration_type' => 'setBusinessRegistrationType', + 'business_registration_issuing_country' => 'setBusinessRegistrationIssuingCountry', + 'business_entity_type' => 'setBusinessEntityType' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'business_address' => 'getBusinessAddress', + 'business_contact' => 'getBusinessContact', + 'message_volume' => 'getMessageVolume', + 'use_case' => 'getUseCase', + 'use_case_summary' => 'getUseCaseSummary', + 'production_message_content' => 'getProductionMessageContent', + 'opt_in_workflow' => 'getOptInWorkflow', + 'additional_information' => 'getAdditionalInformation', + 'isv_reseller' => 'getIsvReseller', + 'privacy_policy_url' => 'getPrivacyPolicyUrl', + 'terms_and_conditions_url' => 'getTermsAndConditionsUrl', + 'business_dba' => 'getBusinessDba', + 'business_registration_number' => 'getBusinessRegistrationNumber', + 'business_registration_type' => 'getBusinessRegistrationType', + 'business_registration_issuing_country' => 'getBusinessRegistrationIssuingCountry', + 'business_entity_type' => 'getBusinessEntityType' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('business_address', $data ?? [], null); + $this->setIfExists('business_contact', $data ?? [], null); + $this->setIfExists('message_volume', $data ?? [], null); + $this->setIfExists('use_case', $data ?? [], null); + $this->setIfExists('use_case_summary', $data ?? [], null); + $this->setIfExists('production_message_content', $data ?? [], null); + $this->setIfExists('opt_in_workflow', $data ?? [], null); + $this->setIfExists('additional_information', $data ?? [], null); + $this->setIfExists('isv_reseller', $data ?? [], null); + $this->setIfExists('privacy_policy_url', $data ?? [], null); + $this->setIfExists('terms_and_conditions_url', $data ?? [], null); + $this->setIfExists('business_dba', $data ?? [], null); + $this->setIfExists('business_registration_number', $data ?? [], null); + $this->setIfExists('business_registration_type', $data ?? [], null); + $this->setIfExists('business_registration_issuing_country', $data ?? [], null); + $this->setIfExists('business_entity_type', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['message_volume']) && ($this->container['message_volume'] > 10000000)) { + $invalidProperties[] = "invalid value for 'message_volume', must be smaller than or equal to 10000000."; + } + + if (!is_null($this->container['message_volume']) && ($this->container['message_volume'] < 10)) { + $invalidProperties[] = "invalid value for 'message_volume', must be bigger than or equal to 10."; + } + + if (!is_null($this->container['use_case']) && (mb_strlen($this->container['use_case']) > 500)) { + $invalidProperties[] = "invalid value for 'use_case', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['use_case']) && (mb_strlen($this->container['use_case']) < 0)) { + $invalidProperties[] = "invalid value for 'use_case', the character length must be bigger than or equal to 0."; + } + + if (!is_null($this->container['use_case_summary']) && (mb_strlen($this->container['use_case_summary']) > 500)) { + $invalidProperties[] = "invalid value for 'use_case_summary', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['use_case_summary']) && (mb_strlen($this->container['use_case_summary']) < 0)) { + $invalidProperties[] = "invalid value for 'use_case_summary', the character length must be bigger than or equal to 0."; + } + + if (!is_null($this->container['production_message_content']) && (mb_strlen($this->container['production_message_content']) > 500)) { + $invalidProperties[] = "invalid value for 'production_message_content', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['production_message_content']) && (mb_strlen($this->container['production_message_content']) < 0)) { + $invalidProperties[] = "invalid value for 'production_message_content', the character length must be bigger than or equal to 0."; + } + + if (!is_null($this->container['additional_information']) && (mb_strlen($this->container['additional_information']) > 500)) { + $invalidProperties[] = "invalid value for 'additional_information', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['additional_information']) && (mb_strlen($this->container['additional_information']) < 0)) { + $invalidProperties[] = "invalid value for 'additional_information', the character length must be bigger than or equal to 0."; + } + + if (!is_null($this->container['isv_reseller']) && (mb_strlen($this->container['isv_reseller']) > 500)) { + $invalidProperties[] = "invalid value for 'isv_reseller', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['isv_reseller']) && (mb_strlen($this->container['isv_reseller']) < 0)) { + $invalidProperties[] = "invalid value for 'isv_reseller', the character length must be bigger than or equal to 0."; + } + + if (!is_null($this->container['privacy_policy_url']) && (mb_strlen($this->container['privacy_policy_url']) > 500)) { + $invalidProperties[] = "invalid value for 'privacy_policy_url', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['terms_and_conditions_url']) && (mb_strlen($this->container['terms_and_conditions_url']) > 500)) { + $invalidProperties[] = "invalid value for 'terms_and_conditions_url', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['business_dba']) && (mb_strlen($this->container['business_dba']) > 500)) { + $invalidProperties[] = "invalid value for 'business_dba', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['business_registration_number']) && (mb_strlen($this->container['business_registration_number']) > 500)) { + $invalidProperties[] = "invalid value for 'business_registration_number', the character length must be smaller than or equal to 500."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets business_address + * + * @return \OpenAPI\Client\Model\Address|null + */ + public function getBusinessAddress(): ?\OpenAPI\Client\Model\Address + { + return $this->container['business_address']; + } + + /** + * Sets business_address + * + * @param \OpenAPI\Client\Model\Address|null $business_address business_address + * + * @return $this + */ + public function setBusinessAddress(?\OpenAPI\Client\Model\Address $business_address): static + { + if (is_null($business_address)) { + throw new InvalidArgumentException('non-nullable business_address cannot be null'); + } + $this->container['business_address'] = $business_address; + + return $this; + } + + /** + * Gets business_contact + * + * @return \OpenAPI\Client\Model\Contact|null + */ + public function getBusinessContact(): ?\OpenAPI\Client\Model\Contact + { + return $this->container['business_contact']; + } + + /** + * Sets business_contact + * + * @param \OpenAPI\Client\Model\Contact|null $business_contact business_contact + * + * @return $this + */ + public function setBusinessContact(?\OpenAPI\Client\Model\Contact $business_contact): static + { + if (is_null($business_contact)) { + throw new InvalidArgumentException('non-nullable business_contact cannot be null'); + } + $this->container['business_contact'] = $business_contact; + + return $this; + } + + /** + * Gets message_volume + * + * @return int|null + */ + public function getMessageVolume(): ?int + { + return $this->container['message_volume']; + } + + /** + * Sets message_volume + * + * @param int|null $message_volume Estimated monthly volume of messages from the toll-free number. + * + * @return $this + */ + public function setMessageVolume(?int $message_volume): static + { + if (is_null($message_volume)) { + throw new InvalidArgumentException('non-nullable message_volume cannot be null'); + } + + if (($message_volume > 10000000)) { + throw new InvalidArgumentException('invalid value for $message_volume when calling TfvSubmissionInfo., must be smaller than or equal to 10000000.'); + } + if (($message_volume < 10)) { + throw new InvalidArgumentException('invalid value for $message_volume when calling TfvSubmissionInfo., must be bigger than or equal to 10.'); + } + + $this->container['message_volume'] = $message_volume; + + return $this; + } + + /** + * Gets use_case + * + * @return string|null + */ + public function getUseCase(): ?string + { + return $this->container['use_case']; + } + + /** + * Sets use_case + * + * @param string|null $use_case The category of the use case. + * + * @return $this + */ + public function setUseCase(?string $use_case): static + { + if (is_null($use_case)) { + throw new InvalidArgumentException('non-nullable use_case cannot be null'); + } + if ((mb_strlen($use_case) > 500)) { + throw new InvalidArgumentException('invalid length for $use_case when calling TfvSubmissionInfo., must be smaller than or equal to 500.'); + } + if ((mb_strlen($use_case) < 0)) { + throw new InvalidArgumentException('invalid length for $use_case when calling TfvSubmissionInfo., must be bigger than or equal to 0.'); + } + + $this->container['use_case'] = $use_case; + + return $this; + } + + /** + * Gets use_case_summary + * + * @return string|null + */ + public function getUseCaseSummary(): ?string + { + return $this->container['use_case_summary']; + } + + /** + * Sets use_case_summary + * + * @param string|null $use_case_summary A general idea of the use case and customer. + * + * @return $this + */ + public function setUseCaseSummary(?string $use_case_summary): static + { + if (is_null($use_case_summary)) { + throw new InvalidArgumentException('non-nullable use_case_summary cannot be null'); + } + if ((mb_strlen($use_case_summary) > 500)) { + throw new InvalidArgumentException('invalid length for $use_case_summary when calling TfvSubmissionInfo., must be smaller than or equal to 500.'); + } + if ((mb_strlen($use_case_summary) < 0)) { + throw new InvalidArgumentException('invalid length for $use_case_summary when calling TfvSubmissionInfo., must be bigger than or equal to 0.'); + } + + $this->container['use_case_summary'] = $use_case_summary; + + return $this; + } + + /** + * Gets production_message_content + * + * @return string|null + */ + public function getProductionMessageContent(): ?string + { + return $this->container['production_message_content']; + } + + /** + * Sets production_message_content + * + * @param string|null $production_message_content Example of message content. + * + * @return $this + */ + public function setProductionMessageContent(?string $production_message_content): static + { + if (is_null($production_message_content)) { + throw new InvalidArgumentException('non-nullable production_message_content cannot be null'); + } + if ((mb_strlen($production_message_content) > 500)) { + throw new InvalidArgumentException('invalid length for $production_message_content when calling TfvSubmissionInfo., must be smaller than or equal to 500.'); + } + if ((mb_strlen($production_message_content) < 0)) { + throw new InvalidArgumentException('invalid length for $production_message_content when calling TfvSubmissionInfo., must be bigger than or equal to 0.'); + } + + $this->container['production_message_content'] = $production_message_content; + + return $this; + } + + /** + * Gets opt_in_workflow + * + * @return \OpenAPI\Client\Model\OptInWorkflow|null + */ + public function getOptInWorkflow(): ?\OpenAPI\Client\Model\OptInWorkflow + { + return $this->container['opt_in_workflow']; + } + + /** + * Sets opt_in_workflow + * + * @param \OpenAPI\Client\Model\OptInWorkflow|null $opt_in_workflow opt_in_workflow + * + * @return $this + */ + public function setOptInWorkflow(?\OpenAPI\Client\Model\OptInWorkflow $opt_in_workflow): static + { + if (is_null($opt_in_workflow)) { + throw new InvalidArgumentException('non-nullable opt_in_workflow cannot be null'); + } + $this->container['opt_in_workflow'] = $opt_in_workflow; + + return $this; + } + + /** + * Gets additional_information + * + * @return string|null + */ + public function getAdditionalInformation(): ?string + { + return $this->container['additional_information']; + } + + /** + * Sets additional_information + * + * @param string|null $additional_information Any additional information. + * + * @return $this + */ + public function setAdditionalInformation(?string $additional_information): static + { + if (is_null($additional_information)) { + array_push($this->openAPINullablesSetToNull, 'additional_information'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('additional_information', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($additional_information) && (mb_strlen($additional_information) > 500)) { + throw new InvalidArgumentException('invalid length for $additional_information when calling TfvSubmissionInfo., must be smaller than or equal to 500.'); + } + if (!is_null($additional_information) && (mb_strlen($additional_information) < 0)) { + throw new InvalidArgumentException('invalid length for $additional_information when calling TfvSubmissionInfo., must be bigger than or equal to 0.'); + } + + $this->container['additional_information'] = $additional_information; + + return $this; + } + + /** + * Gets isv_reseller + * + * @return string|null + */ + public function getIsvReseller(): ?string + { + return $this->container['isv_reseller']; + } + + /** + * Sets isv_reseller + * + * @param string|null $isv_reseller ISV name. + * + * @return $this + */ + public function setIsvReseller(?string $isv_reseller): static + { + if (is_null($isv_reseller)) { + array_push($this->openAPINullablesSetToNull, 'isv_reseller'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('isv_reseller', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($isv_reseller) && (mb_strlen($isv_reseller) > 500)) { + throw new InvalidArgumentException('invalid length for $isv_reseller when calling TfvSubmissionInfo., must be smaller than or equal to 500.'); + } + if (!is_null($isv_reseller) && (mb_strlen($isv_reseller) < 0)) { + throw new InvalidArgumentException('invalid length for $isv_reseller when calling TfvSubmissionInfo., must be bigger than or equal to 0.'); + } + + $this->container['isv_reseller'] = $isv_reseller; + + return $this; + } + + /** + * Gets privacy_policy_url + * + * @return string|null + */ + public function getPrivacyPolicyUrl(): ?string + { + return $this->container['privacy_policy_url']; + } + + /** + * Sets privacy_policy_url + * + * @param string|null $privacy_policy_url The Toll-Free Verification request privacy policy URL. + * + * @return $this + */ + public function setPrivacyPolicyUrl(?string $privacy_policy_url): static + { + if (is_null($privacy_policy_url)) { + throw new InvalidArgumentException('non-nullable privacy_policy_url cannot be null'); + } + if ((mb_strlen($privacy_policy_url) > 500)) { + throw new InvalidArgumentException('invalid length for $privacy_policy_url when calling TfvSubmissionInfo., must be smaller than or equal to 500.'); + } + + $this->container['privacy_policy_url'] = $privacy_policy_url; + + return $this; + } + + /** + * Gets terms_and_conditions_url + * + * @return string|null + */ + public function getTermsAndConditionsUrl(): ?string + { + return $this->container['terms_and_conditions_url']; + } + + /** + * Sets terms_and_conditions_url + * + * @param string|null $terms_and_conditions_url The Toll-Free Verification request terms and conditions policy URL. + * + * @return $this + */ + public function setTermsAndConditionsUrl(?string $terms_and_conditions_url): static + { + if (is_null($terms_and_conditions_url)) { + throw new InvalidArgumentException('non-nullable terms_and_conditions_url cannot be null'); + } + if ((mb_strlen($terms_and_conditions_url) > 500)) { + throw new InvalidArgumentException('invalid length for $terms_and_conditions_url when calling TfvSubmissionInfo., must be smaller than or equal to 500.'); + } + + $this->container['terms_and_conditions_url'] = $terms_and_conditions_url; + + return $this; + } + + /** + * Gets business_dba + * + * @return string|null + */ + public function getBusinessDba(): ?string + { + return $this->container['business_dba']; + } + + /** + * Sets business_dba + * + * @param string|null $business_dba The company 'Doing Business As'. + * + * @return $this + */ + public function setBusinessDba(?string $business_dba): static + { + if (is_null($business_dba)) { + throw new InvalidArgumentException('non-nullable business_dba cannot be null'); + } + if ((mb_strlen($business_dba) > 500)) { + throw new InvalidArgumentException('invalid length for $business_dba when calling TfvSubmissionInfo., must be smaller than or equal to 500.'); + } + + $this->container['business_dba'] = $business_dba; + + return $this; + } + + /** + * Gets business_registration_number + * + * @return string|null + */ + public function getBusinessRegistrationNumber(): ?string + { + return $this->container['business_registration_number']; + } + + /** + * Sets business_registration_number + * + * @param string|null $business_registration_number Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** + * + * @return $this + */ + public function setBusinessRegistrationNumber(?string $business_registration_number): static + { + if (is_null($business_registration_number)) { + array_push($this->openAPINullablesSetToNull, 'business_registration_number'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('business_registration_number', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($business_registration_number) && (mb_strlen($business_registration_number) > 500)) { + throw new InvalidArgumentException('invalid length for $business_registration_number when calling TfvSubmissionInfo., must be smaller than or equal to 500.'); + } + + $this->container['business_registration_number'] = $business_registration_number; + + return $this; + } + + /** + * Gets business_registration_type + * + * @return \OpenAPI\Client\Model\BusinessRegistrationTypeEnum|null + */ + public function getBusinessRegistrationType(): ?\OpenAPI\Client\Model\BusinessRegistrationTypeEnum + { + return $this->container['business_registration_type']; + } + + /** + * Sets business_registration_type + * + * @param \OpenAPI\Client\Model\BusinessRegistrationTypeEnum|null $business_registration_type business_registration_type + * + * @return $this + */ + public function setBusinessRegistrationType(?\OpenAPI\Client\Model\BusinessRegistrationTypeEnum $business_registration_type): static + { + if (is_null($business_registration_type)) { + array_push($this->openAPINullablesSetToNull, 'business_registration_type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('business_registration_type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['business_registration_type'] = $business_registration_type; + + return $this; + } + + /** + * Gets business_registration_issuing_country + * + * @return string|null + */ + public function getBusinessRegistrationIssuingCountry(): ?string + { + return $this->container['business_registration_issuing_country']; + } + + /** + * Sets business_registration_issuing_country + * + * @param string|null $business_registration_issuing_country The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | + * + * @return $this + */ + public function setBusinessRegistrationIssuingCountry(?string $business_registration_issuing_country): static + { + if (is_null($business_registration_issuing_country)) { + array_push($this->openAPINullablesSetToNull, 'business_registration_issuing_country'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('business_registration_issuing_country', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['business_registration_issuing_country'] = $business_registration_issuing_country; + + return $this; + } + + /** + * Gets business_entity_type + * + * @return \OpenAPI\Client\Model\BusinessEntityTypeEnum|null + */ + public function getBusinessEntityType(): ?\OpenAPI\Client\Model\BusinessEntityTypeEnum + { + return $this->container['business_entity_type']; + } + + /** + * Sets business_entity_type + * + * @param \OpenAPI\Client\Model\BusinessEntityTypeEnum|null $business_entity_type business_entity_type + * + * @return $this + */ + public function setBusinessEntityType(?\OpenAPI\Client\Model\BusinessEntityTypeEnum $business_entity_type): static + { + if (is_null($business_entity_type)) { + throw new InvalidArgumentException('non-nullable business_entity_type cannot be null'); + } + $this->container['business_entity_type'] = $business_entity_type; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/TfvSubmissionWrapper.php b/src/Model/TfvSubmissionWrapper.php new file mode 100644 index 00000000..842e6083 --- /dev/null +++ b/src/Model/TfvSubmissionWrapper.php @@ -0,0 +1,384 @@ + + */ +class TfvSubmissionWrapper implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'tfvSubmissionWrapper'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'submission' => '\OpenAPI\Client\Model\VerificationUpdateRequest' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'submission' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'submission' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'submission' => 'submission' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'submission' => 'setSubmission' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'submission' => 'getSubmission' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('submission', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets submission + * + * @return \OpenAPI\Client\Model\VerificationUpdateRequest|null + */ + public function getSubmission(): ?\OpenAPI\Client\Model\VerificationUpdateRequest + { + return $this->container['submission']; + } + + /** + * Sets submission + * + * @param \OpenAPI\Client\Model\VerificationUpdateRequest|null $submission submission + * + * @return $this + */ + public function setSubmission(?\OpenAPI\Client\Model\VerificationUpdateRequest $submission): static + { + if (is_null($submission)) { + throw new InvalidArgumentException('non-nullable submission cannot be null'); + } + $this->container['submission'] = $submission; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/ThumbnailAlignmentEnum.php b/src/Model/ThumbnailAlignmentEnum.php new file mode 100644 index 00000000..edbf42d0 --- /dev/null +++ b/src/Model/ThumbnailAlignmentEnum.php @@ -0,0 +1,46 @@ + + */ +class TranscribeRecording implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'transcribeRecording'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'callback_url' => 'string', + 'callback_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'username' => 'string', + 'password' => 'string', + 'tag' => 'string', + 'callback_timeout' => 'float', + 'detect_language' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'callback_url' => 'uri', + 'callback_method' => null, + 'username' => null, + 'password' => null, + 'tag' => null, + 'callback_timeout' => 'double', + 'detect_language' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'callback_url' => false, + 'callback_method' => true, + 'username' => true, + 'password' => true, + 'tag' => true, + 'callback_timeout' => true, + 'detect_language' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'callback_url' => 'callbackUrl', + 'callback_method' => 'callbackMethod', + 'username' => 'username', + 'password' => 'password', + 'tag' => 'tag', + 'callback_timeout' => 'callbackTimeout', + 'detect_language' => 'detectLanguage' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'callback_url' => 'setCallbackUrl', + 'callback_method' => 'setCallbackMethod', + 'username' => 'setUsername', + 'password' => 'setPassword', + 'tag' => 'setTag', + 'callback_timeout' => 'setCallbackTimeout', + 'detect_language' => 'setDetectLanguage' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'callback_url' => 'getCallbackUrl', + 'callback_method' => 'getCallbackMethod', + 'username' => 'getUsername', + 'password' => 'getPassword', + 'tag' => 'getTag', + 'callback_timeout' => 'getCallbackTimeout', + 'detect_language' => 'getDetectLanguage' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('callback_url', $data ?? [], null); + $this->setIfExists('callback_method', $data ?? [], null); + $this->setIfExists('username', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('callback_timeout', $data ?? [], 15); + $this->setIfExists('detect_language', $data ?? [], false); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['username']) && (mb_strlen($this->container['username']) > 1024)) { + $invalidProperties[] = "invalid value for 'username', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) > 1024)) { + $invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['callback_timeout']) && ($this->container['callback_timeout'] > 25)) { + $invalidProperties[] = "invalid value for 'callback_timeout', must be smaller than or equal to 25."; + } + + if (!is_null($this->container['callback_timeout']) && ($this->container['callback_timeout'] < 1)) { + $invalidProperties[] = "invalid value for 'callback_timeout', must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets callback_url + * + * @return string|null + */ + public function getCallbackUrl(): ?string + { + return $this->container['callback_url']; + } + + /** + * Sets callback_url + * + * @param string|null $callback_url The URL to send the [TranscriptionAvailable](/docs/voice/webhooks/transcriptionAvailable) event to. You should not include sensitive or personally-identifiable information in the callbackUrl field! Always use the proper username and password fields for authorization. + * + * @return $this + */ + public function setCallbackUrl(?string $callback_url): static + { + if (is_null($callback_url)) { + throw new InvalidArgumentException('non-nullable callback_url cannot be null'); + } + $this->container['callback_url'] = $callback_url; + + return $this; + } + + /** + * Gets callback_method + * + * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + */ + public function getCallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + { + return $this->container['callback_method']; + } + + /** + * Sets callback_method + * + * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $callback_method callback_method + * + * @return $this + */ + public function setCallbackMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $callback_method): static + { + if (is_null($callback_method)) { + array_push($this->openAPINullablesSetToNull, 'callback_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('callback_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['callback_method'] = $callback_method; + + return $this; + } + + /** + * Gets username + * + * @return string|null + */ + public function getUsername(): ?string + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string|null $username Basic auth username. + * + * @return $this + */ + public function setUsername(?string $username): static + { + if (is_null($username)) { + array_push($this->openAPINullablesSetToNull, 'username'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('username', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($username) && (mb_strlen($username) > 1024)) { + throw new InvalidArgumentException('invalid length for $username when calling TranscribeRecording., must be smaller than or equal to 1024.'); + } + + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password + * + * @return string|null + */ + public function getPassword(): ?string + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string|null $password Basic auth password. + * + * @return $this + */ + public function setPassword(?string $password): static + { + if (is_null($password)) { + array_push($this->openAPINullablesSetToNull, 'password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($password) && (mb_strlen($password) > 1024)) { + throw new InvalidArgumentException('invalid length for $password when calling TranscribeRecording., must be smaller than or equal to 1024.'); + } + + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets callback_timeout + * + * @return float|null + */ + public function getCallbackTimeout(): ?float + { + return $this->container['callback_timeout']; + } + + /** + * Sets callback_timeout + * + * @param float|null $callback_timeout This is the timeout (in seconds) to use when delivering the webhook to `callbackUrl`. Can be any numeric value (including decimals) between 1 and 25. + * + * @return $this + */ + public function setCallbackTimeout(?float $callback_timeout): static + { + if (is_null($callback_timeout)) { + array_push($this->openAPINullablesSetToNull, 'callback_timeout'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('callback_timeout', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + + if (!is_null($callback_timeout) && ($callback_timeout > 25)) { + throw new InvalidArgumentException('invalid value for $callback_timeout when calling TranscribeRecording., must be smaller than or equal to 25.'); + } + if (!is_null($callback_timeout) && ($callback_timeout < 1)) { + throw new InvalidArgumentException('invalid value for $callback_timeout when calling TranscribeRecording., must be bigger than or equal to 1.'); + } + + $this->container['callback_timeout'] = $callback_timeout; + + return $this; + } + + /** + * Gets detect_language + * + * @return bool|null + */ + public function getDetectLanguage(): ?bool + { + return $this->container['detect_language']; + } + + /** + * Sets detect_language + * + * @param bool|null $detect_language A boolean value to indicate that the recording may not be in English, and the transcription service will need to detect the dominant language the recording is in and transcribe accordingly. Current supported languages are English, French, and Spanish. + * + * @return $this + */ + public function setDetectLanguage(?bool $detect_language): static + { + if (is_null($detect_language)) { + array_push($this->openAPINullablesSetToNull, 'detect_language'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('detect_language', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['detect_language'] = $detect_language; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/Transcription.php b/src/Model/Transcription.php new file mode 100644 index 00000000..d66b03cd --- /dev/null +++ b/src/Model/Transcription.php @@ -0,0 +1,452 @@ + + */ +class Transcription implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'transcription'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'speaker' => 'int', + 'text' => 'string', + 'confidence' => 'float' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'speaker' => null, + 'text' => null, + 'confidence' => 'double' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'speaker' => false, + 'text' => false, + 'confidence' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'speaker' => 'speaker', + 'text' => 'text', + 'confidence' => 'confidence' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'speaker' => 'setSpeaker', + 'text' => 'setText', + 'confidence' => 'setConfidence' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'speaker' => 'getSpeaker', + 'text' => 'getText', + 'confidence' => 'getConfidence' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('speaker', $data ?? [], null); + $this->setIfExists('text', $data ?? [], null); + $this->setIfExists('confidence', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets speaker + * + * @return int|null + */ + public function getSpeaker(): ?int + { + return $this->container['speaker']; + } + + /** + * Sets speaker + * + * @param int|null $speaker Zero-based index identifying the speaker. + * + * @return $this + */ + public function setSpeaker(?int $speaker): static + { + if (is_null($speaker)) { + throw new InvalidArgumentException('non-nullable speaker cannot be null'); + } + $this->container['speaker'] = $speaker; + + return $this; + } + + /** + * Gets text + * + * @return string|null + */ + public function getText(): ?string + { + return $this->container['text']; + } + + /** + * Sets text + * + * @param string|null $text The transcribed text + * + * @return $this + */ + public function setText(?string $text): static + { + if (is_null($text)) { + throw new InvalidArgumentException('non-nullable text cannot be null'); + } + $this->container['text'] = $text; + + return $this; + } + + /** + * Gets confidence + * + * @return float|null + */ + public function getConfidence(): ?float + { + return $this->container['confidence']; + } + + /** + * Sets confidence + * + * @param float|null $confidence The confidence on the recognized content, ranging from `0.0` to `1.0` with `1.0` being the highest confidence. + * + * @return $this + */ + public function setConfidence(?float $confidence): static + { + if (is_null($confidence)) { + throw new InvalidArgumentException('non-nullable confidence cannot be null'); + } + $this->container['confidence'] = $confidence; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/TranscriptionAvailableCallback.php b/src/Model/TranscriptionAvailableCallback.php new file mode 100644 index 00000000..be3db547 --- /dev/null +++ b/src/Model/TranscriptionAvailableCallback.php @@ -0,0 +1,1086 @@ + + */ +class TranscriptionAvailableCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'transcriptionAvailableCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_id' => 'string', + 'call_url' => 'string', + 'media_url' => 'string', + 'parent_call_id' => 'string', + 'recording_id' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'end_time' => '\DateTime', + 'duration' => 'string', + 'file_format' => '\OpenAPI\Client\Model\FileFormatEnum', + 'tag' => 'string', + 'transcription' => '\OpenAPI\Client\Model\Transcription', + 'transfer_caller_id' => 'string', + 'transfer_to' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'call_url' => 'uri', + 'media_url' => 'uri', + 'parent_call_id' => null, + 'recording_id' => null, + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'end_time' => 'date-time', + 'duration' => null, + 'file_format' => null, + 'tag' => null, + 'transcription' => null, + 'transfer_caller_id' => null, + 'transfer_to' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'call_url' => false, + 'media_url' => true, + 'parent_call_id' => false, + 'recording_id' => false, + 'enqueued_time' => true, + 'start_time' => false, + 'end_time' => false, + 'duration' => false, + 'file_format' => false, + 'tag' => true, + 'transcription' => false, + 'transfer_caller_id' => false, + 'transfer_to' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'call_url' => 'callUrl', + 'media_url' => 'mediaUrl', + 'parent_call_id' => 'parentCallId', + 'recording_id' => 'recordingId', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'end_time' => 'endTime', + 'duration' => 'duration', + 'file_format' => 'fileFormat', + 'tag' => 'tag', + 'transcription' => 'transcription', + 'transfer_caller_id' => 'transferCallerId', + 'transfer_to' => 'transferTo' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'call_url' => 'setCallUrl', + 'media_url' => 'setMediaUrl', + 'parent_call_id' => 'setParentCallId', + 'recording_id' => 'setRecordingId', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'end_time' => 'setEndTime', + 'duration' => 'setDuration', + 'file_format' => 'setFileFormat', + 'tag' => 'setTag', + 'transcription' => 'setTranscription', + 'transfer_caller_id' => 'setTransferCallerId', + 'transfer_to' => 'setTransferTo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'call_url' => 'getCallUrl', + 'media_url' => 'getMediaUrl', + 'parent_call_id' => 'getParentCallId', + 'recording_id' => 'getRecordingId', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'end_time' => 'getEndTime', + 'duration' => 'getDuration', + 'file_format' => 'getFileFormat', + 'tag' => 'getTag', + 'transcription' => 'getTranscription', + 'transfer_caller_id' => 'getTransferCallerId', + 'transfer_to' => 'getTransferTo' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('media_url', $data ?? [], null); + $this->setIfExists('parent_call_id', $data ?? [], null); + $this->setIfExists('recording_id', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('end_time', $data ?? [], null); + $this->setIfExists('duration', $data ?? [], null); + $this->setIfExists('file_format', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('transcription', $data ?? [], null); + $this->setIfExists('transfer_caller_id', $data ?? [], null); + $this->setIfExists('transfer_to', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets media_url + * + * @return string|null + */ + public function getMediaUrl(): ?string + { + return $this->container['media_url']; + } + + /** + * Sets media_url + * + * @param string|null $media_url The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. + * + * @return $this + */ + public function setMediaUrl(?string $media_url): static + { + if (is_null($media_url)) { + array_push($this->openAPINullablesSetToNull, 'media_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('media_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['media_url'] = $media_url; + + return $this; + } + + /** + * Gets parent_call_id + * + * @return string|null + */ + public function getParentCallId(): ?string + { + return $this->container['parent_call_id']; + } + + /** + * Sets parent_call_id + * + * @param string|null $parent_call_id (optional) If the event is related to the B leg of a , the call id of the original call leg that executed the . Otherwise, this field will not be present. + * + * @return $this + */ + public function setParentCallId(?string $parent_call_id): static + { + if (is_null($parent_call_id)) { + throw new InvalidArgumentException('non-nullable parent_call_id cannot be null'); + } + $this->container['parent_call_id'] = $parent_call_id; + + return $this; + } + + /** + * Gets recording_id + * + * @return string|null + */ + public function getRecordingId(): ?string + { + return $this->container['recording_id']; + } + + /** + * Sets recording_id + * + * @param string|null $recording_id The unique ID of this recording + * + * @return $this + */ + public function setRecordingId(?string $recording_id): static + { + if (is_null($recording_id)) { + throw new InvalidArgumentException('non-nullable recording_id cannot be null'); + } + $this->container['recording_id'] = $recording_id; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets end_time + * + * @return \DateTime|null + */ + public function getEndTime(): ?\DateTime + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param \DateTime|null $end_time The time that the recording ended in ISO-8601 format + * + * @return $this + */ + public function setEndTime(?\DateTime $end_time): static + { + if (is_null($end_time)) { + throw new InvalidArgumentException('non-nullable end_time cannot be null'); + } + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets duration + * + * @return string|null + */ + public function getDuration(): ?string + { + return $this->container['duration']; + } + + /** + * Sets duration + * + * @param string|null $duration The duration of the recording in ISO-8601 format + * + * @return $this + */ + public function setDuration(?string $duration): static + { + if (is_null($duration)) { + throw new InvalidArgumentException('non-nullable duration cannot be null'); + } + $this->container['duration'] = $duration; + + return $this; + } + + /** + * Gets file_format + * + * @return \OpenAPI\Client\Model\FileFormatEnum|null + */ + public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum + { + return $this->container['file_format']; + } + + /** + * Sets file_format + * + * @param \OpenAPI\Client\Model\FileFormatEnum|null $file_format file_format + * + * @return $this + */ + public function setFileFormat(?\OpenAPI\Client\Model\FileFormatEnum $file_format): static + { + if (is_null($file_format)) { + throw new InvalidArgumentException('non-nullable file_format cannot be null'); + } + $this->container['file_format'] = $file_format; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets transcription + * + * @return \OpenAPI\Client\Model\Transcription|null + */ + public function getTranscription(): ?\OpenAPI\Client\Model\Transcription + { + return $this->container['transcription']; + } + + /** + * Sets transcription + * + * @param \OpenAPI\Client\Model\Transcription|null $transcription transcription + * + * @return $this + */ + public function setTranscription(?\OpenAPI\Client\Model\Transcription $transcription): static + { + if (is_null($transcription)) { + throw new InvalidArgumentException('non-nullable transcription cannot be null'); + } + $this->container['transcription'] = $transcription; + + return $this; + } + + /** + * Gets transfer_caller_id + * + * @return string|null + */ + public function getTransferCallerId(): ?string + { + return $this->container['transfer_caller_id']; + } + + /** + * Sets transfer_caller_id + * + * @param string|null $transfer_caller_id The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferCallerId(?string $transfer_caller_id): static + { + if (is_null($transfer_caller_id)) { + throw new InvalidArgumentException('non-nullable transfer_caller_id cannot be null'); + } + $this->container['transfer_caller_id'] = $transfer_caller_id; + + return $this; + } + + /** + * Gets transfer_to + * + * @return string|null + */ + public function getTransferTo(): ?string + { + return $this->container['transfer_to']; + } + + /** + * Sets transfer_to + * + * @param string|null $transfer_to The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferTo(?string $transfer_to): static + { + if (is_null($transfer_to)) { + throw new InvalidArgumentException('non-nullable transfer_to cannot be null'); + } + $this->container['transfer_to'] = $transfer_to; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/TransferAnswerCallback.php b/src/Model/TransferAnswerCallback.php new file mode 100644 index 00000000..88554b8d --- /dev/null +++ b/src/Model/TransferAnswerCallback.php @@ -0,0 +1,882 @@ + + */ +class TransferAnswerCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'transferAnswerCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_id' => 'string', + 'call_url' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'tag' => 'string', + 'transfer_caller_id' => 'string', + 'transfer_to' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'call_url' => 'uri', + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'tag' => null, + 'transfer_caller_id' => null, + 'transfer_to' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'call_url' => false, + 'enqueued_time' => true, + 'start_time' => false, + 'answer_time' => true, + 'tag' => true, + 'transfer_caller_id' => false, + 'transfer_to' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'call_url' => 'callUrl', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'tag' => 'tag', + 'transfer_caller_id' => 'transferCallerId', + 'transfer_to' => 'transferTo' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'call_url' => 'setCallUrl', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'tag' => 'setTag', + 'transfer_caller_id' => 'setTransferCallerId', + 'transfer_to' => 'setTransferTo' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'call_url' => 'getCallUrl', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'tag' => 'getTag', + 'transfer_caller_id' => 'getTransferCallerId', + 'transfer_to' => 'getTransferTo' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('transfer_caller_id', $data ?? [], null); + $this->setIfExists('transfer_to', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Time the call was answered, in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets transfer_caller_id + * + * @return string|null + */ + public function getTransferCallerId(): ?string + { + return $this->container['transfer_caller_id']; + } + + /** + * Sets transfer_caller_id + * + * @param string|null $transfer_caller_id The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferCallerId(?string $transfer_caller_id): static + { + if (is_null($transfer_caller_id)) { + throw new InvalidArgumentException('non-nullable transfer_caller_id cannot be null'); + } + $this->container['transfer_caller_id'] = $transfer_caller_id; + + return $this; + } + + /** + * Gets transfer_to + * + * @return string|null + */ + public function getTransferTo(): ?string + { + return $this->container['transfer_to']; + } + + /** + * Sets transfer_to + * + * @param string|null $transfer_to The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferTo(?string $transfer_to): static + { + if (is_null($transfer_to)) { + throw new InvalidArgumentException('non-nullable transfer_to cannot be null'); + } + $this->container['transfer_to'] = $transfer_to; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/TransferCompleteCallback.php b/src/Model/TransferCompleteCallback.php new file mode 100644 index 00000000..1808970e --- /dev/null +++ b/src/Model/TransferCompleteCallback.php @@ -0,0 +1,998 @@ + + */ +class TransferCompleteCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'transferCompleteCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_id' => 'string', + 'call_url' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'tag' => 'string', + 'transfer_caller_id' => 'string', + 'transfer_to' => 'string', + 'cause' => 'string', + 'error_message' => 'string', + 'error_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'call_url' => 'uri', + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'tag' => null, + 'transfer_caller_id' => null, + 'transfer_to' => null, + 'cause' => null, + 'error_message' => null, + 'error_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'call_url' => false, + 'enqueued_time' => true, + 'start_time' => false, + 'answer_time' => true, + 'tag' => true, + 'transfer_caller_id' => false, + 'transfer_to' => false, + 'cause' => false, + 'error_message' => true, + 'error_id' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'call_url' => 'callUrl', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'tag' => 'tag', + 'transfer_caller_id' => 'transferCallerId', + 'transfer_to' => 'transferTo', + 'cause' => 'cause', + 'error_message' => 'errorMessage', + 'error_id' => 'errorId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'call_url' => 'setCallUrl', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'tag' => 'setTag', + 'transfer_caller_id' => 'setTransferCallerId', + 'transfer_to' => 'setTransferTo', + 'cause' => 'setCause', + 'error_message' => 'setErrorMessage', + 'error_id' => 'setErrorId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'call_url' => 'getCallUrl', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'tag' => 'getTag', + 'transfer_caller_id' => 'getTransferCallerId', + 'transfer_to' => 'getTransferTo', + 'cause' => 'getCause', + 'error_message' => 'getErrorMessage', + 'error_id' => 'getErrorId' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('transfer_caller_id', $data ?? [], null); + $this->setIfExists('transfer_to', $data ?? [], null); + $this->setIfExists('cause', $data ?? [], null); + $this->setIfExists('error_message', $data ?? [], null); + $this->setIfExists('error_id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Time the call was answered, in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets transfer_caller_id + * + * @return string|null + */ + public function getTransferCallerId(): ?string + { + return $this->container['transfer_caller_id']; + } + + /** + * Sets transfer_caller_id + * + * @param string|null $transfer_caller_id The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferCallerId(?string $transfer_caller_id): static + { + if (is_null($transfer_caller_id)) { + throw new InvalidArgumentException('non-nullable transfer_caller_id cannot be null'); + } + $this->container['transfer_caller_id'] = $transfer_caller_id; + + return $this; + } + + /** + * Gets transfer_to + * + * @return string|null + */ + public function getTransferTo(): ?string + { + return $this->container['transfer_to']; + } + + /** + * Sets transfer_to + * + * @param string|null $transfer_to The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferTo(?string $transfer_to): static + { + if (is_null($transfer_to)) { + throw new InvalidArgumentException('non-nullable transfer_to cannot be null'); + } + $this->container['transfer_to'] = $transfer_to; + + return $this; + } + + /** + * Gets cause + * + * @return string|null + */ + public function getCause(): ?string + { + return $this->container['cause']; + } + + /** + * Sets cause + * + * @param string|null $cause Reason the call failed - hangup, busy, timeout, cancel, rejected, callback-error, invalid-bxml, application-error, account-limit, node-capacity-exceeded, error, or unknown. + * + * @return $this + */ + public function setCause(?string $cause): static + { + if (is_null($cause)) { + throw new InvalidArgumentException('non-nullable cause cannot be null'); + } + $this->container['cause'] = $cause; + + return $this; + } + + /** + * Gets error_message + * + * @return string|null + */ + public function getErrorMessage(): ?string + { + return $this->container['error_message']; + } + + /** + * Sets error_message + * + * @param string|null $error_message Text explaining the reason that caused the call to fail in case of errors. + * + * @return $this + */ + public function setErrorMessage(?string $error_message): static + { + if (is_null($error_message)) { + array_push($this->openAPINullablesSetToNull, 'error_message'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('error_message', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['error_message'] = $error_message; + + return $this; + } + + /** + * Gets error_id + * + * @return string|null + */ + public function getErrorId(): ?string + { + return $this->container['error_id']; + } + + /** + * Sets error_id + * + * @param string|null $error_id Bandwidth's internal id that references the error event. + * + * @return $this + */ + public function setErrorId(?string $error_id): static + { + if (is_null($error_id)) { + array_push($this->openAPINullablesSetToNull, 'error_id'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('error_id', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['error_id'] = $error_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/TransferDisconnectCallback.php b/src/Model/TransferDisconnectCallback.php new file mode 100644 index 00000000..22292e31 --- /dev/null +++ b/src/Model/TransferDisconnectCallback.php @@ -0,0 +1,1066 @@ + + */ +class TransferDisconnectCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'transferDisconnectCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'call_id' => 'string', + 'call_url' => 'string', + 'parent_call_id' => 'string', + 'enqueued_time' => '\DateTime', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'end_time' => '\DateTime', + 'tag' => 'string', + 'transfer_caller_id' => 'string', + 'transfer_to' => 'string', + 'cause' => 'string', + 'error_message' => 'string', + 'error_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'call_url' => 'uri', + 'parent_call_id' => null, + 'enqueued_time' => 'date-time', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'end_time' => 'date-time', + 'tag' => null, + 'transfer_caller_id' => null, + 'transfer_to' => null, + 'cause' => null, + 'error_message' => null, + 'error_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'call_url' => false, + 'parent_call_id' => false, + 'enqueued_time' => true, + 'start_time' => false, + 'answer_time' => true, + 'end_time' => false, + 'tag' => true, + 'transfer_caller_id' => false, + 'transfer_to' => false, + 'cause' => false, + 'error_message' => true, + 'error_id' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'call_url' => 'callUrl', + 'parent_call_id' => 'parentCallId', + 'enqueued_time' => 'enqueuedTime', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'end_time' => 'endTime', + 'tag' => 'tag', + 'transfer_caller_id' => 'transferCallerId', + 'transfer_to' => 'transferTo', + 'cause' => 'cause', + 'error_message' => 'errorMessage', + 'error_id' => 'errorId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'call_url' => 'setCallUrl', + 'parent_call_id' => 'setParentCallId', + 'enqueued_time' => 'setEnqueuedTime', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'end_time' => 'setEndTime', + 'tag' => 'setTag', + 'transfer_caller_id' => 'setTransferCallerId', + 'transfer_to' => 'setTransferTo', + 'cause' => 'setCause', + 'error_message' => 'setErrorMessage', + 'error_id' => 'setErrorId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'call_url' => 'getCallUrl', + 'parent_call_id' => 'getParentCallId', + 'enqueued_time' => 'getEnqueuedTime', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'end_time' => 'getEndTime', + 'tag' => 'getTag', + 'transfer_caller_id' => 'getTransferCallerId', + 'transfer_to' => 'getTransferTo', + 'cause' => 'getCause', + 'error_message' => 'getErrorMessage', + 'error_id' => 'getErrorId' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('parent_call_id', $data ?? [], null); + $this->setIfExists('enqueued_time', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('end_time', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('transfer_caller_id', $data ?? [], null); + $this->setIfExists('transfer_to', $data ?? [], null); + $this->setIfExists('cause', $data ?? [], null); + $this->setIfExists('error_message', $data ?? [], null); + $this->setIfExists('error_id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \OpenAPI\Client\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets parent_call_id + * + * @return string|null + */ + public function getParentCallId(): ?string + { + return $this->container['parent_call_id']; + } + + /** + * Sets parent_call_id + * + * @param string|null $parent_call_id (optional) If the event is related to the B leg of a , the call id of the original call leg that executed the . Otherwise, this field will not be present. + * + * @return $this + */ + public function setParentCallId(?string $parent_call_id): static + { + if (is_null($parent_call_id)) { + throw new InvalidArgumentException('non-nullable parent_call_id cannot be null'); + } + $this->container['parent_call_id'] = $parent_call_id; + + return $this; + } + + /** + * Gets enqueued_time + * + * @return \DateTime|null + */ + public function getEnqueuedTime(): ?\DateTime + { + return $this->container['enqueued_time']; + } + + /** + * Sets enqueued_time + * + * @param \DateTime|null $enqueued_time (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. + * + * @return $this + */ + public function setEnqueuedTime(?\DateTime $enqueued_time): static + { + if (is_null($enqueued_time)) { + array_push($this->openAPINullablesSetToNull, 'enqueued_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('enqueued_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['enqueued_time'] = $enqueued_time; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Time the call was answered, in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets end_time + * + * @return \DateTime|null + */ + public function getEndTime(): ?\DateTime + { + return $this->container['end_time']; + } + + /** + * Sets end_time + * + * @param \DateTime|null $end_time The time that the recording ended in ISO-8601 format + * + * @return $this + */ + public function setEndTime(?\DateTime $end_time): static + { + if (is_null($end_time)) { + throw new InvalidArgumentException('non-nullable end_time cannot be null'); + } + $this->container['end_time'] = $end_time; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets transfer_caller_id + * + * @return string|null + */ + public function getTransferCallerId(): ?string + { + return $this->container['transfer_caller_id']; + } + + /** + * Sets transfer_caller_id + * + * @param string|null $transfer_caller_id The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferCallerId(?string $transfer_caller_id): static + { + if (is_null($transfer_caller_id)) { + throw new InvalidArgumentException('non-nullable transfer_caller_id cannot be null'); + } + $this->container['transfer_caller_id'] = $transfer_caller_id; + + return $this; + } + + /** + * Gets transfer_to + * + * @return string|null + */ + public function getTransferTo(): ?string + { + return $this->container['transfer_to']; + } + + /** + * Sets transfer_to + * + * @param string|null $transfer_to The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTransferTo(?string $transfer_to): static + { + if (is_null($transfer_to)) { + throw new InvalidArgumentException('non-nullable transfer_to cannot be null'); + } + $this->container['transfer_to'] = $transfer_to; + + return $this; + } + + /** + * Gets cause + * + * @return string|null + */ + public function getCause(): ?string + { + return $this->container['cause']; + } + + /** + * Sets cause + * + * @param string|null $cause Reason the call failed - hangup, busy, timeout, cancel, rejected, callback-error, invalid-bxml, application-error, account-limit, node-capacity-exceeded, error, or unknown. + * + * @return $this + */ + public function setCause(?string $cause): static + { + if (is_null($cause)) { + throw new InvalidArgumentException('non-nullable cause cannot be null'); + } + $this->container['cause'] = $cause; + + return $this; + } + + /** + * Gets error_message + * + * @return string|null + */ + public function getErrorMessage(): ?string + { + return $this->container['error_message']; + } + + /** + * Sets error_message + * + * @param string|null $error_message Text explaining the reason that caused the call to fail in case of errors. + * + * @return $this + */ + public function setErrorMessage(?string $error_message): static + { + if (is_null($error_message)) { + array_push($this->openAPINullablesSetToNull, 'error_message'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('error_message', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['error_message'] = $error_message; + + return $this; + } + + /** + * Gets error_id + * + * @return string|null + */ + public function getErrorId(): ?string + { + return $this->container['error_id']; + } + + /** + * Sets error_id + * + * @param string|null $error_id Bandwidth's internal id that references the error event. + * + * @return $this + */ + public function setErrorId(?string $error_id): static + { + if (is_null($error_id)) { + array_push($this->openAPINullablesSetToNull, 'error_id'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('error_id', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['error_id'] = $error_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/UpdateCall.php b/src/Model/UpdateCall.php new file mode 100644 index 00000000..a2ebc440 --- /dev/null +++ b/src/Model/UpdateCall.php @@ -0,0 +1,800 @@ + + */ +class UpdateCall implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'updateCall'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'state' => '\OpenAPI\Client\Model\CallStateEnum', + 'redirect_url' => 'string', + 'redirect_method' => '\OpenAPI\Client\Model\RedirectMethodEnum', + 'username' => 'string', + 'password' => 'string', + 'redirect_fallback_url' => 'string', + 'redirect_fallback_method' => '\OpenAPI\Client\Model\RedirectMethodEnum', + 'fallback_username' => 'string', + 'fallback_password' => 'string', + 'tag' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'state' => null, + 'redirect_url' => 'uri', + 'redirect_method' => null, + 'username' => null, + 'password' => null, + 'redirect_fallback_url' => 'uri', + 'redirect_fallback_method' => null, + 'fallback_username' => null, + 'fallback_password' => null, + 'tag' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'state' => true, + 'redirect_url' => true, + 'redirect_method' => true, + 'username' => true, + 'password' => true, + 'redirect_fallback_url' => true, + 'redirect_fallback_method' => true, + 'fallback_username' => true, + 'fallback_password' => true, + 'tag' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'state' => 'state', + 'redirect_url' => 'redirectUrl', + 'redirect_method' => 'redirectMethod', + 'username' => 'username', + 'password' => 'password', + 'redirect_fallback_url' => 'redirectFallbackUrl', + 'redirect_fallback_method' => 'redirectFallbackMethod', + 'fallback_username' => 'fallbackUsername', + 'fallback_password' => 'fallbackPassword', + 'tag' => 'tag' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'state' => 'setState', + 'redirect_url' => 'setRedirectUrl', + 'redirect_method' => 'setRedirectMethod', + 'username' => 'setUsername', + 'password' => 'setPassword', + 'redirect_fallback_url' => 'setRedirectFallbackUrl', + 'redirect_fallback_method' => 'setRedirectFallbackMethod', + 'fallback_username' => 'setFallbackUsername', + 'fallback_password' => 'setFallbackPassword', + 'tag' => 'setTag' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'state' => 'getState', + 'redirect_url' => 'getRedirectUrl', + 'redirect_method' => 'getRedirectMethod', + 'username' => 'getUsername', + 'password' => 'getPassword', + 'redirect_fallback_url' => 'getRedirectFallbackUrl', + 'redirect_fallback_method' => 'getRedirectFallbackMethod', + 'fallback_username' => 'getFallbackUsername', + 'fallback_password' => 'getFallbackPassword', + 'tag' => 'getTag' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + $this->setIfExists('redirect_url', $data ?? [], null); + $this->setIfExists('redirect_method', $data ?? [], null); + $this->setIfExists('username', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('redirect_fallback_url', $data ?? [], null); + $this->setIfExists('redirect_fallback_method', $data ?? [], null); + $this->setIfExists('fallback_username', $data ?? [], null); + $this->setIfExists('fallback_password', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['username']) && (mb_strlen($this->container['username']) > 1024)) { + $invalidProperties[] = "invalid value for 'username', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) > 1024)) { + $invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['fallback_username']) && (mb_strlen($this->container['fallback_username']) > 1024)) { + $invalidProperties[] = "invalid value for 'fallback_username', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['fallback_password']) && (mb_strlen($this->container['fallback_password']) > 1024)) { + $invalidProperties[] = "invalid value for 'fallback_password', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['tag']) && (mb_strlen($this->container['tag']) > 4096)) { + $invalidProperties[] = "invalid value for 'tag', the character length must be smaller than or equal to 4096."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return \OpenAPI\Client\Model\CallStateEnum|null + */ + public function getState(): ?\OpenAPI\Client\Model\CallStateEnum + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param \OpenAPI\Client\Model\CallStateEnum|null $state state + * + * @return $this + */ + public function setState(?\OpenAPI\Client\Model\CallStateEnum $state): static + { + if (is_null($state)) { + array_push($this->openAPINullablesSetToNull, 'state'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('state', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['state'] = $state; + + return $this; + } + + /** + * Gets redirect_url + * + * @return string|null + */ + public function getRedirectUrl(): ?string + { + return $this->container['redirect_url']; + } + + /** + * Sets redirect_url + * + * @param string|null $redirect_url The URL to send the [Redirect](/docs/voice/bxml/redirect) event to which will provide new BXML. Required if `state` is `active`. Not allowed if `state` is `completed`. + * + * @return $this + */ + public function setRedirectUrl(?string $redirect_url): static + { + if (is_null($redirect_url)) { + array_push($this->openAPINullablesSetToNull, 'redirect_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('redirect_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['redirect_url'] = $redirect_url; + + return $this; + } + + /** + * Gets redirect_method + * + * @return \OpenAPI\Client\Model\RedirectMethodEnum|null + */ + public function getRedirectMethod(): ?\OpenAPI\Client\Model\RedirectMethodEnum + { + return $this->container['redirect_method']; + } + + /** + * Sets redirect_method + * + * @param \OpenAPI\Client\Model\RedirectMethodEnum|null $redirect_method redirect_method + * + * @return $this + */ + public function setRedirectMethod(?\OpenAPI\Client\Model\RedirectMethodEnum $redirect_method): static + { + if (is_null($redirect_method)) { + array_push($this->openAPINullablesSetToNull, 'redirect_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('redirect_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['redirect_method'] = $redirect_method; + + return $this; + } + + /** + * Gets username + * + * @return string|null + */ + public function getUsername(): ?string + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string|null $username Basic auth username. + * + * @return $this + */ + public function setUsername(?string $username): static + { + if (is_null($username)) { + array_push($this->openAPINullablesSetToNull, 'username'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('username', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($username) && (mb_strlen($username) > 1024)) { + throw new InvalidArgumentException('invalid length for $username when calling UpdateCall., must be smaller than or equal to 1024.'); + } + + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password + * + * @return string|null + */ + public function getPassword(): ?string + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string|null $password Basic auth password. + * + * @return $this + */ + public function setPassword(?string $password): static + { + if (is_null($password)) { + array_push($this->openAPINullablesSetToNull, 'password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($password) && (mb_strlen($password) > 1024)) { + throw new InvalidArgumentException('invalid length for $password when calling UpdateCall., must be smaller than or equal to 1024.'); + } + + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets redirect_fallback_url + * + * @return string|null + */ + public function getRedirectFallbackUrl(): ?string + { + return $this->container['redirect_fallback_url']; + } + + /** + * Sets redirect_fallback_url + * + * @param string|null $redirect_fallback_url A fallback url which, if provided, will be used to retry the redirect callback delivery in case `redirectUrl` fails to respond. + * + * @return $this + */ + public function setRedirectFallbackUrl(?string $redirect_fallback_url): static + { + if (is_null($redirect_fallback_url)) { + array_push($this->openAPINullablesSetToNull, 'redirect_fallback_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('redirect_fallback_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['redirect_fallback_url'] = $redirect_fallback_url; + + return $this; + } + + /** + * Gets redirect_fallback_method + * + * @return \OpenAPI\Client\Model\RedirectMethodEnum|null + */ + public function getRedirectFallbackMethod(): ?\OpenAPI\Client\Model\RedirectMethodEnum + { + return $this->container['redirect_fallback_method']; + } + + /** + * Sets redirect_fallback_method + * + * @param \OpenAPI\Client\Model\RedirectMethodEnum|null $redirect_fallback_method redirect_fallback_method + * + * @return $this + */ + public function setRedirectFallbackMethod(?\OpenAPI\Client\Model\RedirectMethodEnum $redirect_fallback_method): static + { + if (is_null($redirect_fallback_method)) { + array_push($this->openAPINullablesSetToNull, 'redirect_fallback_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('redirect_fallback_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['redirect_fallback_method'] = $redirect_fallback_method; + + return $this; + } + + /** + * Gets fallback_username + * + * @return string|null + */ + public function getFallbackUsername(): ?string + { + return $this->container['fallback_username']; + } + + /** + * Sets fallback_username + * + * @param string|null $fallback_username Basic auth username. + * + * @return $this + */ + public function setFallbackUsername(?string $fallback_username): static + { + if (is_null($fallback_username)) { + array_push($this->openAPINullablesSetToNull, 'fallback_username'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fallback_username', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($fallback_username) && (mb_strlen($fallback_username) > 1024)) { + throw new InvalidArgumentException('invalid length for $fallback_username when calling UpdateCall., must be smaller than or equal to 1024.'); + } + + $this->container['fallback_username'] = $fallback_username; + + return $this; + } + + /** + * Gets fallback_password + * + * @return string|null + */ + public function getFallbackPassword(): ?string + { + return $this->container['fallback_password']; + } + + /** + * Sets fallback_password + * + * @param string|null $fallback_password Basic auth password. + * + * @return $this + */ + public function setFallbackPassword(?string $fallback_password): static + { + if (is_null($fallback_password)) { + array_push($this->openAPINullablesSetToNull, 'fallback_password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fallback_password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($fallback_password) && (mb_strlen($fallback_password) > 1024)) { + throw new InvalidArgumentException('invalid length for $fallback_password when calling UpdateCall., must be smaller than or equal to 1024.'); + } + + $this->container['fallback_password'] = $fallback_password; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [``](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 4096 characters. Not allowed if `state` is `completed`. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($tag) && (mb_strlen($tag) > 4096)) { + throw new InvalidArgumentException('invalid length for $tag when calling UpdateCall., must be smaller than or equal to 4096.'); + } + + $this->container['tag'] = $tag; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/UpdateCallRecording.php b/src/Model/UpdateCallRecording.php new file mode 100644 index 00000000..48309c5a --- /dev/null +++ b/src/Model/UpdateCallRecording.php @@ -0,0 +1,387 @@ + + */ +class UpdateCallRecording implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'updateCallRecording'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'state' => '\OpenAPI\Client\Model\RecordingStateEnum' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'state' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'state' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'state' => 'state' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'state' => 'setState' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'state' => 'getState' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('state', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['state'] === null) { + $invalidProperties[] = "'state' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets state + * + * @return \OpenAPI\Client\Model\RecordingStateEnum + */ + public function getState(): \OpenAPI\Client\Model\RecordingStateEnum + { + return $this->container['state']; + } + + /** + * Sets state + * + * @param \OpenAPI\Client\Model\RecordingStateEnum $state state + * + * @return $this + */ + public function setState(\OpenAPI\Client\Model\RecordingStateEnum $state): static + { + if (is_null($state)) { + throw new InvalidArgumentException('non-nullable state cannot be null'); + } + $this->container['state'] = $state; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/UpdateConference.php b/src/Model/UpdateConference.php new file mode 100644 index 00000000..83da938c --- /dev/null +++ b/src/Model/UpdateConference.php @@ -0,0 +1,751 @@ + + */ +class UpdateConference implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'updateConference'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'status' => '\OpenAPI\Client\Model\ConferenceStateEnum', + 'redirect_url' => 'string', + 'redirect_method' => '\OpenAPI\Client\Model\RedirectMethodEnum', + 'username' => 'string', + 'password' => 'string', + 'redirect_fallback_url' => 'string', + 'redirect_fallback_method' => '\OpenAPI\Client\Model\RedirectMethodEnum', + 'fallback_username' => 'string', + 'fallback_password' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'status' => null, + 'redirect_url' => 'uri', + 'redirect_method' => null, + 'username' => null, + 'password' => null, + 'redirect_fallback_url' => 'uri', + 'redirect_fallback_method' => null, + 'fallback_username' => null, + 'fallback_password' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'status' => true, + 'redirect_url' => true, + 'redirect_method' => true, + 'username' => true, + 'password' => true, + 'redirect_fallback_url' => true, + 'redirect_fallback_method' => true, + 'fallback_username' => true, + 'fallback_password' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'status' => 'status', + 'redirect_url' => 'redirectUrl', + 'redirect_method' => 'redirectMethod', + 'username' => 'username', + 'password' => 'password', + 'redirect_fallback_url' => 'redirectFallbackUrl', + 'redirect_fallback_method' => 'redirectFallbackMethod', + 'fallback_username' => 'fallbackUsername', + 'fallback_password' => 'fallbackPassword' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'status' => 'setStatus', + 'redirect_url' => 'setRedirectUrl', + 'redirect_method' => 'setRedirectMethod', + 'username' => 'setUsername', + 'password' => 'setPassword', + 'redirect_fallback_url' => 'setRedirectFallbackUrl', + 'redirect_fallback_method' => 'setRedirectFallbackMethod', + 'fallback_username' => 'setFallbackUsername', + 'fallback_password' => 'setFallbackPassword' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'status' => 'getStatus', + 'redirect_url' => 'getRedirectUrl', + 'redirect_method' => 'getRedirectMethod', + 'username' => 'getUsername', + 'password' => 'getPassword', + 'redirect_fallback_url' => 'getRedirectFallbackUrl', + 'redirect_fallback_method' => 'getRedirectFallbackMethod', + 'fallback_username' => 'getFallbackUsername', + 'fallback_password' => 'getFallbackPassword' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('redirect_url', $data ?? [], null); + $this->setIfExists('redirect_method', $data ?? [], null); + $this->setIfExists('username', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + $this->setIfExists('redirect_fallback_url', $data ?? [], null); + $this->setIfExists('redirect_fallback_method', $data ?? [], null); + $this->setIfExists('fallback_username', $data ?? [], null); + $this->setIfExists('fallback_password', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['username']) && (mb_strlen($this->container['username']) > 1024)) { + $invalidProperties[] = "invalid value for 'username', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) > 1024)) { + $invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['fallback_username']) && (mb_strlen($this->container['fallback_username']) > 1024)) { + $invalidProperties[] = "invalid value for 'fallback_username', the character length must be smaller than or equal to 1024."; + } + + if (!is_null($this->container['fallback_password']) && (mb_strlen($this->container['fallback_password']) > 1024)) { + $invalidProperties[] = "invalid value for 'fallback_password', the character length must be smaller than or equal to 1024."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets status + * + * @return \OpenAPI\Client\Model\ConferenceStateEnum|null + */ + public function getStatus(): ?\OpenAPI\Client\Model\ConferenceStateEnum + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\ConferenceStateEnum|null $status status + * + * @return $this + */ + public function setStatus(?\OpenAPI\Client\Model\ConferenceStateEnum $status): static + { + if (is_null($status)) { + array_push($this->openAPINullablesSetToNull, 'status'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('status', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets redirect_url + * + * @return string|null + */ + public function getRedirectUrl(): ?string + { + return $this->container['redirect_url']; + } + + /** + * Sets redirect_url + * + * @param string|null $redirect_url The URL to send the [conferenceRedirect](/docs/voice/webhooks/conferenceRedirect) event which will provide new BXML. Not allowed if `state` is `completed`, but required if `state` is `active`. + * + * @return $this + */ + public function setRedirectUrl(?string $redirect_url): static + { + if (is_null($redirect_url)) { + array_push($this->openAPINullablesSetToNull, 'redirect_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('redirect_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['redirect_url'] = $redirect_url; + + return $this; + } + + /** + * Gets redirect_method + * + * @return \OpenAPI\Client\Model\RedirectMethodEnum|null + */ + public function getRedirectMethod(): ?\OpenAPI\Client\Model\RedirectMethodEnum + { + return $this->container['redirect_method']; + } + + /** + * Sets redirect_method + * + * @param \OpenAPI\Client\Model\RedirectMethodEnum|null $redirect_method redirect_method + * + * @return $this + */ + public function setRedirectMethod(?\OpenAPI\Client\Model\RedirectMethodEnum $redirect_method): static + { + if (is_null($redirect_method)) { + array_push($this->openAPINullablesSetToNull, 'redirect_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('redirect_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['redirect_method'] = $redirect_method; + + return $this; + } + + /** + * Gets username + * + * @return string|null + */ + public function getUsername(): ?string + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string|null $username Basic auth username. + * + * @return $this + */ + public function setUsername(?string $username): static + { + if (is_null($username)) { + array_push($this->openAPINullablesSetToNull, 'username'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('username', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($username) && (mb_strlen($username) > 1024)) { + throw new InvalidArgumentException('invalid length for $username when calling UpdateConference., must be smaller than or equal to 1024.'); + } + + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password + * + * @return string|null + */ + public function getPassword(): ?string + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string|null $password Basic auth password. + * + * @return $this + */ + public function setPassword(?string $password): static + { + if (is_null($password)) { + array_push($this->openAPINullablesSetToNull, 'password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($password) && (mb_strlen($password) > 1024)) { + throw new InvalidArgumentException('invalid length for $password when calling UpdateConference., must be smaller than or equal to 1024.'); + } + + $this->container['password'] = $password; + + return $this; + } + + /** + * Gets redirect_fallback_url + * + * @return string|null + */ + public function getRedirectFallbackUrl(): ?string + { + return $this->container['redirect_fallback_url']; + } + + /** + * Sets redirect_fallback_url + * + * @param string|null $redirect_fallback_url A fallback url which, if provided, will be used to retry the `conferenceRedirect` webhook delivery in case `redirectUrl` fails to respond. Not allowed if `state` is `completed`. + * + * @return $this + */ + public function setRedirectFallbackUrl(?string $redirect_fallback_url): static + { + if (is_null($redirect_fallback_url)) { + array_push($this->openAPINullablesSetToNull, 'redirect_fallback_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('redirect_fallback_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['redirect_fallback_url'] = $redirect_fallback_url; + + return $this; + } + + /** + * Gets redirect_fallback_method + * + * @return \OpenAPI\Client\Model\RedirectMethodEnum|null + */ + public function getRedirectFallbackMethod(): ?\OpenAPI\Client\Model\RedirectMethodEnum + { + return $this->container['redirect_fallback_method']; + } + + /** + * Sets redirect_fallback_method + * + * @param \OpenAPI\Client\Model\RedirectMethodEnum|null $redirect_fallback_method redirect_fallback_method + * + * @return $this + */ + public function setRedirectFallbackMethod(?\OpenAPI\Client\Model\RedirectMethodEnum $redirect_fallback_method): static + { + if (is_null($redirect_fallback_method)) { + array_push($this->openAPINullablesSetToNull, 'redirect_fallback_method'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('redirect_fallback_method', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['redirect_fallback_method'] = $redirect_fallback_method; + + return $this; + } + + /** + * Gets fallback_username + * + * @return string|null + */ + public function getFallbackUsername(): ?string + { + return $this->container['fallback_username']; + } + + /** + * Sets fallback_username + * + * @param string|null $fallback_username Basic auth username. + * + * @return $this + */ + public function setFallbackUsername(?string $fallback_username): static + { + if (is_null($fallback_username)) { + array_push($this->openAPINullablesSetToNull, 'fallback_username'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fallback_username', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($fallback_username) && (mb_strlen($fallback_username) > 1024)) { + throw new InvalidArgumentException('invalid length for $fallback_username when calling UpdateConference., must be smaller than or equal to 1024.'); + } + + $this->container['fallback_username'] = $fallback_username; + + return $this; + } + + /** + * Gets fallback_password + * + * @return string|null + */ + public function getFallbackPassword(): ?string + { + return $this->container['fallback_password']; + } + + /** + * Sets fallback_password + * + * @param string|null $fallback_password Basic auth password. + * + * @return $this + */ + public function setFallbackPassword(?string $fallback_password): static + { + if (is_null($fallback_password)) { + array_push($this->openAPINullablesSetToNull, 'fallback_password'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('fallback_password', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($fallback_password) && (mb_strlen($fallback_password) > 1024)) { + throw new InvalidArgumentException('invalid length for $fallback_password when calling UpdateConference., must be smaller than or equal to 1024.'); + } + + $this->container['fallback_password'] = $fallback_password; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/UpdateConferenceMember.php b/src/Model/UpdateConferenceMember.php new file mode 100644 index 00000000..a0a8c8c0 --- /dev/null +++ b/src/Model/UpdateConferenceMember.php @@ -0,0 +1,459 @@ + + */ +class UpdateConferenceMember implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'updateConferenceMember'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'mute' => 'bool', + 'hold' => 'bool', + 'call_ids_to_coach' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'mute' => null, + 'hold' => null, + 'call_ids_to_coach' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'mute' => false, + 'hold' => false, + 'call_ids_to_coach' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'mute' => 'mute', + 'hold' => 'hold', + 'call_ids_to_coach' => 'callIdsToCoach' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'mute' => 'setMute', + 'hold' => 'setHold', + 'call_ids_to_coach' => 'setCallIdsToCoach' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'mute' => 'getMute', + 'hold' => 'getHold', + 'call_ids_to_coach' => 'getCallIdsToCoach' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('mute', $data ?? [], null); + $this->setIfExists('hold', $data ?? [], null); + $this->setIfExists('call_ids_to_coach', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets mute + * + * @return bool|null + */ + public function getMute(): ?bool + { + return $this->container['mute']; + } + + /** + * Sets mute + * + * @param bool|null $mute Whether or not this member is currently muted. Members who are muted are still able to hear other participants. Updates this member's mute status. Has no effect if omitted. + * + * @return $this + */ + public function setMute(?bool $mute): static + { + if (is_null($mute)) { + throw new InvalidArgumentException('non-nullable mute cannot be null'); + } + $this->container['mute'] = $mute; + + return $this; + } + + /** + * Gets hold + * + * @return bool|null + */ + public function getHold(): ?bool + { + return $this->container['hold']; + } + + /** + * Sets hold + * + * @param bool|null $hold Whether or not this member is currently on hold. Members who are on hold are not able to hear or speak in the conference. Updates this member's hold status. Has no effect if omitted. + * + * @return $this + */ + public function setHold(?bool $hold): static + { + if (is_null($hold)) { + throw new InvalidArgumentException('non-nullable hold cannot be null'); + } + $this->container['hold'] = $hold; + + return $this; + } + + /** + * Gets call_ids_to_coach + * + * @return string[]|null + */ + public function getCallIdsToCoach(): ?array + { + return $this->container['call_ids_to_coach']; + } + + /** + * Sets call_ids_to_coach + * + * @param string[]|null $call_ids_to_coach If this member had a value set for `callIdsToCoach` in its [Conference](/docs/voice/bxml/conference) verb or this list was added with a previous PUT request to modify the member, this is that list of calls. Modifies the calls that this member is coaching. Has no effect if omitted. See the documentation for the [Conference](/docs/voice/bxml/conference) verb for more details about coaching. Note that this will not add the matching calls to the conference; each call must individually execute a Conference verb to join. + * + * @return $this + */ + public function setCallIdsToCoach(?array $call_ids_to_coach): static + { + if (is_null($call_ids_to_coach)) { + array_push($this->openAPINullablesSetToNull, 'call_ids_to_coach'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('call_ids_to_coach', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['call_ids_to_coach'] = $call_ids_to_coach; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/VerificationDenialWebhook.php b/src/Model/VerificationDenialWebhook.php new file mode 100644 index 00000000..c3f43b89 --- /dev/null +++ b/src/Model/VerificationDenialWebhook.php @@ -0,0 +1,712 @@ + + */ +class VerificationDenialWebhook implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'verificationDenialWebhook'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'account_id' => 'string', + 'additional_denial_reasons' => '\OpenAPI\Client\Model\AdditionalDenialReason[]', + 'decline_reason_description' => 'string', + 'denial_status_code' => 'int', + 'internal_ticket_number' => 'string', + 'phone_number' => 'string', + 'resubmit_allowed' => 'bool', + 'status' => 'string', + 'blocked' => 'bool', + 'blocked_reason' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'account_id' => null, + 'additional_denial_reasons' => null, + 'decline_reason_description' => null, + 'denial_status_code' => null, + 'internal_ticket_number' => null, + 'phone_number' => null, + 'resubmit_allowed' => null, + 'status' => null, + 'blocked' => null, + 'blocked_reason' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'account_id' => false, + 'additional_denial_reasons' => false, + 'decline_reason_description' => false, + 'denial_status_code' => false, + 'internal_ticket_number' => false, + 'phone_number' => false, + 'resubmit_allowed' => false, + 'status' => false, + 'blocked' => false, + 'blocked_reason' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'account_id' => 'accountId', + 'additional_denial_reasons' => 'additionalDenialReasons', + 'decline_reason_description' => 'declineReasonDescription', + 'denial_status_code' => 'denialStatusCode', + 'internal_ticket_number' => 'internalTicketNumber', + 'phone_number' => 'phoneNumber', + 'resubmit_allowed' => 'resubmitAllowed', + 'status' => 'status', + 'blocked' => 'blocked', + 'blocked_reason' => 'blockedReason' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'account_id' => 'setAccountId', + 'additional_denial_reasons' => 'setAdditionalDenialReasons', + 'decline_reason_description' => 'setDeclineReasonDescription', + 'denial_status_code' => 'setDenialStatusCode', + 'internal_ticket_number' => 'setInternalTicketNumber', + 'phone_number' => 'setPhoneNumber', + 'resubmit_allowed' => 'setResubmitAllowed', + 'status' => 'setStatus', + 'blocked' => 'setBlocked', + 'blocked_reason' => 'setBlockedReason' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'account_id' => 'getAccountId', + 'additional_denial_reasons' => 'getAdditionalDenialReasons', + 'decline_reason_description' => 'getDeclineReasonDescription', + 'denial_status_code' => 'getDenialStatusCode', + 'internal_ticket_number' => 'getInternalTicketNumber', + 'phone_number' => 'getPhoneNumber', + 'resubmit_allowed' => 'getResubmitAllowed', + 'status' => 'getStatus', + 'blocked' => 'getBlocked', + 'blocked_reason' => 'getBlockedReason' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('additional_denial_reasons', $data ?? [], null); + $this->setIfExists('decline_reason_description', $data ?? [], null); + $this->setIfExists('denial_status_code', $data ?? [], null); + $this->setIfExists('internal_ticket_number', $data ?? [], null); + $this->setIfExists('phone_number', $data ?? [], null); + $this->setIfExists('resubmit_allowed', $data ?? [], null); + $this->setIfExists('status', $data ?? [], 'UNVERIFIED'); + $this->setIfExists('blocked', $data ?? [], null); + $this->setIfExists('blocked_reason', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) > 12)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be smaller than or equal to 12."; + } + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) < 12)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be bigger than or equal to 12."; + } + + if (!is_null($this->container['phone_number']) && !preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", $this->container['phone_number'])) { + $invalidProperties[] = "invalid value for 'phone_number', must be conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id User's account ID. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets additional_denial_reasons + * + * @return \OpenAPI\Client\Model\AdditionalDenialReason[]|null + */ + public function getAdditionalDenialReasons(): ?array + { + return $this->container['additional_denial_reasons']; + } + + /** + * Sets additional_denial_reasons + * + * @param \OpenAPI\Client\Model\AdditionalDenialReason[]|null $additional_denial_reasons An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. + * + * @return $this + */ + public function setAdditionalDenialReasons(?array $additional_denial_reasons): static + { + if (is_null($additional_denial_reasons)) { + throw new InvalidArgumentException('non-nullable additional_denial_reasons cannot be null'); + } + $this->container['additional_denial_reasons'] = $additional_denial_reasons; + + return $this; + } + + /** + * Gets decline_reason_description + * + * @return string|null + */ + public function getDeclineReasonDescription(): ?string + { + return $this->container['decline_reason_description']; + } + + /** + * Sets decline_reason_description + * + * @param string|null $decline_reason_description Explanation for why a verification request was declined. + * + * @return $this + */ + public function setDeclineReasonDescription(?string $decline_reason_description): static + { + if (is_null($decline_reason_description)) { + throw new InvalidArgumentException('non-nullable decline_reason_description cannot be null'); + } + $this->container['decline_reason_description'] = $decline_reason_description; + + return $this; + } + + /** + * Gets denial_status_code + * + * @return int|null + */ + public function getDenialStatusCode(): ?int + { + return $this->container['denial_status_code']; + } + + /** + * Sets denial_status_code + * + * @param int|null $denial_status_code Reason code for denial. + * + * @return $this + */ + public function setDenialStatusCode(?int $denial_status_code): static + { + if (is_null($denial_status_code)) { + throw new InvalidArgumentException('non-nullable denial_status_code cannot be null'); + } + $this->container['denial_status_code'] = $denial_status_code; + + return $this; + } + + /** + * Gets internal_ticket_number + * + * @return string|null + */ + public function getInternalTicketNumber(): ?string + { + return $this->container['internal_ticket_number']; + } + + /** + * Sets internal_ticket_number + * + * @param string|null $internal_ticket_number Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. + * + * @return $this + */ + public function setInternalTicketNumber(?string $internal_ticket_number): static + { + if (is_null($internal_ticket_number)) { + throw new InvalidArgumentException('non-nullable internal_ticket_number cannot be null'); + } + $this->container['internal_ticket_number'] = $internal_ticket_number; + + return $this; + } + + /** + * Gets phone_number + * + * @return string|null + */ + public function getPhoneNumber(): ?string + { + return $this->container['phone_number']; + } + + /** + * Sets phone_number + * + * @param string|null $phone_number Toll-free telephone number in E.164 format. + * + * @return $this + */ + public function setPhoneNumber(?string $phone_number): static + { + if (is_null($phone_number)) { + throw new InvalidArgumentException('non-nullable phone_number cannot be null'); + } + if ((mb_strlen($phone_number) > 12)) { + throw new InvalidArgumentException('invalid length for $phone_number when calling VerificationDenialWebhook., must be smaller than or equal to 12.'); + } + if ((mb_strlen($phone_number) < 12)) { + throw new InvalidArgumentException('invalid length for $phone_number when calling VerificationDenialWebhook., must be bigger than or equal to 12.'); + } + if ((!preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", ObjectSerializer::toString($phone_number)))) { + throw new InvalidArgumentException("invalid value for \$phone_number when calling VerificationDenialWebhook., must conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."); + } + + $this->container['phone_number'] = $phone_number; + + return $this; + } + + /** + * Gets resubmit_allowed + * + * @return bool|null + */ + public function getResubmitAllowed(): ?bool + { + return $this->container['resubmit_allowed']; + } + + /** + * Sets resubmit_allowed + * + * @param bool|null $resubmit_allowed Whether a Toll-Free Verification request qualifies for resubmission via PUT. + * + * @return $this + */ + public function setResubmitAllowed(?bool $resubmit_allowed): static + { + if (is_null($resubmit_allowed)) { + throw new InvalidArgumentException('non-nullable resubmit_allowed cannot be null'); + } + $this->container['resubmit_allowed'] = $resubmit_allowed; + + return $this; + } + + /** + * Gets status + * + * @return string|null + */ + public function getStatus(): ?string + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param string|null $status status + * + * @return $this + */ + public function setStatus(?string $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets blocked + * + * @return bool|null + */ + public function getBlocked(): ?bool + { + return $this->container['blocked']; + } + + /** + * Sets blocked + * + * @param bool|null $blocked Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. + * + * @return $this + */ + public function setBlocked(?bool $blocked): static + { + if (is_null($blocked)) { + throw new InvalidArgumentException('non-nullable blocked cannot be null'); + } + $this->container['blocked'] = $blocked; + + return $this; + } + + /** + * Gets blocked_reason + * + * @return string|null + */ + public function getBlockedReason(): ?string + { + return $this->container['blocked_reason']; + } + + /** + * Sets blocked_reason + * + * @param string|null $blocked_reason The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. + * + * @return $this + */ + public function setBlockedReason(?string $blocked_reason): static + { + if (is_null($blocked_reason)) { + throw new InvalidArgumentException('non-nullable blocked_reason cannot be null'); + } + $this->container['blocked_reason'] = $blocked_reason; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/VerificationRequest.php b/src/Model/VerificationRequest.php new file mode 100644 index 00000000..9c1972b8 --- /dev/null +++ b/src/Model/VerificationRequest.php @@ -0,0 +1,1267 @@ + + */ +class VerificationRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'verificationRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'business_address' => '\OpenAPI\Client\Model\Address', + 'business_contact' => '\OpenAPI\Client\Model\Contact', + 'message_volume' => 'int', + 'phone_numbers' => 'string[]', + 'use_case' => 'string', + 'use_case_summary' => 'string', + 'production_message_content' => 'string', + 'opt_in_workflow' => '\OpenAPI\Client\Model\OptInWorkflow', + 'additional_information' => 'string', + 'isv_reseller' => 'string', + 'privacy_policy_url' => 'string', + 'terms_and_conditions_url' => 'string', + 'business_dba' => 'string', + 'business_registration_number' => 'string', + 'business_registration_type' => '\OpenAPI\Client\Model\BusinessRegistrationTypeEnum', + 'business_registration_issuing_country' => 'string', + 'business_entity_type' => '\OpenAPI\Client\Model\BusinessEntityTypeEnum', + 'help_message_response' => 'string', + 'age_gated_content' => 'bool', + 'cv_token' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'business_address' => null, + 'business_contact' => null, + 'message_volume' => null, + 'phone_numbers' => null, + 'use_case' => null, + 'use_case_summary' => null, + 'production_message_content' => null, + 'opt_in_workflow' => null, + 'additional_information' => null, + 'isv_reseller' => null, + 'privacy_policy_url' => null, + 'terms_and_conditions_url' => null, + 'business_dba' => null, + 'business_registration_number' => null, + 'business_registration_type' => null, + 'business_registration_issuing_country' => null, + 'business_entity_type' => null, + 'help_message_response' => null, + 'age_gated_content' => null, + 'cv_token' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'business_address' => false, + 'business_contact' => false, + 'message_volume' => false, + 'phone_numbers' => false, + 'use_case' => false, + 'use_case_summary' => false, + 'production_message_content' => false, + 'opt_in_workflow' => false, + 'additional_information' => true, + 'isv_reseller' => true, + 'privacy_policy_url' => false, + 'terms_and_conditions_url' => false, + 'business_dba' => false, + 'business_registration_number' => true, + 'business_registration_type' => true, + 'business_registration_issuing_country' => true, + 'business_entity_type' => false, + 'help_message_response' => true, + 'age_gated_content' => false, + 'cv_token' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'business_address' => 'businessAddress', + 'business_contact' => 'businessContact', + 'message_volume' => 'messageVolume', + 'phone_numbers' => 'phoneNumbers', + 'use_case' => 'useCase', + 'use_case_summary' => 'useCaseSummary', + 'production_message_content' => 'productionMessageContent', + 'opt_in_workflow' => 'optInWorkflow', + 'additional_information' => 'additionalInformation', + 'isv_reseller' => 'isvReseller', + 'privacy_policy_url' => 'privacyPolicyUrl', + 'terms_and_conditions_url' => 'termsAndConditionsUrl', + 'business_dba' => 'businessDba', + 'business_registration_number' => 'businessRegistrationNumber', + 'business_registration_type' => 'businessRegistrationType', + 'business_registration_issuing_country' => 'businessRegistrationIssuingCountry', + 'business_entity_type' => 'businessEntityType', + 'help_message_response' => 'helpMessageResponse', + 'age_gated_content' => 'ageGatedContent', + 'cv_token' => 'cvToken' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'business_address' => 'setBusinessAddress', + 'business_contact' => 'setBusinessContact', + 'message_volume' => 'setMessageVolume', + 'phone_numbers' => 'setPhoneNumbers', + 'use_case' => 'setUseCase', + 'use_case_summary' => 'setUseCaseSummary', + 'production_message_content' => 'setProductionMessageContent', + 'opt_in_workflow' => 'setOptInWorkflow', + 'additional_information' => 'setAdditionalInformation', + 'isv_reseller' => 'setIsvReseller', + 'privacy_policy_url' => 'setPrivacyPolicyUrl', + 'terms_and_conditions_url' => 'setTermsAndConditionsUrl', + 'business_dba' => 'setBusinessDba', + 'business_registration_number' => 'setBusinessRegistrationNumber', + 'business_registration_type' => 'setBusinessRegistrationType', + 'business_registration_issuing_country' => 'setBusinessRegistrationIssuingCountry', + 'business_entity_type' => 'setBusinessEntityType', + 'help_message_response' => 'setHelpMessageResponse', + 'age_gated_content' => 'setAgeGatedContent', + 'cv_token' => 'setCvToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'business_address' => 'getBusinessAddress', + 'business_contact' => 'getBusinessContact', + 'message_volume' => 'getMessageVolume', + 'phone_numbers' => 'getPhoneNumbers', + 'use_case' => 'getUseCase', + 'use_case_summary' => 'getUseCaseSummary', + 'production_message_content' => 'getProductionMessageContent', + 'opt_in_workflow' => 'getOptInWorkflow', + 'additional_information' => 'getAdditionalInformation', + 'isv_reseller' => 'getIsvReseller', + 'privacy_policy_url' => 'getPrivacyPolicyUrl', + 'terms_and_conditions_url' => 'getTermsAndConditionsUrl', + 'business_dba' => 'getBusinessDba', + 'business_registration_number' => 'getBusinessRegistrationNumber', + 'business_registration_type' => 'getBusinessRegistrationType', + 'business_registration_issuing_country' => 'getBusinessRegistrationIssuingCountry', + 'business_entity_type' => 'getBusinessEntityType', + 'help_message_response' => 'getHelpMessageResponse', + 'age_gated_content' => 'getAgeGatedContent', + 'cv_token' => 'getCvToken' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('business_address', $data ?? [], null); + $this->setIfExists('business_contact', $data ?? [], null); + $this->setIfExists('message_volume', $data ?? [], null); + $this->setIfExists('phone_numbers', $data ?? [], null); + $this->setIfExists('use_case', $data ?? [], null); + $this->setIfExists('use_case_summary', $data ?? [], null); + $this->setIfExists('production_message_content', $data ?? [], null); + $this->setIfExists('opt_in_workflow', $data ?? [], null); + $this->setIfExists('additional_information', $data ?? [], null); + $this->setIfExists('isv_reseller', $data ?? [], null); + $this->setIfExists('privacy_policy_url', $data ?? [], null); + $this->setIfExists('terms_and_conditions_url', $data ?? [], null); + $this->setIfExists('business_dba', $data ?? [], null); + $this->setIfExists('business_registration_number', $data ?? [], null); + $this->setIfExists('business_registration_type', $data ?? [], null); + $this->setIfExists('business_registration_issuing_country', $data ?? [], null); + $this->setIfExists('business_entity_type', $data ?? [], null); + $this->setIfExists('help_message_response', $data ?? [], null); + $this->setIfExists('age_gated_content', $data ?? [], null); + $this->setIfExists('cv_token', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['business_address'] === null) { + $invalidProperties[] = "'business_address' can't be null"; + } + if ($this->container['business_contact'] === null) { + $invalidProperties[] = "'business_contact' can't be null"; + } + if ($this->container['message_volume'] === null) { + $invalidProperties[] = "'message_volume' can't be null"; + } + if (($this->container['message_volume'] > 10000000)) { + $invalidProperties[] = "invalid value for 'message_volume', must be smaller than or equal to 10000000."; + } + + if (($this->container['message_volume'] < 10)) { + $invalidProperties[] = "invalid value for 'message_volume', must be bigger than or equal to 10."; + } + + if ($this->container['phone_numbers'] === null) { + $invalidProperties[] = "'phone_numbers' can't be null"; + } + if ((count($this->container['phone_numbers']) > 10)) { + $invalidProperties[] = "invalid value for 'phone_numbers', number of items must be less than or equal to 10."; + } + + if ((count($this->container['phone_numbers']) < 1)) { + $invalidProperties[] = "invalid value for 'phone_numbers', number of items must be greater than or equal to 1."; + } + + if ($this->container['use_case'] === null) { + $invalidProperties[] = "'use_case' can't be null"; + } + if ((mb_strlen($this->container['use_case']) > 500)) { + $invalidProperties[] = "invalid value for 'use_case', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['use_case']) < 0)) { + $invalidProperties[] = "invalid value for 'use_case', the character length must be bigger than or equal to 0."; + } + + if ($this->container['use_case_summary'] === null) { + $invalidProperties[] = "'use_case_summary' can't be null"; + } + if ((mb_strlen($this->container['use_case_summary']) > 500)) { + $invalidProperties[] = "invalid value for 'use_case_summary', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['use_case_summary']) < 0)) { + $invalidProperties[] = "invalid value for 'use_case_summary', the character length must be bigger than or equal to 0."; + } + + if ($this->container['production_message_content'] === null) { + $invalidProperties[] = "'production_message_content' can't be null"; + } + if ((mb_strlen($this->container['production_message_content']) > 500)) { + $invalidProperties[] = "invalid value for 'production_message_content', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['production_message_content']) < 0)) { + $invalidProperties[] = "invalid value for 'production_message_content', the character length must be bigger than or equal to 0."; + } + + if ($this->container['opt_in_workflow'] === null) { + $invalidProperties[] = "'opt_in_workflow' can't be null"; + } + if (!is_null($this->container['additional_information']) && (mb_strlen($this->container['additional_information']) > 500)) { + $invalidProperties[] = "invalid value for 'additional_information', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['additional_information']) && (mb_strlen($this->container['additional_information']) < 0)) { + $invalidProperties[] = "invalid value for 'additional_information', the character length must be bigger than or equal to 0."; + } + + if (!is_null($this->container['isv_reseller']) && (mb_strlen($this->container['isv_reseller']) > 500)) { + $invalidProperties[] = "invalid value for 'isv_reseller', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['isv_reseller']) && (mb_strlen($this->container['isv_reseller']) < 0)) { + $invalidProperties[] = "invalid value for 'isv_reseller', the character length must be bigger than or equal to 0."; + } + + if (!is_null($this->container['privacy_policy_url']) && (mb_strlen($this->container['privacy_policy_url']) > 500)) { + $invalidProperties[] = "invalid value for 'privacy_policy_url', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['terms_and_conditions_url']) && (mb_strlen($this->container['terms_and_conditions_url']) > 500)) { + $invalidProperties[] = "invalid value for 'terms_and_conditions_url', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['business_dba']) && (mb_strlen($this->container['business_dba']) > 500)) { + $invalidProperties[] = "invalid value for 'business_dba', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['business_registration_number']) && (mb_strlen($this->container['business_registration_number']) > 500)) { + $invalidProperties[] = "invalid value for 'business_registration_number', the character length must be smaller than or equal to 500."; + } + + if ($this->container['business_entity_type'] === null) { + $invalidProperties[] = "'business_entity_type' can't be null"; + } + if (!is_null($this->container['help_message_response']) && (mb_strlen($this->container['help_message_response']) > 500)) { + $invalidProperties[] = "invalid value for 'help_message_response', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['cv_token']) && (mb_strlen($this->container['cv_token']) > 500)) { + $invalidProperties[] = "invalid value for 'cv_token', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['cv_token']) && (mb_strlen($this->container['cv_token']) < 0)) { + $invalidProperties[] = "invalid value for 'cv_token', the character length must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets business_address + * + * @return \OpenAPI\Client\Model\Address + */ + public function getBusinessAddress(): \OpenAPI\Client\Model\Address + { + return $this->container['business_address']; + } + + /** + * Sets business_address + * + * @param \OpenAPI\Client\Model\Address $business_address business_address + * + * @return $this + */ + public function setBusinessAddress(\OpenAPI\Client\Model\Address $business_address): static + { + if (is_null($business_address)) { + throw new InvalidArgumentException('non-nullable business_address cannot be null'); + } + $this->container['business_address'] = $business_address; + + return $this; + } + + /** + * Gets business_contact + * + * @return \OpenAPI\Client\Model\Contact + */ + public function getBusinessContact(): \OpenAPI\Client\Model\Contact + { + return $this->container['business_contact']; + } + + /** + * Sets business_contact + * + * @param \OpenAPI\Client\Model\Contact $business_contact business_contact + * + * @return $this + */ + public function setBusinessContact(\OpenAPI\Client\Model\Contact $business_contact): static + { + if (is_null($business_contact)) { + throw new InvalidArgumentException('non-nullable business_contact cannot be null'); + } + $this->container['business_contact'] = $business_contact; + + return $this; + } + + /** + * Gets message_volume + * + * @return int + */ + public function getMessageVolume(): int + { + return $this->container['message_volume']; + } + + /** + * Sets message_volume + * + * @param int $message_volume Estimated monthly volume of messages from the toll-free number. + * + * @return $this + */ + public function setMessageVolume(int $message_volume): static + { + if (is_null($message_volume)) { + throw new InvalidArgumentException('non-nullable message_volume cannot be null'); + } + + if (($message_volume > 10000000)) { + throw new InvalidArgumentException('invalid value for $message_volume when calling VerificationRequest., must be smaller than or equal to 10000000.'); + } + if (($message_volume < 10)) { + throw new InvalidArgumentException('invalid value for $message_volume when calling VerificationRequest., must be bigger than or equal to 10.'); + } + + $this->container['message_volume'] = $message_volume; + + return $this; + } + + /** + * Gets phone_numbers + * + * @return string[] + */ + public function getPhoneNumbers(): array + { + return $this->container['phone_numbers']; + } + + /** + * Sets phone_numbers + * + * @param string[] $phone_numbers phone_numbers + * + * @return $this + */ + public function setPhoneNumbers(array $phone_numbers): static + { + if (is_null($phone_numbers)) { + throw new InvalidArgumentException('non-nullable phone_numbers cannot be null'); + } + + if ((count($phone_numbers) > 10)) { + throw new InvalidArgumentException('invalid value for $phone_numbers when calling VerificationRequest., number of items must be less than or equal to 10.'); + } + if ((count($phone_numbers) < 1)) { + throw new InvalidArgumentException('invalid length for $phone_numbers when calling VerificationRequest., number of items must be greater than or equal to 1.'); + } + $this->container['phone_numbers'] = $phone_numbers; + + return $this; + } + + /** + * Gets use_case + * + * @return string + */ + public function getUseCase(): string + { + return $this->container['use_case']; + } + + /** + * Sets use_case + * + * @param string $use_case The category of the use case. + * + * @return $this + */ + public function setUseCase(string $use_case): static + { + if (is_null($use_case)) { + throw new InvalidArgumentException('non-nullable use_case cannot be null'); + } + if ((mb_strlen($use_case) > 500)) { + throw new InvalidArgumentException('invalid length for $use_case when calling VerificationRequest., must be smaller than or equal to 500.'); + } + if ((mb_strlen($use_case) < 0)) { + throw new InvalidArgumentException('invalid length for $use_case when calling VerificationRequest., must be bigger than or equal to 0.'); + } + + $this->container['use_case'] = $use_case; + + return $this; + } + + /** + * Gets use_case_summary + * + * @return string + */ + public function getUseCaseSummary(): string + { + return $this->container['use_case_summary']; + } + + /** + * Sets use_case_summary + * + * @param string $use_case_summary A general idea of the use case and customer. + * + * @return $this + */ + public function setUseCaseSummary(string $use_case_summary): static + { + if (is_null($use_case_summary)) { + throw new InvalidArgumentException('non-nullable use_case_summary cannot be null'); + } + if ((mb_strlen($use_case_summary) > 500)) { + throw new InvalidArgumentException('invalid length for $use_case_summary when calling VerificationRequest., must be smaller than or equal to 500.'); + } + if ((mb_strlen($use_case_summary) < 0)) { + throw new InvalidArgumentException('invalid length for $use_case_summary when calling VerificationRequest., must be bigger than or equal to 0.'); + } + + $this->container['use_case_summary'] = $use_case_summary; + + return $this; + } + + /** + * Gets production_message_content + * + * @return string + */ + public function getProductionMessageContent(): string + { + return $this->container['production_message_content']; + } + + /** + * Sets production_message_content + * + * @param string $production_message_content Example of message content. + * + * @return $this + */ + public function setProductionMessageContent(string $production_message_content): static + { + if (is_null($production_message_content)) { + throw new InvalidArgumentException('non-nullable production_message_content cannot be null'); + } + if ((mb_strlen($production_message_content) > 500)) { + throw new InvalidArgumentException('invalid length for $production_message_content when calling VerificationRequest., must be smaller than or equal to 500.'); + } + if ((mb_strlen($production_message_content) < 0)) { + throw new InvalidArgumentException('invalid length for $production_message_content when calling VerificationRequest., must be bigger than or equal to 0.'); + } + + $this->container['production_message_content'] = $production_message_content; + + return $this; + } + + /** + * Gets opt_in_workflow + * + * @return \OpenAPI\Client\Model\OptInWorkflow + */ + public function getOptInWorkflow(): \OpenAPI\Client\Model\OptInWorkflow + { + return $this->container['opt_in_workflow']; + } + + /** + * Sets opt_in_workflow + * + * @param \OpenAPI\Client\Model\OptInWorkflow $opt_in_workflow opt_in_workflow + * + * @return $this + */ + public function setOptInWorkflow(\OpenAPI\Client\Model\OptInWorkflow $opt_in_workflow): static + { + if (is_null($opt_in_workflow)) { + throw new InvalidArgumentException('non-nullable opt_in_workflow cannot be null'); + } + $this->container['opt_in_workflow'] = $opt_in_workflow; + + return $this; + } + + /** + * Gets additional_information + * + * @return string|null + */ + public function getAdditionalInformation(): ?string + { + return $this->container['additional_information']; + } + + /** + * Sets additional_information + * + * @param string|null $additional_information Any additional information. + * + * @return $this + */ + public function setAdditionalInformation(?string $additional_information): static + { + if (is_null($additional_information)) { + array_push($this->openAPINullablesSetToNull, 'additional_information'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('additional_information', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($additional_information) && (mb_strlen($additional_information) > 500)) { + throw new InvalidArgumentException('invalid length for $additional_information when calling VerificationRequest., must be smaller than or equal to 500.'); + } + if (!is_null($additional_information) && (mb_strlen($additional_information) < 0)) { + throw new InvalidArgumentException('invalid length for $additional_information when calling VerificationRequest., must be bigger than or equal to 0.'); + } + + $this->container['additional_information'] = $additional_information; + + return $this; + } + + /** + * Gets isv_reseller + * + * @return string|null + */ + public function getIsvReseller(): ?string + { + return $this->container['isv_reseller']; + } + + /** + * Sets isv_reseller + * + * @param string|null $isv_reseller ISV name. + * + * @return $this + */ + public function setIsvReseller(?string $isv_reseller): static + { + if (is_null($isv_reseller)) { + array_push($this->openAPINullablesSetToNull, 'isv_reseller'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('isv_reseller', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($isv_reseller) && (mb_strlen($isv_reseller) > 500)) { + throw new InvalidArgumentException('invalid length for $isv_reseller when calling VerificationRequest., must be smaller than or equal to 500.'); + } + if (!is_null($isv_reseller) && (mb_strlen($isv_reseller) < 0)) { + throw new InvalidArgumentException('invalid length for $isv_reseller when calling VerificationRequest., must be bigger than or equal to 0.'); + } + + $this->container['isv_reseller'] = $isv_reseller; + + return $this; + } + + /** + * Gets privacy_policy_url + * + * @return string|null + */ + public function getPrivacyPolicyUrl(): ?string + { + return $this->container['privacy_policy_url']; + } + + /** + * Sets privacy_policy_url + * + * @param string|null $privacy_policy_url The Toll-Free Verification request privacy policy URL. + * + * @return $this + */ + public function setPrivacyPolicyUrl(?string $privacy_policy_url): static + { + if (is_null($privacy_policy_url)) { + throw new InvalidArgumentException('non-nullable privacy_policy_url cannot be null'); + } + if ((mb_strlen($privacy_policy_url) > 500)) { + throw new InvalidArgumentException('invalid length for $privacy_policy_url when calling VerificationRequest., must be smaller than or equal to 500.'); + } + + $this->container['privacy_policy_url'] = $privacy_policy_url; + + return $this; + } + + /** + * Gets terms_and_conditions_url + * + * @return string|null + */ + public function getTermsAndConditionsUrl(): ?string + { + return $this->container['terms_and_conditions_url']; + } + + /** + * Sets terms_and_conditions_url + * + * @param string|null $terms_and_conditions_url The Toll-Free Verification request terms and conditions policy URL. + * + * @return $this + */ + public function setTermsAndConditionsUrl(?string $terms_and_conditions_url): static + { + if (is_null($terms_and_conditions_url)) { + throw new InvalidArgumentException('non-nullable terms_and_conditions_url cannot be null'); + } + if ((mb_strlen($terms_and_conditions_url) > 500)) { + throw new InvalidArgumentException('invalid length for $terms_and_conditions_url when calling VerificationRequest., must be smaller than or equal to 500.'); + } + + $this->container['terms_and_conditions_url'] = $terms_and_conditions_url; + + return $this; + } + + /** + * Gets business_dba + * + * @return string|null + */ + public function getBusinessDba(): ?string + { + return $this->container['business_dba']; + } + + /** + * Sets business_dba + * + * @param string|null $business_dba The company 'Doing Business As'. + * + * @return $this + */ + public function setBusinessDba(?string $business_dba): static + { + if (is_null($business_dba)) { + throw new InvalidArgumentException('non-nullable business_dba cannot be null'); + } + if ((mb_strlen($business_dba) > 500)) { + throw new InvalidArgumentException('invalid length for $business_dba when calling VerificationRequest., must be smaller than or equal to 500.'); + } + + $this->container['business_dba'] = $business_dba; + + return $this; + } + + /** + * Gets business_registration_number + * + * @return string|null + */ + public function getBusinessRegistrationNumber(): ?string + { + return $this->container['business_registration_number']; + } + + /** + * Sets business_registration_number + * + * @param string|null $business_registration_number Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** + * + * @return $this + */ + public function setBusinessRegistrationNumber(?string $business_registration_number): static + { + if (is_null($business_registration_number)) { + array_push($this->openAPINullablesSetToNull, 'business_registration_number'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('business_registration_number', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($business_registration_number) && (mb_strlen($business_registration_number) > 500)) { + throw new InvalidArgumentException('invalid length for $business_registration_number when calling VerificationRequest., must be smaller than or equal to 500.'); + } + + $this->container['business_registration_number'] = $business_registration_number; + + return $this; + } + + /** + * Gets business_registration_type + * + * @return \OpenAPI\Client\Model\BusinessRegistrationTypeEnum|null + */ + public function getBusinessRegistrationType(): ?\OpenAPI\Client\Model\BusinessRegistrationTypeEnum + { + return $this->container['business_registration_type']; + } + + /** + * Sets business_registration_type + * + * @param \OpenAPI\Client\Model\BusinessRegistrationTypeEnum|null $business_registration_type business_registration_type + * + * @return $this + */ + public function setBusinessRegistrationType(?\OpenAPI\Client\Model\BusinessRegistrationTypeEnum $business_registration_type): static + { + if (is_null($business_registration_type)) { + array_push($this->openAPINullablesSetToNull, 'business_registration_type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('business_registration_type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['business_registration_type'] = $business_registration_type; + + return $this; + } + + /** + * Gets business_registration_issuing_country + * + * @return string|null + */ + public function getBusinessRegistrationIssuingCountry(): ?string + { + return $this->container['business_registration_issuing_country']; + } + + /** + * Sets business_registration_issuing_country + * + * @param string|null $business_registration_issuing_country The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | + * + * @return $this + */ + public function setBusinessRegistrationIssuingCountry(?string $business_registration_issuing_country): static + { + if (is_null($business_registration_issuing_country)) { + array_push($this->openAPINullablesSetToNull, 'business_registration_issuing_country'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('business_registration_issuing_country', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['business_registration_issuing_country'] = $business_registration_issuing_country; + + return $this; + } + + /** + * Gets business_entity_type + * + * @return \OpenAPI\Client\Model\BusinessEntityTypeEnum + */ + public function getBusinessEntityType(): \OpenAPI\Client\Model\BusinessEntityTypeEnum + { + return $this->container['business_entity_type']; + } + + /** + * Sets business_entity_type + * + * @param \OpenAPI\Client\Model\BusinessEntityTypeEnum $business_entity_type business_entity_type + * + * @return $this + */ + public function setBusinessEntityType(\OpenAPI\Client\Model\BusinessEntityTypeEnum $business_entity_type): static + { + if (is_null($business_entity_type)) { + throw new InvalidArgumentException('non-nullable business_entity_type cannot be null'); + } + $this->container['business_entity_type'] = $business_entity_type; + + return $this; + } + + /** + * Gets help_message_response + * + * @return string|null + */ + public function getHelpMessageResponse(): ?string + { + return $this->container['help_message_response']; + } + + /** + * Sets help_message_response + * + * @param string|null $help_message_response A message that gets sent to users requesting help. + * + * @return $this + */ + public function setHelpMessageResponse(?string $help_message_response): static + { + if (is_null($help_message_response)) { + array_push($this->openAPINullablesSetToNull, 'help_message_response'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('help_message_response', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($help_message_response) && (mb_strlen($help_message_response) > 500)) { + throw new InvalidArgumentException('invalid length for $help_message_response when calling VerificationRequest., must be smaller than or equal to 500.'); + } + + $this->container['help_message_response'] = $help_message_response; + + return $this; + } + + /** + * Gets age_gated_content + * + * @return bool|null + */ + public function getAgeGatedContent(): ?bool + { + return $this->container['age_gated_content']; + } + + /** + * Sets age_gated_content + * + * @param bool|null $age_gated_content Indicates whether the content is age-gated. + * + * @return $this + */ + public function setAgeGatedContent(?bool $age_gated_content): static + { + if (is_null($age_gated_content)) { + throw new InvalidArgumentException('non-nullable age_gated_content cannot be null'); + } + $this->container['age_gated_content'] = $age_gated_content; + + return $this; + } + + /** + * Gets cv_token + * + * @return string|null + */ + public function getCvToken(): ?string + { + return $this->container['cv_token']; + } + + /** + * Sets cv_token + * + * @param string|null $cv_token The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection. + * + * @return $this + */ + public function setCvToken(?string $cv_token): static + { + if (is_null($cv_token)) { + array_push($this->openAPINullablesSetToNull, 'cv_token'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('cv_token', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($cv_token) && (mb_strlen($cv_token) > 500)) { + throw new InvalidArgumentException('invalid length for $cv_token when calling VerificationRequest., must be smaller than or equal to 500.'); + } + if (!is_null($cv_token) && (mb_strlen($cv_token) < 0)) { + throw new InvalidArgumentException('invalid length for $cv_token when calling VerificationRequest., must be bigger than or equal to 0.'); + } + + $this->container['cv_token'] = $cv_token; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/VerificationUpdateRequest.php b/src/Model/VerificationUpdateRequest.php new file mode 100644 index 00000000..a8db65c3 --- /dev/null +++ b/src/Model/VerificationUpdateRequest.php @@ -0,0 +1,1212 @@ + + */ +class VerificationUpdateRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'verificationUpdateRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'business_address' => '\OpenAPI\Client\Model\Address', + 'business_contact' => '\OpenAPI\Client\Model\Contact', + 'message_volume' => 'int', + 'use_case' => 'string', + 'use_case_summary' => 'string', + 'production_message_content' => 'string', + 'opt_in_workflow' => '\OpenAPI\Client\Model\OptInWorkflow', + 'additional_information' => 'string', + 'isv_reseller' => 'string', + 'privacy_policy_url' => 'string', + 'terms_and_conditions_url' => 'string', + 'business_dba' => 'string', + 'business_registration_number' => 'string', + 'business_registration_type' => '\OpenAPI\Client\Model\BusinessRegistrationTypeEnum', + 'business_entity_type' => '\OpenAPI\Client\Model\BusinessEntityTypeEnum', + 'business_registration_issuing_country' => 'string', + 'help_message_response' => 'string', + 'age_gated_content' => 'bool', + 'cv_token' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'business_address' => null, + 'business_contact' => null, + 'message_volume' => null, + 'use_case' => null, + 'use_case_summary' => null, + 'production_message_content' => null, + 'opt_in_workflow' => null, + 'additional_information' => null, + 'isv_reseller' => null, + 'privacy_policy_url' => null, + 'terms_and_conditions_url' => null, + 'business_dba' => null, + 'business_registration_number' => null, + 'business_registration_type' => null, + 'business_entity_type' => null, + 'business_registration_issuing_country' => null, + 'help_message_response' => null, + 'age_gated_content' => null, + 'cv_token' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'business_address' => false, + 'business_contact' => false, + 'message_volume' => false, + 'use_case' => false, + 'use_case_summary' => false, + 'production_message_content' => false, + 'opt_in_workflow' => false, + 'additional_information' => true, + 'isv_reseller' => true, + 'privacy_policy_url' => false, + 'terms_and_conditions_url' => false, + 'business_dba' => false, + 'business_registration_number' => true, + 'business_registration_type' => true, + 'business_entity_type' => false, + 'business_registration_issuing_country' => true, + 'help_message_response' => true, + 'age_gated_content' => false, + 'cv_token' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'business_address' => 'businessAddress', + 'business_contact' => 'businessContact', + 'message_volume' => 'messageVolume', + 'use_case' => 'useCase', + 'use_case_summary' => 'useCaseSummary', + 'production_message_content' => 'productionMessageContent', + 'opt_in_workflow' => 'optInWorkflow', + 'additional_information' => 'additionalInformation', + 'isv_reseller' => 'isvReseller', + 'privacy_policy_url' => 'privacyPolicyUrl', + 'terms_and_conditions_url' => 'termsAndConditionsUrl', + 'business_dba' => 'businessDba', + 'business_registration_number' => 'businessRegistrationNumber', + 'business_registration_type' => 'businessRegistrationType', + 'business_entity_type' => 'businessEntityType', + 'business_registration_issuing_country' => 'businessRegistrationIssuingCountry', + 'help_message_response' => 'helpMessageResponse', + 'age_gated_content' => 'ageGatedContent', + 'cv_token' => 'cvToken' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'business_address' => 'setBusinessAddress', + 'business_contact' => 'setBusinessContact', + 'message_volume' => 'setMessageVolume', + 'use_case' => 'setUseCase', + 'use_case_summary' => 'setUseCaseSummary', + 'production_message_content' => 'setProductionMessageContent', + 'opt_in_workflow' => 'setOptInWorkflow', + 'additional_information' => 'setAdditionalInformation', + 'isv_reseller' => 'setIsvReseller', + 'privacy_policy_url' => 'setPrivacyPolicyUrl', + 'terms_and_conditions_url' => 'setTermsAndConditionsUrl', + 'business_dba' => 'setBusinessDba', + 'business_registration_number' => 'setBusinessRegistrationNumber', + 'business_registration_type' => 'setBusinessRegistrationType', + 'business_entity_type' => 'setBusinessEntityType', + 'business_registration_issuing_country' => 'setBusinessRegistrationIssuingCountry', + 'help_message_response' => 'setHelpMessageResponse', + 'age_gated_content' => 'setAgeGatedContent', + 'cv_token' => 'setCvToken' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'business_address' => 'getBusinessAddress', + 'business_contact' => 'getBusinessContact', + 'message_volume' => 'getMessageVolume', + 'use_case' => 'getUseCase', + 'use_case_summary' => 'getUseCaseSummary', + 'production_message_content' => 'getProductionMessageContent', + 'opt_in_workflow' => 'getOptInWorkflow', + 'additional_information' => 'getAdditionalInformation', + 'isv_reseller' => 'getIsvReseller', + 'privacy_policy_url' => 'getPrivacyPolicyUrl', + 'terms_and_conditions_url' => 'getTermsAndConditionsUrl', + 'business_dba' => 'getBusinessDba', + 'business_registration_number' => 'getBusinessRegistrationNumber', + 'business_registration_type' => 'getBusinessRegistrationType', + 'business_entity_type' => 'getBusinessEntityType', + 'business_registration_issuing_country' => 'getBusinessRegistrationIssuingCountry', + 'help_message_response' => 'getHelpMessageResponse', + 'age_gated_content' => 'getAgeGatedContent', + 'cv_token' => 'getCvToken' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('business_address', $data ?? [], null); + $this->setIfExists('business_contact', $data ?? [], null); + $this->setIfExists('message_volume', $data ?? [], null); + $this->setIfExists('use_case', $data ?? [], null); + $this->setIfExists('use_case_summary', $data ?? [], null); + $this->setIfExists('production_message_content', $data ?? [], null); + $this->setIfExists('opt_in_workflow', $data ?? [], null); + $this->setIfExists('additional_information', $data ?? [], null); + $this->setIfExists('isv_reseller', $data ?? [], null); + $this->setIfExists('privacy_policy_url', $data ?? [], null); + $this->setIfExists('terms_and_conditions_url', $data ?? [], null); + $this->setIfExists('business_dba', $data ?? [], null); + $this->setIfExists('business_registration_number', $data ?? [], null); + $this->setIfExists('business_registration_type', $data ?? [], null); + $this->setIfExists('business_entity_type', $data ?? [], null); + $this->setIfExists('business_registration_issuing_country', $data ?? [], null); + $this->setIfExists('help_message_response', $data ?? [], null); + $this->setIfExists('age_gated_content', $data ?? [], null); + $this->setIfExists('cv_token', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['business_address'] === null) { + $invalidProperties[] = "'business_address' can't be null"; + } + if ($this->container['business_contact'] === null) { + $invalidProperties[] = "'business_contact' can't be null"; + } + if ($this->container['message_volume'] === null) { + $invalidProperties[] = "'message_volume' can't be null"; + } + if (($this->container['message_volume'] > 10000000)) { + $invalidProperties[] = "invalid value for 'message_volume', must be smaller than or equal to 10000000."; + } + + if (($this->container['message_volume'] < 10)) { + $invalidProperties[] = "invalid value for 'message_volume', must be bigger than or equal to 10."; + } + + if ($this->container['use_case'] === null) { + $invalidProperties[] = "'use_case' can't be null"; + } + if ((mb_strlen($this->container['use_case']) > 500)) { + $invalidProperties[] = "invalid value for 'use_case', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['use_case']) < 0)) { + $invalidProperties[] = "invalid value for 'use_case', the character length must be bigger than or equal to 0."; + } + + if ($this->container['use_case_summary'] === null) { + $invalidProperties[] = "'use_case_summary' can't be null"; + } + if ((mb_strlen($this->container['use_case_summary']) > 500)) { + $invalidProperties[] = "invalid value for 'use_case_summary', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['use_case_summary']) < 0)) { + $invalidProperties[] = "invalid value for 'use_case_summary', the character length must be bigger than or equal to 0."; + } + + if ($this->container['production_message_content'] === null) { + $invalidProperties[] = "'production_message_content' can't be null"; + } + if ((mb_strlen($this->container['production_message_content']) > 500)) { + $invalidProperties[] = "invalid value for 'production_message_content', the character length must be smaller than or equal to 500."; + } + + if ((mb_strlen($this->container['production_message_content']) < 0)) { + $invalidProperties[] = "invalid value for 'production_message_content', the character length must be bigger than or equal to 0."; + } + + if ($this->container['opt_in_workflow'] === null) { + $invalidProperties[] = "'opt_in_workflow' can't be null"; + } + if (!is_null($this->container['additional_information']) && (mb_strlen($this->container['additional_information']) > 500)) { + $invalidProperties[] = "invalid value for 'additional_information', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['additional_information']) && (mb_strlen($this->container['additional_information']) < 0)) { + $invalidProperties[] = "invalid value for 'additional_information', the character length must be bigger than or equal to 0."; + } + + if (!is_null($this->container['isv_reseller']) && (mb_strlen($this->container['isv_reseller']) > 500)) { + $invalidProperties[] = "invalid value for 'isv_reseller', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['isv_reseller']) && (mb_strlen($this->container['isv_reseller']) < 0)) { + $invalidProperties[] = "invalid value for 'isv_reseller', the character length must be bigger than or equal to 0."; + } + + if (!is_null($this->container['privacy_policy_url']) && (mb_strlen($this->container['privacy_policy_url']) > 500)) { + $invalidProperties[] = "invalid value for 'privacy_policy_url', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['terms_and_conditions_url']) && (mb_strlen($this->container['terms_and_conditions_url']) > 500)) { + $invalidProperties[] = "invalid value for 'terms_and_conditions_url', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['business_dba']) && (mb_strlen($this->container['business_dba']) > 500)) { + $invalidProperties[] = "invalid value for 'business_dba', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['business_registration_number']) && (mb_strlen($this->container['business_registration_number']) > 500)) { + $invalidProperties[] = "invalid value for 'business_registration_number', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['help_message_response']) && (mb_strlen($this->container['help_message_response']) > 500)) { + $invalidProperties[] = "invalid value for 'help_message_response', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['cv_token']) && (mb_strlen($this->container['cv_token']) > 500)) { + $invalidProperties[] = "invalid value for 'cv_token', the character length must be smaller than or equal to 500."; + } + + if (!is_null($this->container['cv_token']) && (mb_strlen($this->container['cv_token']) < 0)) { + $invalidProperties[] = "invalid value for 'cv_token', the character length must be bigger than or equal to 0."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets business_address + * + * @return \OpenAPI\Client\Model\Address + */ + public function getBusinessAddress(): \OpenAPI\Client\Model\Address + { + return $this->container['business_address']; + } + + /** + * Sets business_address + * + * @param \OpenAPI\Client\Model\Address $business_address business_address + * + * @return $this + */ + public function setBusinessAddress(\OpenAPI\Client\Model\Address $business_address): static + { + if (is_null($business_address)) { + throw new InvalidArgumentException('non-nullable business_address cannot be null'); + } + $this->container['business_address'] = $business_address; + + return $this; + } + + /** + * Gets business_contact + * + * @return \OpenAPI\Client\Model\Contact + */ + public function getBusinessContact(): \OpenAPI\Client\Model\Contact + { + return $this->container['business_contact']; + } + + /** + * Sets business_contact + * + * @param \OpenAPI\Client\Model\Contact $business_contact business_contact + * + * @return $this + */ + public function setBusinessContact(\OpenAPI\Client\Model\Contact $business_contact): static + { + if (is_null($business_contact)) { + throw new InvalidArgumentException('non-nullable business_contact cannot be null'); + } + $this->container['business_contact'] = $business_contact; + + return $this; + } + + /** + * Gets message_volume + * + * @return int + */ + public function getMessageVolume(): int + { + return $this->container['message_volume']; + } + + /** + * Sets message_volume + * + * @param int $message_volume Estimated monthly volume of messages from the toll-free number. + * + * @return $this + */ + public function setMessageVolume(int $message_volume): static + { + if (is_null($message_volume)) { + throw new InvalidArgumentException('non-nullable message_volume cannot be null'); + } + + if (($message_volume > 10000000)) { + throw new InvalidArgumentException('invalid value for $message_volume when calling VerificationUpdateRequest., must be smaller than or equal to 10000000.'); + } + if (($message_volume < 10)) { + throw new InvalidArgumentException('invalid value for $message_volume when calling VerificationUpdateRequest., must be bigger than or equal to 10.'); + } + + $this->container['message_volume'] = $message_volume; + + return $this; + } + + /** + * Gets use_case + * + * @return string + */ + public function getUseCase(): string + { + return $this->container['use_case']; + } + + /** + * Sets use_case + * + * @param string $use_case The category of the use case. + * + * @return $this + */ + public function setUseCase(string $use_case): static + { + if (is_null($use_case)) { + throw new InvalidArgumentException('non-nullable use_case cannot be null'); + } + if ((mb_strlen($use_case) > 500)) { + throw new InvalidArgumentException('invalid length for $use_case when calling VerificationUpdateRequest., must be smaller than or equal to 500.'); + } + if ((mb_strlen($use_case) < 0)) { + throw new InvalidArgumentException('invalid length for $use_case when calling VerificationUpdateRequest., must be bigger than or equal to 0.'); + } + + $this->container['use_case'] = $use_case; + + return $this; + } + + /** + * Gets use_case_summary + * + * @return string + */ + public function getUseCaseSummary(): string + { + return $this->container['use_case_summary']; + } + + /** + * Sets use_case_summary + * + * @param string $use_case_summary A general idea of the use case and customer. + * + * @return $this + */ + public function setUseCaseSummary(string $use_case_summary): static + { + if (is_null($use_case_summary)) { + throw new InvalidArgumentException('non-nullable use_case_summary cannot be null'); + } + if ((mb_strlen($use_case_summary) > 500)) { + throw new InvalidArgumentException('invalid length for $use_case_summary when calling VerificationUpdateRequest., must be smaller than or equal to 500.'); + } + if ((mb_strlen($use_case_summary) < 0)) { + throw new InvalidArgumentException('invalid length for $use_case_summary when calling VerificationUpdateRequest., must be bigger than or equal to 0.'); + } + + $this->container['use_case_summary'] = $use_case_summary; + + return $this; + } + + /** + * Gets production_message_content + * + * @return string + */ + public function getProductionMessageContent(): string + { + return $this->container['production_message_content']; + } + + /** + * Sets production_message_content + * + * @param string $production_message_content Example of message content. + * + * @return $this + */ + public function setProductionMessageContent(string $production_message_content): static + { + if (is_null($production_message_content)) { + throw new InvalidArgumentException('non-nullable production_message_content cannot be null'); + } + if ((mb_strlen($production_message_content) > 500)) { + throw new InvalidArgumentException('invalid length for $production_message_content when calling VerificationUpdateRequest., must be smaller than or equal to 500.'); + } + if ((mb_strlen($production_message_content) < 0)) { + throw new InvalidArgumentException('invalid length for $production_message_content when calling VerificationUpdateRequest., must be bigger than or equal to 0.'); + } + + $this->container['production_message_content'] = $production_message_content; + + return $this; + } + + /** + * Gets opt_in_workflow + * + * @return \OpenAPI\Client\Model\OptInWorkflow + */ + public function getOptInWorkflow(): \OpenAPI\Client\Model\OptInWorkflow + { + return $this->container['opt_in_workflow']; + } + + /** + * Sets opt_in_workflow + * + * @param \OpenAPI\Client\Model\OptInWorkflow $opt_in_workflow opt_in_workflow + * + * @return $this + */ + public function setOptInWorkflow(\OpenAPI\Client\Model\OptInWorkflow $opt_in_workflow): static + { + if (is_null($opt_in_workflow)) { + throw new InvalidArgumentException('non-nullable opt_in_workflow cannot be null'); + } + $this->container['opt_in_workflow'] = $opt_in_workflow; + + return $this; + } + + /** + * Gets additional_information + * + * @return string|null + */ + public function getAdditionalInformation(): ?string + { + return $this->container['additional_information']; + } + + /** + * Sets additional_information + * + * @param string|null $additional_information Any additional information. + * + * @return $this + */ + public function setAdditionalInformation(?string $additional_information): static + { + if (is_null($additional_information)) { + array_push($this->openAPINullablesSetToNull, 'additional_information'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('additional_information', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($additional_information) && (mb_strlen($additional_information) > 500)) { + throw new InvalidArgumentException('invalid length for $additional_information when calling VerificationUpdateRequest., must be smaller than or equal to 500.'); + } + if (!is_null($additional_information) && (mb_strlen($additional_information) < 0)) { + throw new InvalidArgumentException('invalid length for $additional_information when calling VerificationUpdateRequest., must be bigger than or equal to 0.'); + } + + $this->container['additional_information'] = $additional_information; + + return $this; + } + + /** + * Gets isv_reseller + * + * @return string|null + */ + public function getIsvReseller(): ?string + { + return $this->container['isv_reseller']; + } + + /** + * Sets isv_reseller + * + * @param string|null $isv_reseller ISV name. + * + * @return $this + */ + public function setIsvReseller(?string $isv_reseller): static + { + if (is_null($isv_reseller)) { + array_push($this->openAPINullablesSetToNull, 'isv_reseller'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('isv_reseller', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($isv_reseller) && (mb_strlen($isv_reseller) > 500)) { + throw new InvalidArgumentException('invalid length for $isv_reseller when calling VerificationUpdateRequest., must be smaller than or equal to 500.'); + } + if (!is_null($isv_reseller) && (mb_strlen($isv_reseller) < 0)) { + throw new InvalidArgumentException('invalid length for $isv_reseller when calling VerificationUpdateRequest., must be bigger than or equal to 0.'); + } + + $this->container['isv_reseller'] = $isv_reseller; + + return $this; + } + + /** + * Gets privacy_policy_url + * + * @return string|null + */ + public function getPrivacyPolicyUrl(): ?string + { + return $this->container['privacy_policy_url']; + } + + /** + * Sets privacy_policy_url + * + * @param string|null $privacy_policy_url The Toll-Free Verification request privacy policy URL. + * + * @return $this + */ + public function setPrivacyPolicyUrl(?string $privacy_policy_url): static + { + if (is_null($privacy_policy_url)) { + throw new InvalidArgumentException('non-nullable privacy_policy_url cannot be null'); + } + if ((mb_strlen($privacy_policy_url) > 500)) { + throw new InvalidArgumentException('invalid length for $privacy_policy_url when calling VerificationUpdateRequest., must be smaller than or equal to 500.'); + } + + $this->container['privacy_policy_url'] = $privacy_policy_url; + + return $this; + } + + /** + * Gets terms_and_conditions_url + * + * @return string|null + */ + public function getTermsAndConditionsUrl(): ?string + { + return $this->container['terms_and_conditions_url']; + } + + /** + * Sets terms_and_conditions_url + * + * @param string|null $terms_and_conditions_url The Toll-Free Verification request terms and conditions policy URL. + * + * @return $this + */ + public function setTermsAndConditionsUrl(?string $terms_and_conditions_url): static + { + if (is_null($terms_and_conditions_url)) { + throw new InvalidArgumentException('non-nullable terms_and_conditions_url cannot be null'); + } + if ((mb_strlen($terms_and_conditions_url) > 500)) { + throw new InvalidArgumentException('invalid length for $terms_and_conditions_url when calling VerificationUpdateRequest., must be smaller than or equal to 500.'); + } + + $this->container['terms_and_conditions_url'] = $terms_and_conditions_url; + + return $this; + } + + /** + * Gets business_dba + * + * @return string|null + */ + public function getBusinessDba(): ?string + { + return $this->container['business_dba']; + } + + /** + * Sets business_dba + * + * @param string|null $business_dba The company 'Doing Business As'. + * + * @return $this + */ + public function setBusinessDba(?string $business_dba): static + { + if (is_null($business_dba)) { + throw new InvalidArgumentException('non-nullable business_dba cannot be null'); + } + if ((mb_strlen($business_dba) > 500)) { + throw new InvalidArgumentException('invalid length for $business_dba when calling VerificationUpdateRequest., must be smaller than or equal to 500.'); + } + + $this->container['business_dba'] = $business_dba; + + return $this; + } + + /** + * Gets business_registration_number + * + * @return string|null + */ + public function getBusinessRegistrationNumber(): ?string + { + return $this->container['business_registration_number']; + } + + /** + * Sets business_registration_number + * + * @param string|null $business_registration_number Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** + * + * @return $this + */ + public function setBusinessRegistrationNumber(?string $business_registration_number): static + { + if (is_null($business_registration_number)) { + array_push($this->openAPINullablesSetToNull, 'business_registration_number'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('business_registration_number', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($business_registration_number) && (mb_strlen($business_registration_number) > 500)) { + throw new InvalidArgumentException('invalid length for $business_registration_number when calling VerificationUpdateRequest., must be smaller than or equal to 500.'); + } + + $this->container['business_registration_number'] = $business_registration_number; + + return $this; + } + + /** + * Gets business_registration_type + * + * @return \OpenAPI\Client\Model\BusinessRegistrationTypeEnum|null + */ + public function getBusinessRegistrationType(): ?\OpenAPI\Client\Model\BusinessRegistrationTypeEnum + { + return $this->container['business_registration_type']; + } + + /** + * Sets business_registration_type + * + * @param \OpenAPI\Client\Model\BusinessRegistrationTypeEnum|null $business_registration_type business_registration_type + * + * @return $this + */ + public function setBusinessRegistrationType(?\OpenAPI\Client\Model\BusinessRegistrationTypeEnum $business_registration_type): static + { + if (is_null($business_registration_type)) { + array_push($this->openAPINullablesSetToNull, 'business_registration_type'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('business_registration_type', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['business_registration_type'] = $business_registration_type; + + return $this; + } + + /** + * Gets business_entity_type + * + * @return \OpenAPI\Client\Model\BusinessEntityTypeEnum|null + */ + public function getBusinessEntityType(): ?\OpenAPI\Client\Model\BusinessEntityTypeEnum + { + return $this->container['business_entity_type']; + } + + /** + * Sets business_entity_type + * + * @param \OpenAPI\Client\Model\BusinessEntityTypeEnum|null $business_entity_type business_entity_type + * + * @return $this + */ + public function setBusinessEntityType(?\OpenAPI\Client\Model\BusinessEntityTypeEnum $business_entity_type): static + { + if (is_null($business_entity_type)) { + throw new InvalidArgumentException('non-nullable business_entity_type cannot be null'); + } + $this->container['business_entity_type'] = $business_entity_type; + + return $this; + } + + /** + * Gets business_registration_issuing_country + * + * @return string|null + */ + public function getBusinessRegistrationIssuingCountry(): ?string + { + return $this->container['business_registration_issuing_country']; + } + + /** + * Sets business_registration_issuing_country + * + * @param string|null $business_registration_issuing_country The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | + * + * @return $this + */ + public function setBusinessRegistrationIssuingCountry(?string $business_registration_issuing_country): static + { + if (is_null($business_registration_issuing_country)) { + array_push($this->openAPINullablesSetToNull, 'business_registration_issuing_country'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('business_registration_issuing_country', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['business_registration_issuing_country'] = $business_registration_issuing_country; + + return $this; + } + + /** + * Gets help_message_response + * + * @return string|null + */ + public function getHelpMessageResponse(): ?string + { + return $this->container['help_message_response']; + } + + /** + * Sets help_message_response + * + * @param string|null $help_message_response A message that gets sent to users requesting help. + * + * @return $this + */ + public function setHelpMessageResponse(?string $help_message_response): static + { + if (is_null($help_message_response)) { + array_push($this->openAPINullablesSetToNull, 'help_message_response'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('help_message_response', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($help_message_response) && (mb_strlen($help_message_response) > 500)) { + throw new InvalidArgumentException('invalid length for $help_message_response when calling VerificationUpdateRequest., must be smaller than or equal to 500.'); + } + + $this->container['help_message_response'] = $help_message_response; + + return $this; + } + + /** + * Gets age_gated_content + * + * @return bool|null + */ + public function getAgeGatedContent(): ?bool + { + return $this->container['age_gated_content']; + } + + /** + * Sets age_gated_content + * + * @param bool|null $age_gated_content Indicates whether the content is age-gated. + * + * @return $this + */ + public function setAgeGatedContent(?bool $age_gated_content): static + { + if (is_null($age_gated_content)) { + throw new InvalidArgumentException('non-nullable age_gated_content cannot be null'); + } + $this->container['age_gated_content'] = $age_gated_content; + + return $this; + } + + /** + * Gets cv_token + * + * @return string|null + */ + public function getCvToken(): ?string + { + return $this->container['cv_token']; + } + + /** + * Sets cv_token + * + * @param string|null $cv_token The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection. + * + * @return $this + */ + public function setCvToken(?string $cv_token): static + { + if (is_null($cv_token)) { + array_push($this->openAPINullablesSetToNull, 'cv_token'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('cv_token', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($cv_token) && (mb_strlen($cv_token) > 500)) { + throw new InvalidArgumentException('invalid length for $cv_token when calling VerificationUpdateRequest., must be smaller than or equal to 500.'); + } + if (!is_null($cv_token) && (mb_strlen($cv_token) < 0)) { + throw new InvalidArgumentException('invalid length for $cv_token when calling VerificationUpdateRequest., must be bigger than or equal to 0.'); + } + + $this->container['cv_token'] = $cv_token; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/VerificationWebhook.php b/src/Model/VerificationWebhook.php new file mode 100644 index 00000000..7c44ca43 --- /dev/null +++ b/src/Model/VerificationWebhook.php @@ -0,0 +1,508 @@ + + */ +class VerificationWebhook implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'verificationWebhook'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'account_id' => 'string', + 'phone_number' => 'string', + 'status' => '\OpenAPI\Client\Model\TfvCallbackStatusEnum', + 'internal_ticket_number' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'account_id' => null, + 'phone_number' => null, + 'status' => null, + 'internal_ticket_number' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'account_id' => false, + 'phone_number' => false, + 'status' => false, + 'internal_ticket_number' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'account_id' => 'accountId', + 'phone_number' => 'phoneNumber', + 'status' => 'status', + 'internal_ticket_number' => 'internalTicketNumber' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'account_id' => 'setAccountId', + 'phone_number' => 'setPhoneNumber', + 'status' => 'setStatus', + 'internal_ticket_number' => 'setInternalTicketNumber' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'account_id' => 'getAccountId', + 'phone_number' => 'getPhoneNumber', + 'status' => 'getStatus', + 'internal_ticket_number' => 'getInternalTicketNumber' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('phone_number', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('internal_ticket_number', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) > 12)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be smaller than or equal to 12."; + } + + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) < 12)) { + $invalidProperties[] = "invalid value for 'phone_number', the character length must be bigger than or equal to 12."; + } + + if (!is_null($this->container['phone_number']) && !preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", $this->container['phone_number'])) { + $invalidProperties[] = "invalid value for 'phone_number', must be conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id User's account ID. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets phone_number + * + * @return string|null + */ + public function getPhoneNumber(): ?string + { + return $this->container['phone_number']; + } + + /** + * Sets phone_number + * + * @param string|null $phone_number Toll-free telephone number in E.164 format. + * + * @return $this + */ + public function setPhoneNumber(?string $phone_number): static + { + if (is_null($phone_number)) { + throw new InvalidArgumentException('non-nullable phone_number cannot be null'); + } + if ((mb_strlen($phone_number) > 12)) { + throw new InvalidArgumentException('invalid length for $phone_number when calling VerificationWebhook., must be smaller than or equal to 12.'); + } + if ((mb_strlen($phone_number) < 12)) { + throw new InvalidArgumentException('invalid length for $phone_number when calling VerificationWebhook., must be bigger than or equal to 12.'); + } + if ((!preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", ObjectSerializer::toString($phone_number)))) { + throw new InvalidArgumentException("invalid value for \$phone_number when calling VerificationWebhook., must conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."); + } + + $this->container['phone_number'] = $phone_number; + + return $this; + } + + /** + * Gets status + * + * @return \OpenAPI\Client\Model\TfvCallbackStatusEnum|null + */ + public function getStatus(): ?\OpenAPI\Client\Model\TfvCallbackStatusEnum + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\TfvCallbackStatusEnum|null $status status + * + * @return $this + */ + public function setStatus(?\OpenAPI\Client\Model\TfvCallbackStatusEnum $status): static + { + if (is_null($status)) { + throw new InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets internal_ticket_number + * + * @return string|null + */ + public function getInternalTicketNumber(): ?string + { + return $this->container['internal_ticket_number']; + } + + /** + * Sets internal_ticket_number + * + * @param string|null $internal_ticket_number Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. + * + * @return $this + */ + public function setInternalTicketNumber(?string $internal_ticket_number): static + { + if (is_null($internal_ticket_number)) { + throw new InvalidArgumentException('non-nullable internal_ticket_number cannot be null'); + } + $this->container['internal_ticket_number'] = $internal_ticket_number; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/VerifyCodeRequest.php b/src/Model/VerifyCodeRequest.php new file mode 100644 index 00000000..850c2f98 --- /dev/null +++ b/src/Model/VerifyCodeRequest.php @@ -0,0 +1,535 @@ + + */ +class VerifyCodeRequest implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'verifyCodeRequest'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'to' => 'string', + 'scope' => 'string', + 'expiration_time_in_minutes' => 'float', + 'code' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'to' => null, + 'scope' => null, + 'expiration_time_in_minutes' => null, + 'code' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'to' => false, + 'scope' => false, + 'expiration_time_in_minutes' => false, + 'code' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'to' => 'to', + 'scope' => 'scope', + 'expiration_time_in_minutes' => 'expirationTimeInMinutes', + 'code' => 'code' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'to' => 'setTo', + 'scope' => 'setScope', + 'expiration_time_in_minutes' => 'setExpirationTimeInMinutes', + 'code' => 'setCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'to' => 'getTo', + 'scope' => 'getScope', + 'expiration_time_in_minutes' => 'getExpirationTimeInMinutes', + 'code' => 'getCode' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('scope', $data ?? [], null); + $this->setIfExists('expiration_time_in_minutes', $data ?? [], null); + $this->setIfExists('code', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['to'] === null) { + $invalidProperties[] = "'to' can't be null"; + } + if (!preg_match("/^\\+[1-9]\\d{1,14}$/", $this->container['to'])) { + $invalidProperties[] = "invalid value for 'to', must be conform to the pattern /^\\+[1-9]\\d{1,14}$/."; + } + + if ($this->container['expiration_time_in_minutes'] === null) { + $invalidProperties[] = "'expiration_time_in_minutes' can't be null"; + } + if (($this->container['expiration_time_in_minutes'] > 15)) { + $invalidProperties[] = "invalid value for 'expiration_time_in_minutes', must be smaller than or equal to 15."; + } + + if (($this->container['expiration_time_in_minutes'] < 1)) { + $invalidProperties[] = "invalid value for 'expiration_time_in_minutes', must be bigger than or equal to 1."; + } + + if ($this->container['code'] === null) { + $invalidProperties[] = "'code' can't be null"; + } + if ((mb_strlen($this->container['code']) > 8)) { + $invalidProperties[] = "invalid value for 'code', the character length must be smaller than or equal to 8."; + } + + if ((mb_strlen($this->container['code']) < 4)) { + $invalidProperties[] = "invalid value for 'code', the character length must be bigger than or equal to 4."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets to + * + * @return string + */ + public function getTo(): string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string $to The phone number to send the mfa code to. + * + * @return $this + */ + public function setTo(string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + + if ((!preg_match("/^\\+[1-9]\\d{1,14}$/", ObjectSerializer::toString($to)))) { + throw new InvalidArgumentException("invalid value for \$to when calling VerifyCodeRequest., must conform to the pattern /^\\+[1-9]\\d{1,14}$/."); + } + + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets scope + * + * @return string|null + */ + public function getScope(): ?string + { + return $this->container['scope']; + } + + /** + * Sets scope + * + * @param string|null $scope An optional field to denote what scope or action the mfa code is addressing. If not supplied, defaults to \"2FA\". + * + * @return $this + */ + public function setScope(?string $scope): static + { + if (is_null($scope)) { + throw new InvalidArgumentException('non-nullable scope cannot be null'); + } + $this->container['scope'] = $scope; + + return $this; + } + + /** + * Gets expiration_time_in_minutes + * + * @return float + */ + public function getExpirationTimeInMinutes(): float + { + return $this->container['expiration_time_in_minutes']; + } + + /** + * Sets expiration_time_in_minutes + * + * @param float $expiration_time_in_minutes The time period, in minutes, to validate the mfa code. By setting this to 3 minutes, it will mean any code generated within the last 3 minutes are still valid. The valid range for expiration time is between 0 and 15 minutes, exclusively and inclusively, respectively. + * + * @return $this + */ + public function setExpirationTimeInMinutes(float $expiration_time_in_minutes): static + { + if (is_null($expiration_time_in_minutes)) { + throw new InvalidArgumentException('non-nullable expiration_time_in_minutes cannot be null'); + } + + if (($expiration_time_in_minutes > 15)) { + throw new InvalidArgumentException('invalid value for $expiration_time_in_minutes when calling VerifyCodeRequest., must be smaller than or equal to 15.'); + } + if (($expiration_time_in_minutes < 1)) { + throw new InvalidArgumentException('invalid value for $expiration_time_in_minutes when calling VerifyCodeRequest., must be bigger than or equal to 1.'); + } + + $this->container['expiration_time_in_minutes'] = $expiration_time_in_minutes; + + return $this; + } + + /** + * Gets code + * + * @return string + */ + public function getCode(): string + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string $code The generated mfa code to check if valid. + * + * @return $this + */ + public function setCode(string $code): static + { + if (is_null($code)) { + throw new InvalidArgumentException('non-nullable code cannot be null'); + } + if ((mb_strlen($code) > 8)) { + throw new InvalidArgumentException('invalid length for $code when calling VerifyCodeRequest., must be smaller than or equal to 8.'); + } + if ((mb_strlen($code) < 4)) { + throw new InvalidArgumentException('invalid length for $code when calling VerifyCodeRequest., must be bigger than or equal to 4.'); + } + + $this->container['code'] = $code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/VerifyCodeResponse.php b/src/Model/VerifyCodeResponse.php new file mode 100644 index 00000000..78bb6a03 --- /dev/null +++ b/src/Model/VerifyCodeResponse.php @@ -0,0 +1,384 @@ + + */ +class VerifyCodeResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'verifyCodeResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'valid' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'valid' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'valid' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'valid' => 'valid' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'valid' => 'setValid' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'valid' => 'getValid' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('valid', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets valid + * + * @return bool|null + */ + public function getValid(): ?bool + { + return $this->container['valid']; + } + + /** + * Sets valid + * + * @param bool|null $valid Whether or not the supplied code is valid. + * + * @return $this + */ + public function setValid(?bool $valid): static + { + if (is_null($valid)) { + throw new InvalidArgumentException('non-nullable valid cannot be null'); + } + $this->container['valid'] = $valid; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/VoiceApiError.php b/src/Model/VoiceApiError.php new file mode 100644 index 00000000..ff9d65b5 --- /dev/null +++ b/src/Model/VoiceApiError.php @@ -0,0 +1,459 @@ + + */ +class VoiceApiError implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'voiceApiError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'type' => 'string', + 'description' => 'string', + 'id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'type' => null, + 'description' => null, + 'id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'type' => false, + 'description' => false, + 'id' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'type' => 'type', + 'description' => 'description', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'type' => 'setType', + 'description' => 'setDescription', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'type' => 'getType', + 'description' => 'getDescription', + 'id' => 'getId' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets type + * + * @return string|null + */ + public function getType(): ?string + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string|null $type type + * + * @return $this + */ + public function setType(?string $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return $this + */ + public function setDescription(?string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets id + * + * @return string|null + */ + public function getId(): ?string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return $this + */ + public function setId(?string $id): static + { + if (is_null($id)) { + array_push($this->openAPINullablesSetToNull, 'id'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('id', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['id'] = $id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/VoiceCodeResponse.php b/src/Model/VoiceCodeResponse.php new file mode 100644 index 00000000..bc1d78b5 --- /dev/null +++ b/src/Model/VoiceCodeResponse.php @@ -0,0 +1,384 @@ + + */ +class VoiceCodeResponse implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'voiceCodeResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'call_id' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'call_id' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'call_id' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'call_id' => 'callId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'call_id' => 'setCallId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'call_id' => 'getCallId' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('call_id', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id Programmable Voice API Call ID. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/WebhookSubscription.php b/src/Model/WebhookSubscription.php new file mode 100644 index 00000000..7cd40551 --- /dev/null +++ b/src/Model/WebhookSubscription.php @@ -0,0 +1,621 @@ + + */ +class WebhookSubscription implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'webhookSubscription'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'id' => 'string', + 'account_id' => 'string', + 'callback_url' => 'string', + 'type' => '\OpenAPI\Client\Model\WebhookSubscriptionTypeEnum', + 'basic_authentication' => '\OpenAPI\Client\Model\WebhookSubscriptionBasicAuthentication', + 'created_date' => '\DateTime', + 'modified_date' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'id' => null, + 'account_id' => null, + 'callback_url' => 'url', + 'type' => null, + 'basic_authentication' => null, + 'created_date' => 'date-time', + 'modified_date' => 'date-time' + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'id' => false, + 'account_id' => false, + 'callback_url' => true, + 'type' => false, + 'basic_authentication' => false, + 'created_date' => false, + 'modified_date' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'id' => 'id', + 'account_id' => 'accountId', + 'callback_url' => 'callbackUrl', + 'type' => 'type', + 'basic_authentication' => 'basicAuthentication', + 'created_date' => 'createdDate', + 'modified_date' => 'modifiedDate' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'id' => 'setId', + 'account_id' => 'setAccountId', + 'callback_url' => 'setCallbackUrl', + 'type' => 'setType', + 'basic_authentication' => 'setBasicAuthentication', + 'created_date' => 'setCreatedDate', + 'modified_date' => 'setModifiedDate' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'id' => 'getId', + 'account_id' => 'getAccountId', + 'callback_url' => 'getCallbackUrl', + 'type' => 'getType', + 'basic_authentication' => 'getBasicAuthentication', + 'created_date' => 'getCreatedDate', + 'modified_date' => 'getModifiedDate' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('callback_url', $data ?? [], null); + $this->setIfExists('type', $data ?? [], null); + $this->setIfExists('basic_authentication', $data ?? [], null); + $this->setIfExists('created_date', $data ?? [], null); + $this->setIfExists('modified_date', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['callback_url'] === null && !$this->isNullableSetToNull('callback_url')) { + $invalidProperties[] = "'callback_url' is required"; + } + if (!is_null($this->container['callback_url']) && (mb_strlen($this->container['callback_url']) > 2000)) { + $invalidProperties[] = "invalid value for 'callback_url', the character length must be smaller than or equal to 2000."; + } + + if (!is_null($this->container['callback_url']) && (mb_strlen($this->container['callback_url']) < 0)) { + $invalidProperties[] = "invalid value for 'callback_url', the character length must be bigger than or equal to 0."; + } + + if (!is_null($this->container['callback_url']) && !preg_match("/^$|(https?:\/\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,253}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#()?&\/\/=]*)/", $this->container['callback_url'])) { + $invalidProperties[] = "invalid value for 'callback_url', must be conform to the pattern /^$|(https?:\/\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,253}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#()?&\/\/=]*)/."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return string|null + */ + public function getId(): ?string + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id id + * + * @return $this + */ + public function setId(?string $id): static + { + if (is_null($id)) { + throw new InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id account_id + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets callback_url + * + * @return string|null + */ + public function getCallbackUrl(): ?string + { + return $this->container['callback_url']; + } + + /** + * Sets callback_url + * + * @param string|null $callback_url Callback URL to receive status updates from Bandwidth. When a webhook subscription is registered with Bandwidth under a given account ID, it will be used to send status updates for all requests submitted under that account ID. + * + * @return $this + */ + public function setCallbackUrl(?string $callback_url): static + { + if (is_null($callback_url)) { + array_push($this->openAPINullablesSetToNull, 'callback_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('callback_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($callback_url) && (mb_strlen($callback_url) > 2000)) { + throw new InvalidArgumentException('invalid length for $callback_url when calling WebhookSubscription., must be smaller than or equal to 2000.'); + } + if (!is_null($callback_url) && (mb_strlen($callback_url) < 0)) { + throw new InvalidArgumentException('invalid length for $callback_url when calling WebhookSubscription., must be bigger than or equal to 0.'); + } + if (!is_null($callback_url) && (!preg_match("/^$|(https?:\/\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,253}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#()?&\/\/=]*)/", ObjectSerializer::toString($callback_url)))) { + throw new InvalidArgumentException("invalid value for \$callback_url when calling WebhookSubscription., must conform to the pattern /^$|(https?:\/\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,253}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#()?&\/\/=]*)/."); + } + + $this->container['callback_url'] = $callback_url; + + return $this; + } + + /** + * Gets type + * + * @return \OpenAPI\Client\Model\WebhookSubscriptionTypeEnum|null + */ + public function getType(): ?\OpenAPI\Client\Model\WebhookSubscriptionTypeEnum + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param \OpenAPI\Client\Model\WebhookSubscriptionTypeEnum|null $type type + * + * @return $this + */ + public function setType(?\OpenAPI\Client\Model\WebhookSubscriptionTypeEnum $type): static + { + if (is_null($type)) { + throw new InvalidArgumentException('non-nullable type cannot be null'); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets basic_authentication + * + * @return \OpenAPI\Client\Model\WebhookSubscriptionBasicAuthentication|null + */ + public function getBasicAuthentication(): ?\OpenAPI\Client\Model\WebhookSubscriptionBasicAuthentication + { + return $this->container['basic_authentication']; + } + + /** + * Sets basic_authentication + * + * @param \OpenAPI\Client\Model\WebhookSubscriptionBasicAuthentication|null $basic_authentication basic_authentication + * + * @return $this + */ + public function setBasicAuthentication(?\OpenAPI\Client\Model\WebhookSubscriptionBasicAuthentication $basic_authentication): static + { + if (is_null($basic_authentication)) { + throw new InvalidArgumentException('non-nullable basic_authentication cannot be null'); + } + $this->container['basic_authentication'] = $basic_authentication; + + return $this; + } + + /** + * Gets created_date + * + * @return \DateTime|null + */ + public function getCreatedDate(): ?\DateTime + { + return $this->container['created_date']; + } + + /** + * Sets created_date + * + * @param \DateTime|null $created_date created_date + * + * @return $this + */ + public function setCreatedDate(?\DateTime $created_date): static + { + if (is_null($created_date)) { + throw new InvalidArgumentException('non-nullable created_date cannot be null'); + } + $this->container['created_date'] = $created_date; + + return $this; + } + + /** + * Gets modified_date + * + * @return \DateTime|null + */ + public function getModifiedDate(): ?\DateTime + { + return $this->container['modified_date']; + } + + /** + * Sets modified_date + * + * @param \DateTime|null $modified_date modified_date + * + * @return $this + */ + public function setModifiedDate(?\DateTime $modified_date): static + { + if (is_null($modified_date)) { + throw new InvalidArgumentException('non-nullable modified_date cannot be null'); + } + $this->container['modified_date'] = $modified_date; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/WebhookSubscriptionBasicAuthentication.php b/src/Model/WebhookSubscriptionBasicAuthentication.php new file mode 100644 index 00000000..4dcb62b4 --- /dev/null +++ b/src/Model/WebhookSubscriptionBasicAuthentication.php @@ -0,0 +1,441 @@ + + */ +class WebhookSubscriptionBasicAuthentication implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'webhookSubscription_basicAuthentication'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'username' => 'string', + 'password' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'username' => null, + 'password' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'username' => false, + 'password' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'username' => 'username', + 'password' => 'password' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'username' => 'setUsername', + 'password' => 'setPassword' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'username' => 'getUsername', + 'password' => 'getPassword' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('username', $data ?? [], null); + $this->setIfExists('password', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['username'] === null) { + $invalidProperties[] = "'username' can't be null"; + } + if ((mb_strlen($this->container['username']) > 100)) { + $invalidProperties[] = "invalid value for 'username', the character length must be smaller than or equal to 100."; + } + + if ($this->container['password'] === null) { + $invalidProperties[] = "'password' can't be null"; + } + if ((mb_strlen($this->container['password']) > 200)) { + $invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 200."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets username + * + * @return string + */ + public function getUsername(): string + { + return $this->container['username']; + } + + /** + * Sets username + * + * @param string $username username + * + * @return $this + */ + public function setUsername(string $username): static + { + if (is_null($username)) { + throw new InvalidArgumentException('non-nullable username cannot be null'); + } + if ((mb_strlen($username) > 100)) { + throw new InvalidArgumentException('invalid length for $username when calling WebhookSubscriptionBasicAuthentication., must be smaller than or equal to 100.'); + } + + $this->container['username'] = $username; + + return $this; + } + + /** + * Gets password + * + * @return string + */ + public function getPassword(): string + { + return $this->container['password']; + } + + /** + * Sets password + * + * @param string $password password + * + * @return $this + */ + public function setPassword(string $password): static + { + if (is_null($password)) { + throw new InvalidArgumentException('non-nullable password cannot be null'); + } + if ((mb_strlen($password) > 200)) { + throw new InvalidArgumentException('invalid length for $password when calling WebhookSubscriptionBasicAuthentication., must be smaller than or equal to 200.'); + } + + $this->container['password'] = $password; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/WebhookSubscriptionError.php b/src/Model/WebhookSubscriptionError.php new file mode 100644 index 00000000..03cffbf3 --- /dev/null +++ b/src/Model/WebhookSubscriptionError.php @@ -0,0 +1,452 @@ + + */ +class WebhookSubscriptionError implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'webhookSubscriptionError'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'code' => 'int', + 'description' => 'string', + 'telephone_numbers' => '\OpenAPI\Client\Model\TelephoneNumber[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'code' => null, + 'description' => null, + 'telephone_numbers' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'code' => false, + 'description' => false, + 'telephone_numbers' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'code' => 'code', + 'description' => 'description', + 'telephone_numbers' => 'telephoneNumbers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'code' => 'setCode', + 'description' => 'setDescription', + 'telephone_numbers' => 'setTelephoneNumbers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'code' => 'getCode', + 'description' => 'getDescription', + 'telephone_numbers' => 'getTelephoneNumbers' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('description', $data ?? [], null); + $this->setIfExists('telephone_numbers', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets code + * + * @return int|null + */ + public function getCode(): ?int + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param int|null $code code + * + * @return $this + */ + public function setCode(?int $code): static + { + if (is_null($code)) { + throw new InvalidArgumentException('non-nullable code cannot be null'); + } + $this->container['code'] = $code; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription(): ?string + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description description + * + * @return $this + */ + public function setDescription(?string $description): static + { + if (is_null($description)) { + throw new InvalidArgumentException('non-nullable description cannot be null'); + } + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets telephone_numbers + * + * @return \OpenAPI\Client\Model\TelephoneNumber[]|null + */ + public function getTelephoneNumbers(): ?array + { + return $this->container['telephone_numbers']; + } + + /** + * Sets telephone_numbers + * + * @param \OpenAPI\Client\Model\TelephoneNumber[]|null $telephone_numbers telephone_numbers + * + * @return $this + */ + public function setTelephoneNumbers(?array $telephone_numbers): static + { + if (is_null($telephone_numbers)) { + throw new InvalidArgumentException('non-nullable telephone_numbers cannot be null'); + } + $this->container['telephone_numbers'] = $telephone_numbers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/WebhookSubscriptionRequestSchema.php b/src/Model/WebhookSubscriptionRequestSchema.php new file mode 100644 index 00000000..124b7fde --- /dev/null +++ b/src/Model/WebhookSubscriptionRequestSchema.php @@ -0,0 +1,513 @@ + + */ +class WebhookSubscriptionRequestSchema implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'webhookSubscriptionRequestSchema'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'basic_authentication' => '\OpenAPI\Client\Model\TfvBasicAuthentication', + 'callback_url' => 'string', + 'shared_secret_key' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'basic_authentication' => null, + 'callback_url' => 'url', + 'shared_secret_key' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'basic_authentication' => false, + 'callback_url' => true, + 'shared_secret_key' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'basic_authentication' => 'basicAuthentication', + 'callback_url' => 'callbackUrl', + 'shared_secret_key' => 'sharedSecretKey' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'basic_authentication' => 'setBasicAuthentication', + 'callback_url' => 'setCallbackUrl', + 'shared_secret_key' => 'setSharedSecretKey' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'basic_authentication' => 'getBasicAuthentication', + 'callback_url' => 'getCallbackUrl', + 'shared_secret_key' => 'getSharedSecretKey' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('basic_authentication', $data ?? [], null); + $this->setIfExists('callback_url', $data ?? [], null); + $this->setIfExists('shared_secret_key', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['callback_url'] === null && !$this->isNullableSetToNull('callback_url')) { + $invalidProperties[] = "'callback_url' is required"; + } + if (!is_null($this->container['callback_url']) && (mb_strlen($this->container['callback_url']) > 2000)) { + $invalidProperties[] = "invalid value for 'callback_url', the character length must be smaller than or equal to 2000."; + } + + if (!is_null($this->container['callback_url']) && (mb_strlen($this->container['callback_url']) < 0)) { + $invalidProperties[] = "invalid value for 'callback_url', the character length must be bigger than or equal to 0."; + } + + if (!is_null($this->container['callback_url']) && !preg_match("/^$|(https?:\/\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,253}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#()?&\/\/=]*)/", $this->container['callback_url'])) { + $invalidProperties[] = "invalid value for 'callback_url', must be conform to the pattern /^$|(https?:\/\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,253}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#()?&\/\/=]*)/."; + } + + if (!is_null($this->container['shared_secret_key']) && (mb_strlen($this->container['shared_secret_key']) > 64)) { + $invalidProperties[] = "invalid value for 'shared_secret_key', the character length must be smaller than or equal to 64."; + } + + if (!is_null($this->container['shared_secret_key']) && (mb_strlen($this->container['shared_secret_key']) < 16)) { + $invalidProperties[] = "invalid value for 'shared_secret_key', the character length must be bigger than or equal to 16."; + } + + if (!is_null($this->container['shared_secret_key']) && !preg_match("/^[ -~]{16,64}$/", $this->container['shared_secret_key'])) { + $invalidProperties[] = "invalid value for 'shared_secret_key', must be conform to the pattern /^[ -~]{16,64}$/."; + } + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets basic_authentication + * + * @return \OpenAPI\Client\Model\TfvBasicAuthentication|null + */ + public function getBasicAuthentication(): ?\OpenAPI\Client\Model\TfvBasicAuthentication + { + return $this->container['basic_authentication']; + } + + /** + * Sets basic_authentication + * + * @param \OpenAPI\Client\Model\TfvBasicAuthentication|null $basic_authentication basic_authentication + * + * @return $this + */ + public function setBasicAuthentication(?\OpenAPI\Client\Model\TfvBasicAuthentication $basic_authentication): static + { + if (is_null($basic_authentication)) { + throw new InvalidArgumentException('non-nullable basic_authentication cannot be null'); + } + $this->container['basic_authentication'] = $basic_authentication; + + return $this; + } + + /** + * Gets callback_url + * + * @return string|null + */ + public function getCallbackUrl(): ?string + { + return $this->container['callback_url']; + } + + /** + * Sets callback_url + * + * @param string|null $callback_url Callback URL to receive status updates from Bandwidth. When a webhook subscription is registered with Bandwidth under a given account ID, it will be used to send status updates for all requests submitted under that account ID. + * + * @return $this + */ + public function setCallbackUrl(?string $callback_url): static + { + if (is_null($callback_url)) { + array_push($this->openAPINullablesSetToNull, 'callback_url'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('callback_url', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($callback_url) && (mb_strlen($callback_url) > 2000)) { + throw new InvalidArgumentException('invalid length for $callback_url when calling WebhookSubscriptionRequestSchema., must be smaller than or equal to 2000.'); + } + if (!is_null($callback_url) && (mb_strlen($callback_url) < 0)) { + throw new InvalidArgumentException('invalid length for $callback_url when calling WebhookSubscriptionRequestSchema., must be bigger than or equal to 0.'); + } + if (!is_null($callback_url) && (!preg_match("/^$|(https?:\/\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,253}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#()?&\/\/=]*)/", ObjectSerializer::toString($callback_url)))) { + throw new InvalidArgumentException("invalid value for \$callback_url when calling WebhookSubscriptionRequestSchema., must conform to the pattern /^$|(https?:\/\/)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,253}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#()?&\/\/=]*)/."); + } + + $this->container['callback_url'] = $callback_url; + + return $this; + } + + /** + * Gets shared_secret_key + * + * @return string|null + */ + public function getSharedSecretKey(): ?string + { + return $this->container['shared_secret_key']; + } + + /** + * Sets shared_secret_key + * + * @param string|null $shared_secret_key An ASCII string submitted by the user as a shared secret key for generating an HMAC header for callbacks. + * + * @return $this + */ + public function setSharedSecretKey(?string $shared_secret_key): static + { + if (is_null($shared_secret_key)) { + array_push($this->openAPINullablesSetToNull, 'shared_secret_key'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('shared_secret_key', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + if (!is_null($shared_secret_key) && (mb_strlen($shared_secret_key) > 64)) { + throw new InvalidArgumentException('invalid length for $shared_secret_key when calling WebhookSubscriptionRequestSchema., must be smaller than or equal to 64.'); + } + if (!is_null($shared_secret_key) && (mb_strlen($shared_secret_key) < 16)) { + throw new InvalidArgumentException('invalid length for $shared_secret_key when calling WebhookSubscriptionRequestSchema., must be bigger than or equal to 16.'); + } + if (!is_null($shared_secret_key) && (!preg_match("/^[ -~]{16,64}$/", ObjectSerializer::toString($shared_secret_key)))) { + throw new InvalidArgumentException("invalid value for \$shared_secret_key when calling WebhookSubscriptionRequestSchema., must conform to the pattern /^[ -~]{16,64}$/."); + } + + $this->container['shared_secret_key'] = $shared_secret_key; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/WebhookSubscriptionTypeEnum.php b/src/Model/WebhookSubscriptionTypeEnum.php new file mode 100644 index 00000000..bd4496be --- /dev/null +++ b/src/Model/WebhookSubscriptionTypeEnum.php @@ -0,0 +1,45 @@ + + */ +class WebhookSubscriptionsListBody implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'webhookSubscriptionsListBody'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'links' => '\OpenAPI\Client\Model\LinksObject', + 'errors' => '\OpenAPI\Client\Model\WebhookSubscriptionError[]', + 'data' => '\OpenAPI\Client\Model\WebhookSubscription[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'links' => null, + 'errors' => null, + 'data' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'links' => false, + 'errors' => false, + 'data' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'links' => 'links', + 'errors' => 'errors', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'links' => 'setLinks', + 'errors' => 'setErrors', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'links' => 'getLinks', + 'errors' => 'getErrors', + 'data' => 'getData' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('links', $data ?? [], null); + $this->setIfExists('errors', $data ?? [], null); + $this->setIfExists('data', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets links + * + * @return \OpenAPI\Client\Model\LinksObject|null + */ + public function getLinks(): ?\OpenAPI\Client\Model\LinksObject + { + return $this->container['links']; + } + + /** + * Sets links + * + * @param \OpenAPI\Client\Model\LinksObject|null $links links + * + * @return $this + */ + public function setLinks(?\OpenAPI\Client\Model\LinksObject $links): static + { + if (is_null($links)) { + throw new InvalidArgumentException('non-nullable links cannot be null'); + } + $this->container['links'] = $links; + + return $this; + } + + /** + * Gets errors + * + * @return \OpenAPI\Client\Model\WebhookSubscriptionError[]|null + */ + public function getErrors(): ?array + { + return $this->container['errors']; + } + + /** + * Sets errors + * + * @param \OpenAPI\Client\Model\WebhookSubscriptionError[]|null $errors errors + * + * @return $this + */ + public function setErrors(?array $errors): static + { + if (is_null($errors)) { + throw new InvalidArgumentException('non-nullable errors cannot be null'); + } + $this->container['errors'] = $errors; + + return $this; + } + + /** + * Gets data + * + * @return \OpenAPI\Client\Model\WebhookSubscription[] + */ + public function getData(): array + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \OpenAPI\Client\Model\WebhookSubscription[] $data data + * + * @return $this + */ + public function setData(array $data): static + { + if (is_null($data)) { + throw new InvalidArgumentException('non-nullable data cannot be null'); + } + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/MultiFactorAuth/Controllers/MFAController.php b/src/MultiFactorAuth/Controllers/MFAController.php deleted file mode 100644 index ea0eb443..00000000 --- a/src/MultiFactorAuth/Controllers/MFAController.php +++ /dev/null @@ -1,320 +0,0 @@ - $accountId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::MULTIFACTORAUTHDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json', - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'multiFactorAuth'); - - $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::post($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ErrorWithRequestException( - 'If there is any issue with values passed in by the user', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new Exceptions\UnauthorizedRequestException( - 'Authentication is either incorrect or not present', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ForbiddenRequestException( - 'The user is not authorized to access this resource', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ErrorWithRequestException('An internal server error occurred', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass( - $response->body, - 'BandwidthLib\\MultiFactorAuth\\Models\\TwoFactorVoiceResponse' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Multi-Factor authentication with Bandwidth Messaging services. Allows a user to send an MFA code via - * a text message (SMS). - * - * @param string $accountId Bandwidth Account ID with Messaging service enabled - * @param Models\TwoFactorCodeRequestSchema $body TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function createMessagingTwoFactor( - string $accountId, - Models\TwoFactorCodeRequestSchema $body - ) { - - //prepare query string for API call - $_queryBuilder = '/accounts/{accountId}/code/messaging'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::MULTIFACTORAUTHDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json', - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'multiFactorAuth'); - - $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::post($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ErrorWithRequestException( - 'If there is any issue with values passed in by the user', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new Exceptions\UnauthorizedRequestException( - 'Authentication is either incorrect or not present', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ForbiddenRequestException( - 'The user is not authorized to access this resource', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ErrorWithRequestException('An internal server error occurred', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass( - $response->body, - 'BandwidthLib\\MultiFactorAuth\\Models\\TwoFactorMessagingResponse' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Allows a user to verify an MFA code. - * - * @param string $accountId Bandwidth Account ID with Two-Factor enabled - * @param Models\TwoFactorVerifyRequestSchema $body TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function createVerifyTwoFactor( - string $accountId, - Models\TwoFactorVerifyRequestSchema $body - ) { - - //prepare query string for API call - $_queryBuilder = '/accounts/{accountId}/code/verify'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::MULTIFACTORAUTHDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json', - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'multiFactorAuth'); - - $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::post($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ErrorWithRequestException( - 'If there is any issue with values passed in by the user', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new Exceptions\UnauthorizedRequestException( - 'Authentication is either incorrect or not present', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ForbiddenRequestException( - 'The user is not authorized to access this resource', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ErrorWithRequestException( - 'The user has made too many bad requests and is temporarily locked out', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ErrorWithRequestException('An internal server error occurred', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass( - $response->body, - 'BandwidthLib\\MultiFactorAuth\\Models\\TwoFactorVerifyCodeResponse' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } -} diff --git a/src/MultiFactorAuth/Exceptions/ErrorWithRequestException.php b/src/MultiFactorAuth/Exceptions/ErrorWithRequestException.php deleted file mode 100644 index 302f371b..00000000 --- a/src/MultiFactorAuth/Exceptions/ErrorWithRequestException.php +++ /dev/null @@ -1,44 +0,0 @@ -to = func_get_arg(0); - $this->from = func_get_arg(1); - $this->applicationId = func_get_arg(2); - $this->scope = func_get_arg(3); - $this->message = func_get_arg(4); - $this->digits = func_get_arg(5); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['to'] = $this->to; - $json['from'] = $this->from; - $json['applicationId'] = $this->applicationId; - $json['scope'] = $this->scope; - $json['message'] = $this->message; - $json['digits'] = $this->digits; - - return array_filter($json); - } -} diff --git a/src/MultiFactorAuth/Models/TwoFactorMessagingResponse.php b/src/MultiFactorAuth/Models/TwoFactorMessagingResponse.php deleted file mode 100644 index 3ffe87b9..00000000 --- a/src/MultiFactorAuth/Models/TwoFactorMessagingResponse.php +++ /dev/null @@ -1,41 +0,0 @@ -messageId = func_get_arg(0); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['messageId'] = $this->messageId; - - return array_filter($json); - } -} diff --git a/src/MultiFactorAuth/Models/TwoFactorVerifyCodeResponse.php b/src/MultiFactorAuth/Models/TwoFactorVerifyCodeResponse.php deleted file mode 100644 index d689f815..00000000 --- a/src/MultiFactorAuth/Models/TwoFactorVerifyCodeResponse.php +++ /dev/null @@ -1,41 +0,0 @@ -valid = func_get_arg(0); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['valid'] = $this->valid; - - return array_filter($json); - } -} diff --git a/src/MultiFactorAuth/Models/TwoFactorVerifyRequestSchema.php b/src/MultiFactorAuth/Models/TwoFactorVerifyRequestSchema.php deleted file mode 100644 index ebaa94db..00000000 --- a/src/MultiFactorAuth/Models/TwoFactorVerifyRequestSchema.php +++ /dev/null @@ -1,84 +0,0 @@ -to = func_get_arg(0); - $this->applicationId = func_get_arg(1); - $this->scope = func_get_arg(2); - $this->expirationTimeInMinutes = func_get_arg(3); - $this->code = func_get_arg(4); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['to'] = $this->to; - $json['applicationId'] = $this->applicationId; - $json['scope'] = $this->scope; - $json['expirationTimeInMinutes'] = $this->expirationTimeInMinutes; - $json['code'] = $this->code; - - return array_filter($json); - } -} diff --git a/src/MultiFactorAuth/Models/TwoFactorVoiceResponse.php b/src/MultiFactorAuth/Models/TwoFactorVoiceResponse.php deleted file mode 100644 index c8f4b693..00000000 --- a/src/MultiFactorAuth/Models/TwoFactorVoiceResponse.php +++ /dev/null @@ -1,41 +0,0 @@ -callId = func_get_arg(0); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['callId'] = $this->callId; - - return array_filter($json); - } -} diff --git a/src/MultiFactorAuth/MultiFactorAuthClient.php b/src/MultiFactorAuth/MultiFactorAuthClient.php deleted file mode 100644 index 1c63a750..00000000 --- a/src/MultiFactorAuth/MultiFactorAuthClient.php +++ /dev/null @@ -1,37 +0,0 @@ -config = $config; - } - - - private $mFA; - - /** - * Provides access to MFA controller - * @return Controllers\MFAController - */ - public function getMFA() - { - if ($this->mFA == null) { - $this->mFA = new Controllers\MFAController($this->config); - } - return $this->mFA; - } -} diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php new file mode 100644 index 00000000..33a8beae --- /dev/null +++ b/src/ObjectSerializer.php @@ -0,0 +1,601 @@ +format('Y-m-d') : $data->format(self::$dateTimeFormat); + } + + if ($data instanceof \BackedEnum) { + return $data->value; + } + + if (is_array($data)) { + foreach ($data as $property => $value) { + $data[$property] = self::sanitizeForSerialization($value); + } + return $data; + } + + if (is_object($data)) { + $values = []; + if ($data instanceof ModelInterface) { + $formats = $data::openAPIFormats(); + foreach ($data::openAPITypes() as $property => $openAPIType) { + $getter = $data::getters()[$property]; + $value = $data->$getter(); + if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { + if (is_subclass_of($openAPIType, '\BackedEnum')) { + if (is_scalar($value)) { + $value = $openAPIType::tryFrom($value); + if ($value === null) { + $imploded = implode("', '", array_map(fn($case) => $case->value, $openAPIType::cases())); + throw new \InvalidArgumentException( + sprintf( + "Invalid value for enum '%s', must be one of: '%s'", + $openAPIType::class, + $imploded + ) + ); + } + } + } + } + if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) { + $values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]); + } + } + } else { + foreach ($data as $property => $value) { + $values[$property] = self::sanitizeForSerialization($value); + } + } + return (object) $values; + } else { + return (string)$data; + } + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param string $filename filename to be sanitized + * + * @return string the sanitized filename + */ + public static function sanitizeFilename(string $filename): string + { + if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) { + return $match[1]; + } else { + return $filename; + } + } + + /** + * Shorter timestamp microseconds to 6 digits length. + * + * @param string $timestamp Original timestamp + * + * @return string the shorten timestamp + */ + public static function sanitizeTimestamp(string $timestamp): string + { + return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the path, by url-encoding. + * + * @param string $value a string which will be part of the path + * + * @return string the serialized object + */ + public static function toPathValue(string $value): string + { + return rawurlencode(self::toString($value)); + } + + /** + * Checks if a value is empty, based on its OpenAPI type. + * + * @param mixed $value + * @param string $openApiType + * + * @return bool true if $value is empty + */ + private static function isEmptyValue(mixed $value, string $openApiType): bool + { + // If empty() returns false, it is not empty regardless of its type. + if (!empty($value)) { + return false; + } + + // Null is always empty, as we cannot send a real "null" value in a query parameter. + if ($value === null) { + return true; + } + + return match ($openApiType) { + // For numeric values, false and '' are considered empty. + // This comparison is safe for floating point values, since the previous call to empty() will + // filter out values that don't match 0. + 'int','integer' => $value !== 0, + 'number'|'float' => $value !== 0 && $value !== 0.0, + + // For boolean values, '' is considered empty + 'bool','boolean' => !in_array($value, [false, 0], true), + + // For string values, '' is considered empty. + 'string' => $value === '', + + // For all the other types, any value at this point can be considered empty. + default => true + }; + } + + /** + * Take query parameter properties and turn it into an array suitable for + * native http_build_query or GuzzleHttp\Psr7\Query::build. + * + * @param mixed $value Parameter value + * @param string $paramName Parameter name + * @param string $openApiType OpenAPIType e.g. array or object + * @param string $style Parameter serialization style + * @param bool $explode Parameter explode option + * @param bool $required Whether query param is required or not + * + * @return array + */ + public static function toQueryValue( + mixed $value, + string $paramName, + string $openApiType = 'string', + string $style = 'form', + bool $explode = true, + bool $required = true + ): array { + + // Check if we should omit this parameter from the query. This should only happen when: + // - Parameter is NOT required; AND + // - its value is set to a value that is equivalent to "empty", depending on its OpenAPI type. For + // example, 0 as "int" or "boolean" is NOT an empty value. + if (self::isEmptyValue($value, $openApiType)) { + if ($required) { + return ["{$paramName}" => '']; + } else { + return []; + } + } + + // Handle DateTime objects in query + if ($openApiType === "string" && $value instanceof DateTime) { + return ["{$paramName}" => $value->format(self::$dateTimeFormat)]; + } + + $query = []; + $value = (in_array($openApiType, ['object', 'array'], true)) ? (array)$value : $value; + + // since \GuzzleHttp\Psr7\Query::build fails with nested arrays + // need to flatten array first + $flattenArray = function ($arr, $name, &$result = []) use (&$flattenArray, $style, $explode) { + if (!is_array($arr)) { + return $arr; + } + + foreach ($arr as $k => $v) { + $prop = ($style === 'deepObject') ? "{$name}[{$k}]" : $k; + + if (is_array($v)) { + $flattenArray($v, $prop, $result); + } else { + if ($style !== 'deepObject' && !$explode) { + // push key itself + $result[] = $prop; + } + + if ($v instanceof BackedEnum) { + $v = $v->value; + } + + $result[$prop] = $v; + } + } + return $result; + }; + + $value = $flattenArray($value, $paramName); + + // https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values + if ($openApiType === 'array' && $style === 'deepObject' && $explode) { + return $value; + } + + if ($openApiType === 'object' && ($style === 'deepObject' || $explode)) { + return $value; + } + + if ('boolean' === $openApiType && is_bool($value)) { + $value = self::convertBoolToQueryStringFormat($value); + } + + // handle style in serializeCollection + $query[$paramName] = ($explode) ? $value : self::serializeCollection((array)$value, $style); + + return $query; + } + + /** + * Convert boolean value to format for query string. + * + * @param bool $value Boolean value + * + * @return int|string Boolean value in format + */ + public static function convertBoolToQueryStringFormat(bool $value): int|string + { + if (Configuration::BOOLEAN_FORMAT_STRING == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString()) { + return $value ? 'true' : 'false'; + } + + return (int) $value; + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the header. If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * + * @param string $value a string which will be part of the header + * + * @return string the header string + */ + public static function toHeaderValue(string $value): string + { + $callable = [$value, 'toHeaderValue']; + if (is_callable($callable)) { + return $callable(); + } + + return self::toString($value); + } + + /** + * Take value and turn it into a string suitable for inclusion in + * the parameter. If it's a string, pass through unchanged + * If it's a datetime object, format it in ISO8601 + * If it's a boolean, convert it to "true" or "false". + * + * @param string|bool|DateTime $value the value of the parameter + * + * @return string the header string + */ + public static function toString(string|bool|DateTime $value): string + { + if ($value instanceof DateTime) { // datetime in ISO8601 format + return $value->format(self::$dateTimeFormat); + } elseif (is_bool($value)) { + return $value ? 'true' : 'false'; + } else { + return (string) $value; + } + } + + /** + * Serialize an array to a string. + * + * @param array $collection collection to serialize to a string + * @param string $style the format use for serialization (csv, + * ssv, tsv, pipes, multi) + * @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array + * + * @return string + */ + public static function serializeCollection(array $collection, string $style, bool $allowCollectionFormatMulti = false): string + { + if ($allowCollectionFormatMulti && ('multi' === $style)) { + // http_build_query() almost does the job for us. We just + // need to fix the result of multidimensional arrays. + return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); + } + return match ($style) { + 'pipeDelimited', 'pipes' => implode('|', $collection), + 'tsv' => implode("\t", $collection), + 'spaceDelimited', 'ssv' => implode(' ', $collection), + default => implode(',', $collection), + }; + } + + /** + * Deserialize a JSON string into an object + * + * @param mixed $data object or primitive to be deserialized + * @param string $class class name is passed as a string + * @param string[]|null $httpHeaders HTTP headers + * + * @return mixed a single or an array of $class instances + */ + public static function deserialize(mixed $data, string $class, ?array $httpHeaders = null): mixed + { + if (null === $data) { + return null; + } + + if (strcasecmp(substr($class, -2), '[]') === 0) { + $data = is_string($data) ? json_decode($data) : $data; + + if (!is_array($data)) { + throw new \InvalidArgumentException("Invalid array '$class'"); + } + + $subClass = substr($class, 0, -2); + $values = []; + foreach ($data as $key => $value) { + $values[] = self::deserialize($value, $subClass, null); + } + return $values; + } + + if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array + $data = is_string($data) ? json_decode($data) : $data; + settype($data, 'array'); + $inner = substr($class, 4, -1); + $deserialized = []; + if (strrpos($inner, ",") !== false) { + $subClass_array = explode(',', $inner, 2); + $subClass = $subClass_array[1]; + foreach ($data as $key => $value) { + $deserialized[$key] = self::deserialize($value, $subClass, null); + } + } + return $deserialized; + } + + if ($class === 'mixed') { + settype($data, gettype($data)); + return $data; + } + + if ($class === '\DateTime') { + // Some APIs return an invalid, empty string as a + // date-time property. DateTime::__construct() will return + // the current time for empty input which is probably not + // what is meant. The invalid empty string is probably to + // be interpreted as a missing field/value. Let's handle + // this graceful. + if (!empty($data)) { + try { + return new DateTime($data); + } catch (\Exception $exception) { + // Some APIs return a date-time with too high nanosecond + // precision for php's DateTime to handle. + // With provided regexp 6 digits of microseconds saved + return new DateTime(self::sanitizeTimestamp($data)); + } + } else { + return null; + } + } + + if ($class === '\Psr\Http\Message\StreamInterface') { + return Utils::streamFor($data); + } + + if ($class === '\SplFileObject') { + $data = Utils::streamFor($data); + + /** @var \Psr\Http\Message\StreamInterface $data */ + + // determine file name + if ( + is_array($httpHeaders) + && array_key_exists('Content-Disposition', $httpHeaders) + && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match) + ) { + $filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]); + } else { + $filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), ''); + } + + $file = fopen($filename, 'w'); + while ($chunk = $data->read(200)) { + fwrite($file, $chunk); + } + fclose($file); + + return new \SplFileObject($filename, 'r'); + } + + /** @psalm-suppress ParadoxicalCondition */ + // handle primitive types + if (in_array($class, ['\DateTime', '\SplFileObject'], true)) { + return $data; + } elseif (in_array($class, ['array', 'bool', 'boolean', 'float', 'double', 'int', 'integer', 'object', 'string', 'null'], true)) { + // type ref: https://www.php.net/manual/en/function.settype.php + // byte, mixed, void in the old php client were removed + settype($data, $class); + return $data; + } + + + if (is_subclass_of($class, '\BackedEnum')) { + $data = $class::tryFrom($data); + if ($data === null) { + $imploded = implode("', '", array_map(fn($case) => $case->value, $class::cases())); + throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'"); + } + return $data; + } else { + $data = is_string($data) ? json_decode($data) : $data; + + if (is_array($data)) { + $data = (object) $data; + } + + // If a discriminator is defined and points to a valid subclass, use it. + $discriminator = $class::DISCRIMINATOR; + if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { + $subclass = '\OpenAPI\Client\Model\\' . $data->{$discriminator}; + if (is_subclass_of($subclass, $class)) { + $class = $subclass; + } + } + + /** @var ModelInterface $instance */ + $instance = new $class(); + foreach ($instance::openAPITypes() as $property => $type) { + $propertySetter = $instance::setters()[$property]; + + if (!isset($propertySetter)) { + continue; + } + + if (!isset($data->{$instance::attributeMap()[$property]})) { + if ($instance::isNullable($property)) { + $instance->$propertySetter(null); + } + + continue; + } + + if (isset($data->{$instance::attributeMap()[$property]})) { + $propertyValue = $data->{$instance::attributeMap()[$property]}; + $instance->$propertySetter(self::deserialize($propertyValue, $type, null)); + } + } + return $instance; + } + } + + /** + * Build a query string from an array of key value pairs. + * + * This function can use the return value of `parse()` to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like `http_build_query()` would). + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + */ + public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): string + { + if (!$params) { + return ''; + } + + if ($encoding === false) { + $encoder = function (string $str): string { + return $str; + }; + } elseif ($encoding === PHP_QUERY_RFC3986) { + $encoder = 'rawurlencode'; + } elseif ($encoding === PHP_QUERY_RFC1738) { + $encoder = 'urlencode'; + } else { + throw new \InvalidArgumentException('Invalid type'); + } + + $castBool = Configuration::BOOLEAN_FORMAT_INT == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString() + ? function ($v) { return (int) $v; } + : function ($v) { return $v ? 'true' : 'false'; }; + + $qs = ''; + foreach ($params as $k => $v) { + $k = $encoder((string) $k); + if (!is_array($v)) { + $qs .= $k; + $v = is_bool($v) ? $castBool($v) : $v; + if ($v !== null) { + $qs .= '='.$encoder((string) $v); + } + $qs .= '&'; + } else { + foreach ($v as $vv) { + $qs .= $k; + $vv = is_bool($vv) ? $castBool($vv) : $vv; + if ($vv !== null) { + $qs .= '='.$encoder((string) $vv); + } + $qs .= '&'; + } + } + } + + return $qs ? substr($qs, 0, -1) : ''; + } +} diff --git a/src/PhoneNumberLookup/Controllers/APIController.php b/src/PhoneNumberLookup/Controllers/APIController.php deleted file mode 100644 index aa680360..00000000 --- a/src/PhoneNumberLookup/Controllers/APIController.php +++ /dev/null @@ -1,353 +0,0 @@ - $accountId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::PHONENUMBERLOOKUPDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json', - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'phoneNumberLookup'); - - $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::post($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\AccountsTnlookup400ErrorException( - 'Bad Request. Ensure that your request payload is properly formatted and that the telephone numbers ' . - 'used are valid.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Unauthorized. Ensure that you are using the proper credentials for the environment you are ' . - 'accessing, your user has the proper role assigned to it, and that your Bandwidth account is' . - 'enabled for TN Lookup access.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new APIException( - 'Invalid content-type. Ensure that your content-type header is set to application/json.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new APIException( - 'Too Many Requests. Reduce the amount of requests that you are sending in order to avoid receiving ' . - 'this status code.', - $_httpContext - ); - } - - if ($response->code >= 500) { - throw new APIException( - 'Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code ' . - 'for an extended period of time.', - $_httpContext - ); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass( - $response->body, - 'BandwidthLib\\PhoneNumberLookup\\Models\\CreateAsyncBulkResponse' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Get a Bulk Async TN Lookup Order. - * - * @param string $accountId The ID of the Bandwidth account that the user belongs to. - * @param string $requestId The phone number lookup request ID from Bandwidth. - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getAsyncLookupRequestStatus( - string $accountId, - string $requestId - ) { - - //prepare query string for API call - $_queryBuilder = '/accounts/{accountId}/phoneNumberLookup/bulk/{requestId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'requestId' => $requestId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::PHONENUMBERLOOKUPDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'phoneNumberLookup'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new APIException( - 'Bad Request. Ensure that you have set the requestId as a URL path parameter.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Unauthorized. Ensure that you are using the proper credentials for the environment you are ' . - 'accessing, your user has the proper role assigned to it, and that your Bandwidth account is' . - 'enabled for TN Lookup access.', - $_httpContext - ); - } - - if ($response->code == 404) { - throw new APIException( - 'RequestId not found. Ensure that the requestId used in the URL path is valid and maps to a ' . - 'previous request that was submitted.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new APIException( - 'Too Many Requests. Reduce the amount of requests that you are sending in order to avoid receiving ' . - 'this status code.', - $_httpContext - ); - } - - if ($response->code >= 500) { - throw new APIException( - 'Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code ' . - 'for an extended period of time.', - $_httpContext - ); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass( - $response->body, - 'BandwidthLib\\PhoneNumberLookup\\Models\\LookupResponse' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Create a Sync TN Lookup Order. - * - * @param string $accountId The ID of the Bandwidth account that the user belongs to. - * @param Models\CreateLookupRequest $body - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function createSyncLookupRequest( - string $accountId, - Models\CreateLookupRequest $body - ) { - - //prepare query string for API call - $_queryBuilder = '/accounts/{accountId}/phoneNumberLookup'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::PHONENUMBERLOOKUPDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json', - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'phoneNumberLookup'); - - $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::post($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\AccountsTnlookup400ErrorException( - 'Bad Request. Ensure that your request payload is properly formatted and that the telephone numbers ' . - 'used are valid.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Unauthorized. Ensure that you are using the proper credentials for the environment you are ' . - 'accessing, your user has the proper role assigned to it, and that your Bandwidth account is' . - 'enabled for TN Lookup access.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new APIException( - 'Invalid content-type. Ensure that your content-type header is set to application/json.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new APIException( - 'Too Many Requests. Reduce the amount of requests that you are sending in order to avoid receiving ' . - 'this status code.', - $_httpContext - ); - } - - if ($response->code >= 500) { - throw new APIException( - 'Unexpected error. Please contact Bandwidth Support if your requests are receiving this status code ' . - 'for an extended period of time.', - $_httpContext - ); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass( - $response->body, - 'BandwidthLib\\PhoneNumberLookup\\Models\\LookupResponse' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } -} diff --git a/src/PhoneNumberLookup/Exceptions/AccountsTnlookup400ErrorException.php b/src/PhoneNumberLookup/Exceptions/AccountsTnlookup400ErrorException.php deleted file mode 100644 index 1d07d92b..00000000 --- a/src/PhoneNumberLookup/Exceptions/AccountsTnlookup400ErrorException.php +++ /dev/null @@ -1,38 +0,0 @@ -links = func_get_arg(0); - $this->data = func_get_arg(1); - $this->errors = func_get_arg(2); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['links'] = isset($this->links) ? array_values($this->links) : null; - $json['data'] = $this->data; - $json['errors'] = isset($this->errors) ? array_values($this->errors) : null; - - return array_filter($json); - } -} diff --git a/src/PhoneNumberLookup/Models/CreateAsyncBulkResponseData.php b/src/PhoneNumberLookup/Models/CreateAsyncBulkResponseData.php deleted file mode 100644 index 1a6ae176..00000000 --- a/src/PhoneNumberLookup/Models/CreateAsyncBulkResponseData.php +++ /dev/null @@ -1,44 +0,0 @@ -requestId = func_get_arg(0); - $this->status = func_get_arg(1); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['requestId'] = $this->requestId; - $json['status'] = $this->status; - - return array_filter($json); - } -} diff --git a/src/PhoneNumberLookup/Models/CreateLookupRequest.php b/src/PhoneNumberLookup/Models/CreateLookupRequest.php deleted file mode 100644 index 8c9ec721..00000000 --- a/src/PhoneNumberLookup/Models/CreateLookupRequest.php +++ /dev/null @@ -1,38 +0,0 @@ -phoneNumbers = func_get_arg(0); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['phoneNumbers'] = isset($this->phoneNumbers) ? array_values($this->phoneNumbers) : null; - - return array_filter($json); - } -} diff --git a/src/PhoneNumberLookup/Models/Error.php b/src/PhoneNumberLookup/Models/Error.php deleted file mode 100644 index ae3d76f0..00000000 --- a/src/PhoneNumberLookup/Models/Error.php +++ /dev/null @@ -1,60 +0,0 @@ -code = func_get_arg(0); - $this->description = func_get_arg(1); - $this->type = func_get_arg(2); - $this->meta = func_get_arg(3); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['code'] = $this->code; - $json['description'] = $this->description; - $json['type'] = $this->type; - $json['meta'] = $this->meta; - - return array_filter($json); - } -} diff --git a/src/PhoneNumberLookup/Models/ErrorMeta.php b/src/PhoneNumberLookup/Models/ErrorMeta.php deleted file mode 100644 index e0c6e335..00000000 --- a/src/PhoneNumberLookup/Models/ErrorMeta.php +++ /dev/null @@ -1,52 +0,0 @@ -phoneNumbers = func_get_arg(0); - $this->message = func_get_arg(1); - $this->code = func_get_arg(2); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['phoneNumbers'] = isset($this->phoneNumbers) ? array_values($this->phoneNumbers) : null; - $json['message'] = $this->message; - $json['code'] = $this->code; - - return array_filter($json); - } -} diff --git a/src/PhoneNumberLookup/Models/Link.php b/src/PhoneNumberLookup/Models/Link.php deleted file mode 100644 index 8172c001..00000000 --- a/src/PhoneNumberLookup/Models/Link.php +++ /dev/null @@ -1,52 +0,0 @@ -href = func_get_arg(0); - $this->rel = func_get_arg(1); - $this->method = func_get_arg(2); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['href'] = $this->href; - $json['rel'] = $this->rel; - $json['method'] = $this->method; - - return array_filter($json); - } -} diff --git a/src/PhoneNumberLookup/Models/LookupResponse.php b/src/PhoneNumberLookup/Models/LookupResponse.php deleted file mode 100644 index e91d4454..00000000 --- a/src/PhoneNumberLookup/Models/LookupResponse.php +++ /dev/null @@ -1,52 +0,0 @@ -links = func_get_arg(0); - $this->data = func_get_arg(1); - $this->errors = func_get_arg(2); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['links'] = isset($this->links) ? array_values($this->links) : null; - $json['data'] = $this->data; - $json['errors'] = isset($this->errors) ? array_values($this->errors) : null; - - return array_filter($json); - } -} diff --git a/src/PhoneNumberLookup/Models/LookupResponseData.php b/src/PhoneNumberLookup/Models/LookupResponseData.php deleted file mode 100644 index 54e945b6..00000000 --- a/src/PhoneNumberLookup/Models/LookupResponseData.php +++ /dev/null @@ -1,53 +0,0 @@ -requestId = func_get_arg(0); - $this->status = func_get_arg(1); - $this->results = func_get_arg(2); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['requestId'] = $this->requestId; - $json['status'] = $this->status; - $json['results'] = isset($this->results) ? array_values($this->results) : null; - - return array_filter($json); - } -} diff --git a/src/PhoneNumberLookup/Models/LookupResult.php b/src/PhoneNumberLookup/Models/LookupResult.php deleted file mode 100644 index 8a86ec33..00000000 --- a/src/PhoneNumberLookup/Models/LookupResult.php +++ /dev/null @@ -1,119 +0,0 @@ -phoneNumber = func_get_arg(0); - $this->lineType = func_get_arg(1); - $this->messagingProvider = func_get_arg(2); - $this->voiceProvider = func_get_arg(3); - $this->countryCodeA3 = func_get_arg(4); - $this->deactivationReporter = func_get_arg(5); - $this->deactivationDate = func_get_arg(6); - $this->deactivationEvent = func_get_arg(7); - $this->latestMessageDeliveryStatus = func_get_arg(8); - $this->initialMessageDeliveryStatusDate = func_get_arg(9); - $this->latestMessageDeliveryStatusDate = func_get_arg(10); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['phoneNumber'] = $this->phoneNumber; - $json['lineType'] = $this->lineType; - $json['messagingProvider'] = $this->messagingProvider; - $json['voiceProvider'] = $this->voiceProvider; - $json['countryCodeA3'] = $this->countryCodeA3; - $json['deactivationReporter'] = $this->deactivationReporter; - $json['deactivationDate'] = $this->deactivationDate; - $json['deactivationEvent'] = $this->deactivationEvent; - $json['latestMessageDeliveryStatus'] = $this->latestMessageDeliveryStatus; - $json['initialMessageDeliveryStatusDate'] = isset($this->initialMessageDeliveryStatusDate) ? - DateTimeHelper::toRfc3339DateTime($this->initialMessageDeliveryStatusDate) : null; - $json['latestMessageDeliveryStatusDate'] = isset($this->latestMessageDeliveryStatusDate) ? - DateTimeHelper::toRfc3339DateTime($this->latestMessageDeliveryStatusDate) : null; - - return array_filter($json); - } -} diff --git a/src/PhoneNumberLookup/PhoneNumberLookupClient.php b/src/PhoneNumberLookup/PhoneNumberLookupClient.php deleted file mode 100644 index 5c08aaac..00000000 --- a/src/PhoneNumberLookup/PhoneNumberLookupClient.php +++ /dev/null @@ -1,37 +0,0 @@ -config = $config; - } - - - private $client; - - /** - * Provides access to API controller - * @return Controllers\APIController - */ - public function getClient() - { - if ($this->client == null) { - $this->client = new Controllers\APIController($this->config); - } - return $this->client; - } -} diff --git a/src/Servers.php b/src/Servers.php deleted file mode 100644 index 4c22bea7..00000000 --- a/src/Servers.php +++ /dev/null @@ -1,44 +0,0 @@ -format(DateTimeHelper::SIMPLE_DATE); - } else { - throw new Exception('Not a valid DateTime object.'); - } - } - - /** - * Convert an array of DateTime objects to an array of strings in simple date format - * @param array|null $dates The array of DateTime objects to convert - * @return array|null The array of datetime strings in simple date format - */ - public static function toSimpleDateArray(?array $dates) - { - if (is_null($dates)) { - return null; - } else { - return array_map('static::toSimpleDate', $dates); - } - } - - /** - * Parse a datetime string in simple date format to a DateTime object - * @param string|null $date A datetime string in simple date format - * @return \DateTime|null The parsed DateTime object - */ - public static function fromSimpleDate(?string $date) - { - if (is_null($date)) { - return null; - } else { - $x = DateTime::createFromFormat(static::SIMPLE_DATE, $date); - - if ($x instanceof DateTime) { - return $x; - } else { - throw new Exception('Incorrect format.'); - } - } - } - - /** - * Parse an array of datetime strings in simple date format to an array of DateTime objects - * @param array|null $dates An array of datetime strings in simple date format - * @return array|null An array of parsed DateTime objects - */ - public static function fromSimpleDateArray(?array $dates) - { - if (is_null($dates)) { - return null; - } else { - return array_map('static::fromSimpleDate', $dates); - } - } - - - /** - * Convert a DateTime object to a string in Rfc1123 format - * @param \DateTime|null $datetime The DateTime object to convert - * @return string|null The datetime as a string in Rfc1123 format - */ - public static function toRfc1123DateTime(?DateTime $datetime) - { - if (is_null($datetime)) { - return null; - } elseif ($datetime instanceof DateTime) { - return $datetime->setTimeZone(new DateTimeZone('GMT'))->format(static::RFC1123); - } else { - throw new Exception('Not a valid DateTime object.'); - } - } - - /** - * Convert an array of DateTime objects to an array of strings in Rfc1123 format - * @param array|null $datetimes The array of DateTime objects to convert - * @return array|null The array of datetime strings in Rfc1123 format - */ - public static function toRfc1123DateTimeArray(?array $datetimes) - { - if (is_null($datetimes)) { - return null; - } else { - return array_map('static::toRfc1123DateTime', $datetimes); - } - } - - /** - * Parse a datetime string in Rfc1123 format to a DateTime object - * @param string|null $datetime A datetime string in Rfc1123 format - * @return \DateTime|null The parsed DateTime object - */ - public static function fromRfc1123DateTime(?string $datetime) - { - if (is_null($datetime)) { - return null; - } else { - $x = DateTime::createFromFormat(DateTime::RFC1123, $datetime); - - if ($x instanceof DateTime) { - return $x->setTimeZone(new DateTimeZone('GMT')); - } else { - throw new Exception('Incorrect format.'); - } - } - } - - /** - * Parse an array of datetime strings in Rfc1123 format to an array of DateTime objects - * @param array|null $datetimes An array of datetime strings in Rfc1123 format - * @return array|null An array of parsed DateTime objects - */ - public static function fromRfc1123DateTimeArray(?array $datetimes) - { - if (is_null($datetimes)) { - return null; - } else { - return array_map('static::fromRfc1123DateTime', $datetimes); - } - } - - - /** - * Convert a DateTime object to a string in Rfc3339 format - * @param \DateTime|null $datetime The DateTime object to convert - * @return string|null The datetime as a string in Rfc3339 format - */ - public static function toRfc3339DateTime(?DateTime $datetime) - { - if (is_null($datetime)) { - return null; - } elseif ($datetime instanceof DateTime) { - return $datetime->setTimeZone(new DateTimeZone('UTC'))->format(DateTime::RFC3339); - } else { - throw new Exception('Not a valid DateTime object.'); - } - } - - /** - * Convert an array of DateTime objects to an array of strings in Rfc3339 format - * @param array|null $datetimes The array of DateTime objects to convert - * @return array|null The array of datetime strings in Rfc3339 format - */ - public static function toRfc3339DateTimeArray(?array $datetimes) - { - if (is_null($datetimes)) { - return null; - } else { - return array_map('static::toRfc3339DateTime', $datetimes); - } - } - - /** - * Parse a datetime string in Rfc3339 format to a DateTime object - * @param string|null $datetime A datetime string in Rfc3339 format - * @return \DateTime|null The parsed DateTime object - */ - public static function fromRfc3339DateTime(?string $datetime) - { - if (is_null($datetime)) { - return null; - } else { - // Check for timezone information and append it if missing - if (!(substr($datetime, strlen($datetime)-1) == 'Z' || strpos($datetime, '+'))) { - $datetime .= 'Z'; - } - - $x = DateTime::createFromFormat(DateTime::RFC3339, $datetime); - - if ($x instanceof DateTime) { - return $x->setTimeZone(new DateTimeZone('UTC')); - } else { - $x = DateTime::createFromFormat("Y-m-d\TH:i:s.uP", $datetime); // parse with up to 6 microseconds - if ($x instanceof DateTime) { - return $x->setTimeZone(new DateTimeZone('UTC')); - } else { - $x = DateTime::createFromFormat("Y-m-d\TH:i:s.uuP", $datetime); // parse with up to 12 microseconds - if ($x instanceof DateTime) { - return $x->setTimeZone(new DateTimeZone('UTC')); - } else { - throw new Exception('Incorrect format.'); - } - } - } - } - } - - /** - * Parse an array of datetime strings in Rfc3339 format to an array of DateTime objects - * @param array|null $datetimes An array of datetime strings in Rfc3339 format - * @return array|null An array of parsed DateTime objects - */ - public static function fromRfc3339DateTimeArray(?array $datetimes) - { - if (is_null($datetimes)) { - return null; - } else { - return array_map('static::fromRfc3339DateTime', $datetimes); - } - } - - - /** - * Convert a DateTime object to a Unix Timestamp - * @param \DateTime|null $datetime The DateTime object to convert - * @return int|null The converted Unix Timestamp - */ - public static function toUnixTimestamp(?DateTime $datetime) - { - if (is_null($datetime)) { - return null; - } elseif ($datetime instanceof DateTime) { - return $datetime->getTimestamp(); - } else { - throw new Exception('Not a valid DateTime object.'); - } - } - - /** - * Convert an array of DateTime objects to an array of Unix timestamps - * @param array|null $datetimes The array of DateTime objects to convert - * @return array|null The array of integers representing date-time in Unix timestamp - */ - public static function toUnixTimestampArray(?array $datetimes) - { - if (is_null($datetimes)) { - return null; - } else { - return array_map('static::toUnixTimestamp', $datetimes); - } - } - - /** - * Parse a Unix Timestamp to a DateTime object - * @param string|null $datetime The Unix Timestamp - * @return \DateTime|null The parsed DateTime object - */ - public static function fromUnixTimestamp(?string $datetime) - { - if (is_null($datetime)) { - return null; - } else { - $x = DateTime::createFromFormat("U", $datetime); - - if ($x instanceof DateTime) { - return $x; - } else { - throw new Exception('Incorrect format.'); - } - } - } - - /** - * Parse an array of Unix Timestamps to an array of DateTime objects - * @param array|null $datetimes An array of Unix Timestamps - * @return array|null An array of parsed DateTime objects - */ - public static function fromUnixTimestampArray(?array $datetimes) - { - if (is_null($datetimes)) { - return null; - } else { - return array_map('static::fromUnixTimestamp', $datetimes); - } - } -} diff --git a/src/Voice/Bxml/Bridge.php b/src/Voice/Bxml/Bridge.php deleted file mode 100644 index 67e0e43b..00000000 --- a/src/Voice/Bxml/Bridge.php +++ /dev/null @@ -1,273 +0,0 @@ -targetCall = $targetCall; - } - - /** - * Sets the bridgeCompleteUrl attribute for Bridge - * - * @param string $bridgeCompleteUrl URL to send the bridge complete event to - */ - public function bridgeCompleteUrl(string $bridgeCompleteUrl): Bridge { - $this->bridgeCompleteUrl = $bridgeCompleteUrl; - return $this; - } - - /** - * Sets the bridgeCompleteMethod attribute for Bridge - * - * @param string $bridgeCompleteMethod HTTP method to send the bridge complete event - */ - public function bridgeCompleteMethod(string $bridgeCompleteMethod): Bridge { - $this->bridgeCompleteMethod = $bridgeCompleteMethod; - return $this; - } - - /** - * Sets the bridgeTargetCompleteUrl attribute for Bridge - * - * @param string $bridgeTargetCompleteUrl URL to send the bridge target complete event to - */ - public function bridgeTargetCompleteUrl(string $bridgeTargetCompleteUrl): Bridge { - $this->bridgeTargetCompleteUrl = $bridgeTargetCompleteUrl; - return $this; - } - - /** - * Sets the bridgeTargetCompleteMethod attribute for Bridge - * - * @param string $bridgeTargetCompleteMethod HTTP method to send the bridge target complete event - */ - public function bridgeTargetCompleteMethod(string $bridgeTargetCompleteMethod): Bridge { - $this->bridgeTargetCompleteMethod = $bridgeTargetCompleteMethod; - return $this; - } - - /** - * Sets the username attribute for Bridge - * - * @param string $username HTTP basic auth username for sending events - */ - public function username(string $username): Bridge { - $this->username = $username; - return $this; - } - - /** - * Sets the password attribute for Bridge - * - * @param string $password HTTP basic auth password for sending events - */ - public function password(string $password): Bridge { - $this->password = $password; - return $this; - } - - /** - * Sets the tag attribute for Bridge - * - * @param string $tag String to include in events - */ - public function tag(string $tag): Bridge { - $this->tag = $tag; - return $this; - } - - /** - * Sets the bridgeCompleteFallbackUrl attribute for Bridge - * - * @param string $bridgeCompleteFallbackUrl Fallback URL for bridge complete callback events - */ - public function bridgeCompleteFallbackUrl(string $bridgeCompleteFallbackUrl): Bridge { - $this->bridgeCompleteFallbackUrl = $bridgeCompleteFallbackUrl; - return $this; - } - - /** - * Sets the bridgeCompleteFallbackMethod attribute for Bridge - * - * @param string $bridgeCompleteFallbackMethod HTTP method for bridge complete fallback requests - */ - public function bridgeCompleteFallbackMethod(string $bridgeCompleteFallbackMethod): Bridge { - $this->bridgeCompleteFallbackMethod = $bridgeCompleteFallbackMethod; - return $this; - } - - /** - * Sets the bridgeTargetCompleteFallbackUrl attribute for Bridge - * - * @param string $bridgeTargetCompleteFallbackUrl Fallback URL for bridge target complete callback events - */ - public function bridgeTargetCompleteFallbackUrl(string $bridgeTargetCompleteFallbackUrl): Bridge { - $this->bridgeTargetCompleteFallbackUrl = $bridgeTargetCompleteFallbackUrl; - return $this; - } - - /** - * Sets the bridgeTargetCompleteFallbackMethod attribute for Bridge - * - * @param string $bridgeTargetCompleteFallbackMethod HTTP method for bridge target complete fallback events - */ - public function bridgeTargetCompleteFallbackMethod(string $bridgeTargetCompleteFallbackMethod): Bridge { - $this->bridgeTargetCompleteFallbackMethod = $bridgeTargetCompleteFallbackMethod; - return $this; - } - - /** - * Sets the fallbackUsername attribute for Bridge - * - * @param string $fallbackUsername HTTP basic auth username for fallback events - */ - public function fallbackUsername(string $fallbackUsername): Bridge { - $this->fallbackUsername = $fallbackUsername; - return $this; - } - - /** - * Sets the fallbackPassword attribute for Bridge - * - * @param string $fallbackPassword HTTP basic auth password - */ - public function fallbackPassword(string $fallbackPassword): Bridge { - $this->fallbackPassword = $fallbackPassword; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("Bridge"); - - $element->appendChild($doc->createTextNode($this->targetCall)); - - if(isset($this->bridgeCompleteUrl)) { - $element->setAttribute("bridgeCompleteUrl", $this->bridgeCompleteUrl); - } - - if(isset($this->bridgeCompleteMethod)) { - $element->setAttribute("bridgeCompleteMethod", $this->bridgeCompleteMethod); - } - - if(isset($this->bridgeTargetCompleteUrl)) { - $element->setAttribute("bridgeTargetCompleteUrl", $this->bridgeTargetCompleteUrl); - } - - if(isset($this->bridgeTargetCompleteMethod)) { - $element->setAttribute("bridgeTargetCompleteMethod", $this->bridgeTargetCompleteMethod); - } - - if(isset($this->username)) { - $element->setAttribute("username", $this->username); - } - - if(isset($this->password)) { - $element->setAttribute("password", $this->password); - } - - if(isset($this->tag)) { - $element->setAttribute("tag", $this->tag); - } - - if(isset($this->bridgeCompleteFallbackUrl)) { - $element->setAttribute("bridgeCompleteFallbackUrl", $this->bridgeCompleteFallbackUrl); - } - - if(isset($this->bridgeCompleteFallbackMethod)) { - $element->setAttribute("bridgeCompleteFallbackMethod", $this->bridgeCompleteFallbackMethod); - } - - if(isset($this->bridgeTargetCompleteFallbackUrl)) { - $element->setAttribute("bridgeTargetCompleteFallbackUrl", $this->bridgeTargetCompleteFallbackUrl); - } - - if(isset($this->bridgeTargetCompleteFallbackMethod)) { - $element->setAttribute("bridgeTargetCompleteFallbackMethod", $this->bridgeTargetCompleteFallbackMethod); - } - - if(isset($this->fallbackUsername)) { - $element->setAttribute("fallbackUsername", $this->fallbackUsername); - } - - if(isset($this->fallbackPassword)) { - $element->setAttribute("fallbackPassword", $this->fallbackPassword); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/Bxml.php b/src/Voice/Bxml/Bxml.php deleted file mode 100644 index a6d4393c..00000000 --- a/src/Voice/Bxml/Bxml.php +++ /dev/null @@ -1,54 +0,0 @@ -verbs = array(); - } - - /** - * Adds the verb to the verbs - * - * @param Verb $verb The verb to add to the list - */ - public function addVerb(Verb $verb): Bxml { - array_push($this->verbs, $verb); - return $this; - } - - /** - * Converts the Response class into its BXML representation - * - * @return string The xml representation of the class - */ - public function toBxml(): string { - $ssmlRegex = '/<([a-zA-Z\/\/].*?)>/'; - $doc = new DOMDocument('1.0', 'UTF-8'); - $bxmlElement = $doc->createElement("Bxml"); - - foreach ($this->verbs as $verb) { - $bxmlElement->appendChild($verb->toBxml($doc)); - } - - $doc->appendChild($bxmlElement); - return str_replace("\n", '', preg_replace($ssmlRegex, "<$1>", $doc->saveXML())); - } -} diff --git a/src/Voice/Bxml/Conference.php b/src/Voice/Bxml/Conference.php deleted file mode 100644 index c666666a..00000000 --- a/src/Voice/Bxml/Conference.php +++ /dev/null @@ -1,273 +0,0 @@ -conferenceName = $conferenceName; - } - - /** - * Sets the tag attribute for Conference - * - * @param string $tag A custom string to be included in callbacks - */ - public function tag(string $tag): Conference { - $this->tag = $tag; - return $this; - } - - /** - * Sets the username attribute for Conference - * - * @param string $username Username for basic auth for callbacks - */ - public function username(string $username): Conference { - $this->username = $username; - return $this; - } - - /** - * Sets the password attribute for Conference - * - * @param string $password Password for basic auth for callbacks - */ - public function password(string $password): Conference { - $this->password = $password; - return $this; - } - - /** - * Sets the conferenceEventUrl attribute for Conference - * - * @param string $conferenceEventUrl URL to receive conference events - */ - public function conferenceEventUrl(string $conferenceEventUrl): Conference { - $this->conferenceEventUrl = $conferenceEventUrl; - return $this; - } - - /** - * Sets the conferenceEventMethod attribute for Conference - * - * @param string $conferenceEventMethod HTTP method for conference events - */ - public function conferenceEventMethod(string $conferenceEventMethod): Conference { - $this->conferenceEventMethod = $conferenceEventMethod; - return $this; - } - - /** - * Sets the callIdsToCoach attribute for Conference - * - * @param string $callIdsToCoach A string of comma separated call IDs to coach - */ - public function callIdsToCoach(string $callIdsToCoach): Conference { - $this->callIdsToCoach = $callIdsToCoach; - return $this; - } - - /** - * Sets the callIdsToCoach attribute for Conference - * - * @param array $callIdsToCoach An array of call IDs to coach - */ - public function callIdsToCoachArray(array $callIdsToCoach): Conference { - $this->callIdsToCoach = implode(",", $callIdsToCoach); - return $this; - } - - /** - * Sets the mute attribute for Conference - * - * @param boolean $mute Determines if conference members should be on mute - */ - public function mute(bool $mute): Conference { - $this->mute = $mute; - return $this; - } - - /** - * Sets the hold attribute for Conference - * - * @param boolean $hold Determines if conference members should be on hold - */ - public function hold(bool $hold): Conference { - $this->hold = $hold; - return $this; - } - - /** - * Sets the conferenceEventFallbackUrl attribute for Conference - * - * @param string $conferenceEventFallbackUrl Fallback url for conference events - */ - public function conferenceEventFallbackUrl(string $conferenceEventFallbackUrl): Conference { - $this->conferenceEventFallbackUrl = $conferenceEventFallbackUrl; - return $this; - } - - /** - * Sets the conferenceEventFallbackMethod attribute for Conference - * - * @param string $conferenceEventFallbackMethod HTTP method for fallback events - */ - public function conferenceEventFallbackMethod(string $conferenceEventFallbackMethod): Conference { - $this->conferenceEventFallbackMethod = $conferenceEventFallbackMethod; - return $this; - } - - /** - * Sets the fallbackUsername attribute for Conference - * - * @param string $fallbackUsername HTTP basic auth username for fallback events - */ - public function fallbackUsername(string $fallbackUsername): Conference { - $this->fallbackUsername = $fallbackUsername; - return $this; - } - - /** - * Sets the fallbackPassword attribute for Conference - * - * @param string $fallbackPassword HTTP basic auth password for fallback events - */ - public function fallbackPassword(string $fallbackPassword): Conference { - $this->fallbackPassword = $fallbackPassword; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("Conference"); - - $element->appendChild($doc->createTextNode($this->conferenceName)); - - if(isset($this->username)) { - $element->setattribute("username", $this->username); - } - - if(isset($this->password)) { - $element->setattribute("password", $this->password); - } - - if(isset($this->tag)) { - $element->setattribute("tag", $this->tag); - } - - if(isset($this->mute)) { - if ($this->mute) { - $element->setattribute("mute", "true"); - } else { - $element->setattribute("mute", "false"); - } - } - - if(isset($this->hold)) { - if ($this->hold) { - $element->setattribute("hold", "true"); - } else { - $element->setattribute("hold", "false"); - } - } - - if(isset($this->callIdsToCoach)) { - $element->setattribute("callIdsToCoach", $this->callIdsToCoach); - } - - if(isset($this->conferenceEventUrl)) { - $element->setattribute("conferenceEventUrl", $this->conferenceEventUrl); - } - - if(isset($this->conferenceEventMethod)) { - $element->setattribute("conferenceEventMethod", $this->conferenceEventMethod); - } - - if(isset($this->conferenceEventFallbackUrl)) { - $element->setattribute("conferenceEventFallbackUrl", $this->conferenceEventFallbackUrl); - } - - if(isset($this->conferenceEventFallbackMethod)) { - $element->setattribute("conferenceEventFallbackMethod", $this->conferenceEventFallbackMethod); - } - - if(isset($this->fallbackUsername)) { - $element->setattribute("fallbackUsername", $this->fallbackUsername); - } - - if(isset($this->fallbackPassword)) { - $element->setattribute("fallbackPassword", $this->fallbackPassword); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/CustomParam.php b/src/Voice/Bxml/CustomParam.php deleted file mode 100644 index ee2fb6aa..00000000 --- a/src/Voice/Bxml/CustomParam.php +++ /dev/null @@ -1,60 +0,0 @@ - elements nested within a tag. These elements define optional user specified parameters that will be sent to the destination URL when the real-time transcription is first started. - * - * * @copyright Bandwidth INC - */ - -namespace BandwidthLib\Voice\Bxml; - -use DOMDocument; -use DOMElement; - -require_once "Verb.php"; - -class CustomParam extends Verb { - /** - * @var string - */ - private $value; - /** - * @var string - */ - private $name; - - /** - * Sets the name attribute for CustomParam - * - * @param string $name (required) The name of this parameter, up to 256 characters. - */ - public function name(string $name): CustomParam { - $this->name = $name; - return $this; - } - - /** - * Sets the value attribute for CustomParam - * - * @param string $value (required) The value of this parameter, up to 2048 characters. - */ - public function value(string $value): CustomParam { - $this->value = $value; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("CustomParam"); - - if(isset($this->name)) { - $element->setAttribute("name", $this->name); - } - - if(isset($this->value)) { - $element->setAttribute("value", $this->value); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/Forward.php b/src/Voice/Bxml/Forward.php deleted file mode 100644 index 18e12a1e..00000000 --- a/src/Voice/Bxml/Forward.php +++ /dev/null @@ -1,114 +0,0 @@ -to = $to; - return $this; - } - - /** - * Sets the from attribute for Forward - * - * @param string $from The phone number to make the phone call - */ - public function from(string $from): Forward { - $this->from = $from; - return $this; - } - - /** - * Sets the callTimeout attribute for Forward - * - * @param string $callTimeout The timeout in seconds for the phone call - */ - public function callTimeout(string $callTimeout): Forward { - $this->callTimeout = $callTimeout; - return $this; - } - - /** - * Sets the diversionTreatment attribute for Forward - * - * @param string $diversionTreatment The diversion treatment for the phone call - */ - public function diversionTreatment(string $diversionTreatment): Forward { - $this->diversionTreatment = $diversionTreatment; - return $this; - } - - /** - * Sets the diversionReason attribute for Forward - * - * @param string $diversionReason The diversion treatment for the phone call - */ - public function diversionReason(string $diversionReason): Forward { - $this->diversionReason = $diversionReason; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("Forward"); - - if(isset($this->to)) { - $element->setAttribute("to", $this->to); - } - - if(isset($this->from)) { - $element->setAttribute("from", $this->from); - } - - if(isset($this->callTimeout)) { - $element->setAttribute("callTimeout", $this->callTimeout); - } - - if(isset($this->diversionTreatment)) { - $element->setAttribute("diversionTreatment", $this->diversionTreatment); - } - - if(isset($this->diversionReason)) { - $element->setAttribute("diversionReason", $this->diversionReason); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/Gather.php b/src/Voice/Bxml/Gather.php deleted file mode 100644 index 4353c5a4..00000000 --- a/src/Voice/Bxml/Gather.php +++ /dev/null @@ -1,329 +0,0 @@ -username = $username; - return $this; - } - - /** - * Sets the password attribute for Gather - * - * @param string $password The password for http authentication for the gather callback - */ - public function password(string $password): Gather { - $this->password = $password; - return $this; - } - - /** - * Sets the gatherUrl attribute for Gather - * - * @param string $gatherUrl The url to receive the gather callback - */ - public function gatherUrl(string $gatherUrl): Gather { - $this->gatherUrl = $gatherUrl; - return $this; - } - - /** - * Sets the gatherMethod attribute for Gather - * - * @param string $gatherMethod The http method to send the gather callback - */ - public function gatherMethod(string $gatherMethod): Gather { - $this->gatherMethod = $gatherMethod; - return $this; - } - - /** - * Sets the tag attribute for Gather - * - * @param string $tag A custom string to be included in callbacks - */ - public function tag(string $tag): Gather { - $this->tag = $tag; - return $this; - } - - /** - * Sets the terminatingDigits attribute for Gather - * - * @param string $terminatingDigits Digits to terminate the gather - */ - public function terminatingDigits(string $terminatingDigits): Gather { - $this->terminatingDigits = $terminatingDigits; - return $this; - } - - /** - * Sets the maxDigits attribute for Gather - * - * @param int $maxDigits The maximum number of digits to collect in the gather - */ - public function maxDigits(int $maxDigits): Gather { - $this->maxDigits = $maxDigits; - return $this; - } - - /** - * Sets the interDigitTimeout attribute for Gather - * - * @param int $interDigitTimeout The time in secods between digit presses before timing out - */ - public function interDigitTimeout(int $interDigitTimeout): Gather { - $this->interDigitTimeout = $interDigitTimeout; - return $this; - } - - /** - * Sets the firstDigitTimeout attribute for Gather - * - * @param int $firstDigitTimeout The time in seconds before the first digit is pressed before timing out - */ - public function firstDigitTimeout(int $firstDigitTimeout): Gather { - $this->firstDigitTimeout = $firstDigitTimeout; - return $this; - } - - /** - * Sets the PlayAudio tag for Gather - * - * @param PlayAudio $playAudio The PlayAudio tag to include in the Gather - */ - public function playAudio(PlayAudio $playAudio): Gather { - $this->playAudio = $playAudio; - return $this->addNestableVerb($playAudio); - } - - /** - * Sets the repeatCount attribute for the Gather - * - * @param int $repeatCount The number of times to repeat the played audio - */ - public function repeatCount(int $repeatCount): Gather { - $this->repeatCount = $repeatCount; - return $this; - } - - /** - * Sets the SpeakSentence tag for Gather. - * - * @param SpeakSentence $speakSentence The SpeakSentence tag to include in the Gather - */ - public function speakSentence(SpeakSentence $speakSentence): Gather { - $this->speakSentence = $speakSentence; - return $this->addNestableVerb($speakSentence); - } - - /** - * Sets the gatherFallbackUrl attribute for Gather - * - * @param string $gatherFallbackUrl Fallback url for gather events - */ - public function gatherFallbackUrl(string $gatherFallbackUrl): Gather { - $this->gatherFallbackUrl = $gatherFallbackUrl; - return $this; - } - - /** - * Sets the gatherFallbackMethod attribute for Gather - * - * @param string $gatherFallbackMethod HTTP method for fallback events - */ - public function gatherFallbackMethod(string $gatherFallbackMethod): Gather { - $this->gatherFallbackMethod = $gatherFallbackMethod; - return $this; - } - - /** - * Sets the fallbackUsername attribute for Gather - * - * @param string $fallbackUsername HTTP basic auth username for fallback events - */ - public function fallbackUsername(string $fallbackUsername): Gather { - $this->fallbackUsername = $fallbackUsername; - return $this; - } - - /** - * Sets the fallbackPassword attribute for Gather - * - * @param string $fallbackPassword HTTP basic auth password for fallback events - */ - public function fallbackPassword(string $fallbackPassword): Gather { - $this->fallbackPassword = $fallbackPassword; - return $this; - } - - /** - * Adds a nestable verb being one of SpeakSentence or PlayAudio. - * - * @param SpeakSentence|PlayAudio $verb The nestable verb to add - */ - private function addNestableVerb($verb): Gather { - if(!isset($this->nestableVerbs)) { - $this->nestableVerbs = []; - } - array_push($this->nestableVerbs, $verb); - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("Gather"); - - if(isset($this->username)) { - $element->setAttribute("username", $this->username); - } - - if(isset($this->password)) { - $element->setAttribute("password", $this->password); - } - - if(isset($this->tag)) { - $element->setAttribute("tag", $this->tag); - } - - if(isset($this->gatherUrl)) { - $element->setAttribute("gatherUrl", $this->gatherUrl); - } - - if(isset($this->gatherMethod)) { - $element->setAttribute("gatherMethod", $this->gatherMethod); - } - - if(isset($this->terminatingDigits)) { - $element->setAttribute("terminatingDigits", $this->terminatingDigits); - } - - if(isset($this->maxDigits)) { - $element->setAttribute("maxDigits", $this->maxDigits); - } - - if(isset($this->interDigitTimeout)) { - $element->setAttribute("interDigitTimeout", $this->interDigitTimeout); - } - - if(isset($this->firstDigitTimeout)) { - $element->setAttribute("firstDigitTimeout", $this->firstDigitTimeout); - } - - if(isset($this->repeatCount)) { - $element->setAttribute("repeatCount", $this->repeatCount); - } - - if(isset($this->gatherFallbackUrl)) { - $element->setAttribute("gatherFallbackUrl", $this->gatherFallbackUrl); - } - - if(isset($this->gatherFallbackMethod)) { - $element->setAttribute("gatherFallbackMethod", $this->gatherFallbackMethod); - } - - if(isset($this->fallbackUsername)) { - $element->setAttribute("fallbackUsername", $this->fallbackUsername); - } - - if(isset($this->fallbackPassword)) { - $element->setAttribute("fallbackPassword", $this->fallbackPassword); - } - - if(isset($this->nestableVerbs)) { - foreach ($this->nestableVerbs as $verb) { - $element->appendChild($verb->toBxml($doc)); - } - } - - return $element; - } -} diff --git a/src/Voice/Bxml/Hangup.php b/src/Voice/Bxml/Hangup.php deleted file mode 100644 index a8ca0574..00000000 --- a/src/Voice/Bxml/Hangup.php +++ /dev/null @@ -1,23 +0,0 @@ -createElement("Hangup"); - return $element; - } -} diff --git a/src/Voice/Bxml/Pause.php b/src/Voice/Bxml/Pause.php deleted file mode 100644 index 94b1266d..00000000 --- a/src/Voice/Bxml/Pause.php +++ /dev/null @@ -1,42 +0,0 @@ -duration = $duration; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("Pause"); - - if(isset($this->duration)) { - $element->setAttribute("duration", $this->duration); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/PauseRecording.php b/src/Voice/Bxml/PauseRecording.php deleted file mode 100644 index eb2839ed..00000000 --- a/src/Voice/Bxml/PauseRecording.php +++ /dev/null @@ -1,23 +0,0 @@ -createElement("PauseRecording"); - return $element; - } -} diff --git a/src/Voice/Bxml/PhoneNumber.php b/src/Voice/Bxml/PhoneNumber.php deleted file mode 100644 index e5adcc17..00000000 --- a/src/Voice/Bxml/PhoneNumber.php +++ /dev/null @@ -1,237 +0,0 @@ -phoneNumber = $phoneNumber; - } - - /** - * Sets the username attribute for PhoneNumber - * - * @param string $username The username for http authentication on the audio url - */ - public function username(string $username): PhoneNumber { - $this->username = $username; - return $this; - } - - /** - * Sets the password attribute for PhoneNumber - * - * @param string $password The password for http authentication on the audio url - */ - public function password(string $password): PhoneNumber { - $this->password = $password; - return $this; - } - - /** - * Sets the transferAnswerUrl attribute for PhoneNumber - * - * @param string $transferAnswerUrl The url to receive the transfer answered callback - */ - public function transferAnswerUrl(string $transferAnswerUrl): PhoneNumber { - $this->transferAnswerUrl = $transferAnswerUrl; - return $this; - } - - /** - * Sets the transferAnswerMethod attribute for PhoneNumber - * - * @param string $transferAnswerMethod The http method to send the transfer answered callback - */ - public function transferAnswerMethod(string $transferAnswerMethod): PhoneNumber { - $this->transferAnswerMethod = $transferAnswerMethod; - return $this; - } - - /** - * Sets the transferDisconnectUrl attribute for PhoneNumber - * - * @param string $transferDisconnectUrl The url to receive the transfer disconnect callback - */ - public function transferDisconnectUrl(string $transferDisconnectUrl): PhoneNumber { - $this->transferDisconnectUrl = $transferDisconnectUrl; - return $this; - } - - /** - * Sets the transferDisconnectMethod attribute for PhoneNumber - * - * @param string $transferDisconnectMethod The http method to send the transfer disconnect callback - */ - public function transferDisconnectMethod(string $transferDisconnectMethod): PhoneNumber { - $this->transferDisconnectMethod = $transferDisconnectMethod; - return $this; - } - - /** - * Sets the tag attribute for PhoneNumber - * - * @param string $tag A custom string to be included in callbacks - */ - public function tag(string $tag): PhoneNumber { - $this->tag = $tag; - return $this; - } - - /** - * Sets the transferAnswerFallbackUrl attribute for PhoneNumber - * - * @param string $transferAnswerFallbackUrl Fallback URL for transfer answer events - */ - public function transferAnswerFallbackUrl(string $transferAnswerFallbackUrl): PhoneNumber { - $this->transferAnswerFallbackUrl = $transferAnswerFallbackUrl; - return $this; - } - - /** - * Sets the transferAnswerFallbackMethod attribute for PhoneNumber - * - * @param string $transferAnswerFallbackMethod HTTP method for fallback events - */ - public function transferAnswerFallbackMethod(string $transferAnswerFallbackMethod): PhoneNumber { - $this->transferAnswerFallbackMethod = $transferAnswerFallbackMethod; - return $this; - } - - /** - * Sets the fallbackUsername attribute for PhoneNumber - * - * @param string $fallbackUsername HTTP basic auth username for fallback events - */ - public function fallbackUsername(string $fallbackUsername): PhoneNumber { - $this->fallbackUsername = $fallbackUsername; - return $this; - } - - /** - * Sets the fallbackPassword attribute for PhoneNumber - * - * @param string $fallbackPassword HTTP basic auth password for fallback events - */ - public function fallbackPassword(string $fallbackPassword): PhoneNumber { - $this->fallbackPassword = $fallbackPassword; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("PhoneNumber"); - - $element->appendChild($doc->createTextNode($this->phoneNumber)); - - if(isset($this->username)) { - $element->setAttribute("username", $this->username); - } - - if(isset($this->password)) { - $element->setAttribute("password", $this->password); - } - - if(isset($this->tag)) { - $element->setAttribute("tag", $this->tag); - } - - if(isset($this->transferAnswerUrl)) { - $element->setAttribute("transferAnswerUrl", $this->transferAnswerUrl); - } - - if(isset($this->transferAnswerMethod)) { - $element->setAttribute("transferAnswerMethod", $this->transferAnswerMethod); - } - - if(isset($this->transferDisconnectUrl)) { - $element->setAttribute("transferDisconnectUrl", $this->transferDisconnectUrl); - } - - if(isset($this->transferDisconnectMethod)) { - $element->setAttribute("transferDisconnectMethod", $this->transferDisconnectMethod); - } - - if(isset($this->transferAnswerFallbackUrl)) { - $element->setAttribute("transferAnswerFallbackUrl", $this->transferAnswerFallbackUrl); - } - - if(isset($this->transferAnswerFallbackMethod)) { - $element->setAttribute("transferAnswerFallbackMethod", $this->transferAnswerFallbackMethod); - } - - if(isset($this->fallbackUsername)) { - $element->setAttribute("fallbackUsername", $this->fallbackUsername); - } - - if(isset($this->fallbackPassword)) { - $element->setAttribute("fallbackPassword", $this->fallbackPassword); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/PlayAudio.php b/src/Voice/Bxml/PlayAudio.php deleted file mode 100644 index 4c4defdb..00000000 --- a/src/Voice/Bxml/PlayAudio.php +++ /dev/null @@ -1,75 +0,0 @@ -url = $url; - } - - /** - * Sets the username attribute for PlayAudio - * - * @param string $username The username for http authentication on the audio url - */ - public function username(string $username): PlayAudio { - $this->username = $username; - return $this; - } - - /** - * Sets the password attribute for PlayAudio - * - * @param string $password The password for http authentication on the audio url - */ - public function password(string $password): PlayAudio { - $this->password = $password; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("PlayAudio"); - - $element->appendChild($doc->createTextNode($this->url)); - - if(isset($this->username)) { - $element->setAttribute("username", $this->username); - } - - if(isset($this->password)) { - $element->setAttribute("password", $this->password); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/Record.php b/src/Voice/Bxml/Record.php deleted file mode 100644 index bff91c6c..00000000 --- a/src/Voice/Bxml/Record.php +++ /dev/null @@ -1,376 +0,0 @@ -tag = $tag; - return $this; - } - - /** - * Sets the recordCompleteUrl attribute for Record - * - * @param string $recordCompleteUrl URL to send the record complete callback to - */ - public function recordCompleteUrl(string $recordCompleteUrl): Record { - $this->recordCompleteUrl = $recordCompleteUrl; - return $this; - } - - /** - * Sets the recordCompleteMethod attribute for Record - * - * @param string $recordCompleteMethod HTTP method to send record complete - * as ("GET" or "POST") - */ - public function recordCompleteMethod(string $recordCompleteMethod): Record { - $this->recordCompleteMethod = $recordCompleteMethod; - return $this; - } - - /** - * Sets the recordingAvailableUrl attribute for Record - * - * @param string $recordingAvailableUrl URL to send the record available callback to - */ - public function recordingAvailableUrl(string $recordingAvailableUrl): Record { - $this->recordingAvailableUrl = $recordingAvailableUrl; - return $this; - } - - /** - * Sets the recordingAvailableMethod attribute for Record - * - * @param string $recordingAvailableMethod HTTP method to send record available - * as ("GET" or "POST") - */ - public function recordingAvailableMethod(string $recordingAvailableMethod): Record { - $this->recordingAvailableMethod = $recordingAvailableMethod; - return $this; - } - - /** - * Sets the username attribute for Record - * - * @param string $username Username for basic auth for callbacks - */ - public function username(string $username): Record { - $this->username = $username; - return $this; - } - - /** - * Sets the password attribute for Record - * - * @param string $password Password for basic auth for callbacks - */ - public function password(string $password): Record { - $this->password = $password; - return $this; - } - - /** - * Sets the terminatingDigits attribute for Record - * - * @param string $terminatingDigits Digits to terminate the recording - */ - public function terminatingDigits(string $terminatingDigits): Record { - $this->terminatingDigits = $terminatingDigits; - return $this; - } - - /** - * Sets the maxDuration attribute for Record - * - * @param int $maxDuration Maximum length of the recording in secods - */ - public function maxDuration(int $maxDuration): Record { - $this->maxDuration = $maxDuration; - return $this; - } - - /** - * Sets the fileFormat attribute for Record - * - * @param string $fileFormat Audio format of the recording ("mp3" or "wav") - */ - public function fileFormat(string $fileFormat): Record { - $this->fileFormat = $fileFormat; - return $this; - } - - /** - * Sets the detectLanguage attribute for Record - * - * @param boolean $detectLanguage Indicates that the recording may not be in English, and the transcription service will need to detect the dominant language the recording is in and transcribe accordingly. Current supported languages are English, French, and Spanish. - */ - public function detectLanguage($detectLanguage): Record { - $this->detectLanguage = $detectLanguage; - return $this; - } - - /** - * Sets the transcribe attribute for Record - * - * @param boolean $transcribe True to submit the recording for transcription, false otherwise - */ - public function transcribe(bool $transcribe): Record { - $this->transcribe = $transcribe; - return $this; - } - - /** - * Sets the transcriptionAvailableUrl for Record - * - * @param string $transcriptionAvailableUrl URL to send transcription available events to - */ - public function transcriptionAvailableUrl(string $transcriptionAvailableUrl): Record { - $this->transcriptionAvailableUrl = $transcriptionAvailableUrl; - return $this; - } - - /** - * Sets the transcriptionAvailableMethod for Record - * - * @param string $transcriptionAvailableMethod HTTP method (GET or POST) to send the transcription available event as - */ - public function transcriptionAvailableMethod(string $transcriptionAvailableMethod): Record { - $this->transcriptionAvailableMethod = $transcriptionAvailableMethod; - return $this; - } - - /** - * Sets the silenceTimeout for Record - * - * @param int $silenceTimeout Number of seconds of silence that ends the recording - */ - public function silenceTimeout(int $silenceTimeout): Record { - $this->silenceTimeout = $silenceTimeout; - return $this; - } - - /** - * Sets the recordCompleteFallbackUrl attribute for Record - * - * @param string $recordCompleteFallbackUrl Fallback URL for record complete events - */ - public function recordCompleteFallbackUrl(string $recordCompleteFallbackUrl): Record { - $this->recordCompleteFallbackUrl = $recordCompleteFallbackUrl; - return $this; - } - - /** - * Sets the recordCompleteFallbackMethod attribute for Record - * - * @param string $recordCompleteFallbackMethod HTTP method for fallback events - */ - public function recordCompleteFallbackMethod(string $recordCompleteFallbackMethod): Record { - $this->recordCompleteFallbackMethod = $recordCompleteFallbackMethod; - return $this; - } - - /** - * Sets the fallbackUsername attribute for Record - * - * @param string $fallbackUsername HTTP basic auth username for fallback events - */ - public function fallbackUsername(string $fallbackUsername): Record { - $this->fallbackUsername = $fallbackUsername; - return $this; - } - - /** - * Sets the fallbackPassword attribute for Record - * - * @param string $fallbackPassword HTTP basic auth password for fallback events - */ - public function fallbackPassword(string $fallbackPassword): Record { - $this->fallbackPassword = $fallbackPassword; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("Record"); - - if(isset($this->tag)) { - $element->setattribute("tag", $this->tag); - } - - if(isset($this->recordCompleteUrl)) { - $element->setattribute("recordCompleteUrl", $this->recordCompleteUrl); - } - - if(isset($this->recordCompleteMethod)) { - $element->setattribute("recordCompleteMethod", $this->recordCompleteMethod); - } - - if(isset($this->recordingAvailableUrl)) { - $element->setattribute("recordingAvailableUrl", $this->recordingAvailableUrl); - } - - if(isset($this->recordingAvailableMethod)) { - $element->setattribute("recordingAvailableMethod", $this->recordingAvailableMethod); - } - - if(isset($this->username)) { - $element->setattribute("username", $this->username); - } - - if(isset($this->password)) { - $element->setattribute("password", $this->password); - } - - if(isset($this->terminatingDigits)) { - $element->setattribute("terminatingDigits", $this->terminatingDigits); - } - - if(isset($this->maxDuration)) { - $element->setattribute("maxDuration", $this->maxDuration); - } - - if(isset($this->fileFormat)) { - $element->setattribute("fileFormat", $this->fileFormat); - } - - if(isset($this->detectLanguage)) { - if ($this->detectLanguage) { - $element->setattribute("detectLanguage", "true"); - } else { - $element->setattribute("detectLanguage", "false"); - } - } - - if(isset($this->transcribe)) { - if ($this->transcribe) { - $element->setattribute("transcribe", "true"); - } else { - $element->setattribute("transcribe", "false"); - } - } - - if(isset($this->transcriptionAvailableUrl)) { - $element->setattribute("transcriptionAvailableUrl", $this->transcriptionAvailableUrl); - } - - if(isset($this->transcriptionAvailableMethod)) { - $element->setattribute("transcriptionAvailableMethod", $this->transcriptionAvailableMethod); - } - - if(isset($this->silenceTimeout)) { - $element->setattribute("silenceTimeout", $this->silenceTimeout); - } - - if(isset($this->recordCompleteFallbackUrl)) { - $element->setattribute("recordCompleteFallbackUrl", $this->recordCompleteFallbackUrl); - } - - if(isset($this->recordCompleteFallbackMethod)) { - $element->setattribute("recordCompleteFallbackMethod", $this->recordCompleteFallbackMethod); - } - - if(isset($this->fallbackUsername)) { - $element->setattribute("fallbackUsername", $this->fallbackUsername); - } - - if(isset($this->fallbackPassword)) { - $element->setattribute("fallbackPassword", $this->fallbackPassword); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/Redirect.php b/src/Voice/Bxml/Redirect.php deleted file mode 100644 index c2215eaa..00000000 --- a/src/Voice/Bxml/Redirect.php +++ /dev/null @@ -1,186 +0,0 @@ -username = $username; - return $this; - } - - /** - * Sets the password attribute for Redirect - * - * @param string $password The password for http authentication on the redirect callback url - */ - public function password(string $password): Redirect { - $this->password = $password; - return $this; - } - - /** - * Sets the redirectUrl attribute for Redirect - * - * @param string $redirectUrl The url to receive the redirect callback - */ - public function redirectUrl(string $redirectUrl): Redirect { - $this->redirectUrl = $redirectUrl; - return $this; - } - - /** - * Sets the redirectMethod attribute for Redirect - * - * @param string $redirectMethod The http method to send the redirect callback - */ - public function redirectMethod(string $redirectMethod): Redirect { - $this->redirectMethod = $redirectMethod; - return $this; - } - - /** - * Sets the tag attribute for Redirect - * - * @param string $tag A custom string to be included in callbacks - */ - public function tag(string $tag): Redirect { - $this->tag = $tag; - return $this; - } - - /** - * Sets the redirectFallbackUrl attribute for Redirect - * - * @param string $redirectFallbackUrl Fallback url for redirect events - */ - public function redirectFallbackUrl(string $redirectFallbackUrl): Redirect { - $this->redirectFallbackUrl = $redirectFallbackUrl; - return $this; - } - - /** - * Sets the redirectFallbackMethod attribute for Redirect - * - * @param string $redirectFallbackMethod HTTP method for fallback events - */ - public function redirectFallbackMethod(string $redirectFallbackMethod): Redirect { - $this->redirectFallbackMethod = $redirectFallbackMethod; - return $this; - } - - /** - * Sets the fallbackUsername attribute for Redirect - * - * @param string $fallbackUsername HTTP basic auth username for fallback events - */ - public function fallbackUsername(string $fallbackUsername): Redirect { - $this->fallbackUsername = $fallbackUsername; - return $this; - } - - /** - * Sets the fallbackPassword attribute for Redirect - * - * @param string $fallbackPassword HTTP basic auth password for fallback events - */ - public function fallbackPassword(string $fallbackPassword): Redirect { - $this->fallbackPassword = $fallbackPassword; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("Redirect"); - - if(isset($this->username)) { - $element->setAttribute("username", $this->username); - } - - if(isset($this->password)) { - $element->setAttribute("password", $this->password); - } - - if(isset($this->tag)) { - $element->setAttribute("tag", $this->tag); - } - - if(isset($this->redirectUrl)) { - $element->setAttribute("redirectUrl", $this->redirectUrl); - } - - if(isset($this->redirectMethod)) { - $element->setAttribute("redirectMethod", $this->redirectMethod); - } - - if(isset($this->redirectFallbackUrl)) { - $element->setAttribute("redirectFallbackUrl", $this->redirectFallbackUrl); - } - - if(isset($this->redirectFallbackMethod)) { - $element->setAttribute("redirectFallbackMethod", $this->redirectFallbackMethod); - } - - if(isset($this->fallbackUsername)) { - $element->setAttribute("fallbackUsername", $this->fallbackUsername); - } - - if(isset($this->fallbackPassword)) { - $element->setAttribute("fallbackPassword", $this->fallbackPassword); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/Response.php b/src/Voice/Bxml/Response.php deleted file mode 100644 index ffc80f17..00000000 --- a/src/Voice/Bxml/Response.php +++ /dev/null @@ -1,59 +0,0 @@ -verbs = array(); - } - - /** - * Adds the verb to the verbs - * - * @param Verb $verb The verb to add to the list - */ - public function addVerb(Verb $verb): Response { - array_push($this->verbs, $verb); - return $this; - } - - /** - * Converts the Response class into its BXML representation - * - * @return string The xml representation of the class - */ - public function toBxml(): string { - $ssmlRegex = '/<([a-zA-Z\/\/].*?)>/'; - $doc = new DOMDocument('1.0', 'UTF-8'); - $responseElement = $doc->createElement("Response"); - - foreach ($this->verbs as $verb) { - $responseElement->appendChild($verb->toBxml($doc)); - } - - $doc->appendChild($responseElement); - return str_replace("\n", '', preg_replace($ssmlRegex, "<$1>", $doc->saveXML())); - } - - public function __toString(): string - { - return $this->toBxml(); - } -} diff --git a/src/Voice/Bxml/ResumeRecording.php b/src/Voice/Bxml/ResumeRecording.php deleted file mode 100644 index d414cf8f..00000000 --- a/src/Voice/Bxml/ResumeRecording.php +++ /dev/null @@ -1,23 +0,0 @@ -createElement("ResumeRecording"); - return $element; - } -} diff --git a/src/Voice/Bxml/Ring.php b/src/Voice/Bxml/Ring.php deleted file mode 100644 index a5cacfa5..00000000 --- a/src/Voice/Bxml/Ring.php +++ /dev/null @@ -1,64 +0,0 @@ -duration = $duration; - return $this; - } - - /** - * Sets the answerCall attribute for Ring - * - * @param boolean $answerCall Determines whether or not to answer the call when Ring is executed on an unanswered incoming call - */ - public function answerCall(bool $answerCall): Ring { - $this->answerCall = $answerCall; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("Ring"); - - if(isset($this->duration)) { - $element->setAttribute("duration", $this->duration); - } - - if(isset($this->answerCall)) { - if ($this->answerCall) { - $element->setattribute("answerCall", "true"); - } else { - $element->setattribute("answerCall", "false"); - } - } - - return $element; - } -} diff --git a/src/Voice/Bxml/SendDtmf.php b/src/Voice/Bxml/SendDtmf.php deleted file mode 100644 index f07fddb4..00000000 --- a/src/Voice/Bxml/SendDtmf.php +++ /dev/null @@ -1,75 +0,0 @@ -digits = $digits; - } - - /** - * Sets the toneDuration attribute for SendDtmf - * - * @param double $toneDuration The length in milliseconds of each DTMF tone - */ - public function toneDuration(float $toneDuration): SendDtmf { - $this->toneDuration = $toneDuration; - return $this; - } - - /** - * Sets the toneInterval attribute for SendDtmf - * - * @param double $toneInterval The duration of silence in milliseconds following each DTMF tone - */ - public function toneInterval(float $toneInterval): SendDtmf { - $this->toneInterval = $toneInterval; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("SendDtmf"); - - $element->appendChild($doc->createTextNode($this->digits)); - - if(isset($this->toneDuration)) { - $element->setattribute("toneDuration", $this->toneDuration); - } - - if(isset($this->toneInterval)) { - $element->setattribute("toneInterval", $this->toneInterval); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/SipUri.php b/src/Voice/Bxml/SipUri.php deleted file mode 100644 index 743f5122..00000000 --- a/src/Voice/Bxml/SipUri.php +++ /dev/null @@ -1,255 +0,0 @@ -sip = $sip; - } - - /** - * Sets the username attribute for SipUri - * - * @param string $username The username for http authentication on the audio url - */ - public function username(string $username): SipUri { - $this->username = $username; - return $this; - } - - /** - * Sets the password attribute for SipUri - * - * @param string $password The password for http authentication on the audio url - */ - public function password(string $password): SipUri { - $this->password = $password; - return $this; - } - - /** - * Sets the transferAnswerUrl attribute for SipUri - * - * @param string $transferAnswerUrl The url to receive the transfer answered callback - */ - public function transferAnswerUrl(string $transferAnswerUrl): SipUri { - $this->transferAnswerUrl = $transferAnswerUrl; - return $this; - } - - /** - * Sets the transferAnswerMethod attribute for SipUri - * - * @param string $transferAnswerMethod The http method to send the transfer answered callback - */ - public function transferAnswerMethod(string $transferAnswerMethod): SipUri { - $this->transferAnswerMethod = $transferAnswerMethod; - return $this; - } - - /** - * Sets the transferDisconnectUrl attribute for SipUri - * - * @param string $transferDisconnectUrl The url to receive the transfer disconnect callback - */ - public function transferDisconnectUrl(string $transferDisconnectUrl): SipUri { - $this->transferDisconnectUrl = $transferDisconnectUrl; - return $this; - } - - /** - * Sets the transferDisconnectMethod attribute for SipUri - * - * @param string $transferDisconnectMethod The http method to send the transfer disconnect callback - */ - public function transferDisconnectMethod(string $transferDisconnectMethod): SipUri { - $this->transferDisconnectMethod = $transferDisconnectMethod; - return $this; - } - - /** - * Sets the tag attribute for SipUri - * - * @param string $tag A custom string to be included in callbacks - */ - public function tag(string $tag): SipUri { - $this->tag = $tag; - return $this; - } - - /** - * Sets the uui attribute for SipUri - * - * @param string $uui The value of the `User-To-User` header to send within the initial `INVITE` - */ - public function uui(string $uui): SipUri { - $this->uui = $uui; - return $this; - } - - /** - * Sets the transferAnswerFallbackUrl attribute for SipUri - * - * @param string $transferAnswerFallbackUrl Fallback URL for transfer answer events - */ - public function transferAnswerFallbackUrl(string $transferAnswerFallbackUrl): SipUri { - $this->transferAnswerFallbackUrl = $transferAnswerFallbackUrl; - return $this; - } - - /** - * Sets the transferAnswerFallbackMethod attribute for SipUri - * - * @param string $transferAnswerFallbackMethod HTTP method for fallback events - */ - public function transferAnswerFallbackMethod(string $transferAnswerFallbackMethod): SipUri { - $this->transferAnswerFallbackMethod = $transferAnswerFallbackMethod; - return $this; - } - - /** - * Sets the fallbackUsername attribute for SipUri - * - * @param string $fallbackUsername HTTP basic auth username for fallback events - */ - public function fallbackUsername(string $fallbackUsername): SipUri { - $this->fallbackUsername = $fallbackUsername; - return $this; - } - - /** - * Sets the fallbackPassword attribute for SipUri - * - * @param string $fallbackPassword HTTP basic auth password for fallback events - */ - public function fallbackPassword(string $fallbackPassword): SipUri { - $this->fallbackPassword = $fallbackPassword; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("SipUri"); - - $element->appendChild($doc->createTextNode($this->sip)); - - if(isset($this->username)) { - $element->setAttribute("username", $this->username); - } - - if(isset($this->password)) { - $element->setAttribute("password", $this->password); - } - - if(isset($this->tag)) { - $element->setAttribute("tag", $this->tag); - } - - if(isset($this->uui)) { - $element->setAttribute("uui", $this->uui); - } - - if(isset($this->transferAnswerUrl)) { - $element->setAttribute("transferAnswerUrl", $this->transferAnswerUrl); - } - - if(isset($this->transferAnswerMethod)) { - $element->setAttribute("transferAnswerMethod", $this->transferAnswerMethod); - } - - if(isset($this->transferDisconnectUrl)) { - $element->setAttribute("transferDisconnectUrl", $this->transferDisconnectUrl); - } - - if(isset($this->transferDisconnectMethod)) { - $element->setAttribute("transferDisconnectMethod", $this->transferDisconnectMethod); - } - - if(isset($this->transferAnswerFallbackUrl)) { - $element->setAttribute("transferAnswerFallbackUrl", $this->transferAnswerFallbackUrl); - } - - if(isset($this->transferAnswerFallbackMethod)) { - $element->setAttribute("transferAnswerFallbackMethod", $this->transferAnswerFallbackMethod); - } - - if(isset($this->fallbackUsername)) { - $element->setAttribute("fallbackUsername", $this->fallbackUsername); - } - - if(isset($this->fallbackPassword)) { - $element->setAttribute("fallbackPassword", $this->fallbackPassword); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/SpeakSentence.php b/src/Voice/Bxml/SpeakSentence.php deleted file mode 100644 index e6f3d68f..00000000 --- a/src/Voice/Bxml/SpeakSentence.php +++ /dev/null @@ -1,93 +0,0 @@ -sentence = $sentence; - } - - /** - * Sets the voice attribute for SpeakSentence - * - * @param string $voice The voice to speak in the call - */ - public function voice(string $voice): SpeakSentence { - $this->voice = $voice; - return $this; - } - - /** - * Sets the locale attribute for SpeakSentence - * - * @param string $locale The locale of the voice in the call - */ - public function locale(string $locale): SpeakSentence { - $this->locale = $locale; - return $this; - } - - /** - * Sets the gender attribute for SpeakSentence - * - * @param string $gender The gender of the voice in the call - */ - public function gender(string $gender): SpeakSentence { - $this->gender = $gender; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("SpeakSentence"); - - $element->appendChild($doc->createTextNode($this->sentence)); - - if(isset($this->locale)) { - $element->setAttribute("locale", $this->locale); - } - - if(isset($this->gender)) { - $element->setAttribute("gender", $this->gender); - } - - if(isset($this->voice)) { - $element->setAttribute("voice", $this->voice); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/StartGather.php b/src/Voice/Bxml/StartGather.php deleted file mode 100644 index 3c684d31..00000000 --- a/src/Voice/Bxml/StartGather.php +++ /dev/null @@ -1,116 +0,0 @@ -username = $username; - return $this; - } - - /** - * Sets the password attribute for StartGather - * - * @param string $password The password for http authentication for the gather callback - */ - public function password(string $password): StartGather { - $this->password = $password; - return $this; - } - - /** - * Sets the dtmfUrl attribute for StartGather - * - * @param string $dtmfUrl The url to receive the dtmf callback - */ - public function dtmfUrl(string $dtmfUrl): StartGather { - $this->dtmfUrl = $dtmfUrl; - return $this; - } - - /** - * Sets the dtmfMethod attribute for StartGather - * - * @param string $dtmfMethod The http method to send the dtmf callback - */ - public function dtmfMethod(string $dtmfMethod): StartGather { - $this->dtmfMethod = $dtmfMethod; - return $this; - } - - /** - * Sets the tag attribute for StartGather - * - * @param string $tag A custom string to be included in callbacks - */ - public function tag(string $tag): StartGather { - $this->tag = $tag; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("StartGather"); - - if(isset($this->username)) { - $element->setAttribute("username", $this->username); - } - - if(isset($this->password)) { - $element->setAttribute("password", $this->password); - } - - if(isset($this->tag)) { - $element->setAttribute("tag", $this->tag); - } - - if(isset($this->dtmfUrl)) { - $element->setAttribute("dtmfUrl", $this->dtmfUrl); - } - - if(isset($this->dtmfMethod)) { - $element->setAttribute("dtmfMethod", $this->dtmfMethod); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/StartRecording.php b/src/Voice/Bxml/StartRecording.php deleted file mode 100644 index 627689d8..00000000 --- a/src/Voice/Bxml/StartRecording.php +++ /dev/null @@ -1,236 +0,0 @@ -tag = $tag; - return $this; - } - - /** - * Sets the recordingAvailableUrl attribute for StartRecording - * - * @param string $recordingAvailableUrl URL to send the record available callback to - */ - public function recordingAvailableUrl(string $recordingAvailableUrl): StartRecording { - $this->recordingAvailableUrl = $recordingAvailableUrl; - return $this; - } - - /** - * Sets the recordingAvailableMethod attribute for StartRecording - * - * @param string $recordingAvailableMethod HTTP method to send record available - * as ("GET" or "POST") - */ - public function recordingAvailableMethod(string $recordingAvailableMethod): StartRecording { - $this->recordingAvailableMethod = $recordingAvailableMethod; - return $this; - } - - /** - * Sets the username attribute for StartRecording - * - * @param string $username Username for basic auth for callbacks - */ - public function username(string $username): StartRecording { - $this->username = $username; - return $this; - } - - /** - * Sets the password attribute for StartRecording - * - * @param string $password Password for basic auth for callbacks - */ - public function password(string $password): StartRecording { - $this->password = $password; - return $this; - } - - /** - * Sets the fileFormat attribute for StartRecording - * - * @param string $fileFormat Audio format of the recording ("mp3" or "wav") - */ - public function fileFormat(string $fileFormat): StartRecording { - $this->fileFormat = $fileFormat; - return $this; - } - - /** - * Sets the detectLanguage attribute for Record - * - * @param boolean $detectLanguage Indicates that the recording may not be in English, and the transcription service will need to detect the dominant language the recording is in and transcribe accordingly. Current supported languages are English, French, and Spanish. - */ - public function detectLanguage($detectLanguage): StartRecording { - $this->detectLanguage = $detectLanguage; - return $this; - } - - - /** - * Sets the multiChannel attribute for StartRecording - * - * @param bool $multiChannel True to record the audio as 2 channels, false otherwise - */ - public function multiChannel(bool $multiChannel): StartRecording { - $this->multiChannel = $multiChannel; - return $this; - } - - /** - * Sets the transcribe attribute for StartRecording - * - * @param boolean $transcribe True to submit the recording for transcription, false otherwise - */ - public function transcribe(bool $transcribe): StartRecording { - $this->transcribe = $transcribe; - return $this; - } - - /** - * Sets the transcriptionAvailableUrl for StartRecording - * - * @param string $transcriptionAvailableUrl URL to send transcription available events to - */ - public function transcriptionAvailableUrl(string $transcriptionAvailableUrl): StartRecording { - $this->transcriptionAvailableUrl = $transcriptionAvailableUrl; - return $this; - } - - /** - * Sets the transcriptionAvailableMethod for StartRecording - * - * @param string $transcriptionAvailableMethod HTTP method (GET or POST) to send the transcription available event as - */ - public function transcriptionAvailableMethod(string $transcriptionAvailableMethod): StartRecording { - $this->transcriptionAvailableMethod = $transcriptionAvailableMethod; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("StartRecording"); - - if(isset($this->tag)) { - $element->setattribute("tag", $this->tag); - } - - if(isset($this->recordingAvailableUrl)) { - $element->setattribute("recordingAvailableUrl", $this->recordingAvailableUrl); - } - - if(isset($this->recordingAvailableMethod)) { - $element->setattribute("recordingAvailableMethod", $this->recordingAvailableMethod); - } - - if(isset($this->username)) { - $element->setattribute("username", $this->username); - } - - if(isset($this->password)) { - $element->setattribute("password", $this->password); - } - - if(isset($this->fileFormat)) { - $element->setattribute("fileFormat", $this->fileFormat); - } - - if(isset($this->detectLanguage)) { - if ($this->detectLanguage) { - $element->setattribute("detectLanguage", "true"); - } else { - $element->setattribute("detectLanguage", "false"); - } - } - - if(isset($this->multiChannel)) { - if ($this->multiChannel) { - $element->setattribute("multiChannel", "true"); - } else { - $element->setattribute("multiChannel", "false"); - } - } - - if(isset($this->transcribe)) { - if ($this->transcribe) { - $element->setattribute("transcribe", "true"); - } else { - $element->setattribute("transcribe", "false"); - } - } - - if(isset($this->transcriptionAvailableUrl)) { - $element->setattribute("transcriptionAvailableUrl", $this->transcriptionAvailableUrl); - } - - if(isset($this->transcriptionAvailableMethod)) { - $element->setattribute("transcriptionAvailableMethod", $this->transcriptionAvailableMethod); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/StartStream.php b/src/Voice/Bxml/StartStream.php deleted file mode 100644 index 0d7b1b4c..00000000 --- a/src/Voice/Bxml/StartStream.php +++ /dev/null @@ -1,168 +0,0 @@ -destination = $destination; - return $this; - } - - /** - * Sets the name attribute for StartStream - * - * @param string $name A name to refer to this stream by. Used when sending [``][1]. If not provided, a random name will be generated and sent in the [`Media Stream Started`][2] webook - */ - public function name(string $name): StartStream { - $this->name = $name; - return $this; - } - - /** - * Sets the tracks attribute for StartStream - * - * @param string $tracks The part of the call to send a stream from. `inbound`, `outbound` or `both`. Default is `inbound`. - * - */ - public function tracks(string $tracks): StartStream { - $this->tracks = $tracks; - return $this; - } - - /** - * Sets the username attribute for StartStream - * - * @param string $username The username to send in the HTTP request to `streamEventUrl`. If specified, the URLs must be TLS-encrypted (i.e., `https`). - */ - public function username(string $username): StartStream { - $this->username = $username; - return $this; - } - - /** - * Sets the password attribute for StartStream - * - * @param string $password The password to send in the HTTP request to `streamEventUrl`. If specified, the URLs must be TLS-encrypted (i.e., `https`). - */ - public function password(string $password): StartStream { - $this->password = $password; - return $this; - } - - /** - * Sets the streamEventUrl attribute for StartStream - * - * @param string $streamEventUrl URL to send the associated Webhook events to during this stream's lifetime. Does not accept BXML. May be a relative URL. - */ - public function streamEventUrl(string $streamEventUrl): StartStream { - $this->streamEventUrl = $streamEventUrl; - return $this; - } - - /** - * Sets the streamEventMethod attribute for StartStream - * - * @param bool $streamEventMethod The HTTP method to use for the request to `streamEventUrl`. GET or POST. Default value is POST. - */ - public function streamEventMethod(string $streamEventMethod): StartStream { - $this->streamEventMethod = $streamEventMethod; - return $this; - } - - /** - * Sets the tag. You may specify up to 12 elements nested within a tag. These elements define optional user specified parameters that will be sent to the destination URL when the stream is first started. - * - * @param list $streamParams The list of StreamParam tags - */ - public function streamParams($streamParams): StartStream { - $this->streamParams = $streamParams; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("StartStream"); - - if(isset($this->destination)) { - $element->setattribute("destination", $this->destination); - } - - if(isset($this->name)) { - $element->setattribute("name", $this->name); - } - - if(isset($this->tracks)) { - $element->setattribute("tracks", $this->tracks); - } - - if(isset($this->username)) { - $element->setattribute("username", $this->username); - } - - if(isset($this->password)) { - $element->setattribute("password", $this->password); - } - - if(isset($this->streamEventUrl)) { - $element->setattribute("streamEventUrl", $this->streamEventUrl); - } - - if(isset($this->streamEventMethod)) { - $element->setattribute("streamEventMethod", $this->streamEventMethod); - } - - if(isset($this->streamParams)) { - foreach ($this->streamParams as $streamParam) { - $element->appendChild($streamParam->toBxml($doc)); - } - } - - return $element; - } -} diff --git a/src/Voice/Bxml/StartTranscription.php b/src/Voice/Bxml/StartTranscription.php deleted file mode 100644 index 6820ce26..00000000 --- a/src/Voice/Bxml/StartTranscription.php +++ /dev/null @@ -1,206 +0,0 @@ -destination = $destination; - return $this; - } - - /** - * Sets the name attribute for StartTranscription - * - * @param string $name A name to refer to this transcription by. Used when sending . If not provided, it will default to the generated transcription id as sent in the real-time Transcription Started webhook. - */ - public function name(string $name): StartTranscription { - $this->name = $name; - return $this; - } - - /** - * Sets the tracks attribute for StartTranscription - * - * @param string $tracks The part of the call to send a real-time transcription from. `inbound`, `outbound` or `both`. Default is `inbound`. - * - */ - public function tracks(string $tracks): StartTranscription { - $this->tracks = $tracks; - return $this; - } - - /** - * Sets the username attribute for StartTranscription - * - * @param string $username The username to send in the HTTP request to `transcriptionEventUrl`. If specified, the URLs must be TLS-encrypted (i.e., `https`). - */ - public function username(string $username): StartTranscription { - $this->username = $username; - return $this; - } - - /** - * Sets the password attribute for StartTranscription - * - * @param string $password The password to send in the HTTP request to `transcriptionEventUrl`. If specified, the URLs must be TLS-encrypted (i.e., `https`). - */ - public function password(string $password): StartTranscription { - $this->password = $password; - return $this; - } - - /** - * Sets the transcriptionEventUrl attribute for StartTranscription - * - * @param string $transcriptionEventUrl URL to send the associated Webhook events to during this stream's lifetime. Does not accept BXML. May be a relative URL. - */ - public function transcriptionEventUrl(string $transcriptionEventUrl): StartTranscription { - $this->transcriptionEventUrl = $transcriptionEventUrl; - return $this; - } - - /** - * Sets the transcriptionEventMethod attribute for StartTranscription - * - * @param bool $transcriptionEventMethod The HTTP method to use for the request to `transcriptionEventUrl`. GET or POST. Default value is POST. - */ - public function transcriptionEventMethod(string $transcriptionEventMethod): StartTranscription { - $this->transcriptionEventMethod = $transcriptionEventMethod; - return $this; - } - - /** - * Sets the stability attribute for StartTranscription - * - * @param bool Whether to send transcription update events to the specified destination only after they have become stable. Requires destination. Defaults to true. - * - */ - public function stability( bool $stability): StartTranscription { - $this->stability = $stability; - return $this; - } - - /** - * Sets the stabilized attribute for StartTranscription - * - * @param bool Whether to send transcription update events to the specified destination only after they have become stable. Requires destination. Defaults to true. - * - */ - public function stabilized( bool $stabilized): StartTranscription { - $this->stabilized = $stabilized; - return $this; - } - - /** - * Sets the tag. You may specify up to 12 elements nested within a tag. These elements define optional user specified parameters that will be sent to the destination URL when the real-time transcription is first started. - * - * @param list $customParams The list of CustomParam tags - */ - public function customParams($customParams): StartTranscription { - $this->customParams = $customParams; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("StartTranscription"); - - if(isset($this->destination)) { - $element->setattribute("destination", $this->destination); - } - - if(isset($this->name)) { - $element->setattribute("name", $this->name); - } - - if(isset($this->tracks)) { - $element->setattribute("tracks", $this->tracks); - } - - if(isset($this->username)) { - $element->setattribute("username", $this->username); - } - - if(isset($this->password)) { - $element->setattribute("password", $this->password); - } - - if(isset($this->transcriptionEventUrl)) { - $element->setattribute("transcriptionEventUrl", $this->transcriptionEventUrl); - } - - if(isset($this->transcriptionEventMethod)) { - $element->setattribute("transcriptionEventMethod", $this->transcriptionEventMethod); - } - - if(isset($this->stability)) { - $element->setattribute("stablilty", $this->stability); - } - - if(isset($this->stabilized)) { - $element->setattribute("stabilized", $this->stabilized); - } - - if(isset($this->customParams)) { - foreach ($this->customParams as $customParam) { - $element->appendChild($customParam->toBxml($doc)); - } - } - - return $element; - } -} diff --git a/src/Voice/Bxml/StopGather.php b/src/Voice/Bxml/StopGather.php deleted file mode 100644 index bada9231..00000000 --- a/src/Voice/Bxml/StopGather.php +++ /dev/null @@ -1,23 +0,0 @@ -createElement("StopGather"); - return $element; - } -} diff --git a/src/Voice/Bxml/StopRecording.php b/src/Voice/Bxml/StopRecording.php deleted file mode 100644 index 511190fc..00000000 --- a/src/Voice/Bxml/StopRecording.php +++ /dev/null @@ -1,23 +0,0 @@ -createElement("StopRecording"); - return $element; - } -} diff --git a/src/Voice/Bxml/StopStream.php b/src/Voice/Bxml/StopStream.php deleted file mode 100644 index 3e195f50..00000000 --- a/src/Voice/Bxml/StopStream.php +++ /dev/null @@ -1,42 +0,0 @@ -`][1] verb, or the system generated name returned in the [Media Stream Started][2] webhook if `` was sent with no `name` attribute. - */ - public function name(string $name): StopStream { - $this->name = $name; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("StopStream"); - - if(isset($this->name)) { - $element->setAttribute("name", $this->name); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/StopTranscription.php b/src/Voice/Bxml/StopTranscription.php deleted file mode 100644 index 5392c8b2..00000000 --- a/src/Voice/Bxml/StopTranscription.php +++ /dev/null @@ -1,42 +0,0 @@ -`][1] verb, or the system generated name returned in the [Media Transcription Started][2] webhook if `` was sent with no `name` attribute. - */ - public function name(string $name): StopTranscription { - $this->name = $name; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("StopTranscription"); - - if(isset($this->name)) { - $element->setAttribute("name", $this->name); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/StreamParam.php b/src/Voice/Bxml/StreamParam.php deleted file mode 100644 index 41d68146..00000000 --- a/src/Voice/Bxml/StreamParam.php +++ /dev/null @@ -1,60 +0,0 @@ - elements nested within a tag. These elements define optional user specified parameters that will be sent to the destination URL when the stream is first started. - * - * * @copyright Bandwidth INC - */ - -namespace BandwidthLib\Voice\Bxml; - -use DOMDocument; -use DOMElement; - -require_once "Verb.php"; - -class StreamParam extends Verb { - /** - * @var string - */ - private $value; - /** - * @var string - */ - private $name; - - /** - * Sets the name attribute for StreamParam - * - * @param string $name (required) The name of this parameter, up to 256 characters. - */ - public function name(string $name): StreamParam { - $this->name = $name; - return $this; - } - - /** - * Sets the value attribute for StreamParam - * - * @param string $value (required) The value of this parameter, up to 2048 characters. - */ - public function value(string $value): StreamParam { - $this->value = $value; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("StreamParam"); - - if(isset($this->name)) { - $element->setAttribute("name", $this->name); - } - - if(isset($this->value)) { - $element->setAttribute("value", $this->value); - } - - return $element; - } -} diff --git a/src/Voice/Bxml/Tag.php b/src/Voice/Bxml/Tag.php deleted file mode 100644 index 88ddfa33..00000000 --- a/src/Voice/Bxml/Tag.php +++ /dev/null @@ -1,39 +0,0 @@ -tag = $tag; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("Tag"); - - $element->appendChild($doc->createTextNode($this->tag)); - - return $element; - } -} diff --git a/src/Voice/Bxml/Transfer.php b/src/Voice/Bxml/Transfer.php deleted file mode 100644 index 45cdaadc..00000000 --- a/src/Voice/Bxml/Transfer.php +++ /dev/null @@ -1,308 +0,0 @@ -username = $username; - return $this; - } - - /** - * Sets the password attribute for Transfer - * - * @param string $password The password for http authentication on the transfer answered callback url - */ - public function password(string $password): Transfer { - $this->password = $password; - return $this; - } - - /** - * Sets the transferCompleteUrl attribute for Transfer - * - * @param string $transferCompleteUrl The url to receive the transfer answered callback - */ - public function transferCompleteUrl(string $transferCompleteUrl): Transfer { - $this->transferCompleteUrl = $transferCompleteUrl; - return $this; - } - - /** - * Sets the transferCompleteMethod attribute for Transfer - * - * @param string $transferCompleteMethod The http method to send the transfer answered callback - */ - public function transferCompleteMethod(string $transferCompleteMethod): Transfer { - $this->transferCompleteMethod = $transferCompleteMethod; - return $this; - } - - /** - * Sets the transferCallerId attribute for Transfer - * - * @param string $transferCallerId The caller id to use when the call is transferred - */ - public function transferCallerId(string $transferCallerId): Transfer { - $this->transferCallerId = $transferCallerId; - return $this; - } - - /** - * Sets the transferCallerDisplayName attribute for Transfer - */ - public function transferCallerDisplayName(string $transferCallerDisplayName): Transfer { - $this->transferCallerDisplayName = $transferCallerDisplayName; - return $this; - } - - /** - * Sets the callTimeout attribute for Transfer - * - * @param int $callTimeout The number of seconds to wait before timing out the call - */ - public function callTimeout(int $callTimeout): Transfer { - $this->callTimeout = $callTimeout; - return $this; - } - - /** - * Sets the tag attribute for Transfer - * - * @param string $tag A custom string to be included in callbacks - */ - public function tag(string $tag): Transfer { - $this->tag = $tag; - return $this; - } - - /** - * Sets the diversionTreatment attribute for Transfer - * - * @param string $diversionTreatment The diversion treatment for the phone call - */ - public function diversionTreatment(string $diversionTreatment): Transfer { - $this->diversionTreatment = $diversionTreatment; - return $this; - } - - /** - * Sets the diversionReason attribute for Transfer - * - * @param string $diversionReason The diversion treatment for the phone call - */ - public function diversionReason(string $diversionReason): Transfer { - $this->diversionReason = $diversionReason; - return $this; - } - - /** - * Sets the PhoneNumber tags to be included in the Transfer - * - * @param list $phoneNumbers The list of PhoneNumber tags - */ - public function phoneNumbers($phoneNumbers): Transfer { - $this->phoneNumbers = $phoneNumbers; - return $this; - } - - /** - * Sets the SipUri tags to be included in the Transfer - * - * @param list $sipUris The list of SipUri tags - */ - public function sipUris($sipUris): Transfer { - $this->sipUris = $sipUris; - return $this; - } - - /** - * Sets the transferCompleteFallbackUrl attribute for Transfer - * - * @param string $transferCompleteFallbackUrl Fallback url for transfer complete events - */ - public function transferCompleteFallbackUrl(string $transferCompleteFallbackUrl): Transfer { - $this->transferCompleteFallbackUrl = $transferCompleteFallbackUrl; - return $this; - } - - /** - * Sets the transferCompleteFallbackMethod attribute for Transfer - * - * @param string $transferCompleteFallbackMethod HTTP method for fallback events - */ - public function transferCompleteFallbackMethod(string $transferCompleteFallbackMethod): Transfer { - $this->transferCompleteFallbackMethod = $transferCompleteFallbackMethod; - return $this; - } - - /** - * Sets the fallbackUsername attribute for Transfer - * - * @param string $fallbackUsername HTTP basic auth username for fallback events - */ - public function fallbackUsername(string $fallbackUsername): Transfer { - $this->fallbackUsername = $fallbackUsername; - return $this; - } - - /** - * Sets the fallbackPassword attribute for Transfer - * - * @param string $fallbackPassword HTTP basic auth password for fallback events - */ - public function fallbackPassword(string $fallbackPassword): Transfer { - $this->fallbackPassword = $fallbackPassword; - return $this; - } - - public function toBxml(DOMDocument $doc): DOMElement { - $element = $doc->createElement("Transfer"); - - if(isset($this->username)) { - $element->setAttribute("username", $this->username); - } - - if(isset($this->password)) { - $element->setAttribute("password", $this->password); - } - - if(isset($this->tag)) { - $element->setAttribute("tag", $this->tag); - } - - if(isset($this->transferCompleteUrl)) { - $element->setAttribute("transferCompleteUrl", $this->transferCompleteUrl); - } - - if(isset($this->transferCompleteMethod)) { - $element->setAttribute("transferCompleteMethod", $this->transferCompleteMethod); - } - - if(isset($this->transferCallerId)) { - $element->setAttribute("transferCallerId", $this->transferCallerId); - } - - if(isset($this->transferCallerDisplayName)) { - $element->setAttribute("transferCallerDisplayName", $this->transferCallerDisplayName); - } - - if(isset($this->callTimeout)) { - $element->setAttribute("callTimeout", $this->callTimeout); - } - - if(isset($this->diversionTreatment)) { - $element->setAttribute("diversionTreatment", $this->diversionTreatment); - } - - if(isset($this->diversionReason)) { - $element->setAttribute("diversionReason", $this->diversionReason); - } - - if(isset($this->transferCompleteFallbackUrl)) { - $element->setAttribute("transferCompleteFallbackUrl", $this->transferCompleteFallbackUrl); - } - - if(isset($this->transferCompleteFallbackMethod)) { - $element->setAttribute("transferCompleteFallbackMethod", $this->transferCompleteFallbackMethod); - } - - if(isset($this->fallbackUsername)) { - $element->setAttribute("fallbackUsername", $this->fallbackUsername); - } - - if(isset($this->fallbackPassword)) { - $element->setAttribute("fallbackPassword", $this->fallbackPassword); - } - - if(isset($this->phoneNumbers)) { - foreach ($this->phoneNumbers as $phoneNumber) { - $element->appendChild($phoneNumber->toBxml($doc)); - } - } - - if(isset($this->sipUris)) { - foreach ($this->sipUris as $sipUri) { - $element->appendChild($sipUri->toBxml($doc)); - } - } - - return $element; - } -} diff --git a/src/Voice/Bxml/Verb.php b/src/Voice/Bxml/Verb.php deleted file mode 100644 index 2d058b21..00000000 --- a/src/Voice/Bxml/Verb.php +++ /dev/null @@ -1,28 +0,0 @@ - $accountId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json', - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::post($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass($response->body, 'BandwidthLib\\Voice\\Models\\CreateCallResponse'); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Returns near-realtime metadata about the specified call. - * - * @param string $accountId TODO: type description here - * @param string $callId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getCall( - string $accountId, - string $callId - ) { - - //prepare query string for API call - $_queryBuilder = '/api/v2/accounts/{accountId}/calls/{callId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'callId' => $callId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass($response->body, 'BandwidthLib\\Voice\\Models\\CallState'); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - -/** - * Replaces the bxml for an active call - * - * @param string $accountId TODO: type description here - * @param string $callId TODO: type description here - * @param string $body Valid BXML string - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function modifyCallBxml( - string $accountId, - string $callId, - string $body - ) { - - //prepare query string for API call - $_queryBuilder = '/api/v2/accounts/{accountId}/calls/{callId}/bxml'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'callId' => $callId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'content-type' => 'application/xml; charset=utf-8' - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::PUT, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::put($_queryUrl, $_headers, $body); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type for this endpoint. If a request body is required, please send it to us as ' . - '`application/xml`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Interrupts and replaces an active call's BXML document. - * - * @param string $accountId TODO: type description here - * @param string $callId TODO: type description here - * @param Models\ModifyCallRequest $body TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function modifyCall( - string $accountId, - string $callId, - Models\ModifyCallRequest $body - ) { - - //prepare query string for API call - $_queryBuilder = '/api/v2/accounts/{accountId}/calls/{callId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'callId' => $callId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::post($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Pauses or resumes a recording. - * - * @param string $accountId TODO: type description here - * @param string $callId TODO: type description here - * @param Models\ModifyCallRecordingRequest $body TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function modifyCallRecordingState( - string $accountId, - string $callId, - Models\ModifyCallRecordingRequest $body - ) { - - //prepare query string for API call - $_queryBuilder = '/api/v2/accounts/{accountId}/calls/{callId}/recording'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'callId' => $callId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::PUT, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::put($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Returns a (potentially empty) list of metadata for the recordings that took place during the - * specified call. - * - * @param string $accountId TODO: type description here - * @param string $callId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getCallRecordings( - string $accountId, - string $callId - ) { - - //prepare query string for API call - $_queryBuilder = '/api/v2/accounts/{accountId}/calls/{callId}/recordings'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'callId' => $callId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClassArray( - $response->body, - 'BandwidthLib\\Voice\\Models\\CallRecordingMetadata' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Returns metadata for the specified recording. - * - * @param string $accountId TODO: type description here - * @param string $callId TODO: type description here - * @param string $recordingId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getCallRecording( - string $accountId, - string $callId, - string $recordingId - ) { - - //prepare query string for API call - $_queryBuilder = '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'callId' => $callId, - 'recordingId' => $recordingId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass( - $response->body, - 'BandwidthLib\\Voice\\Models\\CallRecordingMetadata' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Deletes the specified recording. - * - * @param string $accountId TODO: type description here - * @param string $callId TODO: type description here - * @param string $recordingId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function deleteRecording( - string $accountId, - string $callId, - string $recordingId - ) { - - //prepare query string for API call - $_queryBuilder = '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'callId' => $callId, - 'recordingId' => $recordingId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::DELETE, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::delete($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Downloads the specified recording. - * - * @param string $accountId TODO: type description here - * @param string $callId TODO: type description here - * @param string $recordingId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getDownloadCallRecording( - string $accountId, - string $callId, - string $recordingId - ) { - - //prepare query string for API call - $_queryBuilder = - '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'callId' => $callId, - 'recordingId' => $recordingId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $deserializedResponse = $response->body; - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Deletes the specified recording's media. - * - * @param string $accountId TODO: type description here - * @param string $callId TODO: type description here - * @param string $recordingId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function deleteRecordingMedia( - string $accountId, - string $callId, - string $recordingId - ) { - - //prepare query string for API call - $_queryBuilder = - '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'callId' => $callId, - 'recordingId' => $recordingId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::DELETE, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::delete($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Downloads the specified transcription. - * - * @param string $accountId TODO: type description here - * @param string $callId TODO: type description here - * @param string $recordingId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getCallTranscription( - string $accountId, - string $callId, - string $recordingId - ) { - - //prepare query string for API call - $_queryBuilder = - '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'callId' => $callId, - 'recordingId' => $recordingId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass( - $response->body, - 'BandwidthLib\\Voice\\Models\\TranscriptionResponse' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Requests that the specified recording be transcribed. - * - * @param string $accountId TODO: type description here - * @param string $callId TODO: type description here - * @param string $recordingId TODO: type description here - * @param Models\TranscribeRecordingRequest $body TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function createTranscribeCallRecording( - string $accountId, - string $callId, - string $recordingId, - Models\TranscribeRecordingRequest $body - ) { - - //prepare query string for API call - $_queryBuilder = - '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'callId' => $callId, - 'recordingId' => $recordingId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::post($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 410) { - throw new Exceptions\ApiErrorException( - 'The media for this recording has been deleted, so we can\'t transcribe it', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Deletes the specified recording's transcription. - * - * @param string $accountId TODO: type description here - * @param string $callId TODO: type description here - * @param string $recordingId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function deleteCallTranscription( - string $accountId, - string $callId, - string $recordingId - ) { - - //prepare query string for API call - $_queryBuilder = - '/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'callId' => $callId, - 'recordingId' => $recordingId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::DELETE, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::delete($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Returns information about the conferences in the account. - * - * @param string $accountId TODO: type description here - * @param string|null $name (optional) TODO: type description here - * @param string|null $minCreatedTime (optional) TODO: type description here - * @param string|null $maxCreatedTime (optional) TODO: type description here - * @param integer $pageSize (optional) Example: 1000 - * @param string|null $pageToken (optional) TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getConferences( - string $accountId, - ?string $name = null, - ?string $minCreatedTime = null, - ?string $maxCreatedTime = null, - int $pageSize = 1000, - ?string $pageToken = null - ) { - - //prepare query string for API call - $_queryBuilder = '/api/v2/accounts/{accountId}/conferences'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - )); - - //process optional query parameters - APIHelper::appendUrlWithQueryParameters($_queryBuilder, array ( - 'name' => $name, - 'minCreatedTime' => $minCreatedTime, - 'maxCreatedTime' => $maxCreatedTime, - 'pageSize' => (null != $pageSize) ? $pageSize : 1000, - 'pageToken' => $pageToken, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClassArray($response->body, 'BandwidthLib\\Voice\\Models\\ConferenceState'); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Returns information about the specified conference. - * - * @param string $accountId TODO: type description here - * @param string $conferenceId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getConference( - string $accountId, - string $conferenceId - ) { - - //prepare query string for API call - $_queryBuilder = '/api/v2/accounts/{accountId}/conferences/{conferenceId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'conferenceId' => $conferenceId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass($response->body, 'BandwidthLib\\Voice\\Models\\ConferenceState'); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Modify the conference state. - * - * @param string $accountId TODO: type description here - * @param string $conferenceId TODO: type description here - * @param Models\ModifyConferenceRequest $body TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function modifyConference( - string $accountId, - string $conferenceId, - Models\ModifyConferenceRequest $body - ) { - - //prepare query string for API call - $_queryBuilder = '/api/v2/accounts/{accountId}/conferences/{conferenceId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'conferenceId' => $conferenceId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::post($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Updates settings for a particular conference member. - * - * @param string $accountId TODO: type description here - * @param string $conferenceId TODO: type description here - * @param string $callId TODO: type description here - * @param Models\ConferenceMemberState $body TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function modifyConferenceMember( - string $accountId, - string $conferenceId, - string $callId, - Models\ConferenceMemberState $body - ) { - - //prepare query string for API call - $_queryBuilder = '/api/v2/accounts/{accountId}/conferences/{conferenceId}/members/{callId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'conferenceId' => $conferenceId, - 'callId' => $callId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::PUT, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::put($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Returns information about the specified conference member. - * - * @param string $accountId TODO: type description here - * @param string $conferenceId TODO: type description here - * @param string $memberId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getConferenceMember( - string $accountId, - string $conferenceId, - string $memberId - ) { - - //prepare query string for API call - $_queryBuilder = - '/api/v2/accounts/{accountId}/conferences/{conferenceId}/members/{memberId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'conferenceId' => $conferenceId, - 'memberId' => $memberId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass( - $response->body, - 'BandwidthLib\\Voice\\Models\\ConferenceMemberState' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Returns a (potentially empty) list of metadata for the recordings that took place during the - * specified conference - * - * @param string $accountId TODO: type description here - * @param string $conferenceId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getConferenceRecordings( - string $accountId, - string $conferenceId - ) { - - //prepare query string for API call - $_queryBuilder = '/api/v2/accounts/{accountId}/conferences/{conferenceId}/recordings'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'conferenceId' => $conferenceId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClassArray( - $response->body, - 'BandwidthLib\\Voice\\Models\\ConferenceRecordingMetadata' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Returns metadata for the specified recording. - * - * @param string $accountId TODO: type description here - * @param string $conferenceId TODO: type description here - * @param string $recordingId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getConferenceRecording( - string $accountId, - string $conferenceId, - string $recordingId - ) { - - //prepare query string for API call - $_queryBuilder = - '/api/v2/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'conferenceId' => $conferenceId, - 'recordingId' => $recordingId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass( - $response->body, - 'BandwidthLib\\Voice\\Models\\CallRecordingMetadata' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Downloads the specified recording. - * - * @param string $accountId TODO: type description here - * @param string $conferenceId TODO: type description here - * @param string $recordingId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getDownloadConferenceRecording( - string $accountId, - string $conferenceId, - string $recordingId - ) { - - //prepare query string for API call - $_queryBuilder = - '/api/v2/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'conferenceId' => $conferenceId, - 'recordingId' => $recordingId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $deserializedResponse = $response->body; - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Returns a list of metadata for the recordings associated with the specified account. The list can be - * filtered by the optional from, to, minStartTime, and maxStartTime arguments. The list is capped at - * 1000 entries and may be empty if no recordings match the specified criteria. - * - * @param string $accountId TODO: type description here - * @param string|null $from (optional) TODO: type description here - * @param string|null $to (optional) TODO: type description here - * @param string|null $minStartTime (optional) TODO: type description here - * @param string|null $maxStartTime (optional) TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getQueryCallRecordings( - string $accountId, - ?string $from = null, - ?string $to = null, - ?string $minStartTime = null, - ?string $maxStartTime = null - ) { - - //prepare query string for API call - $_queryBuilder = '/api/v2/accounts/{accountId}/recordings'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - )); - - //process optional query parameters - APIHelper::appendUrlWithQueryParameters($_queryBuilder, array ( - 'from' => $from, - 'to' => $to, - 'minStartTime' => $minStartTime, - 'maxStartTime' => $maxStartTime, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::VOICEDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'voice'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new Exceptions\ApiErrorException( - 'Something\'s not quite right... Your request is invalid. Please fix it before trying again.', - $_httpContext - ); - } - - if ($response->code == 401) { - throw new APIException( - 'Your credentials are invalid. Please use your Bandwidth dashboard credentials to authenticate to ' . - 'the API.', - $_httpContext - ); - } - - if ($response->code == 403) { - throw new Exceptions\ApiErrorException('User unauthorized to perform this action.', $_httpContext); - } - - if ($response->code == 404) { - throw new Exceptions\ApiErrorException( - 'The resource specified cannot be found or does not belong to you.', - $_httpContext - ); - } - - if ($response->code == 415) { - throw new Exceptions\ApiErrorException( - 'We don\'t support that media type. If a request body is required, please send it to us as ' . - '`application/json`.', - $_httpContext - ); - } - - if ($response->code == 429) { - throw new Exceptions\ApiErrorException( - 'You\'re sending requests to this endpoint too frequently. Please slow your request rate down and ' . - 'try again.', - $_httpContext - ); - } - - if ($response->code == 500) { - throw new Exceptions\ApiErrorException('Something unexpected happened. Please try again.', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClassArray( - $response->body, - 'BandwidthLib\\Voice\\Models\\CallRecordingMetadata' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } -} diff --git a/src/Voice/Exceptions/ApiErrorException.php b/src/Voice/Exceptions/ApiErrorException.php deleted file mode 100644 index a7b0b822..00000000 --- a/src/Voice/Exceptions/ApiErrorException.php +++ /dev/null @@ -1,50 +0,0 @@ -eventType = func_get_arg(0); - $this->eventTime = func_get_arg(1); - $this->accountId = func_get_arg(2); - $this->applicationId = func_get_arg(3); - $this->from = func_get_arg(4); - $this->to = func_get_arg(5); - $this->direction = func_get_arg(6); - $this->callId = func_get_arg(7); - $this->callUrl = func_get_arg(8); - $this->startTime = func_get_arg(9); - $this->answerTime = func_get_arg(10); - $this->transferCallerId = func_get_arg(11); - $this->transferTo = func_get_arg(12); - $this->cause = func_get_arg(13); - $this->errorMessage = func_get_arg(14); - $this->errorId = func_get_arg(15); - $this->endTime = func_get_arg(16); - $this->digit = func_get_arg(17); - $this->parentCallId = func_get_arg(18); - $this->recordingId = func_get_arg(19); - $this->duration = func_get_arg(20); - $this->fileFormat = func_get_arg(21); - $this->mediaUrl = func_get_arg(22); - $this->tag = func_get_arg(23); - $this->channels = func_get_arg(24); - $this->status = func_get_arg(25); - $this->digits = func_get_arg(26); - $this->terminatingDigit = func_get_arg(27); - $this->transcription = func_get_arg(28); - $this->diversion = func_get_arg(29); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['eventType'] = $this->eventType; - $json['eventTime'] = $this->eventTime; - $json['accountId'] = $this->accountId; - $json['applicationId'] = $this->applicationId; - $json['from'] = $this->from; - $json['to'] = $this->to; - $json['direction'] = $this->direction; - $json['callId'] = $this->callId; - $json['callUrl'] = $this->callUrl; - $json['startTime'] = $this->startTime; - $json['answerTime'] = $this->answerTime; - $json['transferCallerId'] = $this->transferCallerId; - $json['transferTo'] = $this->transferTo; - $json['cause'] = $this->cause; - $json['errorMessage'] = $this->errorMessage; - $json['errorId'] = $this->errorId; - $json['endTime'] = $this->endTime; - $json['digit'] = $this->digit; - $json['parentCallId'] = $this->parentCallId; - $json['recordingId'] = $this->recordingId; - $json['duration'] = $this->duration; - $json['fileFormat'] = $this->fileFormat; - $json['mediaUrl'] = $this->mediaUrl; - $json['tag'] = $this->tag; - $json['channels'] = $this->channels; - $json['status'] = $this->status; - $json['digits'] = $this->digits; - $json['terminatingDigit'] = $this->terminatingDigit; - $json['transcription'] = $this->transcription; - $json['diversion'] = $this->diversion; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/CallRecordingMetadata.php b/src/Voice/Models/CallRecordingMetadata.php deleted file mode 100644 index cd65992f..00000000 --- a/src/Voice/Models/CallRecordingMetadata.php +++ /dev/null @@ -1,187 +0,0 @@ -applicationId = func_get_arg(0); - $this->accountId = func_get_arg(1); - $this->callId = func_get_arg(2); - $this->parentCallId = func_get_arg(3); - $this->recordingId = func_get_arg(4); - $this->to = func_get_arg(5); - $this->from = func_get_arg(6); - $this->transferCallerId = func_get_arg(7); - $this->transferTo = func_get_arg(8); - $this->duration = func_get_arg(9); - $this->direction = func_get_arg(10); - $this->channels = func_get_arg(11); - $this->startTime = func_get_arg(12); - $this->endTime = func_get_arg(13); - $this->fileFormat = func_get_arg(14); - $this->status = func_get_arg(15); - $this->mediaUrl = func_get_arg(16); - $this->transcription = func_get_arg(17); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['applicationId'] = $this->applicationId; - $json['accountId'] = $this->accountId; - $json['callId'] = $this->callId; - $json['parentCallId'] = $this->parentCallId; - $json['recordingId'] = $this->recordingId; - $json['to'] = $this->to; - $json['from'] = $this->from; - $json['transferCallerId'] = $this->transferCallerId; - $json['transferTo'] = $this->transferTo; - $json['duration'] = $this->duration; - $json['direction'] = $this->direction; - $json['channels'] = $this->channels; - $json['startTime'] = - isset($this->startTime) ? - DateTimeHelper::toRfc3339DateTime($this->startTime) : null; - $json['endTime'] = - isset($this->endTime) ? - DateTimeHelper::toRfc3339DateTime($this->endTime) : null; - $json['fileFormat'] = $this->fileFormat; - $json['status'] = $this->status; - $json['mediaUrl'] = $this->mediaUrl; - $json['transcription'] = $this->transcription; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/CallState.php b/src/Voice/Models/CallState.php deleted file mode 100644 index 6a6540e1..00000000 --- a/src/Voice/Models/CallState.php +++ /dev/null @@ -1,199 +0,0 @@ -callId = func_get_arg(0); - $this->parentCallId = func_get_arg(1); - $this->applicationId = func_get_arg(2); - $this->accountId = func_get_arg(3); - $this->to = func_get_arg(4); - $this->from = func_get_arg(5); - $this->direction = func_get_arg(6); - $this->state = func_get_arg(7); - $this->identity = func_get_arg(8); - $this->stirShaken = func_get_arg(9); - $this->startTime = func_get_arg(10); - $this->enqueuedTime = func_get_arg(11); - $this->answerTime = func_get_arg(12); - $this->endTime = func_get_arg(13); - $this->disconnectCause = func_get_arg(14); - $this->errorMessage = func_get_arg(15); - $this->errorId = func_get_arg(16); - $this->lastUpdate = func_get_arg(17); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['callId'] = $this->callId; - $json['parentCallId'] = $this->parentCallId; - $json['applicationId'] = $this->applicationId; - $json['accountId'] = $this->accountId; - $json['to'] = $this->to; - $json['from'] = $this->from; - $json['direction'] = $this->direction; - $json['state'] = $this->state; - $json['identity'] = $this->identity; - $json['stirShaken'] = $this->stirShaken; - $json['startTime'] = - isset($this->startTime) ? - DateTimeHelper::toRfc3339DateTime($this->startTime) : null; - $json['enqueuedTime'] = - isset($this->enqueuedTime) ? - DateTimeHelper::toRfc3339DateTime($this->enqueuedTime) : null; - $json['answerTime'] = - isset($this->answerTime) ? - DateTimeHelper::toRfc3339DateTime($this->answerTime) : null; - $json['endTime'] = - isset($this->endTime) ? - DateTimeHelper::toRfc3339DateTime($this->endTime) : null; - $json['disconnectCause'] = $this->disconnectCause; - $json['errorMessage'] = $this->errorMessage; - $json['errorId'] = $this->errorId; - $json['lastUpdate'] = - isset($this->lastUpdate) ? - DateTimeHelper::toRfc3339DateTime($this->lastUpdate) : null; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/CallbackMethodEnum.php b/src/Voice/Models/CallbackMethodEnum.php deleted file mode 100644 index add9061d..00000000 --- a/src/Voice/Models/CallbackMethodEnum.php +++ /dev/null @@ -1,24 +0,0 @@ -conferenceId = func_get_arg(0); - $this->name = func_get_arg(1); - $this->eventType = func_get_arg(2); - $this->eventTime = func_get_arg(3); - $this->tag = func_get_arg(4); - $this->callId = func_get_arg(5); - $this->to = func_get_arg(6); - $this->from = func_get_arg(7); - $this->accountId = func_get_arg(8); - $this->recordingId = func_get_arg(9); - $this->channels = func_get_arg(10); - $this->startTime = func_get_arg(11); - $this->endTime = func_get_arg(12); - $this->duration = func_get_arg(13); - $this->fileFormat = func_get_arg(14); - $this->mediaUrl = func_get_arg(15); - $this->status = func_get_arg(16); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['conferenceId'] = $this->conferenceId; - $json['name'] = $this->name; - $json['eventType'] = $this->eventType; - $json['eventTime'] = $this->eventTime; - $json['tag'] = $this->tag; - $json['callId'] = $this->callId; - $json['to'] = $this->to; - $json['from'] = $this->from; - $json['accountId'] = $this->accountId; - $json['recordingId'] = $this->recordingId; - $json['channels'] = $this->channels; - $json['startTime'] = $this->startTime; - $json['endTime'] = $this->endTime; - $json['duration'] = $this->duration; - $json['fileFormat'] = $this->fileFormat; - $json['mediaUrl'] = $this->mediaUrl; - $json['status'] = $this->status; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/ConferenceEventMethodEnum.php b/src/Voice/Models/ConferenceEventMethodEnum.php deleted file mode 100644 index 9ebfa9ed..00000000 --- a/src/Voice/Models/ConferenceEventMethodEnum.php +++ /dev/null @@ -1,24 +0,0 @@ -callId = func_get_arg(0); - $this->conferenceId = func_get_arg(1); - $this->memberUrl = func_get_arg(2); - $this->mute = func_get_arg(3); - $this->hold = func_get_arg(4); - $this->callIdsToCoach = func_get_arg(5); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['callId'] = $this->callId; - $json['conferenceId'] = $this->conferenceId; - $json['memberUrl'] = $this->memberUrl; - $json['mute'] = $this->mute; - $json['hold'] = $this->hold; - $json['callIdsToCoach'] = - isset($this->callIdsToCoach) ? - array_values($this->callIdsToCoach) : null; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/ConferenceRecordingMetadata.php b/src/Voice/Models/ConferenceRecordingMetadata.php deleted file mode 100644 index 7277ab55..00000000 --- a/src/Voice/Models/ConferenceRecordingMetadata.php +++ /dev/null @@ -1,131 +0,0 @@ -accountId = func_get_arg(0); - $this->conferenceId = func_get_arg(1); - $this->name = func_get_arg(2); - $this->recordingId = func_get_arg(3); - $this->duration = func_get_arg(4); - $this->channels = func_get_arg(5); - $this->startTime = func_get_arg(6); - $this->endTime = func_get_arg(7); - $this->fileFormat = func_get_arg(8); - $this->status = func_get_arg(9); - $this->mediaUrl = func_get_arg(10); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['accountId'] = $this->accountId; - $json['conferenceId'] = $this->conferenceId; - $json['name'] = $this->name; - $json['recordingId'] = $this->recordingId; - $json['duration'] = $this->duration; - $json['channels'] = $this->channels; - $json['startTime'] = - isset($this->startTime) ? - DateTimeHelper::toRfc3339DateTime($this->startTime) : null; - $json['endTime'] = - isset($this->endTime) ? - DateTimeHelper::toRfc3339DateTime($this->endTime) : null; - $json['fileFormat'] = $this->fileFormat; - $json['status'] = $this->status; - $json['mediaUrl'] = $this->mediaUrl; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/ConferenceState.php b/src/Voice/Models/ConferenceState.php deleted file mode 100644 index 8ef64999..00000000 --- a/src/Voice/Models/ConferenceState.php +++ /dev/null @@ -1,107 +0,0 @@ -id = func_get_arg(0); - $this->name = func_get_arg(1); - $this->createdTime = func_get_arg(2); - $this->completedTime = func_get_arg(3); - $this->conferenceEventUrl = func_get_arg(4); - $this->conferenceEventMethod = func_get_arg(5); - $this->tag = func_get_arg(6); - $this->activeMembers = func_get_arg(7); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['id'] = $this->id; - $json['name'] = $this->name; - $json['createdTime'] = - isset($this->createdTime) ? - DateTimeHelper::toRfc3339DateTime($this->createdTime) : null; - $json['completedTime'] = - isset($this->completedTime) ? - DateTimeHelper::toRfc3339DateTime($this->completedTime) : null; - $json['conferenceEventUrl'] = $this->conferenceEventUrl; - $json['conferenceEventMethod'] = $this->conferenceEventMethod; - $json['tag'] = $this->tag; - $json['activeMembers'] = - isset($this->activeMembers) ? - array_values($this->activeMembers) : null; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/CreateCallRequest.php b/src/Voice/Models/CreateCallRequest.php deleted file mode 100644 index 24747947..00000000 --- a/src/Voice/Models/CreateCallRequest.php +++ /dev/null @@ -1,192 +0,0 @@ -from = func_get_arg(0); - $this->to = func_get_arg(1); - $this->uui = func_get_arg(2); - $this->callTimeout = func_get_arg(3); - $this->callbackTimeout = func_get_arg(4); - $this->answerUrl = func_get_arg(5); - $this->answerFallbackUrl = func_get_arg(6); - $this->username = func_get_arg(7); - $this->password = func_get_arg(8); - $this->fallbackUsername = func_get_arg(9); - $this->fallbackPassword = func_get_arg(10); - $this->answerMethod = func_get_arg(11); - $this->answerFallbackMethod = func_get_arg(12); - $this->disconnectUrl = func_get_arg(13); - $this->disconnectMethod = func_get_arg(14); - $this->tag = func_get_arg(15); - $this->applicationId = func_get_arg(16); - $this->machineDetection = func_get_arg(17); - $this->priority = func_get_arg(18); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['from'] = $this->from; - $json['to'] = $this->to; - $json['uui'] = $this->uui; - $json['callTimeout'] = $this->callTimeout; - $json['callbackTimeout'] = $this->callbackTimeout; - $json['answerUrl'] = $this->answerUrl; - $json['answerFallbackUrl'] = $this->answerFallbackUrl; - $json['username'] = $this->username; - $json['password'] = $this->password; - $json['fallbackUsername'] = $this->fallbackUsername; - $json['fallbackPassword'] = $this->fallbackPassword; - $json['answerMethod'] = $this->answerMethod; - $json['answerFallbackMethod'] = $this->answerFallbackMethod; - $json['disconnectUrl'] = $this->disconnectUrl; - $json['disconnectMethod'] = $this->disconnectMethod; - $json['tag'] = $this->tag; - $json['applicationId'] = $this->applicationId; - $json['machineDetection'] = $this->machineDetection; - $json['priority'] = $this->priority; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/CreateCallResponse.php b/src/Voice/Models/CreateCallResponse.php deleted file mode 100644 index 428e6ad1..00000000 --- a/src/Voice/Models/CreateCallResponse.php +++ /dev/null @@ -1,215 +0,0 @@ -accountId = func_get_arg(0); - $this->callId = func_get_arg(1); - $this->applicationId = func_get_arg(2); - $this->to = func_get_arg(3); - $this->from = func_get_arg(4); - $this->enqueuedTime = func_get_arg(5); - $this->callUrl = func_get_arg(6); - $this->callTimeout = func_get_arg(7); - $this->callbackTimeout = func_get_arg(8); - $this->answerUrl = func_get_arg(9); - $this->answerMethod = func_get_arg(10); - $this->answerFallbackUrl = func_get_arg(11); - $this->answerFallbackMethod = func_get_arg(12); - $this->disconnectUrl = func_get_arg(13); - $this->disconnectMethod = func_get_arg(14); - $this->username = func_get_arg(15); - $this->password = func_get_arg(16); - $this->fallbackUsername = func_get_arg(17); - $this->fallbackPassword = func_get_arg(18); - $this->tag = func_get_arg(19); - $this->priority = func_get_arg(20); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['accountId'] = $this->accountId; - $json['callId'] = $this->callId; - $json['applicationId'] = $this->applicationId; - $json['to'] = $this->to; - $json['from'] = $this->from; - $json['enqueuedTime'] = - isset($this->enqueuedTime) ? - DateTimeHelper::toRfc3339DateTime($this->enqueuedTime) : null; - $json['callUrl'] = $this->callUrl; - $json['callTimeout'] = $this->callTimeout; - $json['callbackTimeout'] = $this->callbackTimeout; - $json['answerUrl'] = $this->answerUrl; - $json['answerMethod'] = $this->answerMethod; - $json['answerFallbackUrl'] = $this->answerFallbackUrl; - $json['answerFallbackMethod'] = $this->answerFallbackMethod; - $json['disconnectUrl'] = $this->disconnectUrl; - $json['disconnectMethod'] = $this->disconnectMethod; - $json['username'] = $this->username; - $json['password'] = $this->password; - $json['fallbackUsername'] = $this->fallbackUsername; - $json['fallbackPassword'] = $this->fallbackPassword; - $json['tag'] = $this->tag; - $json['priority'] = $this->priority; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/DirectionEnum.php b/src/Voice/Models/DirectionEnum.php deleted file mode 100644 index 8cc04a2e..00000000 --- a/src/Voice/Models/DirectionEnum.php +++ /dev/null @@ -1,24 +0,0 @@ -reason = func_get_arg(0); - $this->privacy = func_get_arg(1); - $this->unknown = func_get_arg(2); - $this->origTo = func_get_arg(3); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['reason'] = $this->reason; - $json['privacy'] = $this->privacy; - $json['unknown'] = $this->unknown; - $json['origTo'] = $this->origTo; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/FallbackMethodEnum.php b/src/Voice/Models/FallbackMethodEnum.php deleted file mode 100644 index 7da22802..00000000 --- a/src/Voice/Models/FallbackMethodEnum.php +++ /dev/null @@ -1,24 +0,0 @@ -mode = func_get_arg(0); - $this->detectionTimeout = func_get_arg(1); - $this->silenceTimeout = func_get_arg(2); - $this->speechThreshold = func_get_arg(3); - $this->speechEndThreshold = func_get_arg(4); - $this->delayResult = func_get_arg(5); - $this->callbackUrl = func_get_arg(6); - $this->callbackMethod = func_get_arg(7); - $this->fallbackUrl = func_get_arg(8); - $this->fallbackMethod = func_get_arg(9); - $this->username = func_get_arg(10); - $this->password = func_get_arg(11); - $this->fallbackUsername = func_get_arg(12); - $this->fallbackPassword = func_get_arg(13); - $this->machineSpeechEndThreshold = func_get_arg(14); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['mode'] = $this->mode; - $json['detectionTimeout'] = $this->detectionTimeout; - $json['silenceTimeout'] = $this->silenceTimeout; - $json['speechThreshold'] = $this->speechThreshold; - $json['speechEndThreshold'] = $this->speechEndThreshold; - $json['delayResult'] = $this->delayResult; - $json['callbackUrl'] = $this->callbackUrl; - $json['callbackMethod'] = $this->callbackMethod; - $json['fallbackUrl'] = $this->fallbackUrl; - $json['fallbackMethod'] = $this->fallbackMethod; - $json['username'] = $this->username; - $json['password'] = $this->password; - $json['fallbackUsername'] = $this->fallbackUsername; - $json['fallbackPassword'] = $this->fallbackPassword; - $json['machineSpeechEndThreshold'] = $this->machineSpeechEndThreshold; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/ModeEnum.php b/src/Voice/Models/ModeEnum.php deleted file mode 100644 index e5790fd5..00000000 --- a/src/Voice/Models/ModeEnum.php +++ /dev/null @@ -1,26 +0,0 @@ -state = func_get_arg(0); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['state'] = $this->state; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/ModifyCallRequest.php b/src/Voice/Models/ModifyCallRequest.php deleted file mode 100644 index 98070965..00000000 --- a/src/Voice/Models/ModifyCallRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -state = func_get_arg(0); - $this->redirectUrl = func_get_arg(1); - $this->redirectFallbackUrl = func_get_arg(2); - $this->redirectMethod = func_get_arg(3); - $this->redirectFallbackMethod = func_get_arg(4); - $this->username = func_get_arg(5); - $this->password = func_get_arg(6); - $this->fallbackUsername = func_get_arg(7); - $this->fallbackPassword = func_get_arg(8); - $this->tag = func_get_arg(9); - break; - - default: - $this->state = StateEnum::ACTIVE; - break; - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['state'] = $this->state; - $json['redirectUrl'] = $this->redirectUrl; - $json['redirectFallbackUrl'] = $this->redirectFallbackUrl; - $json['redirectMethod'] = $this->redirectMethod; - $json['redirectFallbackMethod'] = $this->redirectFallbackMethod; - $json['username'] = $this->username; - $json['password'] = $this->password; - $json['fallbackUsername'] = $this->fallbackUsername; - $json['fallbackPassword'] = $this->fallbackPassword; - $json['tag'] = $this->tag; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/ModifyConferenceRequest.php b/src/Voice/Models/ModifyConferenceRequest.php deleted file mode 100644 index 7d9496b2..00000000 --- a/src/Voice/Models/ModifyConferenceRequest.php +++ /dev/null @@ -1,105 +0,0 @@ -status = func_get_arg(0); - $this->redirectUrl = func_get_arg(1); - $this->redirectFallbackUrl = func_get_arg(2); - $this->redirectMethod = func_get_arg(3); - $this->redirectFallbackMethod = func_get_arg(4); - $this->username = func_get_arg(5); - $this->password = func_get_arg(6); - $this->fallbackUsername = func_get_arg(7); - $this->fallbackPassword = func_get_arg(8); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['status'] = $this->status; - $json['redirectUrl'] = $this->redirectUrl; - $json['redirectFallbackUrl'] = $this->redirectFallbackUrl; - $json['redirectMethod'] = $this->redirectMethod; - $json['redirectFallbackMethod'] = $this->redirectFallbackMethod; - $json['username'] = $this->username; - $json['password'] = $this->password; - $json['fallbackUsername'] = $this->fallbackUsername; - $json['fallbackPassword'] = $this->fallbackPassword; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/RedirectFallbackMethodEnum.php b/src/Voice/Models/RedirectFallbackMethodEnum.php deleted file mode 100644 index 6be172fa..00000000 --- a/src/Voice/Models/RedirectFallbackMethodEnum.php +++ /dev/null @@ -1,24 +0,0 @@ -callbackUrl = func_get_arg(0); - $this->callbackMethod = func_get_arg(1); - $this->username = func_get_arg(2); - $this->password = func_get_arg(3); - $this->tag = func_get_arg(4); - $this->callbackTimeout = func_get_arg(5); - $this->detectLanguage = func_get_arg(6); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['callbackUrl'] = $this->callbackUrl; - $json['callbackMethod'] = $this->callbackMethod; - $json['username'] = $this->username; - $json['password'] = $this->password; - $json['tag'] = $this->tag; - $json['callbackTimeout'] = $this->callbackTimeout; - $json['detectLanguage'] = $this->detectlanguage; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/Transcript.php b/src/Voice/Models/Transcript.php deleted file mode 100644 index cea62f64..00000000 --- a/src/Voice/Models/Transcript.php +++ /dev/null @@ -1,49 +0,0 @@ -text = func_get_arg(0); - $this->confidence = func_get_arg(1); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['text'] = $this->text; - $json['confidence'] = $this->confidence; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/Transcription.php b/src/Voice/Models/Transcription.php deleted file mode 100644 index 84057a9b..00000000 --- a/src/Voice/Models/Transcription.php +++ /dev/null @@ -1,65 +0,0 @@ -id = func_get_arg(0); - $this->url = func_get_arg(1); - $this->status = func_get_arg(2); - $this->completedTime = func_get_arg(3); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['id'] = $this->id; - $json['url'] = $this->url; - $json['status'] = $this->status; - $json['completedTime'] = $this->completedTime; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/TranscriptionMetadata.php b/src/Voice/Models/TranscriptionMetadata.php deleted file mode 100644 index 2026499b..00000000 --- a/src/Voice/Models/TranscriptionMetadata.php +++ /dev/null @@ -1,67 +0,0 @@ -id = func_get_arg(0); - $this->status = func_get_arg(1); - $this->completedTime = func_get_arg(2); - $this->url = func_get_arg(3); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['id'] = $this->id; - $json['status'] = $this->status; - $json['completedTime'] = $this->completedTime; - $json['url'] = $this->url; - - return array_filter($json); - } -} diff --git a/src/Voice/Models/TranscriptionResponse.php b/src/Voice/Models/TranscriptionResponse.php deleted file mode 100644 index 4c9334a3..00000000 --- a/src/Voice/Models/TranscriptionResponse.php +++ /dev/null @@ -1,42 +0,0 @@ -transcripts = func_get_arg(0); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['transcripts'] = isset($this->transcripts) ? - array_values($this->transcripts) : null; - - return array_filter($json); - } -} diff --git a/src/Voice/VoiceClient.php b/src/Voice/VoiceClient.php deleted file mode 100644 index 089b8426..00000000 --- a/src/Voice/VoiceClient.php +++ /dev/null @@ -1,37 +0,0 @@ -config = $config; - } - - - private $client; - - /** - * Provides access to API controller - * @return Controllers\APIController - */ - public function getClient() - { - if ($this->client == null) { - $this->client = new Controllers\APIController($this->config); - } - return $this->client; - } -} diff --git a/src/WebRtc/Controllers/APIController.php b/src/WebRtc/Controllers/APIController.php deleted file mode 100644 index 7deab15a..00000000 --- a/src/WebRtc/Controllers/APIController.php +++ /dev/null @@ -1,931 +0,0 @@ - $accountId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::WEBRTCDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json', - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'webrtc'); - - $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::post($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new APIException('Bad Request', $_httpContext); - } - - if ($response->code == 401) { - throw new APIException('Unauthorized', $_httpContext); - } - - if ($response->code == 403) { - throw new APIException('Access Denied', $_httpContext); - } - - if (($response->code < 200) || ($response->code > 208)) { - throw new Exceptions\ErrorException('Unexpected Error', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass( - $response->body, - 'BandwidthLib\\WebRtc\\Models\\AccountsParticipantsResponse' - ); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Get participant by ID. - * - * @param string $accountId Account ID - * @param string $participantId Participant ID - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getParticipant( - string $accountId, - string $participantId - ) { - - //prepare query string for API call - $_queryBuilder = '/accounts/{accountId}/participants/{participantId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'participantId' => $participantId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::WEBRTCDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'webrtc'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 401) { - throw new APIException('Unauthorized', $_httpContext); - } - - if ($response->code == 403) { - throw new APIException('Access Denied', $_httpContext); - } - - if ($response->code == 404) { - throw new APIException('Not Found', $_httpContext); - } - - if (($response->code < 200) || ($response->code > 208)) { - throw new Exceptions\ErrorException('Unexpected Error', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass($response->body, 'BandwidthLib\\WebRtc\\Models\\Participant'); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Delete participant by ID. - * - * @param string $accountId Account ID - * @param string $participantId TODO: type description here - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function deleteParticipant( - string $accountId, - string $participantId - ) { - - //prepare query string for API call - $_queryBuilder = '/accounts/{accountId}/participants/{participantId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'participantId' => $participantId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::WEBRTCDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT - ); - - //set authentication - $this->configureAuth($_headers, 'webrtc'); - - $_httpRequest = new HttpRequest(HttpMethod::DELETE, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::delete($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 401) { - throw new APIException('Unauthorized', $_httpContext); - } - - if ($response->code == 403) { - throw new APIException('Access Denied', $_httpContext); - } - - if ($response->code == 404) { - throw new APIException('Not Found', $_httpContext); - } - - if (($response->code < 200) || ($response->code > 208)) { - throw new Exceptions\ErrorException('Unexpected Error', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Create a new session. - * - * Sessions are idempotent, so relevant parameters must be set in this function if desired. - * - * - * @param string $accountId Account ID - * @param Models\Session|null $body (optional) Session parameters - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function createSession( - string $accountId, - ?Models\Session $body = null - ) { - - //prepare query string for API call - $_queryBuilder = '/accounts/{accountId}/sessions'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::WEBRTCDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json', - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'webrtc'); - - $_httpRequest = new HttpRequest(HttpMethod::POST, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::post($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new APIException('Bad Request', $_httpContext); - } - - if ($response->code == 401) { - throw new APIException('Unauthorized', $_httpContext); - } - - if ($response->code == 403) { - throw new APIException('Access Denied', $_httpContext); - } - - if (($response->code < 200) || ($response->code > 208)) { - throw new Exceptions\ErrorException('Unexpected Error', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass($response->body, 'BandwidthLib\\WebRtc\\Models\\Session'); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Get session by ID. - * - * @param string $accountId Account ID - * @param string $sessionId Session ID - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getSession( - string $accountId, - string $sessionId - ) { - - //prepare query string for API call - $_queryBuilder = '/accounts/{accountId}/sessions/{sessionId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'sessionId' => $sessionId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::WEBRTCDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'webrtc'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 401) { - throw new APIException('Unauthorized', $_httpContext); - } - - if ($response->code == 403) { - throw new APIException('Access Denied', $_httpContext); - } - - if ($response->code == 404) { - throw new APIException('Not Found', $_httpContext); - } - - if (($response->code < 200) || ($response->code > 208)) { - throw new Exceptions\ErrorException('Unexpected Error', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass($response->body, 'BandwidthLib\\WebRtc\\Models\\Session'); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Delete session by ID. - * - * @param string $accountId Account ID - * @param string $sessionId Session ID - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function deleteSession( - string $accountId, - string $sessionId - ) { - - //prepare query string for API call - $_queryBuilder = '/accounts/{accountId}/sessions/{sessionId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'sessionId' => $sessionId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::WEBRTCDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT - ); - - //set authentication - $this->configureAuth($_headers, 'webrtc'); - - $_httpRequest = new HttpRequest(HttpMethod::DELETE, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::delete($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 401) { - throw new APIException('Unauthorized', $_httpContext); - } - - if ($response->code == 403) { - throw new APIException('Access Denied', $_httpContext); - } - - if ($response->code == 404) { - throw new APIException('Not Found', $_httpContext); - } - - if (($response->code < 200) || ($response->code > 208)) { - throw new Exceptions\ErrorException('Unexpected Error', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * List participants in a session. - * - * @param string $accountId Account ID - * @param string $sessionId Session ID - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function listSessionParticipants( - string $accountId, - string $sessionId - ) { - - //prepare query string for API call - $_queryBuilder = '/accounts/{accountId}/sessions/{sessionId}/participants'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'sessionId' => $sessionId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::WEBRTCDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'webrtc'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 401) { - throw new APIException('Unauthorized', $_httpContext); - } - - if ($response->code == 403) { - throw new APIException('Access Denied', $_httpContext); - } - - if ($response->code == 404) { - throw new APIException('Not Found', $_httpContext); - } - - if (($response->code < 200) || ($response->code > 208)) { - throw new Exceptions\ErrorException('Unexpected Error', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClassArray($response->body, 'BandwidthLib\\WebRtc\\Models\\Participant'); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Add a participant to a session. - * - * Subscriptions can optionally be provided as part of this call. - * - * - * @param string $accountId Account ID - * @param string $sessionId Session ID - * @param string $participantId Participant ID - * @param Models\Subscriptions|null $body (optional) Subscriptions the participant should be created with - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function addParticipantToSession( - string $accountId, - string $sessionId, - string $participantId, - ?Models\Subscriptions $body = null - ) { - - //prepare query string for API call - $_queryBuilder = '/accounts/{accountId}/sessions/{sessionId}/participants/{participantId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'sessionId' => $sessionId, - 'participantId' => $participantId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::WEBRTCDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'webrtc'); - - $_httpRequest = new HttpRequest(HttpMethod::PUT, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::put($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 401) { - throw new APIException('Unauthorized', $_httpContext); - } - - if ($response->code == 403) { - throw new APIException('Access Denied', $_httpContext); - } - - if ($response->code == 404) { - throw new APIException('Not Found', $_httpContext); - } - - if (($response->code < 200) || ($response->code > 208)) { - throw new Exceptions\ErrorException('Unexpected Error', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Remove a participant from a session. - * - * This will automatically remove any subscriptions the participant has associated with this session. - * - * - * @param string $accountId Account ID - * @param string $sessionId Session ID - * @param string $participantId Participant ID - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function removeParticipantFromSession( - string $accountId, - string $sessionId, - string $participantId - ) { - - //prepare query string for API call - $_queryBuilder = '/accounts/{accountId}/sessions/{sessionId}/participants/{participantId}'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'sessionId' => $sessionId, - 'participantId' => $participantId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::WEBRTCDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT - ); - - //set authentication - $this->configureAuth($_headers, 'webrtc'); - - $_httpRequest = new HttpRequest(HttpMethod::DELETE, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::delete($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 401) { - throw new APIException('Unauthorized', $_httpContext); - } - - if ($response->code == 403) { - throw new APIException('Access Denied', $_httpContext); - } - - if ($response->code == 404) { - throw new APIException('Not Found', $_httpContext); - } - - if (($response->code < 200) || ($response->code > 208)) { - throw new Exceptions\ErrorException('Unexpected Error', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } - - /** - * Get a participant's subscriptions. - * - * @param string $accountId Account ID - * @param string $sessionId Session ID - * @param string $participantId Participant ID - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function getParticipantSubscriptions( - string $accountId, - string $sessionId, - string $participantId - ) { - - //prepare query string for API call - $_queryBuilder = - '/accounts/{accountId}/sessions/{sessionId}/participants/{participantId}/subscriptions'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'sessionId' => $sessionId, - 'participantId' => $participantId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::WEBRTCDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'Accept' => 'application/json' - ); - - //set authentication - $this->configureAuth($_headers, 'webrtc'); - - $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::get($_queryUrl, $_headers); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 401) { - throw new APIException('Unauthorized', $_httpContext); - } - - if ($response->code == 403) { - throw new APIException('Access Denied', $_httpContext); - } - - if ($response->code == 404) { - throw new APIException('Not Found', $_httpContext); - } - - if (($response->code < 200) || ($response->code > 208)) { - throw new Exceptions\ErrorException('Unexpected Error', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - $mapper = $this->getJsonMapper(); - $deserializedResponse = $mapper->mapClass($response->body, 'BandwidthLib\\WebRtc\\Models\\Subscriptions'); - return new ApiResponse($response->code, $response->headers, $deserializedResponse); - } - - /** - * Update a participant's subscriptions. - * - * This is a full update that will replace the participant's subscriptions. First call - * `getParticipantSubscriptions` if you need the current subscriptions. Call this function with no - * `Subscriptions` object to remove all subscriptions. - * - * - * @param string $accountId Account ID - * @param string $sessionId Session ID - * @param string $participantId Participant ID - * @param Models\Subscriptions|null $body (optional) Initial state - * @return ApiResponse response from the API call - * @throws APIException Thrown if API call fails - */ - public function updateParticipantSubscriptions( - string $accountId, - string $sessionId, - string $participantId, - ?Models\Subscriptions $body = null - ) { - - //prepare query string for API call - $_queryBuilder = - '/accounts/{accountId}/sessions/{sessionId}/participants/{participantId}/subscriptions'; - - //process optional query parameters - $_queryBuilder = APIHelper::appendUrlWithTemplateParameters($_queryBuilder, array ( - 'accountId' => $accountId, - 'sessionId' => $sessionId, - 'participantId' => $participantId, - )); - - //validate and preprocess url - $_queryUrl = APIHelper::cleanUrl($this->config->getBaseUri(Servers::WEBRTCDEFAULT) . $_queryBuilder); - - //prepare headers - $_headers = array ( - 'user-agent' => BaseController::USER_AGENT, - 'content-type' => 'application/json; charset=utf-8' - ); - - //json encode body - $_bodyJson = Request\Body::Json($body); - - //set authentication - $this->configureAuth($_headers, 'webrtc'); - - $_httpRequest = new HttpRequest(HttpMethod::PUT, $_headers, $_queryUrl); - - //call on-before Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest); - } - // Set request timeout - Request::timeout($this->config->getTimeout()); - - // and invoke the API call request to fetch the response - $response = Request::put($_queryUrl, $_headers, $_bodyJson); - - $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body); - $_httpContext = new HttpContext($_httpRequest, $_httpResponse); - - //call on-after Http callback - if ($this->getHttpCallBack() != null) { - $this->getHttpCallBack()->callOnAfterRequest($_httpContext); - } - - //Error handling using HTTP status codes - if ($response->code == 400) { - throw new APIException('Bad Request', $_httpContext); - } - - if ($response->code == 401) { - throw new APIException('Unauthorized', $_httpContext); - } - - if ($response->code == 403) { - throw new APIException('Access Denied', $_httpContext); - } - - if ($response->code == 404) { - throw new APIException('Not Found', $_httpContext); - } - - if (($response->code < 200) || ($response->code > 208)) { - throw new Exceptions\ErrorException('Unexpected Error', $_httpContext); - } - - //handle errors defined at the API level - $this->validateResponse($_httpResponse, $_httpContext); - return new ApiResponse($response->code, $response->headers, null); - } -} diff --git a/src/WebRtc/Exceptions/ErrorException.php b/src/WebRtc/Exceptions/ErrorException.php deleted file mode 100644 index 35a961ff..00000000 --- a/src/WebRtc/Exceptions/ErrorException.php +++ /dev/null @@ -1,46 +0,0 @@ -participant = func_get_arg(0); - $this->token = func_get_arg(1); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['participant'] = $this->participant; - $json['token'] = $this->token; - - return array_filter($json); - } -} diff --git a/src/WebRtc/Models/DeviceApiVersionEnum.php b/src/WebRtc/Models/DeviceApiVersionEnum.php deleted file mode 100644 index 725e5376..00000000 --- a/src/WebRtc/Models/DeviceApiVersionEnum.php +++ /dev/null @@ -1,24 +0,0 @@ -id = func_get_arg(0); - $this->callbackUrl = func_get_arg(1); - $this->publishPermissions = func_get_arg(2); - $this->sessions = func_get_arg(3); - $this->subscriptions = func_get_arg(4); - $this->tag = func_get_arg(5); - $this->deviceApiVersion = func_get_arg(6); - break; - - default: - $this->deviceApiVersion = DeviceApiVersionEnum::V2; - break; - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['id'] = $this->id; - $json['callbackUrl'] = $this->callbackUrl; - $json['publishPermissions'] = - isset($this->publishPermissions) ? - array_values($this->publishPermissions) : null; - $json['sessions'] = isset($this->sessions) ? - array_values($this->sessions) : null; - $json['subscriptions'] = $this->subscriptions; - $json['tag'] = $this->tag; - $json['deviceApiVersion'] = $this->deviceApiVersion; - - return array_filter($json); - } -} diff --git a/src/WebRtc/Models/ParticipantSubscription.php b/src/WebRtc/Models/ParticipantSubscription.php deleted file mode 100644 index 8d484f8c..00000000 --- a/src/WebRtc/Models/ParticipantSubscription.php +++ /dev/null @@ -1,42 +0,0 @@ -participantId = func_get_arg(0); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['participantId'] = $this->participantId; - - return array_filter($json); - } -} diff --git a/src/WebRtc/Models/PublishPermissionEnum.php b/src/WebRtc/Models/PublishPermissionEnum.php deleted file mode 100644 index f8f1473d..00000000 --- a/src/WebRtc/Models/PublishPermissionEnum.php +++ /dev/null @@ -1,24 +0,0 @@ -id = func_get_arg(0); - $this->tag = func_get_arg(1); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['id'] = $this->id; - $json['tag'] = $this->tag; - - return array_filter($json); - } -} diff --git a/src/WebRtc/Models/Subscriptions.php b/src/WebRtc/Models/Subscriptions.php deleted file mode 100644 index 499aba48..00000000 --- a/src/WebRtc/Models/Subscriptions.php +++ /dev/null @@ -1,54 +0,0 @@ -sessionId = func_get_arg(0); - $this->participants = func_get_arg(1); - } - } - - /** - * Encode this object to JSON - */ - public function jsonSerialize(): array - { - $json = array(); - $json['sessionId'] = $this->sessionId; - $json['participants'] = isset($this->participants) ? - array_values($this->participants) : null; - - return array_filter($json); - } -} diff --git a/src/WebRtc/Utils/WebRtcTransfer.php b/src/WebRtc/Utils/WebRtcTransfer.php deleted file mode 100644 index 80537b92..00000000 --- a/src/WebRtc/Utils/WebRtcTransfer.php +++ /dev/null @@ -1,33 +0,0 @@ -' . WebRtcTransfer::generateTransferBxmlVerb($deviceToken, $voiceCallId, $sipUri) . ''; - } - - public static function generateTransferBxmlVerb($deviceToken, $voiceCallId, $sipUri = "sip:sipx.webrtc.bandwidth.com:5060") { - /** - * Returns the Transfer verb to perform the SIP transfer - * @param string $deviceToken The device token - * @param array $voiceCallId The Bandwidth Voice Call Id - * @return string $sipUri The SIP URI to transfer the call to - */ - $formattedCallId = substr(str_replace("-", "", $voiceCallId), 1); - return '' . $sipUri . ''; - } -} diff --git a/src/WebRtc/WebRtcClient.php b/src/WebRtc/WebRtcClient.php deleted file mode 100644 index fd40808d..00000000 --- a/src/WebRtc/WebRtcClient.php +++ /dev/null @@ -1,37 +0,0 @@ -config = $config; - } - - - private $client; - - /** - * Provides access to API controller - * @return Controllers\APIController - */ - public function getClient() - { - if ($this->client == null) { - $this->client = new Controllers\APIController($this->config); - } - return $this->client; - } -} diff --git a/tests/Api/CallsApiTest.php b/tests/Api/CallsApiTest.php new file mode 100644 index 00000000..06476c26 --- /dev/null +++ b/tests/Api/CallsApiTest.php @@ -0,0 +1,132 @@ + getenv("BW_USERNAME"), - 'voiceBasicAuthPassword' => getenv("BW_PASSWORD"), - 'phoneNumberLookupBasicAuthUserName' => getenv("BW_USERNAME"), - 'phoneNumberLookupBasicAuthPassword' => getenv("BW_PASSWORD"), - 'clientId' => getenv("BW_CLIENT_ID"), - 'clientSecret' => getenv("BW_CLIENT_SECRET"), - ) - ); - self::$bandwidthClient = new BandwidthLib\BandwidthClient($config); - - $messagingMFAConfig = new BandwidthLib\Configuration( - array( - 'messagingBasicAuthUserName' => getenv("BW_USERNAME"), - 'messagingBasicAuthPassword' => getenv("BW_PASSWORD"), - 'multiFactorAuthBasicAuthUserName' => getenv("BW_USERNAME"), - 'multiFactorAuthBasicAuthPassword' => getenv("BW_PASSWORD"), - ) - ); - self::$messagingMFAClient = new BandwidthLib\BandwidthClient($messagingMFAConfig); - } - - public function testCreateMessage() { - $body = new BandwidthLib\Messaging\Models\MessageRequest(); - $body->from = getenv("BW_NUMBER"); - $body->to = [getenv("USER_NUMBER")]; - $body->applicationId = getenv("BW_MESSAGING_APPLICATION_ID"); - $body->text = "PHP Monitoring"; - - $response = self::$messagingMFAClient->getMessaging()->getClient()->createMessage(getenv("BW_ACCOUNT_ID"), $body); - - $this->assertTrue(strlen($response->getResult()->id) > 0); //validate that _some_ id was returned - } - - public function testCreateMessageInvalidPhoneNumber() { - $body = new BandwidthLib\Messaging\Models\MessageRequest(); - $body->from = getenv("BW_NUMBER"); - $body->to = ["+1invalid"]; - $body->applicationId = getenv("BW_MESSAGING_APPLICATION_ID"); - $body->text = "PHP Monitoring"; - - try { - self::$messagingMFAClient->getMessaging()->getClient()->createMessage(getenv("BW_ACCOUNT_ID"), $body); - //workaround to make sure that if the above error is not raised, the build will fail - $this->assertTrue(false); - } catch (BandwidthLib\Messaging\Exceptions\MessagingException $e) { - $this->assertTrue(strlen($e->description) > 0); - } - } - - public function testUploadDownloadMedia() { - //constants - $mediaId = "text-media-id-" . uniqid() . ".txt"; - $content = "Hello world"; - $contentType = 'text/plain'; - - //media upload - self::$messagingMFAClient->getMessaging()->getClient()->uploadMedia(getenv("BW_ACCOUNT_ID"), $mediaId, $content, $contentType); - - //media download - $downloadedContent = self::$messagingMFAClient->getMessaging()->getClient()->getMedia(getenv("BW_ACCOUNT_ID"), $mediaId)->getResult(); - - //media delete - self::$messagingMFAClient->getMessaging()->getClient()->deleteMedia(getenv("BW_ACCOUNT_ID"), $mediaId); - - //validate that response is the same - $this->assertEquals($downloadedContent, $content); - } - - public function testCreateCallAndGetCallState() { - $body = new BandwidthLib\Voice\Models\CreateCallRequest(); - $body->from = getenv("BW_NUMBER"); - $body->to = getenv("USER_NUMBER"); - $body->applicationId = getenv("BW_VOICE_APPLICATION_ID"); - $body->answerUrl = getenv("BASE_CALLBACK_URL"); - $response = self::$bandwidthClient->getVoice()->getClient()->createCall(getenv("BW_ACCOUNT_ID"), $body); - $callId = $response->getResult()->callId; - $this->assertTrue(strlen($callId) > 0); - $this->assertTrue(is_a($response->getResult()->enqueuedTime, 'DateTime')); - - //get phone call information (This is commented out until voice fixes their latency issues - // $response = self::$bandwidthClient->getVoice()->getClient()->getCall(getenv("BW_ACCOUNT_ID"), $callId); - // $this->assertTrue(is_a($response->getResult()->enqueuedTime, 'DateTime')); - - } - - public function testCreateCallWithAmdAndGetCallState() { - $body = new BandwidthLib\Voice\Models\CreateCallRequest(); - $machineDetection = new BandwidthLib\Voice\Models\MachineDetectionConfiguration(); - - $machineDetection->mode = BandwidthLib\Voice\Models\ModeEnum::ASYNC; - $machineDetection->detectionTimeout = 5.0; - $machineDetection->silenceTimeout = 5.0; - $machineDetection->speechThreshold = 5.0; - $machineDetection->speechEndThreshold = 5.0; - $machineDetection->delayResult = true; - $machineDetection->callbackUrl = getenv("BASE_CALLBACK_URL") . "/callbacks/machine-detection"; - $machineDetection->callbackMethod = "POST"; - $machineDetection->machineSpeechEndThreshold = 3.2; - - $body->from = getenv("BW_NUMBER"); - $body->to = getenv("USER_NUMBER"); - $body->applicationId = getenv("BW_VOICE_APPLICATION_ID"); - $body->answerUrl = getenv("BASE_CALLBACK_URL"); - $body->machineDetection = $machineDetection; - $response = self::$bandwidthClient->getVoice()->getClient()->createCall(getenv("BW_ACCOUNT_ID"), $body); - $callId = $response->getResult()->callId; - $this->assertTrue(strlen($callId) > 0); - - sleep(25); - - //get phone call information - // $response = self::$bandwidthClient->getVoice()->getClient()->getCall(getenv("BW_ACCOUNT_ID"), $callId); - // if (($response->getStatus() == 404) ) { - // $this->assertTrue(is_a($response->getResult()->enqueuedTime, 'DateTime')); - // } - } - public function testCreateCallWithPriority() { - $body = new BandwidthLib\Voice\Models\CreateCallRequest(); - $body->from = getenv("BW_NUMBER"); - $body->to = getenv("USER_NUMBER"); - $body->applicationId = getenv("BW_VOICE_APPLICATION_ID"); - $body->answerUrl = getenv("BASE_CALLBACK_URL"); - $body->priority = 1; - $response = self::$bandwidthClient->getVoice()->getClient()->createCall(getenv("BW_ACCOUNT_ID"), $body); - $callId = $response->getResult()->callId; - $this->assertTrue(strlen($callId) > 0); - $this->assertTrue($response->getResult()->priority == $body->priority); - } - - public function testCreateCallInvalidPhoneNumber() { - $body = new BandwidthLib\Voice\Models\CreateCallRequest(); - $body->from = getenv("BW_NUMBER"); - $body->to = "+1invalid"; - $body->applicationId = getenv("BW_VOICE_APPLICATION_ID"); - $body->answerUrl = getenv("BASE_CALLBACK_URL"); - - try { - self::$bandwidthClient->getVoice()->getClient()->createCall(getenv("BW_ACCOUNT_ID"), $body); - //workaround to make sure that if the above error is not raised, the build will fail - $this->assertTrue(false); - } catch (BandwidthLib\Voice\Exceptions\ApiErrorException $e) { - $this->assertTrue(strlen($e->description) > 0); - } - } - - public function testMfaMessaging() { - $body = new BandwidthLib\MultiFactorAuth\Models\TwoFactorCodeRequestSchema(); - $body->from = getenv("BW_NUMBER"); - $body->to = getenv("USER_NUMBER"); - $body->applicationId = getenv("BW_MESSAGING_APPLICATION_ID"); - $body->scope = "scope"; - $body->digits = 6; - $body->message = "Your temporary {NAME} {SCOPE} code is {CODE}"; - - $response = self::$messagingMFAClient->getMultiFactorAuth()->getMFA()->createMessagingTwoFactor(getenv("BW_ACCOUNT_ID"), $body); - $this->assertTrue(strlen($response->getResult()->messageId) > 0); //validate that _some_ id was returned - } - - public function testMfaVoice() { - $body = new BandwidthLib\MultiFactorAuth\Models\TwoFactorCodeRequestSchema(); - $body->from = getenv("BW_NUMBER"); - $body->to = getenv("USER_NUMBER"); - $body->applicationId = getenv("BW_VOICE_APPLICATION_ID"); - $body->scope = "scope"; - $body->digits = 6; - $body->message = "Your temporary {NAME} {SCOPE} code is {CODE}"; - - $response = self::$messagingMFAClient->getMultiFactorAuth()->getMFA()->createVoiceTwoFactor(getenv("BW_ACCOUNT_ID"), $body); - $this->assertTrue(strlen($response->getResult()->callId) > 0); //validate that _some_ id was returned - } - - public function testMfaVerify() { - $body = new BandwidthLib\MultiFactorAuth\Models\TwoFactorVerifyRequestSchema(); - $body->to = "+".rand(10000000000, 19999999999); - $body->applicationId = getenv("BW_VOICE_APPLICATION_ID"); - $body->scope = "scope"; - $body->code = "123456"; - $body->digits = 6; - $body->expirationTimeInMinutes = 3; - - $response = self::$messagingMFAClient->getMultiFactorAuth()->getMFA()->createVerifyTwoFactor(getenv("BW_ACCOUNT_ID"), $body); - $this->assertTrue(is_bool($response->getResult()->valid)); - } - - public function testAsyncTnLookup() { - $body = new BandwidthLib\PhoneNumberLookup\Models\CreateLookupRequest(); - $body->phoneNumbers = [getenv("USER_NUMBER")]; - $createResponse = self::$bandwidthClient->getPhoneNumberLookup()->getClient()->createAsyncBulkLookupRequest(getenv("BW_ACCOUNT_ID"), $body); - $this->assertInstanceOf(BandwidthLib\PhoneNumberLookup\Models\CreateAsyncBulkResponse::class, $createResponse->getResult()); - $this->assertIsArray($createResponse->getResult()->links); - $this->assertInstanceOf(BandwidthLib\PhoneNumberLookup\Models\CreateAsyncBulkResponseData::class, $createResponse->getResult()->data); - $this->assertIsString($createResponse->getResult()->data->requestId); - $this->assertIsString($createResponse->getResult()->data->status); - $this->assertIsArray($createResponse->getResult()->errors); - - sleep(30); - - $statusResponse = self::$bandwidthClient->getPhoneNumberLookup()->getClient()->getAsyncLookupRequestStatus(getenv("BW_ACCOUNT_ID"), $createResponse->getResult()->data->requestId); - $this->assertInstanceOf(BandwidthLib\PhoneNumberLookup\Models\LookupResponse::class, $statusResponse->getResult()); - $this->assertIsArray($statusResponse->getResult()->links); - $this->assertInstanceOf(BandwidthLib\PhoneNumberLookup\Models\LookupResponseData::class, $statusResponse->getResult()->data); - $this->assertIsString($statusResponse->getResult()->data->requestId); - $this->assertIsString($statusResponse->getResult()->data->status); - $this->assertIsArray($statusResponse->getResult()->data->results); - $this->assertInstanceOf(BandwidthLib\PhoneNumberLookup\Models\LookupResult::class, $statusResponse->getResult()->data->results[0]); - $this->assertIsString($statusResponse->getResult()->data->results[0]->phoneNumber); - $this->assertIsString($statusResponse->getResult()->data->results[0]->lineType); - $this->assertIsString($statusResponse->getResult()->data->results[0]->messagingProvider); - $this->assertIsString($statusResponse->getResult()->data->results[0]->voiceProvider); - $this->assertIsString($statusResponse->getResult()->data->results[0]->countryCodeA3); - $this->assertIsArray($statusResponse->getResult()->errors); - } - - public function testSyncTnLookup() { - $body = new BandwidthLib\PhoneNumberLookup\Models\CreateLookupRequest(); - $body->phoneNumbers = [getenv("USER_NUMBER")]; - $response = self::$bandwidthClient->getPhoneNumberLookup()->getClient()->createSyncLookupRequest(getenv("BW_ACCOUNT_ID"), $body); - $this->assertInstanceOf(BandwidthLib\PhoneNumberLookup\Models\LookupResponse::class, $response->getResult()); - $this->assertIsArray($response->getResult()->links); - $this->assertInstanceOf(BandwidthLib\PhoneNumberLookup\Models\Link::class, $response->getResult()->links[0]); - $this->assertInstanceOf(BandwidthLib\PhoneNumberLookup\Models\LookupResponseData::class, $response->getResult()->data); - $this->assertIsString($response->getResult()->data->requestId); - $this->assertIsString($response->getResult()->data->status); - $this->assertEquals("COMPLETE", $response->getResult()->data->status); - $this->assertIsArray($response->getResult()->data->results); - $this->assertInstanceOf(BandwidthLib\PhoneNumberLookup\Models\LookupResult::class, $response->getResult()->data->results[0]); - $this->assertIsString($response->getResult()->data->results[0]->phoneNumber); - $this->assertIsString($response->getResult()->data->results[0]->lineType); - // $this->assertIsString($response->getResult()->data->results[0]->messagingProvider); - $this->assertIsString($response->getResult()->data->results[0]->voiceProvider); - $this->assertIsString($response->getResult()->data->results[0]->countryCodeA3); - $this->assertIsArray($response->getResult()->errors); - } -} diff --git a/tests/BxmlTest.php b/tests/BxmlTest.php deleted file mode 100644 index 44bdb2f2..00000000 --- a/tests/BxmlTest.php +++ /dev/null @@ -1,543 +0,0 @@ -duration("3"); - $speakSentence->voice("susan"); - $speakSentence->locale("en_US"); - $speakSentence->gender("female"); - $bxml = new BandwidthLib\Voice\Bxml\Bxml(); - $bxml->addVerb($speakSentence, $pause); - $bxml->addVerb($pause); - $expectedXml = 'Test'; - $responseXml = $bxml->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testForward() { - $forward = new BandwidthLib\Voice\Bxml\Forward(); - $forward->to("+18888888888"); - $forward->from("+18889999999"); - $forward->callTimeout(3); - $forward->diversionTreatment("none"); - $forward->diversionReason("away"); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($forward); - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testGatherNoNestedTag() { - $gather = new BandwidthLib\Voice\Bxml\Gather(); - $gather->gatherUrl("https://test.com"); - $gather->gatherMethod("GET"); - $gather->username("user"); - $gather->password("pass"); - $gather->tag("tag"); - $gather->terminatingDigits("123"); - $gather->maxDigits(3); - $gather->interDigitTimeout(4); - $gather->firstDigitTimeout(5); - $gather->repeatCount(3); - $gather->gatherFallbackUrl("https://test.com"); - $gather->gatherFallbackMethod("GET"); - $gather->fallbackUsername("fuser"); - $gather->fallbackPassword("fpass"); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($gather); - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testGatherEncodedURL() { - $gather = new BandwidthLib\Voice\Bxml\Gather(); - $gather->gatherUrl("https://test.com?param1=test1¶m2=test2"); - $gather->gatherMethod("GET"); - $gather->username("user"); - $gather->password("pass"); - $gather->tag("tag"); - $gather->terminatingDigits("123"); - $gather->maxDigits(3); - $gather->interDigitTimeout(4); - $gather->firstDigitTimeout(5); - $gather->repeatCount(3); - $gather->gatherFallbackUrl("https://test.com"); - $gather->gatherFallbackMethod("GET"); - $gather->fallbackUsername("fuser"); - $gather->fallbackPassword("fpass"); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($gather); - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testGatherNestedSpeakSentence() { - $gather = new BandwidthLib\Voice\Bxml\Gather(); - $speakSentence = new BandwidthLib\Voice\Bxml\SpeakSentence("Test"); - $speakSentence->voice("susan"); - $speakSentence->locale("en_US"); - $speakSentence->gender("female"); - $gather = new BandwidthLib\Voice\Bxml\Gather(); - $gather->gatherUrl("https://test.com"); - $gather->gatherMethod("GET"); - $gather->username("user"); - $gather->password("pass"); - $gather->tag("tag"); - $gather->terminatingDigits("123"); - $gather->maxDigits(3); - $gather->interDigitTimeout(4); - $gather->firstDigitTimeout(5); - $gather->speakSentence($speakSentence); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($gather); - $expectedXml = 'Test'; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testGatherNestedPlayAudio() { - $gather = new BandwidthLib\Voice\Bxml\Gather(); - $playAudio = new BandwidthLib\Voice\Bxml\PlayAudio("https://test.com"); - $playAudio->username("user"); - $playAudio->password("pass"); - $response = new BandwidthLib\Voice\Bxml\Response(); - $gather = new BandwidthLib\Voice\Bxml\Gather(); - $gather->gatherUrl("https://test.com"); - $gather->gatherMethod("GET"); - $gather->username("user"); - $gather->password("pass"); - $gather->tag("tag"); - $gather->terminatingDigits("123"); - $gather->maxDigits(3); - $gather->interDigitTimeout(4); - $gather->firstDigitTimeout(5); - $gather->playAudio($playAudio); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($gather); - $expectedXml = 'https://test.com'; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testGatherNestedVerbs() { - $speakSentence1 = new BandwidthLib\Voice\Bxml\SpeakSentence("First Sentence"); - $playAudio1 = new BandwidthLib\Voice\Bxml\PlayAudio("https://audio1.com"); - $playAudio2 = new BandwidthLib\Voice\Bxml\PlayAudio("https://audio2.com"); - $speakSentence2 = new BandwidthLib\Voice\Bxml\SpeakSentence("Second Sentence"); - - $gather = new BandwidthLib\Voice\Bxml\Gather(); - $gather->gatherUrl("https://gather.url/nextBXML"); - $gather->speakSentence($speakSentence1); - $gather->playAudio($playAudio1); - $gather->playAudio($playAudio2); - $gather->speakSentence($speakSentence2); - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($gather); - - $expectedXml = 'First Sentencehttps://audio1.comhttps://audio2.comSecond Sentence'; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testHangup() { - $hangup = new BandwidthLib\Voice\Bxml\Hangup(); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($hangup); - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testRedirect() { - $redirect = new BandwidthLib\Voice\Bxml\Redirect(); - $redirect->username("user"); - $redirect->password("pass"); - $redirect->redirectUrl("https://test.com"); - $redirect->redirectMethod("GET"); - $redirect->tag("tag"); - $redirect->redirectFallbackUrl("https://test2.com"); - $redirect->redirectFallbackMethod("POST"); - $redirect->fallbackUsername("fuser"); - $redirect->fallbackPassword("fpass"); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($redirect); - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testPause() { - $pause = new BandwidthLib\Voice\Bxml\Pause(); - $pause->duration("3"); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($pause); - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testSendDtmf() { - $sendDtmf = new BandwidthLib\Voice\Bxml\SendDtmf("123"); - $sendDtmf->toneDuration("65"); - $sendDtmf->toneInterval(75); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($sendDtmf); - $expectedXml = '123'; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testSpeakSentence() { - $speakSentence = new BandwidthLib\Voice\Bxml\SpeakSentence("Test"); - $speakSentence->voice("susan"); - $speakSentence->locale("en_US"); - $speakSentence->gender("female"); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($speakSentence); - $expectedXml = 'Test'; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testSpeakSentenceEncode() { - $speakSentence = new BandwidthLib\Voice\Bxml\SpeakSentence("These characters cause problems < > &"); - $speakSentence->voice("susan"); - $speakSentence->locale("en_US"); - $speakSentence->gender("female"); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($speakSentence); - $expectedXml = 'These characters cause problems < > &'; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testSpeakSentenceSSML() { - $speakSentence = new BandwidthLib\Voice\Bxml\SpeakSentence('Hello, you have reached the home of Antonio Mendoza.Please leave a message.'); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($speakSentence); - $expectedXml = 'Hello, you have reached the home of Antonio Mendoza.Please leave a message.'; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testPlayAudio() { - $playAudio = new BandwidthLib\Voice\Bxml\PlayAudio("https://test.com"); - $playAudio->username("user"); - $playAudio->password("pass"); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($playAudio); - $expectedXml = 'https://test.com'; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testPlayAudioEncodedURL() { - $playAudio = new BandwidthLib\Voice\Bxml\PlayAudio("https://test.com?param1=test1¶m2=test2"); - $playAudio->username("user"); - $playAudio->password("pass"); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($playAudio); - $expectedXml = 'https://test.com?param1=test1&param2=test2'; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testTransfer() { - $number1 = new BandwidthLib\Voice\Bxml\PhoneNumber("+17777777777"); - $number1->transferAnswerUrl("https://test.com"); - $number1->transferAnswerMethod("GET"); - $number1->username("user"); - $number1->password("pass"); - $number1->tag("tag"); - $number2 = new BandwidthLib\Voice\Bxml\PhoneNumber("+17777777779"); - $number2->transferAnswerUrl("https://test2.com"); - $number2->transferAnswerMethod("GET"); - $number2->username("user2"); - $number2->password("pass2"); - $number2->tag("tag2"); - $number2->transferAnswerFallbackUrl("https://test3.com"); - $number2->transferAnswerFallbackMethod("POST"); - $number2->fallbackUsername("fuser"); - $number2->fallbackPassword("fpass"); - $transfer = new BandwidthLib\Voice\Bxml\Transfer(); - $transfer->transferCallerId("+18999999999"); - $transfer->transferCallerDisplayName("test"); - $transfer->transferCompleteUrl("https://test.com"); - $transfer->transferCompleteMethod("GET"); - $transfer->username("user"); - $transfer->password("pass"); - $transfer->tag("tag"); - $transfer->callTimeout(3); - $transfer->diversionTreatment("none"); - $transfer->diversionReason("away"); - $transfer->phoneNumbers(array($number1, $number2)); - $transfer->transferCompleteFallbackUrl("https://test3.com"); - $transfer->transferCompleteFallbackMethod("POST"); - $transfer->fallbackUsername("fusern"); - $transfer->fallbackPassword("fpassw"); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($transfer); - $expectedXml = '+17777777777+17777777779'; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testPauseRecording() { - $pauseRecording = new BandwidthLib\Voice\Bxml\PauseRecording(); - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($pauseRecording); - - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testResumeRecording() { - $resumeRecording = new BandwidthLib\Voice\Bxml\ResumeRecording(); - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($resumeRecording); - - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testStartRecording() { - $startRecording = new BandwidthLib\Voice\Bxml\StartRecording(); - $startRecording->tag("tag"); - $startRecording->recordingAvailableUrl("https://myapp.com/noBXML"); - $startRecording->recordingAvailableMethod("POST"); - $startRecording->username("user"); - $startRecording->password("pass"); - $startRecording->fileFormat("wav"); - $startRecording->multiChannel(true); - $startRecording->transcribe(false); - $startRecording->transcriptionAvailableUrl("https://available.com"); - $startRecording->transcriptionAvailableMethod("GET"); - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($startRecording); - - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testStopRecording() { - $stopRecording = new BandwidthLib\Voice\Bxml\StopRecording(); - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($stopRecording); - - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - public function testStartStream() { - $streamParam1 = new BandwidthLib\Voice\Bxml\StreamParam(); - $streamParam1->name("name1"); - $streamParam1->value("value1"); - $streamParam2 = new BandwidthLib\Voice\Bxml\StreamParam(); - $streamParam2->name("name2"); - $streamParam2->value("value2"); - $startStream = new BandwidthLib\Voice\Bxml\StartStream(); - $startStream->name("test"); - $startStream->tracks("inbound"); - $startStream->destination("https://url.com"); - $startStream->streamEventMethod("POST"); - $startStream->username("user"); - $startStream->password("pass"); - $startStream->streamEventUrl("https://url.com"); - $startStream->streamParams(array($streamParam1, $streamParam2)); - - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($startStream); - - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testStopStream() { - $stopStream = new BandwidthLib\Voice\Bxml\StopStream(); - $stopStream->name("test"); - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($stopStream); - - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testRecord() { - $record = new BandwidthLib\Voice\Bxml\Record(); - $record->recordCompleteUrl("https://myapp.com/nextBXML"); - $record->maxDuration(10); - $record->recordCompleteFallbackUrl("https://test.com"); - $record->recordCompleteFallbackMethod("GET"); - $record->fallbackUsername("fuser"); - $record->fallbackPassword("fpass"); - $record->detectlanguage("true"); - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($record); - - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testConference() { - $conference = new BandwidthLib\Voice\Bxml\Conference("conference-name"); - $conference->mute(true); - $conference->hold(false); - $conference->callIdsToCoach("c-abc,c-def"); - $conference->conferenceEventUrl("https://test.com"); - $conference->conferenceEventMethod("GET"); - $conference->username("user"); - $conference->password("pass"); - $conference->tag("tag"); - $conference->conferenceEventFallbackUrl("https://test2.com"); - $conference->conferenceEventFallbackMethod("POST"); - $conference->fallbackUsername("fuser"); - $conference->fallbackPassword("fpass"); - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($conference); - - $expectedXml = 'conference-name'; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testConferenceCallIdsToCoachArray() { - $conference = new BandwidthLib\Voice\Bxml\Conference("conference-name"); - $conference->callIdsToCoachArray(["c-abc", "c-def"]); - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($conference); - - $expectedXml = 'conference-name'; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testBridge() { - $bridge = new BandwidthLib\Voice\Bxml\Bridge("c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d"); - $bridge->bridgeCompleteUrl("https://test.com"); - $bridge->bridgeCompleteMethod("GET"); - $bridge->bridgeTargetCompleteUrl("https://test2.com"); - $bridge->bridgeTargetCompleteMethod("POST"); - $bridge->username("user"); - $bridge->password("pass"); - $bridge->tag("custom tag"); - $bridge->bridgeCompleteFallbackUrl("https://test3.com"); - $bridge->bridgeCompleteFallbackMethod("GET"); - $bridge->bridgeTargetCompleteFallbackUrl("https://test4.com"); - $bridge->bridgeTargetCompleteFallbackMethod("POST"); - $bridge->fallbackUsername("fuser"); - $bridge->fallbackPassword("fpass"); - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($bridge); - - $expectedXml = 'c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d'; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testRing() { - $ring = new BandwidthLib\Voice\Bxml\Ring(); - $ring->duration(5); - $ring->answerCall(false); - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($ring); - - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testStartGather() { - $startGather = new BandwidthLib\Voice\Bxml\StartGather(); - $startGather->username("user"); - $startGather->password("pass"); - $startGather->dtmfUrl("https://test.com"); - $startGather->dtmfMethod("GET"); - $startGather->tag("custom tag"); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($startGather); - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testStopGather() { - $stopGather = new BandwidthLib\Voice\Bxml\StopGather(); - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($stopGather); - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - public function testStartTranscription() { - $customParam1 = new BandwidthLib\Voice\Bxml\CustomParam(); - $customParam1->name("name1"); - $customParam1->value("value1"); - $customParam2 = new BandwidthLib\Voice\Bxml\CustomParam(); - $customParam2->name("name2"); - $customParam2->value("value2"); - $startTranscription = new BandwidthLib\Voice\Bxml\StartTranscription(); - $startTranscription->name("test"); - $startTranscription->tracks("inbound"); - $startTranscription->destination("https://url.com"); - $startTranscription->transcriptionEventMethod("POST"); - $startTranscription->username("user"); - $startTranscription->password("pass"); - $startTranscription->transcriptionEventUrl("https://url.com"); - $startTranscription->customParams - (array($customParam1, $customParam2)); - - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($startTranscription); - - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } - - public function testStopTranscription() { - $stopTranscription = new BandwidthLib\Voice\Bxml\StopTranscription(); - $stopTranscription->name("test"); - - $response = new BandwidthLib\Voice\Bxml\Response(); - $response->addVerb($stopTranscription); - - $expectedXml = ''; - $responseXml = $response->toBxml(); - $this->assertEquals($expectedXml, $responseXml); - } -} diff --git a/tests/Model/AccountStatisticsTest.php b/tests/Model/AccountStatisticsTest.php new file mode 100644 index 00000000..88eeb7b4 --- /dev/null +++ b/tests/Model/AccountStatisticsTest.php @@ -0,0 +1,98 @@ +sip:sipx.webrtc.bandwidth.com:5060'; - $actual = BandwidthLib\WebRtc\Utils\WebRtcTransfer::generateBxml('asdf', 'c-93d6f3c0-be584596-0b74-4fa2-8015-d8ede84bd1a4'); - $this->assertEquals($expected, $actual); - } - - public function testGenerateTransferBxmlVerb() { - $expected = 'sip:sipx.webrtc.bandwidth.com:5060'; - $actual = BandwidthLib\WebRtc\Utils\WebRtcTransfer::generateTransferBxmlVerb('asdf', 'c-93d6f3c0-be584596-0b74-4fa2-8015-d8ede84bd1a4'); - $this->assertEquals($expected, $actual); - } -} From 5956737ec94fbc83a076ea03b0b8ad431f1c3f01 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 7 Jul 2026 16:24:42 -0400 Subject: [PATCH 02/53] update invokerPackage --- .openapi-generator/FILES | 212 ---------- README.md | 8 +- composer.json | 4 +- docs/Api/CallsApi.md | 52 +-- docs/Api/ConferencesApi.md | 84 ++-- docs/Api/EndpointsApi.md | 56 +-- docs/Api/MFAApi.md | 44 +- docs/Api/MediaApi.md | 30 +- docs/Api/MessagesApi.md | 42 +- docs/Api/MultiChannelApi.md | 16 +- docs/Api/PhoneNumberLookupApi.md | 40 +- docs/Api/RecordingsApi.md | 86 ++-- docs/Api/StatisticsApi.md | 12 +- docs/Api/TollFreeVerificationApi.md | 88 ++-- docs/Api/TranscriptionsApi.md | 28 +- docs/Model/AnswerCallback.md | 4 +- docs/Model/BlockedWebhook.md | 2 +- docs/Model/BridgeCompleteCallback.md | 2 +- docs/Model/BridgeTargetCompleteCallback.md | 2 +- docs/Model/BrtcError.md | 2 +- docs/Model/BrtcErrorResponse.md | 4 +- docs/Model/CallRecordingMetadata.md | 6 +- docs/Model/CallState.md | 2 +- docs/Model/CallTranscription.md | 4 +- docs/Model/CallTranscriptionResponse.md | 2 +- docs/Model/Callback.md | 4 +- docs/Model/Conference.md | 4 +- .../ConferenceRecordingAvailableCallback.md | 2 +- docs/Model/ConferenceRecordingMetadata.md | 2 +- docs/Model/CreateAsyncBulkLookupResponse.md | 6 +- .../CreateAsyncBulkLookupResponseData.md | 2 +- docs/Model/CreateCall.md | 8 +- docs/Model/CreateCallResponse.md | 6 +- docs/Model/CreateEndpointRequestBase.md | 4 +- docs/Model/CreateEndpointResponse.md | 6 +- docs/Model/CreateEndpointResponseData.md | 6 +- docs/Model/CreateMessageRequestError.md | 2 +- .../CreateMultiChannelMessageResponse.md | 6 +- docs/Model/CreateSyncLookupResponse.md | 6 +- docs/Model/CreateSyncLookupResponseData.md | 4 +- docs/Model/CreateWebRtcConnectionRequest.md | 4 +- docs/Model/Device.md | 2 +- docs/Model/DisconnectCallback.md | 2 +- docs/Model/DtmfCallback.md | 2 +- docs/Model/Endpoint.md | 6 +- docs/Model/EndpointEvent.md | 8 +- docs/Model/EndpointResponse.md | 6 +- docs/Model/Endpoints.md | 4 +- docs/Model/ErrorObject.md | 2 +- docs/Model/GatherCallback.md | 2 +- docs/Model/GetAsyncBulkLookupResponse.md | 6 +- docs/Model/GetAsyncBulkLookupResponseData.md | 4 +- docs/Model/InboundCallback.md | 4 +- docs/Model/InboundCallbackMessage.md | 12 +- docs/Model/InitiateCallback.md | 6 +- docs/Model/ListEndpointsResponse.md | 8 +- docs/Model/ListMessageItem.md | 6 +- docs/Model/LookupErrorResponse.md | 4 +- docs/Model/LookupErrorSchema.md | 2 +- docs/Model/LookupResult.md | 6 +- .../Model/MachineDetectionCompleteCallback.md | 4 +- docs/Model/MachineDetectionConfiguration.md | 6 +- docs/Model/Message.md | 4 +- docs/Model/MessageRequest.md | 2 +- docs/Model/MessagesList.md | 4 +- docs/Model/MmsMessageContent.md | 2 +- docs/Model/MultiChannelAction.md | 6 +- docs/Model/MultiChannelActionCalendarEvent.md | 2 +- .../Model/MultiChannelChannelListMMSObject.md | 4 +- ...ultiChannelChannelListMMSResponseObject.md | 4 +- .../MultiChannelChannelListObjectBase.md | 2 +- .../Model/MultiChannelChannelListRBMObject.md | 4 +- ...ChannelChannelListRBMObjectAllOfContent.md | 14 +- ...ultiChannelChannelListRBMResponseObject.md | 4 +- .../MultiChannelChannelListRequestObject.md | 4 +- .../MultiChannelChannelListResponseObject.md | 4 +- .../Model/MultiChannelChannelListSMSObject.md | 4 +- ...ultiChannelChannelListSMSResponseObject.md | 4 +- docs/Model/MultiChannelError.md | 4 +- docs/Model/MultiChannelMessageContent.md | 2 +- docs/Model/MultiChannelMessageRequest.md | 4 +- docs/Model/MultiChannelMessageResponseData.md | 6 +- docs/Model/RbmActionBase.md | 2 +- docs/Model/RbmActionDial.md | 2 +- docs/Model/RbmActionOpenUrl.md | 6 +- docs/Model/RbmActionViewLocation.md | 2 +- docs/Model/RbmCardContent.md | 4 +- docs/Model/RbmCardContentMedia.md | 2 +- docs/Model/RbmMessageCarouselCard.md | 6 +- docs/Model/RbmMessageContentRichCard.md | 12 +- docs/Model/RbmMessageContentText.md | 2 +- docs/Model/RbmMessageMedia.md | 4 +- docs/Model/RbmStandaloneCard.md | 8 +- docs/Model/RecordingAvailableCallback.md | 4 +- docs/Model/RecordingCompleteCallback.md | 4 +- docs/Model/RecordingTranscriptions.md | 4 +- docs/Model/RedirectCallback.md | 2 +- docs/Model/SipConnectionMetadata.md | 2 +- docs/Model/StatusCallback.md | 4 +- docs/Model/StatusCallbackMessage.md | 6 +- docs/Model/TfvStatus.md | 6 +- docs/Model/TfvSubmissionInfo.md | 10 +- docs/Model/TfvSubmissionWrapper.md | 2 +- docs/Model/TranscribeRecording.md | 2 +- docs/Model/TranscriptionAvailableCallback.md | 6 +- docs/Model/TransferAnswerCallback.md | 2 +- docs/Model/TransferCompleteCallback.md | 2 +- docs/Model/TransferDisconnectCallback.md | 2 +- docs/Model/UpdateCall.md | 6 +- docs/Model/UpdateCallRecording.md | 2 +- docs/Model/UpdateConference.md | 6 +- docs/Model/VerificationDenialWebhook.md | 2 +- docs/Model/VerificationRequest.md | 10 +- docs/Model/VerificationUpdateRequest.md | 10 +- docs/Model/VerificationWebhook.md | 2 +- docs/Model/WebhookSubscription.md | 4 +- docs/Model/WebhookSubscriptionError.md | 2 +- .../Model/WebhookSubscriptionRequestSchema.md | 2 +- docs/Model/WebhookSubscriptionsListBody.md | 6 +- openapi-config.yml | 1 + src/APIException.php | 6 +- src/Api/CallsApi.php | 238 +++++------ src/Api/ConferencesApi.php | 384 ++++++++--------- src/Api/EndpointsApi.php | 254 ++++++------ src/Api/MFAApi.php | 170 ++++---- src/Api/MediaApi.php | 140 +++---- src/Api/MessagesApi.php | 212 +++++----- src/Api/MultiChannelApi.php | 82 ++-- src/Api/PhoneNumberLookupApi.php | 110 ++--- src/Api/RecordingsApi.php | 378 ++++++++--------- src/Api/StatisticsApi.php | 62 +-- src/Api/TollFreeVerificationApi.php | 390 +++++++++--------- src/Api/TranscriptionsApi.php | 128 +++--- src/Configuration.php | 8 +- src/FormDataProcessor.php | 6 +- src/HeaderSelector.php | 6 +- src/Model/AccountStatistics.php | 8 +- src/Model/AdditionalDenialReason.php | 8 +- src/Model/Address.php | 8 +- src/Model/AnswerCallback.php | 28 +- src/Model/AsyncLookupRequest.php | 8 +- src/Model/BlockedWebhook.php | 18 +- src/Model/BridgeCompleteCallback.php | 18 +- src/Model/BridgeTargetCompleteCallback.php | 18 +- src/Model/BrtcError.php | 18 +- src/Model/BrtcErrorResponse.php | 20 +- src/Model/BrtcErrorSource.php | 8 +- src/Model/BrtcLink.php | 8 +- src/Model/BusinessEntityTypeEnum.php | 6 +- src/Model/BusinessRegistrationTypeEnum.php | 6 +- src/Model/CallDirectionEnum.php | 6 +- src/Model/CallRecordingMetadata.php | 38 +- src/Model/CallState.php | 18 +- src/Model/CallStateEnum.php | 6 +- src/Model/CallTranscription.php | 28 +- .../CallTranscriptionDetectedLanguageEnum.php | 6 +- src/Model/CallTranscriptionMetadata.php | 8 +- src/Model/CallTranscriptionResponse.php | 14 +- src/Model/CallTranscriptionTrackEnum.php | 6 +- src/Model/Callback.php | 28 +- src/Model/CallbackMethodEnum.php | 6 +- src/Model/CardWidthEnum.php | 6 +- src/Model/CodeRequest.php | 8 +- src/Model/CompletedLookupStatusEnum.php | 6 +- src/Model/Conference.php | 24 +- src/Model/ConferenceCompletedCallback.php | 8 +- src/Model/ConferenceCreatedCallback.php | 8 +- src/Model/ConferenceMember.php | 8 +- src/Model/ConferenceMemberExitCallback.php | 8 +- src/Model/ConferenceMemberJoinCallback.php | 8 +- .../ConferenceRecordingAvailableCallback.php | 18 +- src/Model/ConferenceRecordingMetadata.php | 18 +- src/Model/ConferenceRedirectCallback.php | 8 +- src/Model/ConferenceStateEnum.php | 6 +- src/Model/Contact.php | 8 +- src/Model/CreateAsyncBulkLookupResponse.php | 30 +- .../CreateAsyncBulkLookupResponseData.php | 18 +- src/Model/CreateCall.php | 48 +-- src/Model/CreateCallResponse.php | 38 +- src/Model/CreateEndpointRequestBase.php | 28 +- src/Model/CreateEndpointResponse.php | 30 +- src/Model/CreateEndpointResponseData.php | 34 +- src/Model/CreateMessageRequestError.php | 14 +- .../CreateMultiChannelMessageResponse.php | 30 +- src/Model/CreateSyncLookupResponse.php | 30 +- src/Model/CreateSyncLookupResponseData.php | 24 +- src/Model/CreateWebRtcConnectionRequest.php | 28 +- src/Model/DeactivationEventEnum.php | 6 +- src/Model/Device.php | 18 +- src/Model/DeviceStatusEnum.php | 6 +- src/Model/DisconnectCallback.php | 18 +- src/Model/Diversion.php | 8 +- src/Model/DtmfCallback.php | 18 +- src/Model/Endpoint.php | 34 +- src/Model/EndpointDirectionEnum.php | 6 +- src/Model/EndpointEvent.php | 48 +-- src/Model/EndpointEventTypeEnum.php | 6 +- src/Model/EndpointResponse.php | 30 +- src/Model/EndpointStatusEnum.php | 6 +- src/Model/EndpointTypeEnum.php | 6 +- src/Model/Endpoints.php | 28 +- src/Model/ErrorObject.php | 18 +- src/Model/ErrorSource.php | 8 +- src/Model/FailureWebhook.php | 8 +- src/Model/FieldError.php | 8 +- src/Model/FileFormatEnum.php | 6 +- src/Model/GatherCallback.php | 18 +- src/Model/GetAsyncBulkLookupResponse.php | 30 +- src/Model/GetAsyncBulkLookupResponseData.php | 24 +- src/Model/InProgressLookupStatusEnum.php | 6 +- src/Model/InboundCallback.php | 28 +- src/Model/InboundCallbackMessage.php | 68 +-- src/Model/InboundCallbackTypeEnum.php | 6 +- src/Model/InitiateCallback.php | 38 +- src/Model/LatestMessageDeliveryStatusEnum.php | 6 +- src/Model/LineTypeEnum.php | 6 +- src/Model/Link.php | 8 +- src/Model/LinkSchema.php | 8 +- src/Model/LinksObject.php | 8 +- src/Model/ListEndpointsResponse.php | 36 +- src/Model/ListMessageDirectionEnum.php | 6 +- src/Model/ListMessageItem.php | 38 +- src/Model/LookupErrorResponse.php | 20 +- src/Model/LookupErrorSchema.php | 18 +- src/Model/LookupErrorSchemaMeta.php | 8 +- src/Model/LookupResult.php | 38 +- .../MachineDetectionCompleteCallback.php | 28 +- src/Model/MachineDetectionConfiguration.php | 38 +- src/Model/MachineDetectionModeEnum.php | 6 +- src/Model/MachineDetectionResult.php | 8 +- src/Model/Media.php | 8 +- src/Model/Message.php | 28 +- src/Model/MessageDirectionEnum.php | 6 +- src/Model/MessageRequest.php | 18 +- src/Model/MessageStatusEnum.php | 6 +- src/Model/MessageTypeEnum.php | 6 +- src/Model/MessagesList.php | 24 +- src/Model/MessagingCodeResponse.php | 8 +- src/Model/MessagingRequestError.php | 8 +- src/Model/MfaForbiddenRequestError.php | 8 +- src/Model/MfaRequestError.php | 8 +- src/Model/MfaUnauthorizedRequestError.php | 8 +- src/Model/MmsMessageContent.php | 14 +- src/Model/MmsMessageContentFile.php | 8 +- src/Model/ModelInterface.php | 6 +- src/Model/MultiChannelAction.php | 38 +- src/Model/MultiChannelActionCalendarEvent.php | 18 +- .../MultiChannelChannelListMMSObject.php | 28 +- ...ltiChannelChannelListMMSResponseObject.php | 28 +- .../MultiChannelChannelListObjectBase.php | 18 +- .../MultiChannelChannelListOwnerObject.php | 8 +- .../MultiChannelChannelListRBMObject.php | 28 +- ...hannelChannelListRBMObjectAllOfContent.php | 66 +-- ...ltiChannelChannelListRBMResponseObject.php | 28 +- .../MultiChannelChannelListRequestObject.php | 28 +- .../MultiChannelChannelListResponseObject.php | 28 +- .../MultiChannelChannelListSMSObject.php | 28 +- ...ltiChannelChannelListSMSResponseObject.php | 28 +- src/Model/MultiChannelError.php | 20 +- src/Model/MultiChannelMessageChannelEnum.php | 6 +- src/Model/MultiChannelMessageContent.php | 18 +- src/Model/MultiChannelMessageRequest.php | 24 +- src/Model/MultiChannelMessageResponseData.php | 34 +- src/Model/OptInWorkflow.php | 8 +- src/Model/Page.php | 8 +- src/Model/PageInfo.php | 8 +- src/Model/PriorityEnum.php | 6 +- src/Model/ProductTypeEnum.php | 6 +- src/Model/RbmActionBase.php | 18 +- src/Model/RbmActionDial.php | 18 +- src/Model/RbmActionOpenUrl.php | 38 +- src/Model/RbmActionTypeEnum.php | 6 +- src/Model/RbmActionViewLocation.php | 18 +- src/Model/RbmCardContent.php | 24 +- src/Model/RbmCardContentMedia.php | 18 +- src/Model/RbmLocationResponse.php | 8 +- src/Model/RbmMediaHeightEnum.php | 6 +- src/Model/RbmMessageCarouselCard.php | 30 +- src/Model/RbmMessageContentFile.php | 8 +- src/Model/RbmMessageContentRichCard.php | 60 +-- src/Model/RbmMessageContentText.php | 14 +- src/Model/RbmMessageMedia.php | 20 +- src/Model/RbmOpenUrlEnum.php | 6 +- src/Model/RbmStandaloneCard.php | 44 +- src/Model/RbmSuggestionResponse.php | 8 +- src/Model/RbmWebViewEnum.php | 6 +- src/Model/RecordingAvailableCallback.php | 28 +- src/Model/RecordingCompleteCallback.php | 28 +- src/Model/RecordingStateEnum.php | 6 +- src/Model/RecordingTranscriptionClip.php | 8 +- src/Model/RecordingTranscriptionMetadata.php | 8 +- src/Model/RecordingTranscriptions.php | 20 +- src/Model/RedirectCallback.php | 18 +- src/Model/RedirectMethodEnum.php | 6 +- src/Model/SipConnectionMetadata.php | 18 +- src/Model/SipCredentials.php | 8 +- src/Model/SmsMessageContent.php | 8 +- src/Model/StandaloneCardOrientationEnum.php | 6 +- src/Model/StatusCallback.php | 28 +- src/Model/StatusCallbackMessage.php | 38 +- src/Model/StatusCallbackTypeEnum.php | 6 +- src/Model/StirShaken.php | 8 +- src/Model/SyncLookupRequest.php | 8 +- src/Model/TelephoneNumber.php | 8 +- src/Model/TfvBasicAuthentication.php | 8 +- src/Model/TfvCallbackStatusEnum.php | 6 +- src/Model/TfvError.php | 8 +- src/Model/TfvStatus.php | 34 +- src/Model/TfvStatusEnum.php | 6 +- src/Model/TfvSubmissionInfo.php | 58 +-- src/Model/TfvSubmissionWrapper.php | 18 +- src/Model/ThumbnailAlignmentEnum.php | 6 +- src/Model/TranscribeRecording.php | 18 +- src/Model/Transcription.php | 8 +- src/Model/TranscriptionAvailableCallback.php | 38 +- src/Model/TransferAnswerCallback.php | 18 +- src/Model/TransferCompleteCallback.php | 18 +- src/Model/TransferDisconnectCallback.php | 18 +- src/Model/UpdateCall.php | 38 +- src/Model/UpdateCallRecording.php | 18 +- src/Model/UpdateConference.php | 38 +- src/Model/UpdateConferenceMember.php | 8 +- src/Model/VerificationDenialWebhook.php | 14 +- src/Model/VerificationRequest.php | 58 +-- src/Model/VerificationUpdateRequest.php | 58 +-- src/Model/VerificationWebhook.php | 18 +- src/Model/VerifyCodeRequest.php | 8 +- src/Model/VerifyCodeResponse.php | 8 +- src/Model/VoiceApiError.php | 8 +- src/Model/VoiceCodeResponse.php | 8 +- src/Model/WebhookSubscription.php | 28 +- ...WebhookSubscriptionBasicAuthentication.php | 8 +- src/Model/WebhookSubscriptionError.php | 14 +- .../WebhookSubscriptionRequestSchema.php | 18 +- src/Model/WebhookSubscriptionTypeEnum.php | 6 +- src/Model/WebhookSubscriptionsListBody.php | 30 +- src/ObjectSerializer.php | 10 +- 337 files changed, 3588 insertions(+), 3799 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index f866c6ff..e72f388f 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .php-cs-fixer.dist.php .phplint.yml .travis.yml @@ -435,214 +434,3 @@ src/Model/WebhookSubscriptionRequestSchema.php src/Model/WebhookSubscriptionTypeEnum.php src/Model/WebhookSubscriptionsListBody.php src/ObjectSerializer.php -tests/Api/CallsApiTest.php -tests/Api/ConferencesApiTest.php -tests/Api/EndpointsApiTest.php -tests/Api/MFAApiTest.php -tests/Api/MediaApiTest.php -tests/Api/MessagesApiTest.php -tests/Api/MultiChannelApiTest.php -tests/Api/PhoneNumberLookupApiTest.php -tests/Api/RecordingsApiTest.php -tests/Api/StatisticsApiTest.php -tests/Api/TollFreeVerificationApiTest.php -tests/Api/TranscriptionsApiTest.php -tests/Model/AccountStatisticsTest.php -tests/Model/AdditionalDenialReasonTest.php -tests/Model/AddressTest.php -tests/Model/AnswerCallbackTest.php -tests/Model/AsyncLookupRequestTest.php -tests/Model/BlockedWebhookTest.php -tests/Model/BridgeCompleteCallbackTest.php -tests/Model/BridgeTargetCompleteCallbackTest.php -tests/Model/BrtcErrorResponseTest.php -tests/Model/BrtcErrorSourceTest.php -tests/Model/BrtcErrorTest.php -tests/Model/BrtcLinkTest.php -tests/Model/BusinessEntityTypeEnumTest.php -tests/Model/BusinessRegistrationTypeEnumTest.php -tests/Model/CallDirectionEnumTest.php -tests/Model/CallRecordingMetadataTest.php -tests/Model/CallStateEnumTest.php -tests/Model/CallStateTest.php -tests/Model/CallTranscriptionDetectedLanguageEnumTest.php -tests/Model/CallTranscriptionMetadataTest.php -tests/Model/CallTranscriptionResponseTest.php -tests/Model/CallTranscriptionTest.php -tests/Model/CallTranscriptionTrackEnumTest.php -tests/Model/CallbackMethodEnumTest.php -tests/Model/CallbackTest.php -tests/Model/CardWidthEnumTest.php -tests/Model/CodeRequestTest.php -tests/Model/CompletedLookupStatusEnumTest.php -tests/Model/ConferenceCompletedCallbackTest.php -tests/Model/ConferenceCreatedCallbackTest.php -tests/Model/ConferenceMemberExitCallbackTest.php -tests/Model/ConferenceMemberJoinCallbackTest.php -tests/Model/ConferenceMemberTest.php -tests/Model/ConferenceRecordingAvailableCallbackTest.php -tests/Model/ConferenceRecordingMetadataTest.php -tests/Model/ConferenceRedirectCallbackTest.php -tests/Model/ConferenceStateEnumTest.php -tests/Model/ConferenceTest.php -tests/Model/ContactTest.php -tests/Model/CreateAsyncBulkLookupResponseDataTest.php -tests/Model/CreateAsyncBulkLookupResponseTest.php -tests/Model/CreateCallResponseTest.php -tests/Model/CreateCallTest.php -tests/Model/CreateEndpointRequestBaseTest.php -tests/Model/CreateEndpointResponseDataTest.php -tests/Model/CreateEndpointResponseTest.php -tests/Model/CreateMessageRequestErrorTest.php -tests/Model/CreateMultiChannelMessageResponseTest.php -tests/Model/CreateSyncLookupResponseDataTest.php -tests/Model/CreateSyncLookupResponseTest.php -tests/Model/CreateWebRtcConnectionRequestTest.php -tests/Model/DeactivationEventEnumTest.php -tests/Model/DeviceStatusEnumTest.php -tests/Model/DeviceTest.php -tests/Model/DisconnectCallbackTest.php -tests/Model/DiversionTest.php -tests/Model/DtmfCallbackTest.php -tests/Model/EndpointDirectionEnumTest.php -tests/Model/EndpointEventTest.php -tests/Model/EndpointEventTypeEnumTest.php -tests/Model/EndpointResponseTest.php -tests/Model/EndpointStatusEnumTest.php -tests/Model/EndpointTest.php -tests/Model/EndpointTypeEnumTest.php -tests/Model/EndpointsTest.php -tests/Model/ErrorObjectTest.php -tests/Model/ErrorSourceTest.php -tests/Model/FailureWebhookTest.php -tests/Model/FieldErrorTest.php -tests/Model/FileFormatEnumTest.php -tests/Model/GatherCallbackTest.php -tests/Model/GetAsyncBulkLookupResponseDataTest.php -tests/Model/GetAsyncBulkLookupResponseTest.php -tests/Model/InProgressLookupStatusEnumTest.php -tests/Model/InboundCallbackMessageTest.php -tests/Model/InboundCallbackTest.php -tests/Model/InboundCallbackTypeEnumTest.php -tests/Model/InitiateCallbackTest.php -tests/Model/LatestMessageDeliveryStatusEnumTest.php -tests/Model/LineTypeEnumTest.php -tests/Model/LinkSchemaTest.php -tests/Model/LinkTest.php -tests/Model/LinksObjectTest.php -tests/Model/ListEndpointsResponseTest.php -tests/Model/ListMessageDirectionEnumTest.php -tests/Model/ListMessageItemTest.php -tests/Model/LookupErrorResponseTest.php -tests/Model/LookupErrorSchemaMetaTest.php -tests/Model/LookupErrorSchemaTest.php -tests/Model/LookupResultTest.php -tests/Model/MachineDetectionCompleteCallbackTest.php -tests/Model/MachineDetectionConfigurationTest.php -tests/Model/MachineDetectionModeEnumTest.php -tests/Model/MachineDetectionResultTest.php -tests/Model/MediaTest.php -tests/Model/MessageDirectionEnumTest.php -tests/Model/MessageRequestTest.php -tests/Model/MessageStatusEnumTest.php -tests/Model/MessageTest.php -tests/Model/MessageTypeEnumTest.php -tests/Model/MessagesListTest.php -tests/Model/MessagingCodeResponseTest.php -tests/Model/MessagingRequestErrorTest.php -tests/Model/MfaForbiddenRequestErrorTest.php -tests/Model/MfaRequestErrorTest.php -tests/Model/MfaUnauthorizedRequestErrorTest.php -tests/Model/MmsMessageContentFileTest.php -tests/Model/MmsMessageContentTest.php -tests/Model/MultiChannelActionCalendarEventTest.php -tests/Model/MultiChannelActionTest.php -tests/Model/MultiChannelChannelListMMSObjectTest.php -tests/Model/MultiChannelChannelListMMSResponseObjectTest.php -tests/Model/MultiChannelChannelListObjectBaseTest.php -tests/Model/MultiChannelChannelListOwnerObjectTest.php -tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php -tests/Model/MultiChannelChannelListRBMObjectTest.php -tests/Model/MultiChannelChannelListRBMResponseObjectTest.php -tests/Model/MultiChannelChannelListRequestObjectTest.php -tests/Model/MultiChannelChannelListResponseObjectTest.php -tests/Model/MultiChannelChannelListSMSObjectTest.php -tests/Model/MultiChannelChannelListSMSResponseObjectTest.php -tests/Model/MultiChannelErrorTest.php -tests/Model/MultiChannelMessageChannelEnumTest.php -tests/Model/MultiChannelMessageContentTest.php -tests/Model/MultiChannelMessageRequestTest.php -tests/Model/MultiChannelMessageResponseDataTest.php -tests/Model/OptInWorkflowTest.php -tests/Model/PageInfoTest.php -tests/Model/PageTest.php -tests/Model/PriorityEnumTest.php -tests/Model/ProductTypeEnumTest.php -tests/Model/RbmActionBaseTest.php -tests/Model/RbmActionDialTest.php -tests/Model/RbmActionOpenUrlTest.php -tests/Model/RbmActionTypeEnumTest.php -tests/Model/RbmActionViewLocationTest.php -tests/Model/RbmCardContentMediaTest.php -tests/Model/RbmCardContentTest.php -tests/Model/RbmLocationResponseTest.php -tests/Model/RbmMediaHeightEnumTest.php -tests/Model/RbmMessageCarouselCardTest.php -tests/Model/RbmMessageContentFileTest.php -tests/Model/RbmMessageContentRichCardTest.php -tests/Model/RbmMessageContentTextTest.php -tests/Model/RbmMessageMediaTest.php -tests/Model/RbmOpenUrlEnumTest.php -tests/Model/RbmStandaloneCardTest.php -tests/Model/RbmSuggestionResponseTest.php -tests/Model/RbmWebViewEnumTest.php -tests/Model/RecordingAvailableCallbackTest.php -tests/Model/RecordingCompleteCallbackTest.php -tests/Model/RecordingStateEnumTest.php -tests/Model/RecordingTranscriptionClipTest.php -tests/Model/RecordingTranscriptionMetadataTest.php -tests/Model/RecordingTranscriptionsTest.php -tests/Model/RedirectCallbackTest.php -tests/Model/RedirectMethodEnumTest.php -tests/Model/SipConnectionMetadataTest.php -tests/Model/SipCredentialsTest.php -tests/Model/SmsMessageContentTest.php -tests/Model/StandaloneCardOrientationEnumTest.php -tests/Model/StatusCallbackMessageTest.php -tests/Model/StatusCallbackTest.php -tests/Model/StatusCallbackTypeEnumTest.php -tests/Model/StirShakenTest.php -tests/Model/SyncLookupRequestTest.php -tests/Model/TelephoneNumberTest.php -tests/Model/TfvBasicAuthenticationTest.php -tests/Model/TfvCallbackStatusEnumTest.php -tests/Model/TfvErrorTest.php -tests/Model/TfvStatusEnumTest.php -tests/Model/TfvStatusTest.php -tests/Model/TfvSubmissionInfoTest.php -tests/Model/TfvSubmissionWrapperTest.php -tests/Model/ThumbnailAlignmentEnumTest.php -tests/Model/TranscribeRecordingTest.php -tests/Model/TranscriptionAvailableCallbackTest.php -tests/Model/TranscriptionTest.php -tests/Model/TransferAnswerCallbackTest.php -tests/Model/TransferCompleteCallbackTest.php -tests/Model/TransferDisconnectCallbackTest.php -tests/Model/UpdateCallRecordingTest.php -tests/Model/UpdateCallTest.php -tests/Model/UpdateConferenceMemberTest.php -tests/Model/UpdateConferenceTest.php -tests/Model/VerificationDenialWebhookTest.php -tests/Model/VerificationRequestTest.php -tests/Model/VerificationUpdateRequestTest.php -tests/Model/VerificationWebhookTest.php -tests/Model/VerifyCodeRequestTest.php -tests/Model/VerifyCodeResponseTest.php -tests/Model/VoiceApiErrorTest.php -tests/Model/VoiceCodeResponseTest.php -tests/Model/WebhookSubscriptionBasicAuthenticationTest.php -tests/Model/WebhookSubscriptionErrorTest.php -tests/Model/WebhookSubscriptionRequestSchemaTest.php -tests/Model/WebhookSubscriptionTest.php -tests/Model/WebhookSubscriptionTypeEnumTest.php -tests/Model/WebhookSubscriptionsListBodyTest.php diff --git a/README.md b/README.md index 23e02463..48dd5de1 100644 --- a/README.md +++ b/README.md @@ -50,22 +50,22 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\CallsApi( +$apiInstance = new Bandwidth\Api\CallsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $account_id = 9900000; // string | Your Bandwidth Account ID. -$create_call = new \OpenAPI\Client\Model\CreateCall(); // \OpenAPI\Client\Model\CreateCall | JSON object containing information to create an outbound call +$create_call = new \Bandwidth\Model\CreateCall(); // \Bandwidth\Model\CreateCall | JSON object containing information to create an outbound call try { $result = $apiInstance->createCall($account_id, $create_call); diff --git a/composer.json b/composer.json index d3029390..4e0a6c97 100644 --- a/composer.json +++ b/composer.json @@ -32,10 +32,10 @@ "phpunit/phpunit": "^9.0" }, "autoload": { - "psr-4": { "OpenAPI\\Client\\" : "src/" } + "psr-4": { "Bandwidth\\" : "src/" } }, "autoload-dev": { - "psr-4": { "OpenAPI\\Client\\Test\\" : "tests/" } + "psr-4": { "Bandwidth\\Test\\" : "tests/" } }, "scripts": { "test": [ diff --git a/docs/Api/CallsApi.md b/docs/Api/CallsApi.md index 148c1343..b96b9fe6 100644 --- a/docs/Api/CallsApi.md +++ b/docs/Api/CallsApi.md @@ -1,4 +1,4 @@ -# OpenAPI\Client\CallsApi +# Bandwidth\CallsApi All URIs are relative to http://localhost, except if the operation defines another base path. @@ -14,7 +14,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth ## `createCall()` ```php -createCall($account_id, $create_call): \OpenAPI\Client\Model\CreateCallResponse +createCall($account_id, $create_call): \Bandwidth\Model\CreateCallResponse ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -30,22 +30,22 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\CallsApi( +$apiInstance = new Bandwidth\Api\CallsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $account_id = 9900000; // string | Your Bandwidth Account ID. -$create_call = new \OpenAPI\Client\Model\CreateCall(); // \OpenAPI\Client\Model\CreateCall | JSON object containing information to create an outbound call +$create_call = new \Bandwidth\Model\CreateCall(); // \Bandwidth\Model\CreateCall | JSON object containing information to create an outbound call $hostIndex = 0; $variables = [ @@ -64,13 +64,13 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | -| **create_call** | [**\OpenAPI\Client\Model\CreateCall**](../Model/CreateCall.md)| JSON object containing information to create an outbound call | | +| **create_call** | [**\Bandwidth\Model\CreateCall**](../Model/CreateCall.md)| JSON object containing information to create an outbound call | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | ### Return type -[**\OpenAPI\Client\Model\CreateCallResponse**](../Model/CreateCallResponse.md) +[**\Bandwidth\Model\CreateCallResponse**](../Model/CreateCallResponse.md) ### Authorization @@ -88,7 +88,7 @@ try { ## `getCallState()` ```php -getCallState($account_id, $call_id): \OpenAPI\Client\Model\CallState +getCallState($account_id, $call_id): \Bandwidth\Model\CallState ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -104,15 +104,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\CallsApi( +$apiInstance = new Bandwidth\Api\CallsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -144,7 +144,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\CallState**](../Model/CallState.md) +[**\Bandwidth\Model\CallState**](../Model/CallState.md) ### Authorization @@ -162,7 +162,7 @@ try { ## `listCalls()` ```php -listCalls($account_id, $to, $from, $min_start_time, $max_start_time, $disconnect_cause, $page_size, $page_token): \OpenAPI\Client\Model\CallState[] +listCalls($account_id, $to, $from, $min_start_time, $max_start_time, $disconnect_cause, $page_size, $page_token): \Bandwidth\Model\CallState[] ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -178,15 +178,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\CallsApi( +$apiInstance = new Bandwidth\Api\CallsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -230,7 +230,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\CallState[]**](../Model/CallState.md) +[**\Bandwidth\Model\CallState[]**](../Model/CallState.md) ### Authorization @@ -264,15 +264,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\CallsApi( +$apiInstance = new Bandwidth\Api\CallsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -280,7 +280,7 @@ $apiInstance = new OpenAPI\Client\Api\CallsApi( ); $account_id = 9900000; // string | Your Bandwidth Account ID. $call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. -$update_call = new \OpenAPI\Client\Model\UpdateCall(); // \OpenAPI\Client\Model\UpdateCall | JSON object containing information to redirect an existing call to a new BXML document +$update_call = new \Bandwidth\Model\UpdateCall(); // \Bandwidth\Model\UpdateCall | JSON object containing information to redirect an existing call to a new BXML document $hostIndex = 0; $variables = [ @@ -299,7 +299,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | | **call_id** | **string**| Programmable Voice API Call ID. | | -| **update_call** | [**\OpenAPI\Client\Model\UpdateCall**](../Model/UpdateCall.md)| JSON object containing information to redirect an existing call to a new BXML document | | +| **update_call** | [**\Bandwidth\Model\UpdateCall**](../Model/UpdateCall.md)| JSON object containing information to redirect an existing call to a new BXML document | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | @@ -339,15 +339,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\CallsApi( +$apiInstance = new Bandwidth\Api\CallsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), diff --git a/docs/Api/ConferencesApi.md b/docs/Api/ConferencesApi.md index 5394fe7d..1d182bdd 100644 --- a/docs/Api/ConferencesApi.md +++ b/docs/Api/ConferencesApi.md @@ -1,4 +1,4 @@ -# OpenAPI\Client\ConferencesApi +# Bandwidth\ConferencesApi All URIs are relative to http://localhost, except if the operation defines another base path. @@ -34,15 +34,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\ConferencesApi( +$apiInstance = new Bandwidth\Api\ConferencesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -94,7 +94,7 @@ try { ## `getConference()` ```php -getConference($account_id, $conference_id): \OpenAPI\Client\Model\Conference +getConference($account_id, $conference_id): \Bandwidth\Model\Conference ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -110,15 +110,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\ConferencesApi( +$apiInstance = new Bandwidth\Api\ConferencesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -150,7 +150,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\Conference**](../Model/Conference.md) +[**\Bandwidth\Model\Conference**](../Model/Conference.md) ### Authorization @@ -168,7 +168,7 @@ try { ## `getConferenceMember()` ```php -getConferenceMember($account_id, $conference_id, $member_id): \OpenAPI\Client\Model\ConferenceMember +getConferenceMember($account_id, $conference_id, $member_id): \Bandwidth\Model\ConferenceMember ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -184,15 +184,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\ConferencesApi( +$apiInstance = new Bandwidth\Api\ConferencesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -226,7 +226,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\ConferenceMember**](../Model/ConferenceMember.md) +[**\Bandwidth\Model\ConferenceMember**](../Model/ConferenceMember.md) ### Authorization @@ -244,7 +244,7 @@ try { ## `getConferenceRecording()` ```php -getConferenceRecording($account_id, $conference_id, $recording_id): \OpenAPI\Client\Model\ConferenceRecordingMetadata +getConferenceRecording($account_id, $conference_id, $recording_id): \Bandwidth\Model\ConferenceRecordingMetadata ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -260,15 +260,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\ConferencesApi( +$apiInstance = new Bandwidth\Api\ConferencesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -302,7 +302,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\ConferenceRecordingMetadata**](../Model/ConferenceRecordingMetadata.md) +[**\Bandwidth\Model\ConferenceRecordingMetadata**](../Model/ConferenceRecordingMetadata.md) ### Authorization @@ -320,7 +320,7 @@ try { ## `listConferenceRecordings()` ```php -listConferenceRecordings($account_id, $conference_id): \OpenAPI\Client\Model\ConferenceRecordingMetadata[] +listConferenceRecordings($account_id, $conference_id): \Bandwidth\Model\ConferenceRecordingMetadata[] ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -336,15 +336,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\ConferencesApi( +$apiInstance = new Bandwidth\Api\ConferencesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -376,7 +376,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\ConferenceRecordingMetadata[]**](../Model/ConferenceRecordingMetadata.md) +[**\Bandwidth\Model\ConferenceRecordingMetadata[]**](../Model/ConferenceRecordingMetadata.md) ### Authorization @@ -394,7 +394,7 @@ try { ## `listConferences()` ```php -listConferences($account_id, $name, $min_created_time, $max_created_time, $page_size, $page_token): \OpenAPI\Client\Model\Conference[] +listConferences($account_id, $name, $min_created_time, $max_created_time, $page_size, $page_token): \Bandwidth\Model\Conference[] ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -410,15 +410,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\ConferencesApi( +$apiInstance = new Bandwidth\Api\ConferencesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -458,7 +458,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\Conference[]**](../Model/Conference.md) +[**\Bandwidth\Model\Conference[]**](../Model/Conference.md) ### Authorization @@ -492,15 +492,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\ConferencesApi( +$apiInstance = new Bandwidth\Api\ConferencesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -508,7 +508,7 @@ $apiInstance = new OpenAPI\Client\Api\ConferencesApi( ); $account_id = 9900000; // string | Your Bandwidth Account ID. $conference_id = conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9; // string | Programmable Voice API Conference ID. -$update_conference = new \OpenAPI\Client\Model\UpdateConference(); // \OpenAPI\Client\Model\UpdateConference +$update_conference = new \Bandwidth\Model\UpdateConference(); // \Bandwidth\Model\UpdateConference $hostIndex = 0; $variables = [ @@ -527,7 +527,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | | **conference_id** | **string**| Programmable Voice API Conference ID. | | -| **update_conference** | [**\OpenAPI\Client\Model\UpdateConference**](../Model/UpdateConference.md)| | | +| **update_conference** | [**\Bandwidth\Model\UpdateConference**](../Model/UpdateConference.md)| | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | @@ -567,15 +567,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\ConferencesApi( +$apiInstance = new Bandwidth\Api\ConferencesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -645,15 +645,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\ConferencesApi( +$apiInstance = new Bandwidth\Api\ConferencesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -662,7 +662,7 @@ $apiInstance = new OpenAPI\Client\Api\ConferencesApi( $account_id = 9900000; // string | Your Bandwidth Account ID. $conference_id = conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9; // string | Programmable Voice API Conference ID. $member_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Conference Member ID. -$update_conference_member = new \OpenAPI\Client\Model\UpdateConferenceMember(); // \OpenAPI\Client\Model\UpdateConferenceMember +$update_conference_member = new \Bandwidth\Model\UpdateConferenceMember(); // \Bandwidth\Model\UpdateConferenceMember $hostIndex = 0; $variables = [ @@ -682,7 +682,7 @@ try { | **account_id** | **string**| Your Bandwidth Account ID. | | | **conference_id** | **string**| Programmable Voice API Conference ID. | | | **member_id** | **string**| Programmable Voice API Conference Member ID. | | -| **update_conference_member** | [**\OpenAPI\Client\Model\UpdateConferenceMember**](../Model/UpdateConferenceMember.md)| | | +| **update_conference_member** | [**\Bandwidth\Model\UpdateConferenceMember**](../Model/UpdateConferenceMember.md)| | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | diff --git a/docs/Api/EndpointsApi.md b/docs/Api/EndpointsApi.md index e32306a8..fe416f95 100644 --- a/docs/Api/EndpointsApi.md +++ b/docs/Api/EndpointsApi.md @@ -1,4 +1,4 @@ -# OpenAPI\Client\EndpointsApi +# Bandwidth\EndpointsApi All URIs are relative to http://localhost, except if the operation defines another base path. @@ -14,7 +14,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth ## `createEndpoint()` ```php -createEndpoint($account_id, $body): \OpenAPI\Client\Model\CreateEndpointResponse +createEndpoint($account_id, $body): \Bandwidth\Model\CreateEndpointResponse ``` ### URI(s): - https://api.bandwidth.com/v2 Production @@ -30,22 +30,22 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\EndpointsApi( +$apiInstance = new Bandwidth\Api\EndpointsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $account_id = 9900000; // string | Your Bandwidth Account ID. -$body = new \OpenAPI\Client\Model\CreateWebRtcConnectionRequest(); // \OpenAPI\Client\Model\CreateWebRtcConnectionRequest +$body = new \Bandwidth\Model\CreateWebRtcConnectionRequest(); // \Bandwidth\Model\CreateWebRtcConnectionRequest $hostIndex = 0; $variables = [ @@ -64,13 +64,13 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | -| **body** | **\OpenAPI\Client\Model\CreateWebRtcConnectionRequest**| | | +| **body** | **\Bandwidth\Model\CreateWebRtcConnectionRequest**| | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | ### Return type -[**\OpenAPI\Client\Model\CreateEndpointResponse**](../Model/CreateEndpointResponse.md) +[**\Bandwidth\Model\CreateEndpointResponse**](../Model/CreateEndpointResponse.md) ### Authorization @@ -104,15 +104,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\EndpointsApi( +$apiInstance = new Bandwidth\Api\EndpointsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -161,7 +161,7 @@ void (empty response body) ## `getEndpoint()` ```php -getEndpoint($account_id, $endpoint_id): \OpenAPI\Client\Model\EndpointResponse +getEndpoint($account_id, $endpoint_id): \Bandwidth\Model\EndpointResponse ``` ### URI(s): - https://api.bandwidth.com/v2 Production @@ -177,15 +177,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\EndpointsApi( +$apiInstance = new Bandwidth\Api\EndpointsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -217,7 +217,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\EndpointResponse**](../Model/EndpointResponse.md) +[**\Bandwidth\Model\EndpointResponse**](../Model/EndpointResponse.md) ### Authorization @@ -235,7 +235,7 @@ try { ## `listEndpoints()` ```php -listEndpoints($account_id, $type, $status, $after_cursor, $limit): \OpenAPI\Client\Model\ListEndpointsResponse +listEndpoints($account_id, $type, $status, $after_cursor, $limit): \Bandwidth\Model\ListEndpointsResponse ``` ### URI(s): - https://api.bandwidth.com/v2 Production @@ -251,23 +251,23 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\EndpointsApi( +$apiInstance = new Bandwidth\Api\EndpointsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $account_id = 9900000; // string | Your Bandwidth Account ID. -$type = new \OpenAPI\Client\Model\\OpenAPI\Client\Model\EndpointTypeEnum(); // \OpenAPI\Client\Model\EndpointTypeEnum | The type of endpoint. -$status = new \OpenAPI\Client\Model\\OpenAPI\Client\Model\EndpointStatusEnum(); // \OpenAPI\Client\Model\EndpointStatusEnum | The status of the endpoint. +$type = new \Bandwidth\Model\\Bandwidth\Model\EndpointTypeEnum(); // \Bandwidth\Model\EndpointTypeEnum | The type of endpoint. +$status = new \Bandwidth\Model\\Bandwidth\Model\EndpointStatusEnum(); // \Bandwidth\Model\EndpointStatusEnum | The status of the endpoint. $after_cursor = TWF5IHRoZSBmb3JjZSBiZSB3aXRoIHlvdQ==; // string | The cursor to use for pagination. This is the value of the `next` link in the previous response. $limit = 2; // int | The maximum number of endpoints to return in the response. @@ -288,8 +288,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | -| **type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](../Model/.md)| The type of endpoint. | [optional] | -| **status** | [**\OpenAPI\Client\Model\EndpointStatusEnum**](../Model/.md)| The status of the endpoint. | [optional] | +| **type** | [**\Bandwidth\Model\EndpointTypeEnum**](../Model/.md)| The type of endpoint. | [optional] | +| **status** | [**\Bandwidth\Model\EndpointStatusEnum**](../Model/.md)| The status of the endpoint. | [optional] | | **after_cursor** | **string**| The cursor to use for pagination. This is the value of the `next` link in the previous response. | [optional] | | **limit** | **int**| The maximum number of endpoints to return in the response. | [optional] [default to 100] | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | @@ -297,7 +297,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\ListEndpointsResponse**](../Model/ListEndpointsResponse.md) +[**\Bandwidth\Model\ListEndpointsResponse**](../Model/ListEndpointsResponse.md) ### Authorization @@ -331,15 +331,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\EndpointsApi( +$apiInstance = new Bandwidth\Api\EndpointsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), diff --git a/docs/Api/MFAApi.md b/docs/Api/MFAApi.md index aa08eeaf..1f4196c3 100644 --- a/docs/Api/MFAApi.md +++ b/docs/Api/MFAApi.md @@ -1,4 +1,4 @@ -# OpenAPI\Client\MFAApi +# Bandwidth\MFAApi All URIs are relative to http://localhost, except if the operation defines another base path. @@ -12,7 +12,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth ## `generateMessagingCode()` ```php -generateMessagingCode($account_id, $code_request): \OpenAPI\Client\Model\MessagingCodeResponse +generateMessagingCode($account_id, $code_request): \Bandwidth\Model\MessagingCodeResponse ``` ### URI(s): - https://mfa.bandwidth.com/api/v1 Production @@ -28,22 +28,22 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\MFAApi( +$apiInstance = new Bandwidth\Api\MFAApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $account_id = 9900000; // string | Your Bandwidth Account ID. -$code_request = new \OpenAPI\Client\Model\CodeRequest(); // \OpenAPI\Client\Model\CodeRequest | MFA code request body. +$code_request = new \Bandwidth\Model\CodeRequest(); // \Bandwidth\Model\CodeRequest | MFA code request body. $hostIndex = 0; $variables = [ @@ -62,13 +62,13 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | -| **code_request** | [**\OpenAPI\Client\Model\CodeRequest**](../Model/CodeRequest.md)| MFA code request body. | | +| **code_request** | [**\Bandwidth\Model\CodeRequest**](../Model/CodeRequest.md)| MFA code request body. | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | ### Return type -[**\OpenAPI\Client\Model\MessagingCodeResponse**](../Model/MessagingCodeResponse.md) +[**\Bandwidth\Model\MessagingCodeResponse**](../Model/MessagingCodeResponse.md) ### Authorization @@ -86,7 +86,7 @@ try { ## `generateVoiceCode()` ```php -generateVoiceCode($account_id, $code_request): \OpenAPI\Client\Model\VoiceCodeResponse +generateVoiceCode($account_id, $code_request): \Bandwidth\Model\VoiceCodeResponse ``` ### URI(s): - https://mfa.bandwidth.com/api/v1 Production @@ -102,22 +102,22 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\MFAApi( +$apiInstance = new Bandwidth\Api\MFAApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $account_id = 9900000; // string | Your Bandwidth Account ID. -$code_request = new \OpenAPI\Client\Model\CodeRequest(); // \OpenAPI\Client\Model\CodeRequest | MFA code request body. +$code_request = new \Bandwidth\Model\CodeRequest(); // \Bandwidth\Model\CodeRequest | MFA code request body. $hostIndex = 0; $variables = [ @@ -136,13 +136,13 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | -| **code_request** | [**\OpenAPI\Client\Model\CodeRequest**](../Model/CodeRequest.md)| MFA code request body. | | +| **code_request** | [**\Bandwidth\Model\CodeRequest**](../Model/CodeRequest.md)| MFA code request body. | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | ### Return type -[**\OpenAPI\Client\Model\VoiceCodeResponse**](../Model/VoiceCodeResponse.md) +[**\Bandwidth\Model\VoiceCodeResponse**](../Model/VoiceCodeResponse.md) ### Authorization @@ -160,7 +160,7 @@ try { ## `verifyCode()` ```php -verifyCode($account_id, $verify_code_request): \OpenAPI\Client\Model\VerifyCodeResponse +verifyCode($account_id, $verify_code_request): \Bandwidth\Model\VerifyCodeResponse ``` ### URI(s): - https://mfa.bandwidth.com/api/v1 Production @@ -176,22 +176,22 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\MFAApi( +$apiInstance = new Bandwidth\Api\MFAApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $account_id = 9900000; // string | Your Bandwidth Account ID. -$verify_code_request = new \OpenAPI\Client\Model\VerifyCodeRequest(); // \OpenAPI\Client\Model\VerifyCodeRequest | MFA code verify request body. +$verify_code_request = new \Bandwidth\Model\VerifyCodeRequest(); // \Bandwidth\Model\VerifyCodeRequest | MFA code verify request body. $hostIndex = 0; $variables = [ @@ -210,13 +210,13 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | -| **verify_code_request** | [**\OpenAPI\Client\Model\VerifyCodeRequest**](../Model/VerifyCodeRequest.md)| MFA code verify request body. | | +| **verify_code_request** | [**\Bandwidth\Model\VerifyCodeRequest**](../Model/VerifyCodeRequest.md)| MFA code verify request body. | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | ### Return type -[**\OpenAPI\Client\Model\VerifyCodeResponse**](../Model/VerifyCodeResponse.md) +[**\Bandwidth\Model\VerifyCodeResponse**](../Model/VerifyCodeResponse.md) ### Authorization diff --git a/docs/Api/MediaApi.md b/docs/Api/MediaApi.md index 9506c4dd..55d92a6b 100644 --- a/docs/Api/MediaApi.md +++ b/docs/Api/MediaApi.md @@ -1,4 +1,4 @@ -# OpenAPI\Client\MediaApi +# Bandwidth\MediaApi All URIs are relative to http://localhost, except if the operation defines another base path. @@ -29,15 +29,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\MediaApi( +$apiInstance = new Bandwidth\Api\MediaApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -102,15 +102,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\MediaApi( +$apiInstance = new Bandwidth\Api\MediaApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -160,7 +160,7 @@ try { ## `listMedia()` ```php -listMedia($account_id, $continuation_token): \OpenAPI\Client\Model\Media[] +listMedia($account_id, $continuation_token): \Bandwidth\Model\Media[] ``` ### URI(s): - https://messaging.bandwidth.com/api/v2 Production @@ -176,15 +176,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\MediaApi( +$apiInstance = new Bandwidth\Api\MediaApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -216,7 +216,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\Media[]**](../Model/Media.md) +[**\Bandwidth\Model\Media[]**](../Model/Media.md) ### Authorization @@ -250,15 +250,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\MediaApi( +$apiInstance = new Bandwidth\Api\MediaApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), diff --git a/docs/Api/MessagesApi.md b/docs/Api/MessagesApi.md index 6e69cad2..6638e374 100644 --- a/docs/Api/MessagesApi.md +++ b/docs/Api/MessagesApi.md @@ -1,4 +1,4 @@ -# OpenAPI\Client\MessagesApi +# Bandwidth\MessagesApi All URIs are relative to http://localhost, except if the operation defines another base path. @@ -11,7 +11,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth ## `createMessage()` ```php -createMessage($account_id, $message_request): \OpenAPI\Client\Model\Message +createMessage($account_id, $message_request): \Bandwidth\Model\Message ``` ### URI(s): - https://messaging.bandwidth.com/api/v2 Production @@ -27,22 +27,22 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\MessagesApi( +$apiInstance = new Bandwidth\Api\MessagesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $account_id = 9900000; // string | Your Bandwidth Account ID. -$message_request = new \OpenAPI\Client\Model\MessageRequest(); // \OpenAPI\Client\Model\MessageRequest +$message_request = new \Bandwidth\Model\MessageRequest(); // \Bandwidth\Model\MessageRequest $hostIndex = 0; $variables = [ @@ -61,13 +61,13 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | -| **message_request** | [**\OpenAPI\Client\Model\MessageRequest**](../Model/MessageRequest.md)| | | +| **message_request** | [**\Bandwidth\Model\MessageRequest**](../Model/MessageRequest.md)| | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | ### Return type -[**\OpenAPI\Client\Model\Message**](../Model/Message.md) +[**\Bandwidth\Model\Message**](../Model/Message.md) ### Authorization @@ -85,7 +85,7 @@ try { ## `listMessages()` ```php -listMessages($account_id, $message_id, $source_tn, $destination_tn, $message_status, $message_direction, $carrier_name, $message_type, $error_code, $from_date_time, $to_date_time, $campaign_id, $from_bw_latency, $bw_queued, $product, $location, $carrier_queued, $from_carrier_latency, $calling_number_country_a3, $called_number_country_a3, $from_segment_count, $to_segment_count, $from_message_size, $to_message_size, $sort, $page_token, $limit, $limit_total_count): \OpenAPI\Client\Model\MessagesList +listMessages($account_id, $message_id, $source_tn, $destination_tn, $message_status, $message_direction, $carrier_name, $message_type, $error_code, $from_date_time, $to_date_time, $campaign_id, $from_bw_latency, $bw_queued, $product, $location, $carrier_queued, $from_carrier_latency, $calling_number_country_a3, $called_number_country_a3, $from_segment_count, $to_segment_count, $from_message_size, $to_message_size, $sort, $page_token, $limit, $limit_total_count): \Bandwidth\Model\MessagesList ``` ### URI(s): - https://messaging.bandwidth.com/api/v2 Production @@ -101,15 +101,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\MessagesApi( +$apiInstance = new Bandwidth\Api\MessagesApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -119,17 +119,17 @@ $account_id = 9900000; // string | Your Bandwidth Account ID. $message_id = 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6; // string | The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. $source_tn = %2B15554443333; // string | The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). $destination_tn = %2B15554443333; // string | The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). -$message_status = new \OpenAPI\Client\Model\\OpenAPI\Client\Model\MessageStatusEnum(); // \OpenAPI\Client\Model\MessageStatusEnum | The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. -$message_direction = new \OpenAPI\Client\Model\\OpenAPI\Client\Model\ListMessageDirectionEnum(); // \OpenAPI\Client\Model\ListMessageDirectionEnum | The direction of the message. One of INBOUND OUTBOUND. +$message_status = new \Bandwidth\Model\\Bandwidth\Model\MessageStatusEnum(); // \Bandwidth\Model\MessageStatusEnum | The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. +$message_direction = new \Bandwidth\Model\\Bandwidth\Model\ListMessageDirectionEnum(); // \Bandwidth\Model\ListMessageDirectionEnum | The direction of the message. One of INBOUND OUTBOUND. $carrier_name = Verizon; // string | The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). -$message_type = new \OpenAPI\Client\Model\\OpenAPI\Client\Model\MessageTypeEnum(); // \OpenAPI\Client\Model\MessageTypeEnum | The type of message. Either sms or mms. +$message_type = new \Bandwidth\Model\\Bandwidth\Model\MessageTypeEnum(); // \Bandwidth\Model\MessageTypeEnum | The type of message. Either sms or mms. $error_code = 9902; // int | The error code of the message. $from_date_time = 2022-09-14T18:20:16.000Z; // string | The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. $to_date_time = 2022-09-14T18:20:16.000Z; // string | The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. $campaign_id = CJEUMDK; // string | The campaign ID of the message. $from_bw_latency = 5; // int | The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. $bw_queued = true; // bool | A boolean value indicating whether the message is queued in the Bandwidth network. -$product = P2P; // \OpenAPI\Client\Model\ProductTypeEnum | Messaging product associated with the message. +$product = P2P; // \Bandwidth\Model\ProductTypeEnum | Messaging product associated with the message. $location = 123ABC; // string | Location Id associated with the message. $carrier_queued = true; // bool | A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. $from_carrier_latency = 50; // int | The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. @@ -164,17 +164,17 @@ try { | **message_id** | **string**| The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. | [optional] | | **source_tn** | **string**| The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). | [optional] | | **destination_tn** | **string**| The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). | [optional] | -| **message_status** | [**\OpenAPI\Client\Model\MessageStatusEnum**](../Model/.md)| The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. | [optional] | -| **message_direction** | [**\OpenAPI\Client\Model\ListMessageDirectionEnum**](../Model/.md)| The direction of the message. One of INBOUND OUTBOUND. | [optional] | +| **message_status** | [**\Bandwidth\Model\MessageStatusEnum**](../Model/.md)| The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. | [optional] | +| **message_direction** | [**\Bandwidth\Model\ListMessageDirectionEnum**](../Model/.md)| The direction of the message. One of INBOUND OUTBOUND. | [optional] | | **carrier_name** | **string**| The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). | [optional] | -| **message_type** | [**\OpenAPI\Client\Model\MessageTypeEnum**](../Model/.md)| The type of message. Either sms or mms. | [optional] | +| **message_type** | [**\Bandwidth\Model\MessageTypeEnum**](../Model/.md)| The type of message. Either sms or mms. | [optional] | | **error_code** | **int**| The error code of the message. | [optional] | | **from_date_time** | **string**| The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | [optional] | | **to_date_time** | **string**| The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. | [optional] | | **campaign_id** | **string**| The campaign ID of the message. | [optional] | | **from_bw_latency** | **int**| The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. | [optional] | | **bw_queued** | **bool**| A boolean value indicating whether the message is queued in the Bandwidth network. | [optional] | -| **product** | [**\OpenAPI\Client\Model\ProductTypeEnum**](../Model/.md)| Messaging product associated with the message. | [optional] | +| **product** | [**\Bandwidth\Model\ProductTypeEnum**](../Model/.md)| Messaging product associated with the message. | [optional] | | **location** | **string**| Location Id associated with the message. | [optional] | | **carrier_queued** | **bool**| A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] | | **from_carrier_latency** | **int**| The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. | [optional] | @@ -193,7 +193,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\MessagesList**](../Model/MessagesList.md) +[**\Bandwidth\Model\MessagesList**](../Model/MessagesList.md) ### Authorization diff --git a/docs/Api/MultiChannelApi.md b/docs/Api/MultiChannelApi.md index 631e46c0..bfeebb54 100644 --- a/docs/Api/MultiChannelApi.md +++ b/docs/Api/MultiChannelApi.md @@ -1,4 +1,4 @@ -# OpenAPI\Client\MultiChannelApi +# Bandwidth\MultiChannelApi All URIs are relative to http://localhost, except if the operation defines another base path. @@ -10,7 +10,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth ## `createMultiChannelMessage()` ```php -createMultiChannelMessage($account_id, $multi_channel_message_request): \OpenAPI\Client\Model\CreateMultiChannelMessageResponse +createMultiChannelMessage($account_id, $multi_channel_message_request): \Bandwidth\Model\CreateMultiChannelMessageResponse ``` ### URI(s): - https://messaging.bandwidth.com/api/v2 Production @@ -26,22 +26,22 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\MultiChannelApi( +$apiInstance = new Bandwidth\Api\MultiChannelApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $account_id = 9900000; // string | Your Bandwidth Account ID. -$multi_channel_message_request = new \OpenAPI\Client\Model\MultiChannelMessageRequest(); // \OpenAPI\Client\Model\MultiChannelMessageRequest +$multi_channel_message_request = new \Bandwidth\Model\MultiChannelMessageRequest(); // \Bandwidth\Model\MultiChannelMessageRequest $hostIndex = 0; $variables = [ @@ -60,13 +60,13 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | -| **multi_channel_message_request** | [**\OpenAPI\Client\Model\MultiChannelMessageRequest**](../Model/MultiChannelMessageRequest.md)| | | +| **multi_channel_message_request** | [**\Bandwidth\Model\MultiChannelMessageRequest**](../Model/MultiChannelMessageRequest.md)| | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | ### Return type -[**\OpenAPI\Client\Model\CreateMultiChannelMessageResponse**](../Model/CreateMultiChannelMessageResponse.md) +[**\Bandwidth\Model\CreateMultiChannelMessageResponse**](../Model/CreateMultiChannelMessageResponse.md) ### Authorization diff --git a/docs/Api/PhoneNumberLookupApi.md b/docs/Api/PhoneNumberLookupApi.md index d33675ce..5eb609c1 100644 --- a/docs/Api/PhoneNumberLookupApi.md +++ b/docs/Api/PhoneNumberLookupApi.md @@ -1,4 +1,4 @@ -# OpenAPI\Client\PhoneNumberLookupApi +# Bandwidth\PhoneNumberLookupApi All URIs are relative to http://localhost, except if the operation defines another base path. @@ -12,7 +12,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth ## `createAsyncBulkLookup()` ```php -createAsyncBulkLookup($account_id, $async_lookup_request): \OpenAPI\Client\Model\CreateAsyncBulkLookupResponse +createAsyncBulkLookup($account_id, $async_lookup_request): \Bandwidth\Model\CreateAsyncBulkLookupResponse ``` ### URI(s): - https://api.bandwidth.com/v2 Production @@ -28,22 +28,22 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\PhoneNumberLookupApi( +$apiInstance = new Bandwidth\Api\PhoneNumberLookupApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $account_id = 9900000; // string -$async_lookup_request = new \OpenAPI\Client\Model\AsyncLookupRequest(); // \OpenAPI\Client\Model\AsyncLookupRequest | Asynchronous bulk phone number lookup request. +$async_lookup_request = new \Bandwidth\Model\AsyncLookupRequest(); // \Bandwidth\Model\AsyncLookupRequest | Asynchronous bulk phone number lookup request. $hostIndex = 0; $variables = [ @@ -62,13 +62,13 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| | | -| **async_lookup_request** | [**\OpenAPI\Client\Model\AsyncLookupRequest**](../Model/AsyncLookupRequest.md)| Asynchronous bulk phone number lookup request. | | +| **async_lookup_request** | [**\Bandwidth\Model\AsyncLookupRequest**](../Model/AsyncLookupRequest.md)| Asynchronous bulk phone number lookup request. | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | ### Return type -[**\OpenAPI\Client\Model\CreateAsyncBulkLookupResponse**](../Model/CreateAsyncBulkLookupResponse.md) +[**\Bandwidth\Model\CreateAsyncBulkLookupResponse**](../Model/CreateAsyncBulkLookupResponse.md) ### Authorization @@ -86,7 +86,7 @@ try { ## `createSyncLookup()` ```php -createSyncLookup($account_id, $sync_lookup_request): \OpenAPI\Client\Model\CreateSyncLookupResponse +createSyncLookup($account_id, $sync_lookup_request): \Bandwidth\Model\CreateSyncLookupResponse ``` ### URI(s): - https://api.bandwidth.com/v2 Production @@ -102,22 +102,22 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\PhoneNumberLookupApi( +$apiInstance = new Bandwidth\Api\PhoneNumberLookupApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $account_id = 9900000; // string -$sync_lookup_request = new \OpenAPI\Client\Model\SyncLookupRequest(); // \OpenAPI\Client\Model\SyncLookupRequest | Synchronous phone number lookup request. +$sync_lookup_request = new \Bandwidth\Model\SyncLookupRequest(); // \Bandwidth\Model\SyncLookupRequest | Synchronous phone number lookup request. $hostIndex = 0; $variables = [ @@ -136,13 +136,13 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| | | -| **sync_lookup_request** | [**\OpenAPI\Client\Model\SyncLookupRequest**](../Model/SyncLookupRequest.md)| Synchronous phone number lookup request. | | +| **sync_lookup_request** | [**\Bandwidth\Model\SyncLookupRequest**](../Model/SyncLookupRequest.md)| Synchronous phone number lookup request. | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | ### Return type -[**\OpenAPI\Client\Model\CreateSyncLookupResponse**](../Model/CreateSyncLookupResponse.md) +[**\Bandwidth\Model\CreateSyncLookupResponse**](../Model/CreateSyncLookupResponse.md) ### Authorization @@ -160,7 +160,7 @@ try { ## `getAsyncBulkLookup()` ```php -getAsyncBulkLookup($account_id, $request_id): \OpenAPI\Client\Model\GetAsyncBulkLookupResponse +getAsyncBulkLookup($account_id, $request_id): \Bandwidth\Model\GetAsyncBulkLookupResponse ``` ### URI(s): - https://api.bandwidth.com/v2 Production @@ -176,15 +176,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\PhoneNumberLookupApi( +$apiInstance = new Bandwidth\Api\PhoneNumberLookupApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -216,7 +216,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\GetAsyncBulkLookupResponse**](../Model/GetAsyncBulkLookupResponse.md) +[**\Bandwidth\Model\GetAsyncBulkLookupResponse**](../Model/GetAsyncBulkLookupResponse.md) ### Authorization diff --git a/docs/Api/RecordingsApi.md b/docs/Api/RecordingsApi.md index 08270ce2..7a6a4b4f 100644 --- a/docs/Api/RecordingsApi.md +++ b/docs/Api/RecordingsApi.md @@ -1,4 +1,4 @@ -# OpenAPI\Client\RecordingsApi +# Bandwidth\RecordingsApi All URIs are relative to http://localhost, except if the operation defines another base path. @@ -35,15 +35,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\RecordingsApi( +$apiInstance = new Bandwidth\Api\RecordingsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -110,15 +110,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\RecordingsApi( +$apiInstance = new Bandwidth\Api\RecordingsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -185,15 +185,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\RecordingsApi( +$apiInstance = new Bandwidth\Api\RecordingsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -260,15 +260,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\RecordingsApi( +$apiInstance = new Bandwidth\Api\RecordingsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -320,7 +320,7 @@ try { ## `getCallRecording()` ```php -getCallRecording($account_id, $call_id, $recording_id): \OpenAPI\Client\Model\CallRecordingMetadata +getCallRecording($account_id, $call_id, $recording_id): \Bandwidth\Model\CallRecordingMetadata ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -336,15 +336,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\RecordingsApi( +$apiInstance = new Bandwidth\Api\RecordingsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -378,7 +378,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\CallRecordingMetadata**](../Model/CallRecordingMetadata.md) +[**\Bandwidth\Model\CallRecordingMetadata**](../Model/CallRecordingMetadata.md) ### Authorization @@ -396,7 +396,7 @@ try { ## `getRecordingTranscription()` ```php -getRecordingTranscription($account_id, $call_id, $recording_id): \OpenAPI\Client\Model\RecordingTranscriptions +getRecordingTranscription($account_id, $call_id, $recording_id): \Bandwidth\Model\RecordingTranscriptions ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -412,15 +412,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\RecordingsApi( +$apiInstance = new Bandwidth\Api\RecordingsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -454,7 +454,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\RecordingTranscriptions**](../Model/RecordingTranscriptions.md) +[**\Bandwidth\Model\RecordingTranscriptions**](../Model/RecordingTranscriptions.md) ### Authorization @@ -472,7 +472,7 @@ try { ## `listAccountCallRecordings()` ```php -listAccountCallRecordings($account_id, $to, $from, $min_start_time, $max_start_time): \OpenAPI\Client\Model\CallRecordingMetadata[] +listAccountCallRecordings($account_id, $to, $from, $min_start_time, $max_start_time): \Bandwidth\Model\CallRecordingMetadata[] ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -488,15 +488,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\RecordingsApi( +$apiInstance = new Bandwidth\Api\RecordingsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -534,7 +534,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\CallRecordingMetadata[]**](../Model/CallRecordingMetadata.md) +[**\Bandwidth\Model\CallRecordingMetadata[]**](../Model/CallRecordingMetadata.md) ### Authorization @@ -552,7 +552,7 @@ try { ## `listCallRecordings()` ```php -listCallRecordings($account_id, $call_id): \OpenAPI\Client\Model\CallRecordingMetadata[] +listCallRecordings($account_id, $call_id): \Bandwidth\Model\CallRecordingMetadata[] ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -568,15 +568,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\RecordingsApi( +$apiInstance = new Bandwidth\Api\RecordingsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -608,7 +608,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\CallRecordingMetadata[]**](../Model/CallRecordingMetadata.md) +[**\Bandwidth\Model\CallRecordingMetadata[]**](../Model/CallRecordingMetadata.md) ### Authorization @@ -642,15 +642,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\RecordingsApi( +$apiInstance = new Bandwidth\Api\RecordingsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -659,7 +659,7 @@ $apiInstance = new OpenAPI\Client\Api\RecordingsApi( $account_id = 9900000; // string | Your Bandwidth Account ID. $call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. $recording_id = r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Recording ID. -$transcribe_recording = new \OpenAPI\Client\Model\TranscribeRecording(); // \OpenAPI\Client\Model\TranscribeRecording +$transcribe_recording = new \Bandwidth\Model\TranscribeRecording(); // \Bandwidth\Model\TranscribeRecording $hostIndex = 0; $variables = [ @@ -679,7 +679,7 @@ try { | **account_id** | **string**| Your Bandwidth Account ID. | | | **call_id** | **string**| Programmable Voice API Call ID. | | | **recording_id** | **string**| Programmable Voice API Recording ID. | | -| **transcribe_recording** | [**\OpenAPI\Client\Model\TranscribeRecording**](../Model/TranscribeRecording.md)| | | +| **transcribe_recording** | [**\Bandwidth\Model\TranscribeRecording**](../Model/TranscribeRecording.md)| | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | @@ -719,15 +719,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\RecordingsApi( +$apiInstance = new Bandwidth\Api\RecordingsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -735,7 +735,7 @@ $apiInstance = new OpenAPI\Client\Api\RecordingsApi( ); $account_id = 9900000; // string | Your Bandwidth Account ID. $call_id = c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85; // string | Programmable Voice API Call ID. -$update_call_recording = new \OpenAPI\Client\Model\UpdateCallRecording(); // \OpenAPI\Client\Model\UpdateCallRecording +$update_call_recording = new \Bandwidth\Model\UpdateCallRecording(); // \Bandwidth\Model\UpdateCallRecording $hostIndex = 0; $variables = [ @@ -754,7 +754,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | | **call_id** | **string**| Programmable Voice API Call ID. | | -| **update_call_recording** | [**\OpenAPI\Client\Model\UpdateCallRecording**](../Model/UpdateCallRecording.md)| | | +| **update_call_recording** | [**\Bandwidth\Model\UpdateCallRecording**](../Model/UpdateCallRecording.md)| | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | diff --git a/docs/Api/StatisticsApi.md b/docs/Api/StatisticsApi.md index c70133f5..91dab58d 100644 --- a/docs/Api/StatisticsApi.md +++ b/docs/Api/StatisticsApi.md @@ -1,4 +1,4 @@ -# OpenAPI\Client\StatisticsApi +# Bandwidth\StatisticsApi All URIs are relative to http://localhost, except if the operation defines another base path. @@ -10,7 +10,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth ## `getStatistics()` ```php -getStatistics($account_id): \OpenAPI\Client\Model\AccountStatistics +getStatistics($account_id): \Bandwidth\Model\AccountStatistics ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -26,15 +26,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\StatisticsApi( +$apiInstance = new Bandwidth\Api\StatisticsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -64,7 +64,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\AccountStatistics**](../Model/AccountStatistics.md) +[**\Bandwidth\Model\AccountStatistics**](../Model/AccountStatistics.md) ### Authorization diff --git a/docs/Api/TollFreeVerificationApi.md b/docs/Api/TollFreeVerificationApi.md index 868b3853..c4ca7f6e 100644 --- a/docs/Api/TollFreeVerificationApi.md +++ b/docs/Api/TollFreeVerificationApi.md @@ -1,4 +1,4 @@ -# OpenAPI\Client\TollFreeVerificationApi +# Bandwidth\TollFreeVerificationApi All URIs are relative to http://localhost, except if the operation defines another base path. @@ -18,7 +18,7 @@ All URIs are relative to http://localhost, except if the operation defines anoth ## `createWebhookSubscription()` ```php -createWebhookSubscription($account_id, $webhook_subscription_request_schema): \OpenAPI\Client\Model\WebhookSubscription +createWebhookSubscription($account_id, $webhook_subscription_request_schema): \Bandwidth\Model\WebhookSubscription ``` ### URI(s): - https://api.bandwidth.com/api/v2 Production @@ -34,22 +34,22 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( +$apiInstance = new Bandwidth\Api\TollFreeVerificationApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $account_id = 9900000; // string | Your Bandwidth Account ID. -$webhook_subscription_request_schema = new \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema(); // \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema | Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. +$webhook_subscription_request_schema = new \Bandwidth\Model\WebhookSubscriptionRequestSchema(); // \Bandwidth\Model\WebhookSubscriptionRequestSchema | Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. $hostIndex = 0; $variables = [ @@ -68,13 +68,13 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | -| **webhook_subscription_request_schema** | [**\OpenAPI\Client\Model\WebhookSubscriptionRequestSchema**](../Model/WebhookSubscriptionRequestSchema.md)| Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. | | +| **webhook_subscription_request_schema** | [**\Bandwidth\Model\WebhookSubscriptionRequestSchema**](../Model/WebhookSubscriptionRequestSchema.md)| Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | ### Return type -[**\OpenAPI\Client\Model\WebhookSubscription**](../Model/WebhookSubscription.md) +[**\Bandwidth\Model\WebhookSubscription**](../Model/WebhookSubscription.md) ### Authorization @@ -108,15 +108,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( +$apiInstance = new Bandwidth\Api\TollFreeVerificationApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -181,15 +181,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( +$apiInstance = new Bandwidth\Api\TollFreeVerificationApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -238,7 +238,7 @@ void (empty response body) ## `getTollFreeVerificationStatus()` ```php -getTollFreeVerificationStatus($account_id, $phone_number): \OpenAPI\Client\Model\TfvStatus +getTollFreeVerificationStatus($account_id, $phone_number): \Bandwidth\Model\TfvStatus ``` ### URI(s): - https://api.bandwidth.com/api/v2 Production @@ -254,15 +254,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( +$apiInstance = new Bandwidth\Api\TollFreeVerificationApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -294,7 +294,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\TfvStatus**](../Model/TfvStatus.md) +[**\Bandwidth\Model\TfvStatus**](../Model/TfvStatus.md) ### Authorization @@ -328,15 +328,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( +$apiInstance = new Bandwidth\Api\TollFreeVerificationApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -381,7 +381,7 @@ This endpoint does not need any parameter. ## `listWebhookSubscriptions()` ```php -listWebhookSubscriptions($account_id): \OpenAPI\Client\Model\WebhookSubscriptionsListBody +listWebhookSubscriptions($account_id): \Bandwidth\Model\WebhookSubscriptionsListBody ``` ### URI(s): - https://api.bandwidth.com/api/v2 Production @@ -397,15 +397,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( +$apiInstance = new Bandwidth\Api\TollFreeVerificationApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -435,7 +435,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\WebhookSubscriptionsListBody**](../Model/WebhookSubscriptionsListBody.md) +[**\Bandwidth\Model\WebhookSubscriptionsListBody**](../Model/WebhookSubscriptionsListBody.md) ### Authorization @@ -469,22 +469,22 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( +$apiInstance = new Bandwidth\Api\TollFreeVerificationApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $account_id = 9900000; // string | Your Bandwidth Account ID. -$verification_request = new \OpenAPI\Client\Model\VerificationRequest(); // \OpenAPI\Client\Model\VerificationRequest | Request for verification of a toll-free phone number. +$verification_request = new \Bandwidth\Model\VerificationRequest(); // \Bandwidth\Model\VerificationRequest | Request for verification of a toll-free phone number. $hostIndex = 0; $variables = [ @@ -502,7 +502,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | -| **verification_request** | [**\OpenAPI\Client\Model\VerificationRequest**](../Model/VerificationRequest.md)| Request for verification of a toll-free phone number. | | +| **verification_request** | [**\Bandwidth\Model\VerificationRequest**](../Model/VerificationRequest.md)| Request for verification of a toll-free phone number. | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | @@ -542,15 +542,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( +$apiInstance = new Bandwidth\Api\TollFreeVerificationApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -558,7 +558,7 @@ $apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( ); $account_id = 9900000; // string | Your Bandwidth Account ID. $phone_number = +18885555555; // string | Valid Toll-Free telephone number in E.164 format. -$tfv_submission_wrapper = new \OpenAPI\Client\Model\TfvSubmissionWrapper(); // \OpenAPI\Client\Model\TfvSubmissionWrapper | Update a request for verification of a toll-free phone number. +$tfv_submission_wrapper = new \Bandwidth\Model\TfvSubmissionWrapper(); // \Bandwidth\Model\TfvSubmissionWrapper | Update a request for verification of a toll-free phone number. $hostIndex = 0; $variables = [ @@ -577,7 +577,7 @@ try { | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | | **phone_number** | **string**| Valid Toll-Free telephone number in E.164 format. | | -| **tfv_submission_wrapper** | [**\OpenAPI\Client\Model\TfvSubmissionWrapper**](../Model/TfvSubmissionWrapper.md)| Update a request for verification of a toll-free phone number. | | +| **tfv_submission_wrapper** | [**\Bandwidth\Model\TfvSubmissionWrapper**](../Model/TfvSubmissionWrapper.md)| Update a request for verification of a toll-free phone number. | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | @@ -601,7 +601,7 @@ void (empty response body) ## `updateWebhookSubscription()` ```php -updateWebhookSubscription($account_id, $id, $webhook_subscription_request_schema): \OpenAPI\Client\Model\WebhookSubscription +updateWebhookSubscription($account_id, $id, $webhook_subscription_request_schema): \Bandwidth\Model\WebhookSubscription ``` ### URI(s): - https://api.bandwidth.com/api/v2 Production @@ -617,15 +617,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( +$apiInstance = new Bandwidth\Api\TollFreeVerificationApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -633,7 +633,7 @@ $apiInstance = new OpenAPI\Client\Api\TollFreeVerificationApi( ); $account_id = 9900000; // string | Your Bandwidth Account ID. $id = 7bt57JcsVYJrN9K1OcV1Nu; // string | Webhook subscription ID -$webhook_subscription_request_schema = new \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema(); // \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema | Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. +$webhook_subscription_request_schema = new \Bandwidth\Model\WebhookSubscriptionRequestSchema(); // \Bandwidth\Model\WebhookSubscriptionRequestSchema | Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. $hostIndex = 0; $variables = [ @@ -653,13 +653,13 @@ try { | ------------- | ------------- | ------------- | ------------- | | **account_id** | **string**| Your Bandwidth Account ID. | | | **id** | **string**| Webhook subscription ID | | -| **webhook_subscription_request_schema** | [**\OpenAPI\Client\Model\WebhookSubscriptionRequestSchema**](../Model/WebhookSubscriptionRequestSchema.md)| Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. | | +| **webhook_subscription_request_schema** | [**\Bandwidth\Model\WebhookSubscriptionRequestSchema**](../Model/WebhookSubscriptionRequestSchema.md)| Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | ### Return type -[**\OpenAPI\Client\Model\WebhookSubscription**](../Model/WebhookSubscription.md) +[**\Bandwidth\Model\WebhookSubscription**](../Model/WebhookSubscription.md) ### Authorization diff --git a/docs/Api/TranscriptionsApi.md b/docs/Api/TranscriptionsApi.md index c7059769..0f102389 100644 --- a/docs/Api/TranscriptionsApi.md +++ b/docs/Api/TranscriptionsApi.md @@ -1,4 +1,4 @@ -# OpenAPI\Client\TranscriptionsApi +# Bandwidth\TranscriptionsApi All URIs are relative to http://localhost, except if the operation defines another base path. @@ -28,15 +28,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\TranscriptionsApi( +$apiInstance = new Bandwidth\Api\TranscriptionsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -87,7 +87,7 @@ void (empty response body) ## `getRealTimeTranscription()` ```php -getRealTimeTranscription($account_id, $call_id, $transcription_id): \OpenAPI\Client\Model\CallTranscriptionResponse +getRealTimeTranscription($account_id, $call_id, $transcription_id): \Bandwidth\Model\CallTranscriptionResponse ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -103,15 +103,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\TranscriptionsApi( +$apiInstance = new Bandwidth\Api\TranscriptionsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -145,7 +145,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\CallTranscriptionResponse**](../Model/CallTranscriptionResponse.md) +[**\Bandwidth\Model\CallTranscriptionResponse**](../Model/CallTranscriptionResponse.md) ### Authorization @@ -163,7 +163,7 @@ try { ## `listRealTimeTranscriptions()` ```php -listRealTimeTranscriptions($account_id, $call_id): \OpenAPI\Client\Model\CallTranscriptionMetadata[] +listRealTimeTranscriptions($account_id, $call_id): \Bandwidth\Model\CallTranscriptionMetadata[] ``` ### URI(s): - https://voice.bandwidth.com/api/v2 Production @@ -179,15 +179,15 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure HTTP basic authorization: Basic -$config = OpenAPI\Client\Configuration::getDefaultConfiguration() +$config = Bandwidth\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); // Configure OAuth2 access token for authorization: OAuth2 -$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); +$config = Bandwidth\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); -$apiInstance = new OpenAPI\Client\Api\TranscriptionsApi( +$apiInstance = new Bandwidth\Api\TranscriptionsApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), @@ -219,7 +219,7 @@ try { ### Return type -[**\OpenAPI\Client\Model\CallTranscriptionMetadata[]**](../Model/CallTranscriptionMetadata.md) +[**\Bandwidth\Model\CallTranscriptionMetadata[]**](../Model/CallTranscriptionMetadata.md) ### Authorization diff --git a/docs/Model/AnswerCallback.md b/docs/Model/AnswerCallback.md index 198aa6a8..3c3bd606 100644 --- a/docs/Model/AnswerCallback.md +++ b/docs/Model/AnswerCallback.md @@ -10,13 +10,13 @@ Name | Type | Description | Notes **application_id** | **string** | The id of the application associated with the call. | [optional] **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] **start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] **answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] **tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] -**machine_detection_result** | [**\OpenAPI\Client\Model\MachineDetectionResult**](MachineDetectionResult.md) | | [optional] +**machine_detection_result** | [**\Bandwidth\Model\MachineDetectionResult**](MachineDetectionResult.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BlockedWebhook.md b/docs/Model/BlockedWebhook.md index ec505175..8e2a9a0c 100644 --- a/docs/Model/BlockedWebhook.md +++ b/docs/Model/BlockedWebhook.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_id** | **string** | User's account ID. | [optional] **phone_number** | **string** | Toll-free telephone number in E.164 format. | [optional] -**status** | [**\OpenAPI\Client\Model\TfvCallbackStatusEnum**](TfvCallbackStatusEnum.md) | | [optional] +**status** | [**\Bandwidth\Model\TfvCallbackStatusEnum**](TfvCallbackStatusEnum.md) | | [optional] **internal_ticket_number** | **string** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. | [optional] **blocked** | **bool** | Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] **blocked_reason** | **string** | The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] diff --git a/docs/Model/BridgeCompleteCallback.md b/docs/Model/BridgeCompleteCallback.md index e77f2a3e..107200de 100644 --- a/docs/Model/BridgeCompleteCallback.md +++ b/docs/Model/BridgeCompleteCallback.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **application_id** | **string** | The id of the application associated with the call. | [optional] **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] diff --git a/docs/Model/BridgeTargetCompleteCallback.md b/docs/Model/BridgeTargetCompleteCallback.md index 8304212c..53f2e21c 100644 --- a/docs/Model/BridgeTargetCompleteCallback.md +++ b/docs/Model/BridgeTargetCompleteCallback.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **application_id** | **string** | The id of the application associated with the call. | [optional] **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] diff --git a/docs/Model/BrtcError.md b/docs/Model/BrtcError.md index df33268d..8d504bec 100644 --- a/docs/Model/BrtcError.md +++ b/docs/Model/BrtcError.md @@ -8,6 +8,6 @@ Name | Type | Description | Notes **type** | **string** | The type of error. | **description** | **string** | A description of the error. | **code** | **string** | A code that uniquely identifies the error. | [optional] -**source** | [**\OpenAPI\Client\Model\BrtcErrorSource**](BrtcErrorSource.md) | | [optional] +**source** | [**\Bandwidth\Model\BrtcErrorSource**](BrtcErrorSource.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BrtcErrorResponse.md b/docs/Model/BrtcErrorResponse.md index dd25ae45..3e8a9cdd 100644 --- a/docs/Model/BrtcErrorResponse.md +++ b/docs/Model/BrtcErrorResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**\OpenAPI\Client\Model\BrtcLink[]**](BrtcLink.md) | | +**links** | [**\Bandwidth\Model\BrtcLink[]**](BrtcLink.md) | | **data** | **object** | | -**errors** | [**\OpenAPI\Client\Model\BrtcError[]**](BrtcError.md) | | +**errors** | [**\Bandwidth\Model\BrtcError[]**](BrtcError.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CallRecordingMetadata.md b/docs/Model/CallRecordingMetadata.md index a2880395..96da31f1 100644 --- a/docs/Model/CallRecordingMetadata.md +++ b/docs/Model/CallRecordingMetadata.md @@ -14,14 +14,14 @@ Name | Type | Description | Notes **transfer_caller_id** | **string** | The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] **transfer_to** | **string** | The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] **duration** | **string** | The duration of the recording in ISO-8601 format | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **channels** | **int** | Always `1` for conference recordings; multi-channel recordings are not supported on conferences. | [optional] **start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] **end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] -**file_format** | [**\OpenAPI\Client\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] +**file_format** | [**\Bandwidth\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] **status** | **string** | The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] **media_url** | **string** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional] -**transcription** | [**\OpenAPI\Client\Model\RecordingTranscriptionMetadata**](RecordingTranscriptionMetadata.md) | | [optional] +**transcription** | [**\Bandwidth\Model\RecordingTranscriptionMetadata**](RecordingTranscriptionMetadata.md) | | [optional] **recording_name** | **string** | A name to identify this recording. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CallState.md b/docs/Model/CallState.md index 4d81c635..9dc69238 100644 --- a/docs/Model/CallState.md +++ b/docs/Model/CallState.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **parent_call_id** | **string** | The A-leg call id, set only if this call is the B-leg of a [`<Transfer>`](/docs/voice/bxml/transfer). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555), or if the call was to a SIP URI, the SIP URI. | [optional] **from** | **string** | The phone number that made the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **state** | **string** | The current state of the call. Current possible values are `queued`, `initiated`, `answered` and `disconnected`. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] **stir_shaken** | **array** | For inbound calls, the Bandwidth STIR/SHAKEN implementation will verify the information provided in the inbound invite request `Identity` header. The verification status is stored in the call state `stirShaken` property as follows. | Property | Description | |:------------------|:------------| | verstat | (optional) The verification status indicating whether the verification was successful or not. Possible values are `TN-Validation-Passed` or `TN-Validation-Failed`. | | attestationIndicator | (optional) The attestation level verified by Bandwidth. Possible values are `A` (full), `B` (partial) or `C` (gateway). | | originatingId | (optional) A unique origination identifier. | Note that these are common properties but that the `stirShaken` object is free form and can contain other key-value pairs. More information: [Understanding STIR/SHAKEN](https://www.bandwidth.com/regulations/stir-shaken). | [optional] **identity** | **string** | The value of the `Identity` header from the inbound invite request. Only present for inbound calls and if the account is configured to forward this header. | [optional] diff --git a/docs/Model/CallTranscription.md b/docs/Model/CallTranscription.md index 43c87383..b9ad214b 100644 --- a/docs/Model/CallTranscription.md +++ b/docs/Model/CallTranscription.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**detected_language** | [**\OpenAPI\Client\Model\CallTranscriptionDetectedLanguageEnum**](CallTranscriptionDetectedLanguageEnum.md) | | [optional] -**track** | [**\OpenAPI\Client\Model\CallTranscriptionTrackEnum**](CallTranscriptionTrackEnum.md) | | [optional] +**detected_language** | [**\Bandwidth\Model\CallTranscriptionDetectedLanguageEnum**](CallTranscriptionDetectedLanguageEnum.md) | | [optional] +**track** | [**\Bandwidth\Model\CallTranscriptionTrackEnum**](CallTranscriptionTrackEnum.md) | | [optional] **transcript** | **string** | The transcription itself. | [optional] **confidence** | **float** | How confident the transcription engine was in transcribing the associated audio (from `0` to `1`). | [optional] diff --git a/docs/Model/CallTranscriptionResponse.md b/docs/Model/CallTranscriptionResponse.md index d3112be9..cf2d9f58 100644 --- a/docs/Model/CallTranscriptionResponse.md +++ b/docs/Model/CallTranscriptionResponse.md @@ -7,6 +7,6 @@ Name | Type | Description | Notes **account_id** | **string** | The user account associated with the call. | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **transcription_id** | **string** | The programmable voice API transcription ID. | [optional] -**tracks** | [**\OpenAPI\Client\Model\CallTranscription[]**](CallTranscription.md) | | [optional] +**tracks** | [**\Bandwidth\Model\CallTranscription[]**](CallTranscription.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Callback.md b/docs/Model/Callback.md index dba3107e..88dc7cf2 100644 --- a/docs/Model/Callback.md +++ b/docs/Model/Callback.md @@ -6,10 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **time** | **\DateTime** | | **event_time** | **\DateTime** | Represents the time at which the message was read, for `message-read` callbacks. | [optional] -**type** | [**\OpenAPI\Client\Model\InboundCallbackTypeEnum**](InboundCallbackTypeEnum.md) | | +**type** | [**\Bandwidth\Model\InboundCallbackTypeEnum**](InboundCallbackTypeEnum.md) | | **to** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | **description** | **string** | A detailed description of the event described by the callback. | -**message** | [**\OpenAPI\Client\Model\InboundCallbackMessage**](InboundCallbackMessage.md) | | +**message** | [**\Bandwidth\Model\InboundCallbackMessage**](InboundCallbackMessage.md) | | **error_code** | **int** | Optional error code, applicable only when type is `message-failed`. | [optional] **carrier_name** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] diff --git a/docs/Model/Conference.md b/docs/Model/Conference.md index 06b1aff7..6a35def1 100644 --- a/docs/Model/Conference.md +++ b/docs/Model/Conference.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **created_time** | **\DateTime** | The time the conference was initiated, in ISO 8601 format. | [optional] **completed_time** | **\DateTime** | The time the conference was terminated, in ISO 8601 format. | [optional] **conference_event_url** | **string** | The URL to send the conference-related events. | [optional] -**conference_event_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**conference_event_method** | [**\Bandwidth\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] **tag** | **string** | The custom string attached to the conference that will be sent with callbacks. | [optional] -**active_members** | [**\OpenAPI\Client\Model\ConferenceMember[]**](ConferenceMember.md) | A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences). | [optional] +**active_members** | [**\Bandwidth\Model\ConferenceMember[]**](ConferenceMember.md) | A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences). | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ConferenceRecordingAvailableCallback.md b/docs/Model/ConferenceRecordingAvailableCallback.md index 3976ad2e..23a82809 100644 --- a/docs/Model/ConferenceRecordingAvailableCallback.md +++ b/docs/Model/ConferenceRecordingAvailableCallback.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] **end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] **duration** | **string** | The duration of the recording in ISO-8601 format | [optional] -**file_format** | [**\OpenAPI\Client\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] +**file_format** | [**\Bandwidth\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] **media_url** | **string** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional] **tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] **status** | **string** | The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] diff --git a/docs/Model/ConferenceRecordingMetadata.md b/docs/Model/ConferenceRecordingMetadata.md index 14b84d46..257aa518 100644 --- a/docs/Model/ConferenceRecordingMetadata.md +++ b/docs/Model/ConferenceRecordingMetadata.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **channels** | **int** | Always `1` for conference recordings; multi-channel recordings are not supported on conferences. | [optional] **start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] **end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] -**file_format** | [**\OpenAPI\Client\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] +**file_format** | [**\Bandwidth\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] **status** | **string** | The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] **media_url** | **string** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional] **recording_name** | **string** | A name to identify this recording. | [optional] diff --git a/docs/Model/CreateAsyncBulkLookupResponse.md b/docs/Model/CreateAsyncBulkLookupResponse.md index 2460c41f..1f8241e0 100644 --- a/docs/Model/CreateAsyncBulkLookupResponse.md +++ b/docs/Model/CreateAsyncBulkLookupResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**\OpenAPI\Client\Model\LinkSchema[]**](LinkSchema.md) | Links for pagination (if applicable) | [optional] -**data** | [**\OpenAPI\Client\Model\CreateAsyncBulkLookupResponseData**](CreateAsyncBulkLookupResponseData.md) | | [optional] -**errors** | [**\OpenAPI\Client\Model\LookupErrorSchema[]**](LookupErrorSchema.md) | | [optional] +**links** | [**\Bandwidth\Model\LinkSchema[]**](LinkSchema.md) | Links for pagination (if applicable) | [optional] +**data** | [**\Bandwidth\Model\CreateAsyncBulkLookupResponseData**](CreateAsyncBulkLookupResponseData.md) | | [optional] +**errors** | [**\Bandwidth\Model\LookupErrorSchema[]**](LookupErrorSchema.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateAsyncBulkLookupResponseData.md b/docs/Model/CreateAsyncBulkLookupResponseData.md index 6de366b9..257952a2 100644 --- a/docs/Model/CreateAsyncBulkLookupResponseData.md +++ b/docs/Model/CreateAsyncBulkLookupResponseData.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **request_id** | **string** | The phone number lookup request ID from Bandwidth. | [optional] -**status** | [**\OpenAPI\Client\Model\InProgressLookupStatusEnum**](InProgressLookupStatusEnum.md) | | [optional] +**status** | [**\Bandwidth\Model\InProgressLookupStatusEnum**](InProgressLookupStatusEnum.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateCall.md b/docs/Model/CreateCall.md index 60f853e0..08fc238f 100644 --- a/docs/Model/CreateCall.md +++ b/docs/Model/CreateCall.md @@ -11,18 +11,18 @@ Name | Type | Description | Notes **uui** | **string** | A comma-separated list of 'User-To-User' headers to be sent in the INVITE when calling a SIP URI. Each value must end with an 'encoding' parameter as described in <a href='https://tools.ietf.org/html/rfc7433'>RFC 7433</a>. Only 'jwt', 'base64' and 'hex' encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators. | [optional] **application_id** | **string** | The id of the application associated with the `from` number. | **answer_url** | **string** | The full URL to send the <a href='/docs/voice/webhooks/answer'>Answer</a> event to when the called party answers. This endpoint should return the first <a href='/docs/voice/bxml'>BXML document</a> to be executed in the call. Must use `https` if specifying `username` and `password`. | -**answer_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**answer_method** | [**\Bandwidth\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] **username** | **string** | Basic auth username. | [optional] **password** | **string** | Basic auth password. | [optional] **answer_fallback_url** | **string** | A fallback url which, if provided, will be used to retry the `answer` webhook delivery in case `answerUrl` fails to respond Must use `https` if specifying `fallbackUsername` and `fallbackPassword`. | [optional] -**answer_fallback_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**answer_fallback_method** | [**\Bandwidth\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] **fallback_username** | **string** | Basic auth username. | [optional] **fallback_password** | **string** | Basic auth password. | [optional] **disconnect_url** | **string** | The URL to send the <a href='/docs/voice/webhooks/disconnect'>Disconnect</a> event to when the call ends. This event does not expect a BXML response. | [optional] -**disconnect_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**disconnect_method** | [**\Bandwidth\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] **call_timeout** | **float** | The timeout (in seconds) for the callee to answer the call after it starts ringing. If the call does not start ringing within 30s, the call will be cancelled regardless of this value. Can be any numeric value (including decimals) between 1 and 300. | [optional] [default to 30] **callback_timeout** | **float** | This is the timeout (in seconds) to use when delivering webhooks for the call. Can be any numeric value (including decimals) between 1 and 25. | [optional] [default to 15] -**machine_detection** | [**\OpenAPI\Client\Model\MachineDetectionConfiguration**](MachineDetectionConfiguration.md) | | [optional] +**machine_detection** | [**\Bandwidth\Model\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 4096 characters. | [optional] diff --git a/docs/Model/CreateCallResponse.md b/docs/Model/CreateCallResponse.md index b5724fe9..9d8b4654 100644 --- a/docs/Model/CreateCallResponse.md +++ b/docs/Model/CreateCallResponse.md @@ -14,11 +14,11 @@ Name | Type | Description | Notes **call_timeout** | **float** | The timeout (in seconds) for the callee to answer the call after it starts ringing. | [optional] **callback_timeout** | **float** | This is the timeout (in seconds) to use when delivering webhooks for the call. | [optional] **tag** | **string** | Custom tag value. | [optional] -**answer_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | +**answer_method** | [**\Bandwidth\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | **answer_url** | **string** | URL to deliver the `answer` event webhook. | -**answer_fallback_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**answer_fallback_method** | [**\Bandwidth\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] **answer_fallback_url** | **string** | Fallback URL to deliver the `answer` event webhook. | [optional] -**disconnect_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | +**disconnect_method** | [**\Bandwidth\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | **disconnect_url** | **string** | URL to deliver the `disconnect` event webhook. | [optional] **username** | **string** | Basic auth username. | [optional] **password** | **string** | Basic auth password. | [optional] diff --git a/docs/Model/CreateEndpointRequestBase.md b/docs/Model/CreateEndpointRequestBase.md index 699242a5..30f9780a 100644 --- a/docs/Model/CreateEndpointRequestBase.md +++ b/docs/Model/CreateEndpointRequestBase.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | -**direction** | [**\OpenAPI\Client\Model\EndpointDirectionEnum**](EndpointDirectionEnum.md) | | +**type** | [**\Bandwidth\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | +**direction** | [**\Bandwidth\Model\EndpointDirectionEnum**](EndpointDirectionEnum.md) | | **event_callback_url** | **string** | The URL to send event callbacks to. | [optional] **event_fallback_url** | **string** | The URL to send event fallbacks to. | [optional] **tag** | **string** | A tag for the endpoint. | [optional] diff --git a/docs/Model/CreateEndpointResponse.md b/docs/Model/CreateEndpointResponse.md index 0fde440b..59464de7 100644 --- a/docs/Model/CreateEndpointResponse.md +++ b/docs/Model/CreateEndpointResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**\OpenAPI\Client\Model\BrtcLink[]**](BrtcLink.md) | | -**data** | [**\OpenAPI\Client\Model\CreateEndpointResponseData**](CreateEndpointResponseData.md) | | -**errors** | [**\OpenAPI\Client\Model\BrtcError[]**](BrtcError.md) | | +**links** | [**\Bandwidth\Model\BrtcLink[]**](BrtcLink.md) | | +**data** | [**\Bandwidth\Model\CreateEndpointResponseData**](CreateEndpointResponseData.md) | | +**errors** | [**\Bandwidth\Model\BrtcError[]**](BrtcError.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateEndpointResponseData.md b/docs/Model/CreateEndpointResponseData.md index ed7b8be9..37f37451 100644 --- a/docs/Model/CreateEndpointResponseData.md +++ b/docs/Model/CreateEndpointResponseData.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **endpoint_id** | **string** | The unique ID of the endpoint. | -**type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | -**status** | [**\OpenAPI\Client\Model\EndpointStatusEnum**](EndpointStatusEnum.md) | | +**type** | [**\Bandwidth\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | +**status** | [**\Bandwidth\Model\EndpointStatusEnum**](EndpointStatusEnum.md) | | **creation_timestamp** | **\DateTime** | The time the endpoint was created. In ISO-8601 format. | **expiration_timestamp** | **\DateTime** | The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. | **tag** | **string** | A tag for the endpoint. | [optional] -**devices** | [**\OpenAPI\Client\Model\Device[]**](Device.md) | | [optional] +**devices** | [**\Bandwidth\Model\Device[]**](Device.md) | | [optional] **token** | **string** | The json web token specific to the endpoint. Used to authenticate the client with the media gateway. | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateMessageRequestError.md b/docs/Model/CreateMessageRequestError.md index b834941e..f67b8a2d 100644 --- a/docs/Model/CreateMessageRequestError.md +++ b/docs/Model/CreateMessageRequestError.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **string** | | **description** | **string** | | -**field_errors** | [**\OpenAPI\Client\Model\FieldError[]**](FieldError.md) | | [optional] +**field_errors** | [**\Bandwidth\Model\FieldError[]**](FieldError.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateMultiChannelMessageResponse.md b/docs/Model/CreateMultiChannelMessageResponse.md index 5d8e7fbe..cfcee27e 100644 --- a/docs/Model/CreateMultiChannelMessageResponse.md +++ b/docs/Model/CreateMultiChannelMessageResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**\OpenAPI\Client\Model\Link[]**](Link.md) | | [optional] -**data** | [**\OpenAPI\Client\Model\MultiChannelMessageResponseData**](MultiChannelMessageResponseData.md) | | [optional] -**errors** | [**\OpenAPI\Client\Model\ErrorObject[]**](ErrorObject.md) | | [optional] +**links** | [**\Bandwidth\Model\Link[]**](Link.md) | | [optional] +**data** | [**\Bandwidth\Model\MultiChannelMessageResponseData**](MultiChannelMessageResponseData.md) | | [optional] +**errors** | [**\Bandwidth\Model\ErrorObject[]**](ErrorObject.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateSyncLookupResponse.md b/docs/Model/CreateSyncLookupResponse.md index 1515b193..96ec124e 100644 --- a/docs/Model/CreateSyncLookupResponse.md +++ b/docs/Model/CreateSyncLookupResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**\OpenAPI\Client\Model\LinkSchema[]**](LinkSchema.md) | | [optional] -**data** | [**\OpenAPI\Client\Model\CreateSyncLookupResponseData**](CreateSyncLookupResponseData.md) | | [optional] -**errors** | [**\OpenAPI\Client\Model\LookupErrorSchema[]**](LookupErrorSchema.md) | | [optional] +**links** | [**\Bandwidth\Model\LinkSchema[]**](LinkSchema.md) | | [optional] +**data** | [**\Bandwidth\Model\CreateSyncLookupResponseData**](CreateSyncLookupResponseData.md) | | [optional] +**errors** | [**\Bandwidth\Model\LookupErrorSchema[]**](LookupErrorSchema.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateSyncLookupResponseData.md b/docs/Model/CreateSyncLookupResponseData.md index f9e55798..c7be58ff 100644 --- a/docs/Model/CreateSyncLookupResponseData.md +++ b/docs/Model/CreateSyncLookupResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **request_id** | **string** | The phone number lookup request ID from Bandwidth. | [optional] -**status** | [**\OpenAPI\Client\Model\CompletedLookupStatusEnum**](CompletedLookupStatusEnum.md) | | [optional] -**results** | [**\OpenAPI\Client\Model\LookupResult[]**](LookupResult.md) | The carrier information results for the specified telephone numbers. | [optional] +**status** | [**\Bandwidth\Model\CompletedLookupStatusEnum**](CompletedLookupStatusEnum.md) | | [optional] +**results** | [**\Bandwidth\Model\LookupResult[]**](LookupResult.md) | The carrier information results for the specified telephone numbers. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateWebRtcConnectionRequest.md b/docs/Model/CreateWebRtcConnectionRequest.md index 7003b3fe..0394e4f1 100644 --- a/docs/Model/CreateWebRtcConnectionRequest.md +++ b/docs/Model/CreateWebRtcConnectionRequest.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | -**direction** | [**\OpenAPI\Client\Model\EndpointDirectionEnum**](EndpointDirectionEnum.md) | | +**type** | [**\Bandwidth\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | +**direction** | [**\Bandwidth\Model\EndpointDirectionEnum**](EndpointDirectionEnum.md) | | **event_callback_url** | **string** | The URL to send event callbacks to. | [optional] **event_fallback_url** | **string** | The URL to send event fallbacks to. | [optional] **tag** | **string** | A tag for the endpoint. | [optional] diff --git a/docs/Model/Device.md b/docs/Model/Device.md index ee92cf78..48373dd2 100644 --- a/docs/Model/Device.md +++ b/docs/Model/Device.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **device_id** | **string** | The unique ID of the device. | **device_name** | **string** | The name of the device. | [optional] -**status** | [**\OpenAPI\Client\Model\DeviceStatusEnum**](DeviceStatusEnum.md) | | +**status** | [**\Bandwidth\Model\DeviceStatusEnum**](DeviceStatusEnum.md) | | **creation_timestamp** | **\DateTime** | The time the device was created. In ISO-8601 format. | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DisconnectCallback.md b/docs/Model/DisconnectCallback.md index 34fbd3d5..8cf3fc83 100644 --- a/docs/Model/DisconnectCallback.md +++ b/docs/Model/DisconnectCallback.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] **call_id** | **string** | The call id associated with the event. | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] **start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] diff --git a/docs/Model/DtmfCallback.md b/docs/Model/DtmfCallback.md index 4824835a..a01d9d04 100644 --- a/docs/Model/DtmfCallback.md +++ b/docs/Model/DtmfCallback.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] **call_id** | **string** | The call id associated with the event. | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **digit** | **string** | The digit collected in the call. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] diff --git a/docs/Model/Endpoint.md b/docs/Model/Endpoint.md index 2b11f07f..708d4ff8 100644 --- a/docs/Model/Endpoint.md +++ b/docs/Model/Endpoint.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **endpoint_id** | **string** | The unique ID of the endpoint. | -**type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | -**status** | [**\OpenAPI\Client\Model\EndpointStatusEnum**](EndpointStatusEnum.md) | | +**type** | [**\Bandwidth\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | +**status** | [**\Bandwidth\Model\EndpointStatusEnum**](EndpointStatusEnum.md) | | **creation_timestamp** | **\DateTime** | The time the endpoint was created. In ISO-8601 format. | **expiration_timestamp** | **\DateTime** | The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. | **tag** | **string** | A tag for the endpoint. | [optional] -**devices** | [**\OpenAPI\Client\Model\Device[]**](Device.md) | | [optional] +**devices** | [**\Bandwidth\Model\Device[]**](Device.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EndpointEvent.md b/docs/Model/EndpointEvent.md index 4096d40b..efe57fd5 100644 --- a/docs/Model/EndpointEvent.md +++ b/docs/Model/EndpointEvent.md @@ -5,13 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **endpoint_id** | **string** | The unique ID of the endpoint. | -**type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | -**status** | [**\OpenAPI\Client\Model\EndpointStatusEnum**](EndpointStatusEnum.md) | | +**type** | [**\Bandwidth\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | +**status** | [**\Bandwidth\Model\EndpointStatusEnum**](EndpointStatusEnum.md) | | **creation_timestamp** | **\DateTime** | The time the endpoint was created. In ISO-8601 format. | **expiration_timestamp** | **\DateTime** | The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. | **tag** | **string** | A tag for the endpoint. | [optional] **event_time** | **\DateTime** | The time the event occurred. In ISO-8601 format. | -**event_type** | [**\OpenAPI\Client\Model\EndpointEventTypeEnum**](EndpointEventTypeEnum.md) | | -**device** | [**\OpenAPI\Client\Model\Device**](Device.md) | | [optional] +**event_type** | [**\Bandwidth\Model\EndpointEventTypeEnum**](EndpointEventTypeEnum.md) | | +**device** | [**\Bandwidth\Model\Device**](Device.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EndpointResponse.md b/docs/Model/EndpointResponse.md index 7fd26e7f..f0bc49d5 100644 --- a/docs/Model/EndpointResponse.md +++ b/docs/Model/EndpointResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**\OpenAPI\Client\Model\BrtcLink[]**](BrtcLink.md) | | -**data** | [**\OpenAPI\Client\Model\Endpoint**](Endpoint.md) | | -**errors** | [**\OpenAPI\Client\Model\BrtcError[]**](BrtcError.md) | | +**links** | [**\Bandwidth\Model\BrtcLink[]**](BrtcLink.md) | | +**data** | [**\Bandwidth\Model\Endpoint**](Endpoint.md) | | +**errors** | [**\Bandwidth\Model\BrtcError[]**](BrtcError.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Endpoints.md b/docs/Model/Endpoints.md index 2385ab5b..41404461 100644 --- a/docs/Model/Endpoints.md +++ b/docs/Model/Endpoints.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **endpoint_id** | **string** | The unique ID of the endpoint. | -**type** | [**\OpenAPI\Client\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | -**status** | [**\OpenAPI\Client\Model\EndpointStatusEnum**](EndpointStatusEnum.md) | | +**type** | [**\Bandwidth\Model\EndpointTypeEnum**](EndpointTypeEnum.md) | | +**status** | [**\Bandwidth\Model\EndpointStatusEnum**](EndpointStatusEnum.md) | | **creation_timestamp** | **\DateTime** | The time the endpoint was created. In ISO-8601 format. | **expiration_timestamp** | **\DateTime** | The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. | **tag** | **string** | A tag for the endpoint. | [optional] diff --git a/docs/Model/ErrorObject.md b/docs/Model/ErrorObject.md index 5a63ae69..6a2f6ad9 100644 --- a/docs/Model/ErrorObject.md +++ b/docs/Model/ErrorObject.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **string** | A concise summary of the error used for categorization. | **description** | **string** | A detailed explanation of the error. | -**source** | [**\OpenAPI\Client\Model\ErrorSource**](ErrorSource.md) | | +**source** | [**\Bandwidth\Model\ErrorSource**](ErrorSource.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GatherCallback.md b/docs/Model/GatherCallback.md index a8120031..681db30a 100644 --- a/docs/Model/GatherCallback.md +++ b/docs/Model/GatherCallback.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **application_id** | **string** | The id of the application associated with the call. | [optional] **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **digits** | **string** | (optional) The digits, letters, and/or symbols entered by the user. The string is empty if a timeout occurred before any buttons were pressed. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] diff --git a/docs/Model/GetAsyncBulkLookupResponse.md b/docs/Model/GetAsyncBulkLookupResponse.md index 1f361899..d9e45a66 100644 --- a/docs/Model/GetAsyncBulkLookupResponse.md +++ b/docs/Model/GetAsyncBulkLookupResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**\OpenAPI\Client\Model\LinkSchema[]**](LinkSchema.md) | | [optional] -**data** | [**\OpenAPI\Client\Model\GetAsyncBulkLookupResponseData**](GetAsyncBulkLookupResponseData.md) | | [optional] -**errors** | [**\OpenAPI\Client\Model\LookupErrorSchema[]**](LookupErrorSchema.md) | | [optional] +**links** | [**\Bandwidth\Model\LinkSchema[]**](LinkSchema.md) | | [optional] +**data** | [**\Bandwidth\Model\GetAsyncBulkLookupResponseData**](GetAsyncBulkLookupResponseData.md) | | [optional] +**errors** | [**\Bandwidth\Model\LookupErrorSchema[]**](LookupErrorSchema.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/GetAsyncBulkLookupResponseData.md b/docs/Model/GetAsyncBulkLookupResponseData.md index 20e7fbbe..f0a4530f 100644 --- a/docs/Model/GetAsyncBulkLookupResponseData.md +++ b/docs/Model/GetAsyncBulkLookupResponseData.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **request_id** | **string** | The phone number lookup request ID from Bandwidth. | [optional] -**status** | [**\OpenAPI\Client\Model\InProgressLookupStatusEnum**](InProgressLookupStatusEnum.md) | | [optional] -**results** | [**\OpenAPI\Client\Model\LookupResult[]**](LookupResult.md) | The carrier information results for the specified telephone number. | [optional] +**status** | [**\Bandwidth\Model\InProgressLookupStatusEnum**](InProgressLookupStatusEnum.md) | | [optional] +**results** | [**\Bandwidth\Model\LookupResult[]**](LookupResult.md) | The carrier information results for the specified telephone number. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InboundCallback.md b/docs/Model/InboundCallback.md index 59e0d6f0..f3544094 100644 --- a/docs/Model/InboundCallback.md +++ b/docs/Model/InboundCallback.md @@ -5,10 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **time** | **\DateTime** | | -**type** | [**\OpenAPI\Client\Model\InboundCallbackTypeEnum**](InboundCallbackTypeEnum.md) | | +**type** | [**\Bandwidth\Model\InboundCallbackTypeEnum**](InboundCallbackTypeEnum.md) | | **to** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | **description** | **string** | A detailed description of the event described by the callback. | -**message** | [**\OpenAPI\Client\Model\InboundCallbackMessage**](InboundCallbackMessage.md) | | +**message** | [**\Bandwidth\Model\InboundCallbackMessage**](InboundCallbackMessage.md) | | **carrier_name** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InboundCallbackMessage.md b/docs/Model/InboundCallbackMessage.md index a74bbfa7..b96d8bf7 100644 --- a/docs/Model/InboundCallbackMessage.md +++ b/docs/Model/InboundCallbackMessage.md @@ -9,16 +9,16 @@ Name | Type | Description | Notes **application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | **time** | **\DateTime** | | **segment_count** | **int** | The number of segments the user's message is broken into before sending over carrier networks. | -**direction** | [**\OpenAPI\Client\Model\MessageDirectionEnum**](MessageDirectionEnum.md) | | +**direction** | [**\Bandwidth\Model\MessageDirectionEnum**](MessageDirectionEnum.md) | | **to** | **string[]** | The phone number recipients of the message. | **from** | **string** | The Bandwidth phone number or alphanumeric identifier the message was sent from. | **text** | **string** | | [optional] **tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] **media** | **string[]** | Optional media, not applicable for sms | [optional] -**priority** | [**\OpenAPI\Client\Model\PriorityEnum**](PriorityEnum.md) | | [optional] -**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | [optional] -**content** | [**\OpenAPI\Client\Model\MultiChannelMessageContent**](MultiChannelMessageContent.md) | | [optional] -**suggestion_response** | [**\OpenAPI\Client\Model\RbmSuggestionResponse**](RbmSuggestionResponse.md) | | [optional] -**location_response** | [**\OpenAPI\Client\Model\RbmLocationResponse**](RbmLocationResponse.md) | | [optional] +**priority** | [**\Bandwidth\Model\PriorityEnum**](PriorityEnum.md) | | [optional] +**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | [optional] +**content** | [**\Bandwidth\Model\MultiChannelMessageContent**](MultiChannelMessageContent.md) | | [optional] +**suggestion_response** | [**\Bandwidth\Model\RbmSuggestionResponse**](RbmSuggestionResponse.md) | | [optional] +**location_response** | [**\Bandwidth\Model\RbmLocationResponse**](RbmLocationResponse.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InitiateCallback.md b/docs/Model/InitiateCallback.md index 7c8c82e6..4096e04d 100644 --- a/docs/Model/InitiateCallback.md +++ b/docs/Model/InitiateCallback.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes **application_id** | **string** | The id of the application associated with the call. | [optional] **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] -**diversion** | [**\OpenAPI\Client\Model\Diversion**](Diversion.md) | | [optional] -**stir_shaken** | [**\OpenAPI\Client\Model\StirShaken**](StirShaken.md) | | [optional] +**diversion** | [**\Bandwidth\Model\Diversion**](Diversion.md) | | [optional] +**stir_shaken** | [**\Bandwidth\Model\StirShaken**](StirShaken.md) | | [optional] **uui** | **string** | The value of the `User-To-User` header to send within the initial `INVITE`. Must include the encoding parameter as specified in RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListEndpointsResponse.md b/docs/Model/ListEndpointsResponse.md index 233b0071..f01b1bab 100644 --- a/docs/Model/ListEndpointsResponse.md +++ b/docs/Model/ListEndpointsResponse.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**\OpenAPI\Client\Model\BrtcLink[]**](BrtcLink.md) | | -**page** | [**\OpenAPI\Client\Model\Page**](Page.md) | | [optional] -**data** | [**\OpenAPI\Client\Model\Endpoints[]**](Endpoints.md) | | -**errors** | [**\OpenAPI\Client\Model\BrtcError[]**](BrtcError.md) | | +**links** | [**\Bandwidth\Model\BrtcLink[]**](BrtcLink.md) | | +**page** | [**\Bandwidth\Model\Page**](Page.md) | | [optional] +**data** | [**\Bandwidth\Model\Endpoints[]**](Endpoints.md) | | +**errors** | [**\Bandwidth\Model\BrtcError[]**](BrtcError.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListMessageItem.md b/docs/Model/ListMessageItem.md index 3e807345..bf7b0900 100644 --- a/docs/Model/ListMessageItem.md +++ b/docs/Model/ListMessageItem.md @@ -8,9 +8,9 @@ Name | Type | Description | Notes **account_id** | **string** | The account id associated with this message. | [optional] **source_tn** | **string** | The source phone number of the message. | [optional] **destination_tn** | **string** | The recipient phone number of the message. | [optional] -**message_status** | [**\OpenAPI\Client\Model\MessageStatusEnum**](MessageStatusEnum.md) | | [optional] -**message_direction** | [**\OpenAPI\Client\Model\ListMessageDirectionEnum**](ListMessageDirectionEnum.md) | | [optional] -**message_type** | [**\OpenAPI\Client\Model\MessageTypeEnum**](MessageTypeEnum.md) | | [optional] +**message_status** | [**\Bandwidth\Model\MessageStatusEnum**](MessageStatusEnum.md) | | [optional] +**message_direction** | [**\Bandwidth\Model\ListMessageDirectionEnum**](ListMessageDirectionEnum.md) | | [optional] +**message_type** | [**\Bandwidth\Model\MessageTypeEnum**](MessageTypeEnum.md) | | [optional] **segment_count** | **int** | The number of segments the user's message is broken into before sending over carrier networks. | [optional] **error_code** | **int** | The numeric error code of the message. | [optional] **receive_time** | **\DateTime** | The ISO 8601 datetime of the message. | [optional] diff --git a/docs/Model/LookupErrorResponse.md b/docs/Model/LookupErrorResponse.md index a91edda0..c15beef1 100644 --- a/docs/Model/LookupErrorResponse.md +++ b/docs/Model/LookupErrorResponse.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**\OpenAPI\Client\Model\LinkSchema[]**](LinkSchema.md) | | [optional] +**links** | [**\Bandwidth\Model\LinkSchema[]**](LinkSchema.md) | | [optional] **data** | **object** | The phone number lookup response data | [optional] -**errors** | [**\OpenAPI\Client\Model\LookupErrorSchema[]**](LookupErrorSchema.md) | | [optional] +**errors** | [**\Bandwidth\Model\LookupErrorSchema[]**](LookupErrorSchema.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LookupErrorSchema.md b/docs/Model/LookupErrorSchema.md index 20617818..b503053f 100644 --- a/docs/Model/LookupErrorSchema.md +++ b/docs/Model/LookupErrorSchema.md @@ -7,6 +7,6 @@ Name | Type | Description | Notes **code** | **string** | Validation error code | **description** | **string** | Description of validation error | **type** | **string** | Type of validation error | -**meta** | [**\OpenAPI\Client\Model\LookupErrorSchemaMeta**](LookupErrorSchemaMeta.md) | | [optional] +**meta** | [**\Bandwidth\Model\LookupErrorSchemaMeta**](LookupErrorSchemaMeta.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LookupResult.md b/docs/Model/LookupResult.md index 59e196ee..0a7c71e8 100644 --- a/docs/Model/LookupResult.md +++ b/docs/Model/LookupResult.md @@ -5,14 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **phone_number** | **string** | The telephone number in E.164 format. | [optional] -**line_type** | [**\OpenAPI\Client\Model\LineTypeEnum**](LineTypeEnum.md) | | [optional] +**line_type** | [**\Bandwidth\Model\LineTypeEnum**](LineTypeEnum.md) | | [optional] **messaging_provider** | **string** | The messaging service provider of the telephone number. | [optional] **voice_provider** | **string** | The voice service provider of the telephone number. | [optional] **country_code_a3** | **string** | The country code of the telephone number in ISO 3166-1 alpha-3 format. | [optional] **deactivation_reporter** | **string** | [DNI-Only](#section/DNI-Only). The carrier that reported a deactivation event for this phone number. | [optional] **deactivation_date** | **string** | [DNI-Only](#section/DNI-Only). The datetime the carrier reported a deactivation event. | [optional] -**deactivation_event** | [**\OpenAPI\Client\Model\DeactivationEventEnum**](DeactivationEventEnum.md) | | [optional] -**latest_message_delivery_status** | [**\OpenAPI\Client\Model\LatestMessageDeliveryStatusEnum**](LatestMessageDeliveryStatusEnum.md) | | [optional] +**deactivation_event** | [**\Bandwidth\Model\DeactivationEventEnum**](DeactivationEventEnum.md) | | [optional] +**latest_message_delivery_status** | [**\Bandwidth\Model\LatestMessageDeliveryStatusEnum**](LatestMessageDeliveryStatusEnum.md) | | [optional] **initial_message_delivery_status_date** | **\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] **latest_message_delivery_status_date** | **\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] **rcs_enabled** | **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/Model/MachineDetectionCompleteCallback.md b/docs/Model/MachineDetectionCompleteCallback.md index 031b391f..8f5ae3ac 100644 --- a/docs/Model/MachineDetectionCompleteCallback.md +++ b/docs/Model/MachineDetectionCompleteCallback.md @@ -10,13 +10,13 @@ Name | Type | Description | Notes **application_id** | **string** | The id of the application associated with the call. | [optional] **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] **start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] **answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] **tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] -**machine_detection_result** | [**\OpenAPI\Client\Model\MachineDetectionResult**](MachineDetectionResult.md) | | [optional] +**machine_detection_result** | [**\Bandwidth\Model\MachineDetectionResult**](MachineDetectionResult.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MachineDetectionConfiguration.md b/docs/Model/MachineDetectionConfiguration.md index 63305251..bf1bf0d1 100644 --- a/docs/Model/MachineDetectionConfiguration.md +++ b/docs/Model/MachineDetectionConfiguration.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mode** | [**\OpenAPI\Client\Model\MachineDetectionModeEnum**](MachineDetectionModeEnum.md) | | [optional] +**mode** | [**\Bandwidth\Model\MachineDetectionModeEnum**](MachineDetectionModeEnum.md) | | [optional] **detection_timeout** | **float** | The timeout used for the whole operation, in seconds. If no result is determined in this period, a callback with a `timeout` result is sent. | [optional] [default to 15] **silence_timeout** | **float** | If no speech is detected in this period, a callback with a 'silence' result is sent. | [optional] [default to 10] **speech_threshold** | **float** | When speech has ended and a result couldn't be determined based on the audio content itself, this value is used to determine if the speaker is a machine based on the speech duration. If the length of the speech detected is greater than or equal to this threshold, the result will be 'answering-machine'. If the length of speech detected is below this threshold, the result will be 'human'. | [optional] [default to 10] @@ -12,11 +12,11 @@ Name | Type | Description | Notes **machine_speech_end_threshold** | **float** | When an answering machine is detected, the amount of silence (in seconds) before assuming the message has finished playing. If not provided it will default to the speechEndThreshold value. | [optional] **delay_result** | **bool** | If set to 'true' and if an answering machine is detected, the 'answering-machine' callback will be delayed until the machine is done speaking, or an end of message tone is detected, or until the 'detectionTimeout' is exceeded. If false, the 'answering-machine' result is sent immediately. | [optional] [default to false] **callback_url** | **string** | The URL to send the 'machineDetectionComplete' webhook when the detection is completed. Only for 'async' mode. | [optional] -**callback_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**callback_method** | [**\Bandwidth\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] **username** | **string** | Basic auth username. | [optional] **password** | **string** | Basic auth password. | [optional] **fallback_url** | **string** | A fallback URL which, if provided, will be used to retry the machine detection complete webhook delivery in case `callbackUrl` fails to respond | [optional] -**fallback_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**fallback_method** | [**\Bandwidth\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] **fallback_username** | **string** | Basic auth username. | [optional] **fallback_password** | **string** | Basic auth password. | [optional] diff --git a/docs/Model/Message.md b/docs/Model/Message.md index b9afaef2..4dd76869 100644 --- a/docs/Model/Message.md +++ b/docs/Model/Message.md @@ -9,13 +9,13 @@ Name | Type | Description | Notes **application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | [optional] **time** | **\DateTime** | The datetime stamp of the message in ISO 8601 | [optional] **segment_count** | **int** | The number of segments the user's message is broken into before sending over carrier networks. | [optional] -**direction** | [**\OpenAPI\Client\Model\MessageDirectionEnum**](MessageDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\MessageDirectionEnum**](MessageDirectionEnum.md) | | [optional] **to** | **string[]** | The phone number recipients of the message. | [optional] **from** | **string** | The phone number the message was sent from. | [optional] **media** | **string[]** | The list of media URLs sent in the message. Including a `filename` field in the `Content-Disposition` header of the media linked with a URL will set the displayed file name. This is a best practice to ensure that your media has a readable file name. | [optional] **text** | **string** | The contents of the message. | [optional] **tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] -**priority** | [**\OpenAPI\Client\Model\PriorityEnum**](PriorityEnum.md) | | [optional] +**priority** | [**\Bandwidth\Model\PriorityEnum**](PriorityEnum.md) | | [optional] **expiration** | **\DateTime** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MessageRequest.md b/docs/Model/MessageRequest.md index 4679cb82..391bf4fb 100644 --- a/docs/Model/MessageRequest.md +++ b/docs/Model/MessageRequest.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **text** | **string** | The contents of the text message. Must be 2048 characters or less. | [optional] **media** | **string[]** | A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters. | [optional] **tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] -**priority** | [**\OpenAPI\Client\Model\PriorityEnum**](PriorityEnum.md) | | [optional] +**priority** | [**\Bandwidth\Model\PriorityEnum**](PriorityEnum.md) | | [optional] **expiration** | **\DateTime** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MessagesList.md b/docs/Model/MessagesList.md index 9491cbda..5422a85d 100644 --- a/docs/Model/MessagesList.md +++ b/docs/Model/MessagesList.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **total_count** | **int** | The total number of messages matched by the search. When the request has limitTotalCount set to true this value is limited to 10,000. | [optional] -**page_info** | [**\OpenAPI\Client\Model\PageInfo**](PageInfo.md) | | [optional] -**messages** | [**\OpenAPI\Client\Model\ListMessageItem[]**](ListMessageItem.md) | | [optional] +**page_info** | [**\Bandwidth\Model\PageInfo**](PageInfo.md) | | [optional] +**messages** | [**\Bandwidth\Model\ListMessageItem[]**](ListMessageItem.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MmsMessageContent.md b/docs/Model/MmsMessageContent.md index ad079a4b..c03e1eb0 100644 --- a/docs/Model/MmsMessageContent.md +++ b/docs/Model/MmsMessageContent.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **text** | **string** | The contents of the text message. Must be 2048 characters or less. | [optional] -**media** | [**\OpenAPI\Client\Model\MmsMessageContentFile[]**](MmsMessageContentFile.md) | | [optional] +**media** | [**\Bandwidth\Model\MmsMessageContentFile[]**](MmsMessageContentFile.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelAction.md b/docs/Model/MultiChannelAction.md index c819bd26..e255ffea 100644 --- a/docs/Model/MultiChannelAction.md +++ b/docs/Model/MultiChannelAction.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\OpenAPI\Client\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | +**type** | [**\Bandwidth\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | **text** | **string** | Displayed text for user to click | **postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | **phone_number** | **string** | The phone number to dial. Must be E164 format. | @@ -16,7 +16,7 @@ Name | Type | Description | Notes **end_time** | **\DateTime** | The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | **description** | **string** | The description of the event. | [optional] **url** | **string** | The URL to open in browser. Must use http:// or https:// scheme. | -**application** | [**\OpenAPI\Client\Model\RbmOpenUrlEnum**](RbmOpenUrlEnum.md) | | [optional] -**webview_view_mode** | [**\OpenAPI\Client\Model\RbmWebViewEnum**](RbmWebViewEnum.md) | | [optional] +**application** | [**\Bandwidth\Model\RbmOpenUrlEnum**](RbmOpenUrlEnum.md) | | [optional] +**webview_view_mode** | [**\Bandwidth\Model\RbmWebViewEnum**](RbmWebViewEnum.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelActionCalendarEvent.md b/docs/Model/MultiChannelActionCalendarEvent.md index 9b12ad47..7a41991a 100644 --- a/docs/Model/MultiChannelActionCalendarEvent.md +++ b/docs/Model/MultiChannelActionCalendarEvent.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\OpenAPI\Client\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | +**type** | [**\Bandwidth\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | **text** | **string** | Displayed text for user to click | **postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | **title** | **string** | The title of the event. | diff --git a/docs/Model/MultiChannelChannelListMMSObject.md b/docs/Model/MultiChannelChannelListMMSObject.md index 6bf60f18..e1b6dd7e 100644 --- a/docs/Model/MultiChannelChannelListMMSObject.md +++ b/docs/Model/MultiChannelChannelListMMSObject.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | **application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | -**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | -**content** | [**\OpenAPI\Client\Model\MmsMessageContent**](MmsMessageContent.md) | | +**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\Bandwidth\Model\MmsMessageContent**](MmsMessageContent.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListMMSResponseObject.md b/docs/Model/MultiChannelChannelListMMSResponseObject.md index d2fea758..cda71d23 100644 --- a/docs/Model/MultiChannelChannelListMMSResponseObject.md +++ b/docs/Model/MultiChannelChannelListMMSResponseObject.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | **application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | -**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | -**content** | [**\OpenAPI\Client\Model\MmsMessageContent**](MmsMessageContent.md) | | +**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\Bandwidth\Model\MmsMessageContent**](MmsMessageContent.md) | | **owner** | **string** | The Bandwidth senderId associated with the message. Identical to 'from'. | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListObjectBase.md b/docs/Model/MultiChannelChannelListObjectBase.md index 746133a9..95399224 100644 --- a/docs/Model/MultiChannelChannelListObjectBase.md +++ b/docs/Model/MultiChannelChannelListObjectBase.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | **application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | -**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListRBMObject.md b/docs/Model/MultiChannelChannelListRBMObject.md index 4df5ff8d..ef0ec8d1 100644 --- a/docs/Model/MultiChannelChannelListRBMObject.md +++ b/docs/Model/MultiChannelChannelListRBMObject.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | **application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | -**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | -**content** | [**\OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent**](MultiChannelChannelListRBMObjectAllOfContent.md) | | +**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent**](MultiChannelChannelListRBMObjectAllOfContent.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md b/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md index 94205922..91860be4 100644 --- a/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md +++ b/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **text** | **string** | The text associated with the message. Must be 3270 characters or less | -**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] -**media** | [**\OpenAPI\Client\Model\RbmMessageContentFile[]**](RbmMessageContentFile.md) | | -**orientation** | [**\OpenAPI\Client\Model\StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | -**thumbnail_image_alignment** | [**\OpenAPI\Client\Model\ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [optional] -**card_content** | [**\OpenAPI\Client\Model\RbmCardContent**](RbmCardContent.md) | | -**card_width** | [**\OpenAPI\Client\Model\CardWidthEnum**](CardWidthEnum.md) | | -**card_contents** | [**\OpenAPI\Client\Model\RbmCardContent[]**](RbmCardContent.md) | | +**suggestions** | [**\Bandwidth\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] +**media** | [**\Bandwidth\Model\RbmMessageContentFile[]**](RbmMessageContentFile.md) | | +**orientation** | [**\Bandwidth\Model\StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | +**thumbnail_image_alignment** | [**\Bandwidth\Model\ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [optional] +**card_content** | [**\Bandwidth\Model\RbmCardContent**](RbmCardContent.md) | | +**card_width** | [**\Bandwidth\Model\CardWidthEnum**](CardWidthEnum.md) | | +**card_contents** | [**\Bandwidth\Model\RbmCardContent[]**](RbmCardContent.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListRBMResponseObject.md b/docs/Model/MultiChannelChannelListRBMResponseObject.md index e84ee8ff..767cab7d 100644 --- a/docs/Model/MultiChannelChannelListRBMResponseObject.md +++ b/docs/Model/MultiChannelChannelListRBMResponseObject.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | **application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | -**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | -**content** | [**\OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent**](MultiChannelChannelListRBMObjectAllOfContent.md) | | +**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent**](MultiChannelChannelListRBMObjectAllOfContent.md) | | **owner** | **string** | The Bandwidth senderId associated with the message. Identical to 'from'. | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListRequestObject.md b/docs/Model/MultiChannelChannelListRequestObject.md index 3918cd26..e167c7ac 100644 --- a/docs/Model/MultiChannelChannelListRequestObject.md +++ b/docs/Model/MultiChannelChannelListRequestObject.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | **application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | -**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | -**content** | [**\OpenAPI\Client\Model\MmsMessageContent**](MmsMessageContent.md) | | +**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\Bandwidth\Model\MmsMessageContent**](MmsMessageContent.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListResponseObject.md b/docs/Model/MultiChannelChannelListResponseObject.md index 82923581..219bc83d 100644 --- a/docs/Model/MultiChannelChannelListResponseObject.md +++ b/docs/Model/MultiChannelChannelListResponseObject.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | **application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | -**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | -**content** | [**\OpenAPI\Client\Model\MmsMessageContent**](MmsMessageContent.md) | | +**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\Bandwidth\Model\MmsMessageContent**](MmsMessageContent.md) | | **owner** | **string** | The Bandwidth senderId associated with the message. Identical to 'from'. | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListSMSObject.md b/docs/Model/MultiChannelChannelListSMSObject.md index 4e5bb37c..922b58bf 100644 --- a/docs/Model/MultiChannelChannelListSMSObject.md +++ b/docs/Model/MultiChannelChannelListSMSObject.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | **application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | -**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | -**content** | [**\OpenAPI\Client\Model\SmsMessageContent**](SmsMessageContent.md) | | +**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\Bandwidth\Model\SmsMessageContent**](SmsMessageContent.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListSMSResponseObject.md b/docs/Model/MultiChannelChannelListSMSResponseObject.md index d2fbcc39..b48fcc11 100644 --- a/docs/Model/MultiChannelChannelListSMSResponseObject.md +++ b/docs/Model/MultiChannelChannelListSMSResponseObject.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | **application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | -**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | -**content** | [**\OpenAPI\Client\Model\SmsMessageContent**](SmsMessageContent.md) | | +**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | +**content** | [**\Bandwidth\Model\SmsMessageContent**](SmsMessageContent.md) | | **owner** | **string** | The Bandwidth senderId associated with the message. Identical to 'from'. | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelError.md b/docs/Model/MultiChannelError.md index 47957f59..baed1f16 100644 --- a/docs/Model/MultiChannelError.md +++ b/docs/Model/MultiChannelError.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**\OpenAPI\Client\Model\Link[]**](Link.md) | | [optional] +**links** | [**\Bandwidth\Model\Link[]**](Link.md) | | [optional] **data** | **object** | | [optional] -**errors** | [**\OpenAPI\Client\Model\ErrorObject[]**](ErrorObject.md) | | [optional] +**errors** | [**\Bandwidth\Model\ErrorObject[]**](ErrorObject.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelMessageContent.md b/docs/Model/MultiChannelMessageContent.md index 483edd25..9e95b700 100644 --- a/docs/Model/MultiChannelMessageContent.md +++ b/docs/Model/MultiChannelMessageContent.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **text** | **string** | | [optional] -**media** | [**\OpenAPI\Client\Model\RbmMessageContentFile**](RbmMessageContentFile.md) | | [optional] +**media** | [**\Bandwidth\Model\RbmMessageContentFile**](RbmMessageContentFile.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelMessageRequest.md b/docs/Model/MultiChannelMessageRequest.md index 9bf972a7..0a61eaa0 100644 --- a/docs/Model/MultiChannelMessageRequest.md +++ b/docs/Model/MultiChannelMessageRequest.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **to** | **string** | The phone number the message should be sent to in E164 format. | -**channel_list** | [**\OpenAPI\Client\Model\MultiChannelChannelListRequestObject[]**](MultiChannelChannelListRequestObject.md) | A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. | +**channel_list** | [**\Bandwidth\Model\MultiChannelChannelListRequestObject[]**](MultiChannelChannelListRequestObject.md) | A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. | **tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] -**priority** | [**\OpenAPI\Client\Model\PriorityEnum**](PriorityEnum.md) | | [optional] +**priority** | [**\Bandwidth\Model\PriorityEnum**](PriorityEnum.md) | | [optional] **expiration** | **\DateTime** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelMessageResponseData.md b/docs/Model/MultiChannelMessageResponseData.md index f1b5c42d..c120148b 100644 --- a/docs/Model/MultiChannelMessageResponseData.md +++ b/docs/Model/MultiChannelMessageResponseData.md @@ -6,11 +6,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **string** | The ID of the message. | **time** | **\DateTime** | The time the message was received by the Bandwidth API. | -**direction** | [**\OpenAPI\Client\Model\MessageDirectionEnum**](MessageDirectionEnum.md) | | +**direction** | [**\Bandwidth\Model\MessageDirectionEnum**](MessageDirectionEnum.md) | | **to** | **string[]** | The destination phone number(s) of the message, in E164 format. | -**channel_list** | [**\OpenAPI\Client\Model\MultiChannelChannelListResponseObject[]**](MultiChannelChannelListResponseObject.md) | A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. | +**channel_list** | [**\Bandwidth\Model\MultiChannelChannelListResponseObject[]**](MultiChannelChannelListResponseObject.md) | A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. | **tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] -**priority** | [**\OpenAPI\Client\Model\PriorityEnum**](PriorityEnum.md) | | [optional] +**priority** | [**\Bandwidth\Model\PriorityEnum**](PriorityEnum.md) | | [optional] **expiration** | **\DateTime** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmActionBase.md b/docs/Model/RbmActionBase.md index 0a2ae92d..9e641fe3 100644 --- a/docs/Model/RbmActionBase.md +++ b/docs/Model/RbmActionBase.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\OpenAPI\Client\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | +**type** | [**\Bandwidth\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | **text** | **string** | Displayed text for user to click | **postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | diff --git a/docs/Model/RbmActionDial.md b/docs/Model/RbmActionDial.md index aadb2587..0744ebd4 100644 --- a/docs/Model/RbmActionDial.md +++ b/docs/Model/RbmActionDial.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\OpenAPI\Client\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | +**type** | [**\Bandwidth\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | **text** | **string** | Displayed text for user to click | **postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | **phone_number** | **string** | The phone number to dial. Must be E164 format. | diff --git a/docs/Model/RbmActionOpenUrl.md b/docs/Model/RbmActionOpenUrl.md index 2a47deef..e3c16313 100644 --- a/docs/Model/RbmActionOpenUrl.md +++ b/docs/Model/RbmActionOpenUrl.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\OpenAPI\Client\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | +**type** | [**\Bandwidth\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | **text** | **string** | Displayed text for user to click | **postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | **url** | **string** | The URL to open in browser. Must use http:// or https:// scheme. | -**application** | [**\OpenAPI\Client\Model\RbmOpenUrlEnum**](RbmOpenUrlEnum.md) | | [optional] -**webview_view_mode** | [**\OpenAPI\Client\Model\RbmWebViewEnum**](RbmWebViewEnum.md) | | [optional] +**application** | [**\Bandwidth\Model\RbmOpenUrlEnum**](RbmOpenUrlEnum.md) | | [optional] +**webview_view_mode** | [**\Bandwidth\Model\RbmWebViewEnum**](RbmWebViewEnum.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmActionViewLocation.md b/docs/Model/RbmActionViewLocation.md index 50999c5f..2fb12d5b 100644 --- a/docs/Model/RbmActionViewLocation.md +++ b/docs/Model/RbmActionViewLocation.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**type** | [**\OpenAPI\Client\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | +**type** | [**\Bandwidth\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | **text** | **string** | Displayed text for user to click | **postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | **latitude** | **float** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | diff --git a/docs/Model/RbmCardContent.md b/docs/Model/RbmCardContent.md index acfe166f..8405875d 100644 --- a/docs/Model/RbmCardContent.md +++ b/docs/Model/RbmCardContent.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **string** | The title of the card. Must be 200 characters or less. | [optional] **description** | **string** | The description of the card. Must be 2000 characters or less. | [optional] -**media** | [**\OpenAPI\Client\Model\RbmCardContentMedia**](RbmCardContentMedia.md) | | [optional] -**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient that will be displayed on the rich card. | [optional] +**media** | [**\Bandwidth\Model\RbmCardContentMedia**](RbmCardContentMedia.md) | | [optional] +**suggestions** | [**\Bandwidth\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient that will be displayed on the rich card. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmCardContentMedia.md b/docs/Model/RbmCardContentMedia.md index ab3d098d..c8618237 100644 --- a/docs/Model/RbmCardContentMedia.md +++ b/docs/Model/RbmCardContentMedia.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **file_url** | **string** | The URL of the media file. 100MB is the maximum file size. | **thumbnail_url** | **string** | The URL of the thumbnail image. Applies only to video file media. | [optional] -**height** | [**\OpenAPI\Client\Model\RbmMediaHeightEnum**](RbmMediaHeightEnum.md) | | +**height** | [**\Bandwidth\Model\RbmMediaHeightEnum**](RbmMediaHeightEnum.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmMessageCarouselCard.md b/docs/Model/RbmMessageCarouselCard.md index f035b0ff..bb27bc35 100644 --- a/docs/Model/RbmMessageCarouselCard.md +++ b/docs/Model/RbmMessageCarouselCard.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**card_width** | [**\OpenAPI\Client\Model\CardWidthEnum**](CardWidthEnum.md) | | -**card_contents** | [**\OpenAPI\Client\Model\RbmCardContent[]**](RbmCardContent.md) | | -**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] +**card_width** | [**\Bandwidth\Model\CardWidthEnum**](CardWidthEnum.md) | | +**card_contents** | [**\Bandwidth\Model\RbmCardContent[]**](RbmCardContent.md) | | +**suggestions** | [**\Bandwidth\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmMessageContentRichCard.md b/docs/Model/RbmMessageContentRichCard.md index 193f391b..b8f4d14b 100644 --- a/docs/Model/RbmMessageContentRichCard.md +++ b/docs/Model/RbmMessageContentRichCard.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**orientation** | [**\OpenAPI\Client\Model\StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | -**thumbnail_image_alignment** | [**\OpenAPI\Client\Model\ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [optional] -**card_content** | [**\OpenAPI\Client\Model\RbmCardContent**](RbmCardContent.md) | | -**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] -**card_width** | [**\OpenAPI\Client\Model\CardWidthEnum**](CardWidthEnum.md) | | -**card_contents** | [**\OpenAPI\Client\Model\RbmCardContent[]**](RbmCardContent.md) | | +**orientation** | [**\Bandwidth\Model\StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | +**thumbnail_image_alignment** | [**\Bandwidth\Model\ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [optional] +**card_content** | [**\Bandwidth\Model\RbmCardContent**](RbmCardContent.md) | | +**suggestions** | [**\Bandwidth\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] +**card_width** | [**\Bandwidth\Model\CardWidthEnum**](CardWidthEnum.md) | | +**card_contents** | [**\Bandwidth\Model\RbmCardContent[]**](RbmCardContent.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmMessageContentText.md b/docs/Model/RbmMessageContentText.md index 0e2439f6..c0f3a400 100644 --- a/docs/Model/RbmMessageContentText.md +++ b/docs/Model/RbmMessageContentText.md @@ -5,6 +5,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **text** | **string** | The text associated with the message. Must be 3270 characters or less | -**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] +**suggestions** | [**\Bandwidth\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmMessageMedia.md b/docs/Model/RbmMessageMedia.md index 9f161ba4..4d201b0c 100644 --- a/docs/Model/RbmMessageMedia.md +++ b/docs/Model/RbmMessageMedia.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**media** | [**\OpenAPI\Client\Model\RbmMessageContentFile[]**](RbmMessageContentFile.md) | | -**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] +**media** | [**\Bandwidth\Model\RbmMessageContentFile[]**](RbmMessageContentFile.md) | | +**suggestions** | [**\Bandwidth\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmStandaloneCard.md b/docs/Model/RbmStandaloneCard.md index 776dfe4c..00601330 100644 --- a/docs/Model/RbmStandaloneCard.md +++ b/docs/Model/RbmStandaloneCard.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**orientation** | [**\OpenAPI\Client\Model\StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | -**thumbnail_image_alignment** | [**\OpenAPI\Client\Model\ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [optional] -**card_content** | [**\OpenAPI\Client\Model\RbmCardContent**](RbmCardContent.md) | | -**suggestions** | [**\OpenAPI\Client\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] +**orientation** | [**\Bandwidth\Model\StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | +**thumbnail_image_alignment** | [**\Bandwidth\Model\ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [optional] +**card_content** | [**\Bandwidth\Model\RbmCardContent**](RbmCardContent.md) | | +**suggestions** | [**\Bandwidth\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RecordingAvailableCallback.md b/docs/Model/RecordingAvailableCallback.md index edfb94e4..cdf0c491 100644 --- a/docs/Model/RecordingAvailableCallback.md +++ b/docs/Model/RecordingAvailableCallback.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **application_id** | **string** | The id of the application associated with the call. | [optional] **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **parent_call_id** | **string** | (optional) If the event is related to the B leg of a <Transfer>, the call id of the original call leg that executed the <Transfer>. Otherwise, this field will not be present. | [optional] @@ -20,7 +20,7 @@ Name | Type | Description | Notes **start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] **end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] **duration** | **string** | The duration of the recording in ISO-8601 format | [optional] -**file_format** | [**\OpenAPI\Client\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] +**file_format** | [**\Bandwidth\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] **channels** | **int** | Always `1` for conference recordings; multi-channel recordings are not supported on conferences. | [optional] **tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] **status** | **string** | The current status of the process. For recording, current possible values are 'processing', 'partial', 'complete', 'deleted', and 'error'. For transcriptions, current possible values are 'none', 'processing', 'available', 'error', 'timeout', 'file-size-too-big', and 'file-size-too-small'. Additional states may be added in the future, so your application must be tolerant of unknown values. | [optional] diff --git a/docs/Model/RecordingCompleteCallback.md b/docs/Model/RecordingCompleteCallback.md index d6ed8f92..1d427fd5 100644 --- a/docs/Model/RecordingCompleteCallback.md +++ b/docs/Model/RecordingCompleteCallback.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **application_id** | **string** | The id of the application associated with the call. | [optional] **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **parent_call_id** | **string** | (optional) If the event is related to the B leg of a <Transfer>, the call id of the original call leg that executed the <Transfer>. Otherwise, this field will not be present. | [optional] @@ -21,7 +21,7 @@ Name | Type | Description | Notes **answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] **end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] **duration** | **string** | The duration of the recording in ISO-8601 format | [optional] -**file_format** | [**\OpenAPI\Client\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] +**file_format** | [**\Bandwidth\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] **channels** | **int** | Always `1` for conference recordings; multi-channel recordings are not supported on conferences. | [optional] **tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] **transfer_caller_id** | **string** | The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] diff --git a/docs/Model/RecordingTranscriptions.md b/docs/Model/RecordingTranscriptions.md index 6ede6261..f0bb6cb5 100644 --- a/docs/Model/RecordingTranscriptions.md +++ b/docs/Model/RecordingTranscriptions.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**transcripts** | [**\OpenAPI\Client\Model\Transcription[]**](Transcription.md) | | [optional] -**clips** | [**\OpenAPI\Client\Model\RecordingTranscriptionClip[]**](RecordingTranscriptionClip.md) | A list of individual speech clips with speaker, timing, and confidence information. | [optional] +**transcripts** | [**\Bandwidth\Model\Transcription[]**](Transcription.md) | | [optional] +**clips** | [**\Bandwidth\Model\RecordingTranscriptionClip[]**](RecordingTranscriptionClip.md) | A list of individual speech clips with speaker, timing, and confidence information. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RedirectCallback.md b/docs/Model/RedirectCallback.md index 29dcdd5c..e3325931 100644 --- a/docs/Model/RedirectCallback.md +++ b/docs/Model/RedirectCallback.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **application_id** | **string** | The id of the application associated with the call. | [optional] **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **parent_call_id** | **string** | (optional) If the event is related to the B leg of a <Transfer>, the call id of the original call leg that executed the <Transfer>. Otherwise, this field will not be present. | [optional] diff --git a/docs/Model/SipConnectionMetadata.md b/docs/Model/SipConnectionMetadata.md index bb744e6d..4b621968 100644 --- a/docs/Model/SipConnectionMetadata.md +++ b/docs/Model/SipConnectionMetadata.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ip_address** | **string** | The IP address of the SIP connection. | [optional] **port** | **int** | The port of the SIP connection. | [optional] -**credentials** | [**\OpenAPI\Client\Model\SipCredentials**](SipCredentials.md) | | [optional] +**credentials** | [**\Bandwidth\Model\SipCredentials**](SipCredentials.md) | | [optional] **uui_header** | **string** | The User-to-User Information header for the SIP connection. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/StatusCallback.md b/docs/Model/StatusCallback.md index 3d0b6968..19e6f3ce 100644 --- a/docs/Model/StatusCallback.md +++ b/docs/Model/StatusCallback.md @@ -6,10 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **time** | **\DateTime** | | **event_time** | **\DateTime** | Represents the time at which the message was read, for `message-read` callbacks. | [optional] -**type** | [**\OpenAPI\Client\Model\StatusCallbackTypeEnum**](StatusCallbackTypeEnum.md) | | +**type** | [**\Bandwidth\Model\StatusCallbackTypeEnum**](StatusCallbackTypeEnum.md) | | **to** | **string** | The destination phone number the message was sent to. For status callbacks, this the the Bandwidth user's client phone number. | **description** | **string** | A detailed description of the event described by the callback. | -**message** | [**\OpenAPI\Client\Model\StatusCallbackMessage**](StatusCallbackMessage.md) | | +**message** | [**\Bandwidth\Model\StatusCallbackMessage**](StatusCallbackMessage.md) | | **error_code** | **int** | Optional error code, applicable only when type is `message-failed`. | [optional] **carrier_name** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] diff --git a/docs/Model/StatusCallbackMessage.md b/docs/Model/StatusCallbackMessage.md index 98a27624..286542fa 100644 --- a/docs/Model/StatusCallbackMessage.md +++ b/docs/Model/StatusCallbackMessage.md @@ -9,13 +9,13 @@ Name | Type | Description | Notes **application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | **time** | **\DateTime** | | **segment_count** | **int** | The number of segments the user's message is broken into before sending over carrier networks. | -**direction** | [**\OpenAPI\Client\Model\MessageDirectionEnum**](MessageDirectionEnum.md) | | +**direction** | [**\Bandwidth\Model\MessageDirectionEnum**](MessageDirectionEnum.md) | | **to** | **string[]** | The phone number recipients of the message. | **from** | **string** | The Bandwidth phone number or alphanumeric identifier the message was sent from. | **text** | **string** | | [optional] **tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] **media** | **string[]** | Optional media, not applicable for sms | [optional] -**priority** | [**\OpenAPI\Client\Model\PriorityEnum**](PriorityEnum.md) | | [optional] -**channel** | [**\OpenAPI\Client\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | [optional] +**priority** | [**\Bandwidth\Model\PriorityEnum**](PriorityEnum.md) | | [optional] +**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TfvStatus.md b/docs/Model/TfvStatus.md index 527dfe8c..1f1f9b65 100644 --- a/docs/Model/TfvStatus.md +++ b/docs/Model/TfvStatus.md @@ -5,15 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **phone_number** | **string** | Toll-free telephone number in E.164 format. | [optional] -**status** | [**\OpenAPI\Client\Model\TfvStatusEnum**](TfvStatusEnum.md) | | [optional] +**status** | [**\Bandwidth\Model\TfvStatusEnum**](TfvStatusEnum.md) | | [optional] **internal_ticket_number** | **string** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number - included in all webhook payloads. | [optional] **decline_reason_description** | **string** | Explanation for why a verification request was declined. | [optional] **denial_status_code** | **int** | Reason code for denial. | [optional] -**additional_denial_reasons** | [**\OpenAPI\Client\Model\AdditionalDenialReason[]**](AdditionalDenialReason.md) | An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. | [optional] +**additional_denial_reasons** | [**\Bandwidth\Model\AdditionalDenialReason[]**](AdditionalDenialReason.md) | An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. | [optional] **resubmit_allowed** | **bool** | Whether a Toll-Free Verification request qualifies for resubmission via PUT. | [optional] **created_date_time** | **\DateTime** | Date and time the verification request was created. | [optional] **modified_date_time** | **\DateTime** | Date and time the verification request was last modified. | [optional] -**submission** | [**\OpenAPI\Client\Model\TfvSubmissionInfo**](TfvSubmissionInfo.md) | | [optional] +**submission** | [**\Bandwidth\Model\TfvSubmissionInfo**](TfvSubmissionInfo.md) | | [optional] **blocked** | **bool** | Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] **blocked_reason** | **string** | The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] **cv_token** | **string** | The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection. | [optional] diff --git a/docs/Model/TfvSubmissionInfo.md b/docs/Model/TfvSubmissionInfo.md index d99efd4d..baa36f27 100644 --- a/docs/Model/TfvSubmissionInfo.md +++ b/docs/Model/TfvSubmissionInfo.md @@ -4,21 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**business_address** | [**\OpenAPI\Client\Model\Address**](Address.md) | | [optional] -**business_contact** | [**\OpenAPI\Client\Model\Contact**](Contact.md) | | [optional] +**business_address** | [**\Bandwidth\Model\Address**](Address.md) | | [optional] +**business_contact** | [**\Bandwidth\Model\Contact**](Contact.md) | | [optional] **message_volume** | **int** | Estimated monthly volume of messages from the toll-free number. | [optional] **use_case** | **string** | The category of the use case. | [optional] **use_case_summary** | **string** | A general idea of the use case and customer. | [optional] **production_message_content** | **string** | Example of message content. | [optional] -**opt_in_workflow** | [**\OpenAPI\Client\Model\OptInWorkflow**](OptInWorkflow.md) | | [optional] +**opt_in_workflow** | [**\Bandwidth\Model\OptInWorkflow**](OptInWorkflow.md) | | [optional] **additional_information** | **string** | Any additional information. | [optional] **isv_reseller** | **string** | ISV name. | [optional] **privacy_policy_url** | **string** | The Toll-Free Verification request privacy policy URL. | [optional] **terms_and_conditions_url** | **string** | The Toll-Free Verification request terms and conditions policy URL. | [optional] **business_dba** | **string** | The company 'Doing Business As'. | [optional] **business_registration_number** | **string** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] -**business_registration_type** | [**\OpenAPI\Client\Model\BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] +**business_registration_type** | [**\Bandwidth\Model\BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] **business_registration_issuing_country** | **string** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] -**business_entity_type** | [**\OpenAPI\Client\Model\BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] +**business_entity_type** | [**\Bandwidth\Model\BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TfvSubmissionWrapper.md b/docs/Model/TfvSubmissionWrapper.md index 0979c831..e2959402 100644 --- a/docs/Model/TfvSubmissionWrapper.md +++ b/docs/Model/TfvSubmissionWrapper.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**submission** | [**\OpenAPI\Client\Model\VerificationUpdateRequest**](VerificationUpdateRequest.md) | | [optional] +**submission** | [**\Bandwidth\Model\VerificationUpdateRequest**](VerificationUpdateRequest.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TranscribeRecording.md b/docs/Model/TranscribeRecording.md index 13ff7d39..1018548d 100644 --- a/docs/Model/TranscribeRecording.md +++ b/docs/Model/TranscribeRecording.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **callback_url** | **string** | The URL to send the [TranscriptionAvailable](/docs/voice/webhooks/transcriptionAvailable) event to. You should not include sensitive or personally-identifiable information in the callbackUrl field! Always use the proper username and password fields for authorization. | [optional] -**callback_method** | [**\OpenAPI\Client\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] +**callback_method** | [**\Bandwidth\Model\CallbackMethodEnum**](CallbackMethodEnum.md) | | [optional] **username** | **string** | Basic auth username. | [optional] **password** | **string** | Basic auth password. | [optional] **tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] diff --git a/docs/Model/TranscriptionAvailableCallback.md b/docs/Model/TranscriptionAvailableCallback.md index 73c22272..970b971d 100644 --- a/docs/Model/TranscriptionAvailableCallback.md +++ b/docs/Model/TranscriptionAvailableCallback.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **application_id** | **string** | The id of the application associated with the call. | [optional] **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **media_url** | **string** | The URL that can be used to download the recording. Only present if the recording is finished and may be downloaded. | [optional] @@ -20,9 +20,9 @@ Name | Type | Description | Notes **start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] **end_time** | **\DateTime** | The time that the recording ended in ISO-8601 format | [optional] **duration** | **string** | The duration of the recording in ISO-8601 format | [optional] -**file_format** | [**\OpenAPI\Client\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] +**file_format** | [**\Bandwidth\Model\FileFormatEnum**](FileFormatEnum.md) | | [optional] **tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] -**transcription** | [**\OpenAPI\Client\Model\Transcription**](Transcription.md) | | [optional] +**transcription** | [**\Bandwidth\Model\Transcription**](Transcription.md) | | [optional] **transfer_caller_id** | **string** | The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] **transfer_to** | **string** | The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). | [optional] diff --git a/docs/Model/TransferAnswerCallback.md b/docs/Model/TransferAnswerCallback.md index d8b6079c..c90ebdd2 100644 --- a/docs/Model/TransferAnswerCallback.md +++ b/docs/Model/TransferAnswerCallback.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **application_id** | **string** | The id of the application associated with the call. | [optional] **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] diff --git a/docs/Model/TransferCompleteCallback.md b/docs/Model/TransferCompleteCallback.md index 8be1819a..826e130a 100644 --- a/docs/Model/TransferCompleteCallback.md +++ b/docs/Model/TransferCompleteCallback.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **application_id** | **string** | The id of the application associated with the call. | [optional] **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **enqueued_time** | **\DateTime** | (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. | [optional] diff --git a/docs/Model/TransferDisconnectCallback.md b/docs/Model/TransferDisconnectCallback.md index 9e673c54..92067a27 100644 --- a/docs/Model/TransferDisconnectCallback.md +++ b/docs/Model/TransferDisconnectCallback.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **application_id** | **string** | The id of the application associated with the call. | [optional] **from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] **to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] -**direction** | [**\OpenAPI\Client\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] **call_id** | **string** | The call id associated with the event. | [optional] **call_url** | **string** | The URL of the call associated with the event. | [optional] **parent_call_id** | **string** | (optional) If the event is related to the B leg of a <Transfer>, the call id of the original call leg that executed the <Transfer>. Otherwise, this field will not be present. | [optional] diff --git a/docs/Model/UpdateCall.md b/docs/Model/UpdateCall.md index 83ab0c45..f3bdf8dd 100644 --- a/docs/Model/UpdateCall.md +++ b/docs/Model/UpdateCall.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**state** | [**\OpenAPI\Client\Model\CallStateEnum**](CallStateEnum.md) | | [optional] +**state** | [**\Bandwidth\Model\CallStateEnum**](CallStateEnum.md) | | [optional] **redirect_url** | **string** | The URL to send the [Redirect](/docs/voice/bxml/redirect) event to which will provide new BXML. Required if `state` is `active`. Not allowed if `state` is `completed`. | [optional] -**redirect_method** | [**\OpenAPI\Client\Model\RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] +**redirect_method** | [**\Bandwidth\Model\RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] **username** | **string** | Basic auth username. | [optional] **password** | **string** | Basic auth password. | [optional] **redirect_fallback_url** | **string** | A fallback url which, if provided, will be used to retry the redirect callback delivery in case `redirectUrl` fails to respond. | [optional] -**redirect_fallback_method** | [**\OpenAPI\Client\Model\RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] +**redirect_fallback_method** | [**\Bandwidth\Model\RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] **fallback_username** | **string** | Basic auth username. | [optional] **fallback_password** | **string** | Basic auth password. | [optional] **tag** | **string** | A custom string that will be sent with this and all future callbacks unless overwritten by a future `tag` attribute or [`<Tag>`](/docs/voice/bxml/tag) verb, or cleared. May be cleared by setting `tag=\"\"`. Max length 4096 characters. Not allowed if `state` is `completed`. | [optional] diff --git a/docs/Model/UpdateCallRecording.md b/docs/Model/UpdateCallRecording.md index 33a14df4..e96fa5e8 100644 --- a/docs/Model/UpdateCallRecording.md +++ b/docs/Model/UpdateCallRecording.md @@ -4,6 +4,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**state** | [**\OpenAPI\Client\Model\RecordingStateEnum**](RecordingStateEnum.md) | | +**state** | [**\Bandwidth\Model\RecordingStateEnum**](RecordingStateEnum.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateConference.md b/docs/Model/UpdateConference.md index 03093f4b..37548500 100644 --- a/docs/Model/UpdateConference.md +++ b/docs/Model/UpdateConference.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | [**\OpenAPI\Client\Model\ConferenceStateEnum**](ConferenceStateEnum.md) | | [optional] +**status** | [**\Bandwidth\Model\ConferenceStateEnum**](ConferenceStateEnum.md) | | [optional] **redirect_url** | **string** | The URL to send the [conferenceRedirect](/docs/voice/webhooks/conferenceRedirect) event which will provide new BXML. Not allowed if `state` is `completed`, but required if `state` is `active`. | [optional] -**redirect_method** | [**\OpenAPI\Client\Model\RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] +**redirect_method** | [**\Bandwidth\Model\RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] **username** | **string** | Basic auth username. | [optional] **password** | **string** | Basic auth password. | [optional] **redirect_fallback_url** | **string** | A fallback url which, if provided, will be used to retry the `conferenceRedirect` webhook delivery in case `redirectUrl` fails to respond. Not allowed if `state` is `completed`. | [optional] -**redirect_fallback_method** | [**\OpenAPI\Client\Model\RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] +**redirect_fallback_method** | [**\Bandwidth\Model\RedirectMethodEnum**](RedirectMethodEnum.md) | | [optional] **fallback_username** | **string** | Basic auth username. | [optional] **fallback_password** | **string** | Basic auth password. | [optional] diff --git a/docs/Model/VerificationDenialWebhook.md b/docs/Model/VerificationDenialWebhook.md index ad0fe2b0..a2dadad3 100644 --- a/docs/Model/VerificationDenialWebhook.md +++ b/docs/Model/VerificationDenialWebhook.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_id** | **string** | User's account ID. | [optional] -**additional_denial_reasons** | [**\OpenAPI\Client\Model\AdditionalDenialReason[]**](AdditionalDenialReason.md) | An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. | [optional] +**additional_denial_reasons** | [**\Bandwidth\Model\AdditionalDenialReason[]**](AdditionalDenialReason.md) | An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. | [optional] **decline_reason_description** | **string** | Explanation for why a verification request was declined. | [optional] **denial_status_code** | **int** | Reason code for denial. | [optional] **internal_ticket_number** | **string** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. | [optional] diff --git a/docs/Model/VerificationRequest.md b/docs/Model/VerificationRequest.md index 0d347778..cd5dcf68 100644 --- a/docs/Model/VerificationRequest.md +++ b/docs/Model/VerificationRequest.md @@ -4,23 +4,23 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**business_address** | [**\OpenAPI\Client\Model\Address**](Address.md) | | -**business_contact** | [**\OpenAPI\Client\Model\Contact**](Contact.md) | | +**business_address** | [**\Bandwidth\Model\Address**](Address.md) | | +**business_contact** | [**\Bandwidth\Model\Contact**](Contact.md) | | **message_volume** | **int** | Estimated monthly volume of messages from the toll-free number. | **phone_numbers** | **string[]** | | **use_case** | **string** | The category of the use case. | **use_case_summary** | **string** | A general idea of the use case and customer. | **production_message_content** | **string** | Example of message content. | -**opt_in_workflow** | [**\OpenAPI\Client\Model\OptInWorkflow**](OptInWorkflow.md) | | +**opt_in_workflow** | [**\Bandwidth\Model\OptInWorkflow**](OptInWorkflow.md) | | **additional_information** | **string** | Any additional information. | [optional] **isv_reseller** | **string** | ISV name. | [optional] **privacy_policy_url** | **string** | The Toll-Free Verification request privacy policy URL. | [optional] **terms_and_conditions_url** | **string** | The Toll-Free Verification request terms and conditions policy URL. | [optional] **business_dba** | **string** | The company 'Doing Business As'. | [optional] **business_registration_number** | **string** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] -**business_registration_type** | [**\OpenAPI\Client\Model\BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] +**business_registration_type** | [**\Bandwidth\Model\BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] **business_registration_issuing_country** | **string** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] -**business_entity_type** | [**\OpenAPI\Client\Model\BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | +**business_entity_type** | [**\Bandwidth\Model\BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | **help_message_response** | **string** | A message that gets sent to users requesting help. | [optional] **age_gated_content** | **bool** | Indicates whether the content is age-gated. | [optional] **cv_token** | **string** | The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. Supplying an empty string will likely result in rejection. | [optional] diff --git a/docs/Model/VerificationUpdateRequest.md b/docs/Model/VerificationUpdateRequest.md index 9aed1caf..1d891fcc 100644 --- a/docs/Model/VerificationUpdateRequest.md +++ b/docs/Model/VerificationUpdateRequest.md @@ -4,21 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**business_address** | [**\OpenAPI\Client\Model\Address**](Address.md) | | -**business_contact** | [**\OpenAPI\Client\Model\Contact**](Contact.md) | | +**business_address** | [**\Bandwidth\Model\Address**](Address.md) | | +**business_contact** | [**\Bandwidth\Model\Contact**](Contact.md) | | **message_volume** | **int** | Estimated monthly volume of messages from the toll-free number. | **use_case** | **string** | The category of the use case. | **use_case_summary** | **string** | A general idea of the use case and customer. | **production_message_content** | **string** | Example of message content. | -**opt_in_workflow** | [**\OpenAPI\Client\Model\OptInWorkflow**](OptInWorkflow.md) | | +**opt_in_workflow** | [**\Bandwidth\Model\OptInWorkflow**](OptInWorkflow.md) | | **additional_information** | **string** | Any additional information. | [optional] **isv_reseller** | **string** | ISV name. | [optional] **privacy_policy_url** | **string** | The Toll-Free Verification request privacy policy URL. | [optional] **terms_and_conditions_url** | **string** | The Toll-Free Verification request terms and conditions policy URL. | [optional] **business_dba** | **string** | The company 'Doing Business As'. | [optional] **business_registration_number** | **string** | Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.** | [optional] -**business_registration_type** | [**\OpenAPI\Client\Model\BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] -**business_entity_type** | [**\OpenAPI\Client\Model\BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] +**business_registration_type** | [**\Bandwidth\Model\BusinessRegistrationTypeEnum**](BusinessRegistrationTypeEnum.md) | | [optional] +**business_entity_type** | [**\Bandwidth\Model\BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional] **business_registration_issuing_country** | **string** | The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code | | [optional] **help_message_response** | **string** | A message that gets sent to users requesting help. | [optional] **age_gated_content** | **bool** | Indicates whether the content is age-gated. | [optional] diff --git a/docs/Model/VerificationWebhook.md b/docs/Model/VerificationWebhook.md index d98948d6..17071740 100644 --- a/docs/Model/VerificationWebhook.md +++ b/docs/Model/VerificationWebhook.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **account_id** | **string** | User's account ID. | [optional] **phone_number** | **string** | Toll-free telephone number in E.164 format. | [optional] -**status** | [**\OpenAPI\Client\Model\TfvCallbackStatusEnum**](TfvCallbackStatusEnum.md) | | [optional] +**status** | [**\Bandwidth\Model\TfvCallbackStatusEnum**](TfvCallbackStatusEnum.md) | | [optional] **internal_ticket_number** | **string** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookSubscription.md b/docs/Model/WebhookSubscription.md index 78aefa80..73d9a1f1 100644 --- a/docs/Model/WebhookSubscription.md +++ b/docs/Model/WebhookSubscription.md @@ -7,8 +7,8 @@ Name | Type | Description | Notes **id** | **string** | | [optional] **account_id** | **string** | | [optional] **callback_url** | **string** | Callback URL to receive status updates from Bandwidth. When a webhook subscription is registered with Bandwidth under a given account ID, it will be used to send status updates for all requests submitted under that account ID. | -**type** | [**\OpenAPI\Client\Model\WebhookSubscriptionTypeEnum**](WebhookSubscriptionTypeEnum.md) | | [optional] -**basic_authentication** | [**\OpenAPI\Client\Model\WebhookSubscriptionBasicAuthentication**](WebhookSubscriptionBasicAuthentication.md) | | [optional] +**type** | [**\Bandwidth\Model\WebhookSubscriptionTypeEnum**](WebhookSubscriptionTypeEnum.md) | | [optional] +**basic_authentication** | [**\Bandwidth\Model\WebhookSubscriptionBasicAuthentication**](WebhookSubscriptionBasicAuthentication.md) | | [optional] **created_date** | **\DateTime** | | [optional] **modified_date** | **\DateTime** | | [optional] diff --git a/docs/Model/WebhookSubscriptionError.md b/docs/Model/WebhookSubscriptionError.md index 999901be..7879abcf 100644 --- a/docs/Model/WebhookSubscriptionError.md +++ b/docs/Model/WebhookSubscriptionError.md @@ -6,6 +6,6 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **code** | **int** | | [optional] **description** | **string** | | [optional] -**telephone_numbers** | [**\OpenAPI\Client\Model\TelephoneNumber[]**](TelephoneNumber.md) | | [optional] +**telephone_numbers** | [**\Bandwidth\Model\TelephoneNumber[]**](TelephoneNumber.md) | | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/WebhookSubscriptionRequestSchema.md b/docs/Model/WebhookSubscriptionRequestSchema.md index 52567701..075d329e 100644 --- a/docs/Model/WebhookSubscriptionRequestSchema.md +++ b/docs/Model/WebhookSubscriptionRequestSchema.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**basic_authentication** | [**\OpenAPI\Client\Model\TfvBasicAuthentication**](TfvBasicAuthentication.md) | | [optional] +**basic_authentication** | [**\Bandwidth\Model\TfvBasicAuthentication**](TfvBasicAuthentication.md) | | [optional] **callback_url** | **string** | Callback URL to receive status updates from Bandwidth. When a webhook subscription is registered with Bandwidth under a given account ID, it will be used to send status updates for all requests submitted under that account ID. | **shared_secret_key** | **string** | An ASCII string submitted by the user as a shared secret key for generating an HMAC header for callbacks. | [optional] diff --git a/docs/Model/WebhookSubscriptionsListBody.md b/docs/Model/WebhookSubscriptionsListBody.md index a8858bfc..d7c4f525 100644 --- a/docs/Model/WebhookSubscriptionsListBody.md +++ b/docs/Model/WebhookSubscriptionsListBody.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**\OpenAPI\Client\Model\LinksObject**](LinksObject.md) | | [optional] -**errors** | [**\OpenAPI\Client\Model\WebhookSubscriptionError[]**](WebhookSubscriptionError.md) | | [optional] -**data** | [**\OpenAPI\Client\Model\WebhookSubscription[]**](WebhookSubscription.md) | | +**links** | [**\Bandwidth\Model\LinksObject**](LinksObject.md) | | [optional] +**errors** | [**\Bandwidth\Model\WebhookSubscriptionError[]**](WebhookSubscriptionError.md) | | [optional] +**data** | [**\Bandwidth\Model\WebhookSubscription[]**](WebhookSubscription.md) | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/openapi-config.yml b/openapi-config.yml index 8b5e6f6e..1cce16ad 100644 --- a/openapi-config.yml +++ b/openapi-config.yml @@ -1,2 +1,3 @@ packageName: Bandwidth composerPackageName: bandwidth/sdk +invokerPackage: Bandwidth diff --git a/src/APIException.php b/src/APIException.php index 4f053177..029bbfd9 100644 --- a/src/APIException.php +++ b/src/APIException.php @@ -3,7 +3,7 @@ * ApiException * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client; +namespace Bandwidth; use Exception; use stdClass; @@ -33,7 +33,7 @@ /** * ApiException Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Api/CallsApi.php b/src/Api/CallsApi.php index 43a4f427..01488aca 100644 --- a/src/Api/CallsApi.php +++ b/src/Api/CallsApi.php @@ -3,7 +3,7 @@ * CallsApi * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Api; +namespace Bandwidth\Api; use InvalidArgumentException; use GuzzleHttp\Client; @@ -38,16 +38,16 @@ use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ApiException; +use Bandwidth\Configuration; +use Bandwidth\HeaderSelector; +use Bandwidth\FormDataProcessor; +use Bandwidth\ObjectSerializer; /** * CallsApi Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -148,22 +148,22 @@ public function getConfig(): Configuration * URL: https://voice.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) + * @param \Bandwidth\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createCall'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\CreateCallResponse|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\CreateCallResponse|\Bandwidth\Model\VoiceApiError */ public function createCall( string $account_id, - \OpenAPI\Client\Model\CreateCall $create_call, + \Bandwidth\Model\CreateCall $create_call, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createCall'][0] - ): \OpenAPI\Client\Model\CreateCallResponse|\OpenAPI\Client\Model\VoiceApiError + ): \Bandwidth\Model\CreateCallResponse|\Bandwidth\Model\VoiceApiError { list($response) = $this->createCallWithHttpInfo($account_id, $create_call, $hostIndex, $variables, $contentType); return $response; @@ -179,18 +179,18 @@ public function createCall( * URL: https://voice.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) + * @param \Bandwidth\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createCall'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\CreateCallResponse|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\CreateCallResponse|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function createCallWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\CreateCall $create_call, + \Bandwidth\Model\CreateCall $create_call, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createCall'][0] @@ -223,55 +223,55 @@ public function createCallWithHttpInfo( switch($statusCode) { case 201: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CreateCallResponse', + '\Bandwidth\Model\CreateCallResponse', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -292,7 +292,7 @@ public function createCallWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CreateCallResponse', + '\Bandwidth\Model\CreateCallResponse', $request, $response, ); @@ -301,7 +301,7 @@ public function createCallWithHttpInfo( case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\CreateCallResponse', + '\Bandwidth\Model\CreateCallResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -309,7 +309,7 @@ public function createCallWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -317,7 +317,7 @@ public function createCallWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -325,7 +325,7 @@ public function createCallWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -333,7 +333,7 @@ public function createCallWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -341,7 +341,7 @@ public function createCallWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -349,7 +349,7 @@ public function createCallWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -357,7 +357,7 @@ public function createCallWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -365,7 +365,7 @@ public function createCallWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -386,7 +386,7 @@ public function createCallWithHttpInfo( * URL: https://voice.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) + * @param \Bandwidth\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createCall'] to see the possible values for this operation @@ -396,7 +396,7 @@ public function createCallWithHttpInfo( */ public function createCallAsync( string $account_id, - \OpenAPI\Client\Model\CreateCall $create_call, + \Bandwidth\Model\CreateCall $create_call, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createCall'][0] @@ -420,7 +420,7 @@ function ($response) { * URL: https://voice.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) + * @param \Bandwidth\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createCall'] to see the possible values for this operation @@ -430,13 +430,13 @@ function ($response) { */ public function createCallAsyncWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\CreateCall $create_call, + \Bandwidth\Model\CreateCall $create_call, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createCall'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\CreateCallResponse'; + $returnType = '\Bandwidth\Model\CreateCallResponse'; $request = $this->createCallRequest($account_id, $create_call, $hostIndex, $variables, $contentType); return $this->client @@ -483,7 +483,7 @@ function ($exception) { * URL: https://voice.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) + * @param \Bandwidth\Model\CreateCall $create_call JSON object containing information to create an outbound call (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createCall'] to see the possible values for this operation @@ -493,7 +493,7 @@ function ($exception) { */ public function createCallRequest( string $account_id, - \OpenAPI\Client\Model\CreateCall $create_call, + \Bandwidth\Model\CreateCall $create_call, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createCall'][0] @@ -645,7 +645,7 @@ protected function getHostSettingsForcreateCall(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\CallState|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\CallState|\Bandwidth\Model\VoiceApiError */ public function getCallState( string $account_id, @@ -653,7 +653,7 @@ public function getCallState( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['getCallState'][0] - ): \OpenAPI\Client\Model\CallState|\OpenAPI\Client\Model\VoiceApiError + ): \Bandwidth\Model\CallState|\Bandwidth\Model\VoiceApiError { list($response) = $this->getCallStateWithHttpInfo($account_id, $call_id, $hostIndex, $variables, $contentType); return $response; @@ -676,7 +676,7 @@ public function getCallState( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\CallState|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\CallState|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function getCallStateWithHttpInfo( string $account_id, @@ -713,55 +713,55 @@ public function getCallStateWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallState', + '\Bandwidth\Model\CallState', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -782,7 +782,7 @@ public function getCallStateWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallState', + '\Bandwidth\Model\CallState', $request, $response, ); @@ -791,7 +791,7 @@ public function getCallStateWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\CallState', + '\Bandwidth\Model\CallState', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -799,7 +799,7 @@ public function getCallStateWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -807,7 +807,7 @@ public function getCallStateWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -815,7 +815,7 @@ public function getCallStateWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -823,7 +823,7 @@ public function getCallStateWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -831,7 +831,7 @@ public function getCallStateWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -839,7 +839,7 @@ public function getCallStateWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -847,7 +847,7 @@ public function getCallStateWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -855,7 +855,7 @@ public function getCallStateWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -926,7 +926,7 @@ public function getCallStateAsyncWithHttpInfo( string $contentType = self::contentTypes['getCallState'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\CallState'; + $returnType = '\Bandwidth\Model\CallState'; $request = $this->getCallStateRequest($account_id, $call_id, $hostIndex, $variables, $contentType); return $this->client @@ -1142,7 +1142,7 @@ protected function getHostSettingsForgetCallState(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\CallState[]|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\CallState[]|\Bandwidth\Model\VoiceApiError */ public function listCalls( string $account_id, @@ -1156,7 +1156,7 @@ public function listCalls( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['listCalls'][0] - ): array|\OpenAPI\Client\Model\VoiceApiError + ): array|\Bandwidth\Model\VoiceApiError { list($response) = $this->listCallsWithHttpInfo($account_id, $to, $from, $min_start_time, $max_start_time, $disconnect_cause, $page_size, $page_token, $hostIndex, $variables, $contentType); return $response; @@ -1185,7 +1185,7 @@ public function listCalls( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\CallState[]|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\CallState[]|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function listCallsWithHttpInfo( string $account_id, @@ -1228,55 +1228,55 @@ public function listCallsWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallState[]', + '\Bandwidth\Model\CallState[]', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -1297,7 +1297,7 @@ public function listCallsWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallState[]', + '\Bandwidth\Model\CallState[]', $request, $response, ); @@ -1306,7 +1306,7 @@ public function listCallsWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\CallState[]', + '\Bandwidth\Model\CallState[]', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1314,7 +1314,7 @@ public function listCallsWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1322,7 +1322,7 @@ public function listCallsWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1330,7 +1330,7 @@ public function listCallsWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1338,7 +1338,7 @@ public function listCallsWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1346,7 +1346,7 @@ public function listCallsWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1354,7 +1354,7 @@ public function listCallsWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1362,7 +1362,7 @@ public function listCallsWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1370,7 +1370,7 @@ public function listCallsWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1465,7 +1465,7 @@ public function listCallsAsyncWithHttpInfo( string $contentType = self::contentTypes['listCalls'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\CallState[]'; + $returnType = '\Bandwidth\Model\CallState[]'; $request = $this->listCallsRequest($account_id, $to, $from, $min_start_time, $max_start_time, $disconnect_cause, $page_size, $page_token, $hostIndex, $variables, $contentType); return $this->client @@ -1742,23 +1742,23 @@ protected function getHostSettingsForlistCalls(): array * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) - * @param \OpenAPI\Client\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) + * @param \Bandwidth\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCall'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\VoiceApiError|null + * @return \Bandwidth\Model\VoiceApiError|null */ public function updateCall( string $account_id, string $call_id, - \OpenAPI\Client\Model\UpdateCall $update_call, + \Bandwidth\Model\UpdateCall $update_call, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateCall'][0] - ): ?\OpenAPI\Client\Model\VoiceApiError + ): ?\Bandwidth\Model\VoiceApiError { list($response) = $this->updateCallWithHttpInfo($account_id, $call_id, $update_call, $hostIndex, $variables, $contentType); return $response; @@ -1775,7 +1775,7 @@ public function updateCall( * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) - * @param \OpenAPI\Client\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) + * @param \Bandwidth\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCall'] to see the possible values for this operation @@ -1787,7 +1787,7 @@ public function updateCall( public function updateCallWithHttpInfo( string $account_id, string $call_id, - \OpenAPI\Client\Model\UpdateCall $update_call, + \Bandwidth\Model\UpdateCall $update_call, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateCall'][0] @@ -1824,7 +1824,7 @@ public function updateCallWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1832,7 +1832,7 @@ public function updateCallWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1840,7 +1840,7 @@ public function updateCallWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1848,7 +1848,7 @@ public function updateCallWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1856,7 +1856,7 @@ public function updateCallWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1864,7 +1864,7 @@ public function updateCallWithHttpInfo( case 409: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1872,7 +1872,7 @@ public function updateCallWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1880,7 +1880,7 @@ public function updateCallWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1888,7 +1888,7 @@ public function updateCallWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1910,7 +1910,7 @@ public function updateCallWithHttpInfo( * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) - * @param \OpenAPI\Client\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) + * @param \Bandwidth\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCall'] to see the possible values for this operation @@ -1921,7 +1921,7 @@ public function updateCallWithHttpInfo( public function updateCallAsync( string $account_id, string $call_id, - \OpenAPI\Client\Model\UpdateCall $update_call, + \Bandwidth\Model\UpdateCall $update_call, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateCall'][0] @@ -1946,7 +1946,7 @@ function ($response) { * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) - * @param \OpenAPI\Client\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) + * @param \Bandwidth\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCall'] to see the possible values for this operation @@ -1957,7 +1957,7 @@ function ($response) { public function updateCallAsyncWithHttpInfo( string $account_id, string $call_id, - \OpenAPI\Client\Model\UpdateCall $update_call, + \Bandwidth\Model\UpdateCall $update_call, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateCall'][0] @@ -1998,7 +1998,7 @@ function ($exception) { * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) - * @param \OpenAPI\Client\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) + * @param \Bandwidth\Model\UpdateCall $update_call JSON object containing information to redirect an existing call to a new BXML document (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCall'] to see the possible values for this operation @@ -2009,7 +2009,7 @@ function ($exception) { public function updateCallRequest( string $account_id, string $call_id, - \OpenAPI\Client\Model\UpdateCall $update_call, + \Bandwidth\Model\UpdateCall $update_call, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateCall'][0] @@ -2177,7 +2177,7 @@ protected function getHostSettingsForupdateCall(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\VoiceApiError|null + * @return \Bandwidth\Model\VoiceApiError|null */ public function updateCallBxml( string $account_id, @@ -2186,7 +2186,7 @@ public function updateCallBxml( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateCallBxml'][0] - ): ?\OpenAPI\Client\Model\VoiceApiError + ): ?\Bandwidth\Model\VoiceApiError { list($response) = $this->updateCallBxmlWithHttpInfo($account_id, $call_id, $body, $hostIndex, $variables, $contentType); return $response; @@ -2252,7 +2252,7 @@ public function updateCallBxmlWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2260,7 +2260,7 @@ public function updateCallBxmlWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2268,7 +2268,7 @@ public function updateCallBxmlWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2276,7 +2276,7 @@ public function updateCallBxmlWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2284,7 +2284,7 @@ public function updateCallBxmlWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2292,7 +2292,7 @@ public function updateCallBxmlWithHttpInfo( case 409: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2300,7 +2300,7 @@ public function updateCallBxmlWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2308,7 +2308,7 @@ public function updateCallBxmlWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2316,7 +2316,7 @@ public function updateCallBxmlWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); diff --git a/src/Api/ConferencesApi.php b/src/Api/ConferencesApi.php index 5bbc41cc..df29fbdb 100644 --- a/src/Api/ConferencesApi.php +++ b/src/Api/ConferencesApi.php @@ -3,7 +3,7 @@ * ConferencesApi * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Api; +namespace Bandwidth\Api; use InvalidArgumentException; use GuzzleHttp\Client; @@ -38,16 +38,16 @@ use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ApiException; +use Bandwidth\Configuration; +use Bandwidth\HeaderSelector; +use Bandwidth\FormDataProcessor; +use Bandwidth\ObjectSerializer; /** * ConferencesApi Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -168,7 +168,7 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SplFileObject|\OpenAPI\Client\Model\VoiceApiError + * @return \SplFileObject|\Bandwidth\Model\VoiceApiError */ public function downloadConferenceRecording( string $account_id, @@ -177,7 +177,7 @@ public function downloadConferenceRecording( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['downloadConferenceRecording'][0] - ): \SplFileObject|\OpenAPI\Client\Model\VoiceApiError + ): \SplFileObject|\Bandwidth\Model\VoiceApiError { list($response) = $this->downloadConferenceRecordingWithHttpInfo($account_id, $conference_id, $recording_id, $hostIndex, $variables, $contentType); return $response; @@ -201,7 +201,7 @@ public function downloadConferenceRecording( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SplFileObject|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \SplFileObject|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function downloadConferenceRecordingWithHttpInfo( string $account_id, @@ -245,49 +245,49 @@ public function downloadConferenceRecordingWithHttpInfo( ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -325,7 +325,7 @@ public function downloadConferenceRecordingWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -333,7 +333,7 @@ public function downloadConferenceRecordingWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -341,7 +341,7 @@ public function downloadConferenceRecordingWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -349,7 +349,7 @@ public function downloadConferenceRecordingWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -357,7 +357,7 @@ public function downloadConferenceRecordingWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -365,7 +365,7 @@ public function downloadConferenceRecordingWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -373,7 +373,7 @@ public function downloadConferenceRecordingWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -381,7 +381,7 @@ public function downloadConferenceRecordingWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -683,7 +683,7 @@ protected function getHostSettingsFordownloadConferenceRecording(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\Conference|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\Conference|\Bandwidth\Model\VoiceApiError */ public function getConference( string $account_id, @@ -691,7 +691,7 @@ public function getConference( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['getConference'][0] - ): \OpenAPI\Client\Model\Conference|\OpenAPI\Client\Model\VoiceApiError + ): \Bandwidth\Model\Conference|\Bandwidth\Model\VoiceApiError { list($response) = $this->getConferenceWithHttpInfo($account_id, $conference_id, $hostIndex, $variables, $contentType); return $response; @@ -714,7 +714,7 @@ public function getConference( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\Conference|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\Conference|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function getConferenceWithHttpInfo( string $account_id, @@ -751,55 +751,55 @@ public function getConferenceWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\Conference', + '\Bandwidth\Model\Conference', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -820,7 +820,7 @@ public function getConferenceWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\Conference', + '\Bandwidth\Model\Conference', $request, $response, ); @@ -829,7 +829,7 @@ public function getConferenceWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\Conference', + '\Bandwidth\Model\Conference', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -837,7 +837,7 @@ public function getConferenceWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -845,7 +845,7 @@ public function getConferenceWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -853,7 +853,7 @@ public function getConferenceWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -861,7 +861,7 @@ public function getConferenceWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -869,7 +869,7 @@ public function getConferenceWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -877,7 +877,7 @@ public function getConferenceWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -885,7 +885,7 @@ public function getConferenceWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -893,7 +893,7 @@ public function getConferenceWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -964,7 +964,7 @@ public function getConferenceAsyncWithHttpInfo( string $contentType = self::contentTypes['getConference'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\Conference'; + $returnType = '\Bandwidth\Model\Conference'; $request = $this->getConferenceRequest($account_id, $conference_id, $hostIndex, $variables, $contentType); return $this->client @@ -1175,7 +1175,7 @@ protected function getHostSettingsForgetConference(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\ConferenceMember|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\ConferenceMember|\Bandwidth\Model\VoiceApiError */ public function getConferenceMember( string $account_id, @@ -1184,7 +1184,7 @@ public function getConferenceMember( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['getConferenceMember'][0] - ): \OpenAPI\Client\Model\ConferenceMember|\OpenAPI\Client\Model\VoiceApiError + ): \Bandwidth\Model\ConferenceMember|\Bandwidth\Model\VoiceApiError { list($response) = $this->getConferenceMemberWithHttpInfo($account_id, $conference_id, $member_id, $hostIndex, $variables, $contentType); return $response; @@ -1208,7 +1208,7 @@ public function getConferenceMember( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\ConferenceMember|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\ConferenceMember|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function getConferenceMemberWithHttpInfo( string $account_id, @@ -1246,55 +1246,55 @@ public function getConferenceMemberWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\ConferenceMember', + '\Bandwidth\Model\ConferenceMember', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -1315,7 +1315,7 @@ public function getConferenceMemberWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\ConferenceMember', + '\Bandwidth\Model\ConferenceMember', $request, $response, ); @@ -1324,7 +1324,7 @@ public function getConferenceMemberWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\ConferenceMember', + '\Bandwidth\Model\ConferenceMember', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1332,7 +1332,7 @@ public function getConferenceMemberWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1340,7 +1340,7 @@ public function getConferenceMemberWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1348,7 +1348,7 @@ public function getConferenceMemberWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1356,7 +1356,7 @@ public function getConferenceMemberWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1364,7 +1364,7 @@ public function getConferenceMemberWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1372,7 +1372,7 @@ public function getConferenceMemberWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1380,7 +1380,7 @@ public function getConferenceMemberWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1388,7 +1388,7 @@ public function getConferenceMemberWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1463,7 +1463,7 @@ public function getConferenceMemberAsyncWithHttpInfo( string $contentType = self::contentTypes['getConferenceMember'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\ConferenceMember'; + $returnType = '\Bandwidth\Model\ConferenceMember'; $request = $this->getConferenceMemberRequest($account_id, $conference_id, $member_id, $hostIndex, $variables, $contentType); return $this->client @@ -1691,7 +1691,7 @@ protected function getHostSettingsForgetConferenceMember(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\ConferenceRecordingMetadata|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\ConferenceRecordingMetadata|\Bandwidth\Model\VoiceApiError */ public function getConferenceRecording( string $account_id, @@ -1700,7 +1700,7 @@ public function getConferenceRecording( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['getConferenceRecording'][0] - ): \OpenAPI\Client\Model\ConferenceRecordingMetadata|\OpenAPI\Client\Model\VoiceApiError + ): \Bandwidth\Model\ConferenceRecordingMetadata|\Bandwidth\Model\VoiceApiError { list($response) = $this->getConferenceRecordingWithHttpInfo($account_id, $conference_id, $recording_id, $hostIndex, $variables, $contentType); return $response; @@ -1724,7 +1724,7 @@ public function getConferenceRecording( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\ConferenceRecordingMetadata|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\ConferenceRecordingMetadata|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function getConferenceRecordingWithHttpInfo( string $account_id, @@ -1762,55 +1762,55 @@ public function getConferenceRecordingWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\ConferenceRecordingMetadata', + '\Bandwidth\Model\ConferenceRecordingMetadata', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -1831,7 +1831,7 @@ public function getConferenceRecordingWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\ConferenceRecordingMetadata', + '\Bandwidth\Model\ConferenceRecordingMetadata', $request, $response, ); @@ -1840,7 +1840,7 @@ public function getConferenceRecordingWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\ConferenceRecordingMetadata', + '\Bandwidth\Model\ConferenceRecordingMetadata', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1848,7 +1848,7 @@ public function getConferenceRecordingWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1856,7 +1856,7 @@ public function getConferenceRecordingWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1864,7 +1864,7 @@ public function getConferenceRecordingWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1872,7 +1872,7 @@ public function getConferenceRecordingWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1880,7 +1880,7 @@ public function getConferenceRecordingWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1888,7 +1888,7 @@ public function getConferenceRecordingWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1896,7 +1896,7 @@ public function getConferenceRecordingWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1904,7 +1904,7 @@ public function getConferenceRecordingWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1979,7 +1979,7 @@ public function getConferenceRecordingAsyncWithHttpInfo( string $contentType = self::contentTypes['getConferenceRecording'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\ConferenceRecordingMetadata'; + $returnType = '\Bandwidth\Model\ConferenceRecordingMetadata'; $request = $this->getConferenceRecordingRequest($account_id, $conference_id, $recording_id, $hostIndex, $variables, $contentType); return $this->client @@ -2206,7 +2206,7 @@ protected function getHostSettingsForgetConferenceRecording(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\ConferenceRecordingMetadata[]|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\ConferenceRecordingMetadata[]|\Bandwidth\Model\VoiceApiError */ public function listConferenceRecordings( string $account_id, @@ -2214,7 +2214,7 @@ public function listConferenceRecordings( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['listConferenceRecordings'][0] - ): array|\OpenAPI\Client\Model\VoiceApiError + ): array|\Bandwidth\Model\VoiceApiError { list($response) = $this->listConferenceRecordingsWithHttpInfo($account_id, $conference_id, $hostIndex, $variables, $contentType); return $response; @@ -2237,7 +2237,7 @@ public function listConferenceRecordings( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\ConferenceRecordingMetadata[]|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\ConferenceRecordingMetadata[]|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function listConferenceRecordingsWithHttpInfo( string $account_id, @@ -2274,55 +2274,55 @@ public function listConferenceRecordingsWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\ConferenceRecordingMetadata[]', + '\Bandwidth\Model\ConferenceRecordingMetadata[]', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -2343,7 +2343,7 @@ public function listConferenceRecordingsWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\ConferenceRecordingMetadata[]', + '\Bandwidth\Model\ConferenceRecordingMetadata[]', $request, $response, ); @@ -2352,7 +2352,7 @@ public function listConferenceRecordingsWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\ConferenceRecordingMetadata[]', + '\Bandwidth\Model\ConferenceRecordingMetadata[]', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2360,7 +2360,7 @@ public function listConferenceRecordingsWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2368,7 +2368,7 @@ public function listConferenceRecordingsWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2376,7 +2376,7 @@ public function listConferenceRecordingsWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2384,7 +2384,7 @@ public function listConferenceRecordingsWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2392,7 +2392,7 @@ public function listConferenceRecordingsWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2400,7 +2400,7 @@ public function listConferenceRecordingsWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2408,7 +2408,7 @@ public function listConferenceRecordingsWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2416,7 +2416,7 @@ public function listConferenceRecordingsWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2487,7 +2487,7 @@ public function listConferenceRecordingsAsyncWithHttpInfo( string $contentType = self::contentTypes['listConferenceRecordings'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\ConferenceRecordingMetadata[]'; + $returnType = '\Bandwidth\Model\ConferenceRecordingMetadata[]'; $request = $this->listConferenceRecordingsRequest($account_id, $conference_id, $hostIndex, $variables, $contentType); return $this->client @@ -2701,7 +2701,7 @@ protected function getHostSettingsForlistConferenceRecordings(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\Conference[]|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\Conference[]|\Bandwidth\Model\VoiceApiError */ public function listConferences( string $account_id, @@ -2713,7 +2713,7 @@ public function listConferences( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['listConferences'][0] - ): array|\OpenAPI\Client\Model\VoiceApiError + ): array|\Bandwidth\Model\VoiceApiError { list($response) = $this->listConferencesWithHttpInfo($account_id, $name, $min_created_time, $max_created_time, $page_size, $page_token, $hostIndex, $variables, $contentType); return $response; @@ -2740,7 +2740,7 @@ public function listConferences( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\Conference[]|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\Conference[]|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function listConferencesWithHttpInfo( string $account_id, @@ -2781,55 +2781,55 @@ public function listConferencesWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\Conference[]', + '\Bandwidth\Model\Conference[]', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -2850,7 +2850,7 @@ public function listConferencesWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\Conference[]', + '\Bandwidth\Model\Conference[]', $request, $response, ); @@ -2859,7 +2859,7 @@ public function listConferencesWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\Conference[]', + '\Bandwidth\Model\Conference[]', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2867,7 +2867,7 @@ public function listConferencesWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2875,7 +2875,7 @@ public function listConferencesWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2883,7 +2883,7 @@ public function listConferencesWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2891,7 +2891,7 @@ public function listConferencesWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2899,7 +2899,7 @@ public function listConferencesWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2907,7 +2907,7 @@ public function listConferencesWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2915,7 +2915,7 @@ public function listConferencesWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2923,7 +2923,7 @@ public function listConferencesWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3010,7 +3010,7 @@ public function listConferencesAsyncWithHttpInfo( string $contentType = self::contentTypes['listConferences'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\Conference[]'; + $returnType = '\Bandwidth\Model\Conference[]'; $request = $this->listConferencesRequest($account_id, $name, $min_created_time, $max_created_time, $page_size, $page_token, $hostIndex, $variables, $contentType); return $this->client @@ -3263,23 +3263,23 @@ protected function getHostSettingsForlistConferences(): array * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $conference_id Programmable Voice API Conference ID. (required) - * @param \OpenAPI\Client\Model\UpdateConference $update_conference update_conference (required) + * @param \Bandwidth\Model\UpdateConference $update_conference update_conference (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConference'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\VoiceApiError|null + * @return \Bandwidth\Model\VoiceApiError|null */ public function updateConference( string $account_id, string $conference_id, - \OpenAPI\Client\Model\UpdateConference $update_conference, + \Bandwidth\Model\UpdateConference $update_conference, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateConference'][0] - ): ?\OpenAPI\Client\Model\VoiceApiError + ): ?\Bandwidth\Model\VoiceApiError { list($response) = $this->updateConferenceWithHttpInfo($account_id, $conference_id, $update_conference, $hostIndex, $variables, $contentType); return $response; @@ -3296,7 +3296,7 @@ public function updateConference( * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $conference_id Programmable Voice API Conference ID. (required) - * @param \OpenAPI\Client\Model\UpdateConference $update_conference (required) + * @param \Bandwidth\Model\UpdateConference $update_conference (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConference'] to see the possible values for this operation @@ -3308,7 +3308,7 @@ public function updateConference( public function updateConferenceWithHttpInfo( string $account_id, string $conference_id, - \OpenAPI\Client\Model\UpdateConference $update_conference, + \Bandwidth\Model\UpdateConference $update_conference, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateConference'][0] @@ -3345,7 +3345,7 @@ public function updateConferenceWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3353,7 +3353,7 @@ public function updateConferenceWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3361,7 +3361,7 @@ public function updateConferenceWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3369,7 +3369,7 @@ public function updateConferenceWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3377,7 +3377,7 @@ public function updateConferenceWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3385,7 +3385,7 @@ public function updateConferenceWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3393,7 +3393,7 @@ public function updateConferenceWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3401,7 +3401,7 @@ public function updateConferenceWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3423,7 +3423,7 @@ public function updateConferenceWithHttpInfo( * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $conference_id Programmable Voice API Conference ID. (required) - * @param \OpenAPI\Client\Model\UpdateConference $update_conference (required) + * @param \Bandwidth\Model\UpdateConference $update_conference (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConference'] to see the possible values for this operation @@ -3434,7 +3434,7 @@ public function updateConferenceWithHttpInfo( public function updateConferenceAsync( string $account_id, string $conference_id, - \OpenAPI\Client\Model\UpdateConference $update_conference, + \Bandwidth\Model\UpdateConference $update_conference, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateConference'][0] @@ -3459,7 +3459,7 @@ function ($response) { * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $conference_id Programmable Voice API Conference ID. (required) - * @param \OpenAPI\Client\Model\UpdateConference $update_conference (required) + * @param \Bandwidth\Model\UpdateConference $update_conference (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConference'] to see the possible values for this operation @@ -3470,7 +3470,7 @@ function ($response) { public function updateConferenceAsyncWithHttpInfo( string $account_id, string $conference_id, - \OpenAPI\Client\Model\UpdateConference $update_conference, + \Bandwidth\Model\UpdateConference $update_conference, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateConference'][0] @@ -3511,7 +3511,7 @@ function ($exception) { * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $conference_id Programmable Voice API Conference ID. (required) - * @param \OpenAPI\Client\Model\UpdateConference $update_conference (required) + * @param \Bandwidth\Model\UpdateConference $update_conference (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConference'] to see the possible values for this operation @@ -3522,7 +3522,7 @@ function ($exception) { public function updateConferenceRequest( string $account_id, string $conference_id, - \OpenAPI\Client\Model\UpdateConference $update_conference, + \Bandwidth\Model\UpdateConference $update_conference, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateConference'][0] @@ -3690,7 +3690,7 @@ protected function getHostSettingsForupdateConference(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\VoiceApiError|null + * @return \Bandwidth\Model\VoiceApiError|null */ public function updateConferenceBxml( string $account_id, @@ -3699,7 +3699,7 @@ public function updateConferenceBxml( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateConferenceBxml'][0] - ): ?\OpenAPI\Client\Model\VoiceApiError + ): ?\Bandwidth\Model\VoiceApiError { list($response) = $this->updateConferenceBxmlWithHttpInfo($account_id, $conference_id, $body, $hostIndex, $variables, $contentType); return $response; @@ -3765,7 +3765,7 @@ public function updateConferenceBxmlWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3773,7 +3773,7 @@ public function updateConferenceBxmlWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3781,7 +3781,7 @@ public function updateConferenceBxmlWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3789,7 +3789,7 @@ public function updateConferenceBxmlWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3797,7 +3797,7 @@ public function updateConferenceBxmlWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3805,7 +3805,7 @@ public function updateConferenceBxmlWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3813,7 +3813,7 @@ public function updateConferenceBxmlWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3821,7 +3821,7 @@ public function updateConferenceBxmlWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4104,24 +4104,24 @@ protected function getHostSettingsForupdateConferenceBxml(): array * @param string $account_id Your Bandwidth Account ID. (required) * @param string $conference_id Programmable Voice API Conference ID. (required) * @param string $member_id Programmable Voice API Conference Member ID. (required) - * @param \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member update_conference_member (required) + * @param \Bandwidth\Model\UpdateConferenceMember $update_conference_member update_conference_member (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceMember'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\VoiceApiError|null + * @return \Bandwidth\Model\VoiceApiError|null */ public function updateConferenceMember( string $account_id, string $conference_id, string $member_id, - \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member, + \Bandwidth\Model\UpdateConferenceMember $update_conference_member, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateConferenceMember'][0] - ): ?\OpenAPI\Client\Model\VoiceApiError + ): ?\Bandwidth\Model\VoiceApiError { list($response) = $this->updateConferenceMemberWithHttpInfo($account_id, $conference_id, $member_id, $update_conference_member, $hostIndex, $variables, $contentType); return $response; @@ -4139,7 +4139,7 @@ public function updateConferenceMember( * @param string $account_id Your Bandwidth Account ID. (required) * @param string $conference_id Programmable Voice API Conference ID. (required) * @param string $member_id Programmable Voice API Conference Member ID. (required) - * @param \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member (required) + * @param \Bandwidth\Model\UpdateConferenceMember $update_conference_member (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceMember'] to see the possible values for this operation @@ -4152,7 +4152,7 @@ public function updateConferenceMemberWithHttpInfo( string $account_id, string $conference_id, string $member_id, - \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member, + \Bandwidth\Model\UpdateConferenceMember $update_conference_member, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateConferenceMember'][0] @@ -4189,7 +4189,7 @@ public function updateConferenceMemberWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4197,7 +4197,7 @@ public function updateConferenceMemberWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4205,7 +4205,7 @@ public function updateConferenceMemberWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4213,7 +4213,7 @@ public function updateConferenceMemberWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4221,7 +4221,7 @@ public function updateConferenceMemberWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4229,7 +4229,7 @@ public function updateConferenceMemberWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4237,7 +4237,7 @@ public function updateConferenceMemberWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4245,7 +4245,7 @@ public function updateConferenceMemberWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4268,7 +4268,7 @@ public function updateConferenceMemberWithHttpInfo( * @param string $account_id Your Bandwidth Account ID. (required) * @param string $conference_id Programmable Voice API Conference ID. (required) * @param string $member_id Programmable Voice API Conference Member ID. (required) - * @param \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member (required) + * @param \Bandwidth\Model\UpdateConferenceMember $update_conference_member (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceMember'] to see the possible values for this operation @@ -4280,7 +4280,7 @@ public function updateConferenceMemberAsync( string $account_id, string $conference_id, string $member_id, - \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member, + \Bandwidth\Model\UpdateConferenceMember $update_conference_member, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateConferenceMember'][0] @@ -4306,7 +4306,7 @@ function ($response) { * @param string $account_id Your Bandwidth Account ID. (required) * @param string $conference_id Programmable Voice API Conference ID. (required) * @param string $member_id Programmable Voice API Conference Member ID. (required) - * @param \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member (required) + * @param \Bandwidth\Model\UpdateConferenceMember $update_conference_member (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceMember'] to see the possible values for this operation @@ -4318,7 +4318,7 @@ public function updateConferenceMemberAsyncWithHttpInfo( string $account_id, string $conference_id, string $member_id, - \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member, + \Bandwidth\Model\UpdateConferenceMember $update_conference_member, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateConferenceMember'][0] @@ -4360,7 +4360,7 @@ function ($exception) { * @param string $account_id Your Bandwidth Account ID. (required) * @param string $conference_id Programmable Voice API Conference ID. (required) * @param string $member_id Programmable Voice API Conference Member ID. (required) - * @param \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member (required) + * @param \Bandwidth\Model\UpdateConferenceMember $update_conference_member (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateConferenceMember'] to see the possible values for this operation @@ -4372,7 +4372,7 @@ public function updateConferenceMemberRequest( string $account_id, string $conference_id, string $member_id, - \OpenAPI\Client\Model\UpdateConferenceMember $update_conference_member, + \Bandwidth\Model\UpdateConferenceMember $update_conference_member, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateConferenceMember'][0] diff --git a/src/Api/EndpointsApi.php b/src/Api/EndpointsApi.php index 26ae2a5b..ad58349b 100644 --- a/src/Api/EndpointsApi.php +++ b/src/Api/EndpointsApi.php @@ -3,7 +3,7 @@ * EndpointsApi * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Api; +namespace Bandwidth\Api; use InvalidArgumentException; use GuzzleHttp\Client; @@ -38,16 +38,16 @@ use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ApiException; +use Bandwidth\Configuration; +use Bandwidth\HeaderSelector; +use Bandwidth\FormDataProcessor; +use Bandwidth\ObjectSerializer; /** * EndpointsApi Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -148,22 +148,22 @@ public function getConfig(): Configuration * URL: https://api.bandwidth.com/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body body (required) + * @param \Bandwidth\Model\CreateWebRtcConnectionRequest $body body (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createEndpoint'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\CreateEndpointResponse|\OpenAPI\Client\Model\BrtcErrorResponse + * @return \Bandwidth\Model\CreateEndpointResponse|\Bandwidth\Model\BrtcErrorResponse */ public function createEndpoint( string $account_id, - \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body, + \Bandwidth\Model\CreateWebRtcConnectionRequest $body, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createEndpoint'][0] - ): \OpenAPI\Client\Model\CreateEndpointResponse|\OpenAPI\Client\Model\BrtcErrorResponse + ): \Bandwidth\Model\CreateEndpointResponse|\Bandwidth\Model\BrtcErrorResponse { list($response) = $this->createEndpointWithHttpInfo($account_id, $body, $hostIndex, $variables, $contentType); return $response; @@ -179,18 +179,18 @@ public function createEndpoint( * URL: https://api.bandwidth.com/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body (required) + * @param \Bandwidth\Model\CreateWebRtcConnectionRequest $body (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createEndpoint'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\CreateEndpointResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\CreateEndpointResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function createEndpointWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body, + \Bandwidth\Model\CreateWebRtcConnectionRequest $body, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createEndpoint'][0] @@ -223,55 +223,55 @@ public function createEndpointWithHttpInfo( switch($statusCode) { case 201: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CreateEndpointResponse', + '\Bandwidth\Model\CreateEndpointResponse', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); @@ -292,7 +292,7 @@ public function createEndpointWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CreateEndpointResponse', + '\Bandwidth\Model\CreateEndpointResponse', $request, $response, ); @@ -301,7 +301,7 @@ public function createEndpointWithHttpInfo( case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\CreateEndpointResponse', + '\Bandwidth\Model\CreateEndpointResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -309,7 +309,7 @@ public function createEndpointWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -317,7 +317,7 @@ public function createEndpointWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -325,7 +325,7 @@ public function createEndpointWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -333,7 +333,7 @@ public function createEndpointWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -341,7 +341,7 @@ public function createEndpointWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -349,7 +349,7 @@ public function createEndpointWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -357,7 +357,7 @@ public function createEndpointWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -365,7 +365,7 @@ public function createEndpointWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -386,7 +386,7 @@ public function createEndpointWithHttpInfo( * URL: https://api.bandwidth.com/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body (required) + * @param \Bandwidth\Model\CreateWebRtcConnectionRequest $body (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createEndpoint'] to see the possible values for this operation @@ -396,7 +396,7 @@ public function createEndpointWithHttpInfo( */ public function createEndpointAsync( string $account_id, - \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body, + \Bandwidth\Model\CreateWebRtcConnectionRequest $body, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createEndpoint'][0] @@ -420,7 +420,7 @@ function ($response) { * URL: https://api.bandwidth.com/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body (required) + * @param \Bandwidth\Model\CreateWebRtcConnectionRequest $body (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createEndpoint'] to see the possible values for this operation @@ -430,13 +430,13 @@ function ($response) { */ public function createEndpointAsyncWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body, + \Bandwidth\Model\CreateWebRtcConnectionRequest $body, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createEndpoint'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\CreateEndpointResponse'; + $returnType = '\Bandwidth\Model\CreateEndpointResponse'; $request = $this->createEndpointRequest($account_id, $body, $hostIndex, $variables, $contentType); return $this->client @@ -483,7 +483,7 @@ function ($exception) { * URL: https://api.bandwidth.com/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body (required) + * @param \Bandwidth\Model\CreateWebRtcConnectionRequest $body (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createEndpoint'] to see the possible values for this operation @@ -493,7 +493,7 @@ function ($exception) { */ public function createEndpointRequest( string $account_id, - \OpenAPI\Client\Model\CreateWebRtcConnectionRequest $body, + \Bandwidth\Model\CreateWebRtcConnectionRequest $body, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createEndpoint'][0] @@ -645,7 +645,7 @@ protected function getHostSettingsForcreateEndpoint(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\BrtcErrorResponse|null + * @return \Bandwidth\Model\BrtcErrorResponse|null */ public function deleteEndpoint( string $account_id, @@ -653,7 +653,7 @@ public function deleteEndpoint( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['deleteEndpoint'][0] - ): ?\OpenAPI\Client\Model\BrtcErrorResponse + ): ?\Bandwidth\Model\BrtcErrorResponse { list($response) = $this->deleteEndpointWithHttpInfo($account_id, $endpoint_id, $hostIndex, $variables, $contentType); return $response; @@ -717,7 +717,7 @@ public function deleteEndpointWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -725,7 +725,7 @@ public function deleteEndpointWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -733,7 +733,7 @@ public function deleteEndpointWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -741,7 +741,7 @@ public function deleteEndpointWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -749,7 +749,7 @@ public function deleteEndpointWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -757,7 +757,7 @@ public function deleteEndpointWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -765,7 +765,7 @@ public function deleteEndpointWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -773,7 +773,7 @@ public function deleteEndpointWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1041,7 +1041,7 @@ protected function getHostSettingsFordeleteEndpoint(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\EndpointResponse|\OpenAPI\Client\Model\BrtcErrorResponse + * @return \Bandwidth\Model\EndpointResponse|\Bandwidth\Model\BrtcErrorResponse */ public function getEndpoint( string $account_id, @@ -1049,7 +1049,7 @@ public function getEndpoint( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['getEndpoint'][0] - ): \OpenAPI\Client\Model\EndpointResponse|\OpenAPI\Client\Model\BrtcErrorResponse + ): \Bandwidth\Model\EndpointResponse|\Bandwidth\Model\BrtcErrorResponse { list($response) = $this->getEndpointWithHttpInfo($account_id, $endpoint_id, $hostIndex, $variables, $contentType); return $response; @@ -1072,7 +1072,7 @@ public function getEndpoint( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\EndpointResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\EndpointResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function getEndpointWithHttpInfo( string $account_id, @@ -1109,55 +1109,55 @@ public function getEndpointWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\EndpointResponse', + '\Bandwidth\Model\EndpointResponse', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); @@ -1178,7 +1178,7 @@ public function getEndpointWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\EndpointResponse', + '\Bandwidth\Model\EndpointResponse', $request, $response, ); @@ -1187,7 +1187,7 @@ public function getEndpointWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\EndpointResponse', + '\Bandwidth\Model\EndpointResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1195,7 +1195,7 @@ public function getEndpointWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1203,7 +1203,7 @@ public function getEndpointWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1211,7 +1211,7 @@ public function getEndpointWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1219,7 +1219,7 @@ public function getEndpointWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1227,7 +1227,7 @@ public function getEndpointWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1235,7 +1235,7 @@ public function getEndpointWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1243,7 +1243,7 @@ public function getEndpointWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1251,7 +1251,7 @@ public function getEndpointWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1322,7 +1322,7 @@ public function getEndpointAsyncWithHttpInfo( string $contentType = self::contentTypes['getEndpoint'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\EndpointResponse'; + $returnType = '\Bandwidth\Model\EndpointResponse'; $request = $this->getEndpointRequest($account_id, $endpoint_id, $hostIndex, $variables, $contentType); return $this->client @@ -1525,8 +1525,8 @@ protected function getHostSettingsForgetEndpoint(): array * URL: https://api.bandwidth.com/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) - * @param \OpenAPI\Client\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) + * @param \Bandwidth\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) + * @param \Bandwidth\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) * @param string|null $after_cursor The cursor to use for pagination. This is the value of the `next` link in the previous response. (optional) * @param int|null $limit The maximum number of endpoints to return in the response. (optional, default to 100) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead @@ -1535,18 +1535,18 @@ protected function getHostSettingsForgetEndpoint(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\ListEndpointsResponse|\OpenAPI\Client\Model\BrtcErrorResponse + * @return \Bandwidth\Model\ListEndpointsResponse|\Bandwidth\Model\BrtcErrorResponse */ public function listEndpoints( string $account_id, - ?\OpenAPI\Client\Model\EndpointTypeEnum $type = null, - ?\OpenAPI\Client\Model\EndpointStatusEnum $status = null, + ?\Bandwidth\Model\EndpointTypeEnum $type = null, + ?\Bandwidth\Model\EndpointStatusEnum $status = null, ?string $after_cursor = null, ?int $limit = 100, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['listEndpoints'][0] - ): \OpenAPI\Client\Model\ListEndpointsResponse|\OpenAPI\Client\Model\BrtcErrorResponse + ): \Bandwidth\Model\ListEndpointsResponse|\Bandwidth\Model\BrtcErrorResponse { list($response) = $this->listEndpointsWithHttpInfo($account_id, $type, $status, $after_cursor, $limit, $hostIndex, $variables, $contentType); return $response; @@ -1562,8 +1562,8 @@ public function listEndpoints( * URL: https://api.bandwidth.com/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) - * @param \OpenAPI\Client\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) + * @param \Bandwidth\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) + * @param \Bandwidth\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) * @param string|null $after_cursor The cursor to use for pagination. This is the value of the `next` link in the previous response. (optional) * @param int|null $limit The maximum number of endpoints to return in the response. (optional, default to 100) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead @@ -1572,12 +1572,12 @@ public function listEndpoints( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\ListEndpointsResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse|\OpenAPI\Client\Model\BrtcErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\ListEndpointsResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function listEndpointsWithHttpInfo( string $account_id, - ?\OpenAPI\Client\Model\EndpointTypeEnum $type = null, - ?\OpenAPI\Client\Model\EndpointStatusEnum $status = null, + ?\Bandwidth\Model\EndpointTypeEnum $type = null, + ?\Bandwidth\Model\EndpointStatusEnum $status = null, ?string $after_cursor = null, ?int $limit = 100, ?int $hostIndex = null, @@ -1612,55 +1612,55 @@ public function listEndpointsWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\ListEndpointsResponse', + '\Bandwidth\Model\ListEndpointsResponse', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $request, $response, ); @@ -1681,7 +1681,7 @@ public function listEndpointsWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\ListEndpointsResponse', + '\Bandwidth\Model\ListEndpointsResponse', $request, $response, ); @@ -1690,7 +1690,7 @@ public function listEndpointsWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\ListEndpointsResponse', + '\Bandwidth\Model\ListEndpointsResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1698,7 +1698,7 @@ public function listEndpointsWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1706,7 +1706,7 @@ public function listEndpointsWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1714,7 +1714,7 @@ public function listEndpointsWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1722,7 +1722,7 @@ public function listEndpointsWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1730,7 +1730,7 @@ public function listEndpointsWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1738,7 +1738,7 @@ public function listEndpointsWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1746,7 +1746,7 @@ public function listEndpointsWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1754,7 +1754,7 @@ public function listEndpointsWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1775,8 +1775,8 @@ public function listEndpointsWithHttpInfo( * URL: https://api.bandwidth.com/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) - * @param \OpenAPI\Client\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) + * @param \Bandwidth\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) + * @param \Bandwidth\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) * @param string|null $after_cursor The cursor to use for pagination. This is the value of the `next` link in the previous response. (optional) * @param int|null $limit The maximum number of endpoints to return in the response. (optional, default to 100) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead @@ -1788,8 +1788,8 @@ public function listEndpointsWithHttpInfo( */ public function listEndpointsAsync( string $account_id, - ?\OpenAPI\Client\Model\EndpointTypeEnum $type = null, - ?\OpenAPI\Client\Model\EndpointStatusEnum $status = null, + ?\Bandwidth\Model\EndpointTypeEnum $type = null, + ?\Bandwidth\Model\EndpointStatusEnum $status = null, ?string $after_cursor = null, ?int $limit = 100, ?int $hostIndex = null, @@ -1815,8 +1815,8 @@ function ($response) { * URL: https://api.bandwidth.com/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) - * @param \OpenAPI\Client\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) + * @param \Bandwidth\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) + * @param \Bandwidth\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) * @param string|null $after_cursor The cursor to use for pagination. This is the value of the `next` link in the previous response. (optional) * @param int|null $limit The maximum number of endpoints to return in the response. (optional, default to 100) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead @@ -1828,8 +1828,8 @@ function ($response) { */ public function listEndpointsAsyncWithHttpInfo( string $account_id, - ?\OpenAPI\Client\Model\EndpointTypeEnum $type = null, - ?\OpenAPI\Client\Model\EndpointStatusEnum $status = null, + ?\Bandwidth\Model\EndpointTypeEnum $type = null, + ?\Bandwidth\Model\EndpointStatusEnum $status = null, ?string $after_cursor = null, ?int $limit = 100, ?int $hostIndex = null, @@ -1837,7 +1837,7 @@ public function listEndpointsAsyncWithHttpInfo( string $contentType = self::contentTypes['listEndpoints'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\ListEndpointsResponse'; + $returnType = '\Bandwidth\Model\ListEndpointsResponse'; $request = $this->listEndpointsRequest($account_id, $type, $status, $after_cursor, $limit, $hostIndex, $variables, $contentType); return $this->client @@ -1884,8 +1884,8 @@ function ($exception) { * URL: https://api.bandwidth.com/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) - * @param \OpenAPI\Client\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) + * @param \Bandwidth\Model\EndpointTypeEnum|null $type The type of endpoint. (optional) + * @param \Bandwidth\Model\EndpointStatusEnum|null $status The status of the endpoint. (optional) * @param string|null $after_cursor The cursor to use for pagination. This is the value of the `next` link in the previous response. (optional) * @param int|null $limit The maximum number of endpoints to return in the response. (optional, default to 100) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead @@ -1897,8 +1897,8 @@ function ($exception) { */ public function listEndpointsRequest( string $account_id, - ?\OpenAPI\Client\Model\EndpointTypeEnum $type = null, - ?\OpenAPI\Client\Model\EndpointStatusEnum $status = null, + ?\Bandwidth\Model\EndpointTypeEnum $type = null, + ?\Bandwidth\Model\EndpointStatusEnum $status = null, ?string $after_cursor = null, ?int $limit = 100, ?int $hostIndex = null, @@ -2085,7 +2085,7 @@ protected function getHostSettingsForlistEndpoints(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\BrtcErrorResponse|null + * @return \Bandwidth\Model\BrtcErrorResponse|null */ public function updateEndpointBxml( string $account_id, @@ -2094,7 +2094,7 @@ public function updateEndpointBxml( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateEndpointBxml'][0] - ): ?\OpenAPI\Client\Model\BrtcErrorResponse + ): ?\Bandwidth\Model\BrtcErrorResponse { list($response) = $this->updateEndpointBxmlWithHttpInfo($account_id, $endpoint_id, $body, $hostIndex, $variables, $contentType); return $response; @@ -2160,7 +2160,7 @@ public function updateEndpointBxmlWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2168,7 +2168,7 @@ public function updateEndpointBxmlWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2176,7 +2176,7 @@ public function updateEndpointBxmlWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2184,7 +2184,7 @@ public function updateEndpointBxmlWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2192,7 +2192,7 @@ public function updateEndpointBxmlWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2200,7 +2200,7 @@ public function updateEndpointBxmlWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2208,7 +2208,7 @@ public function updateEndpointBxmlWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2216,7 +2216,7 @@ public function updateEndpointBxmlWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\BrtcErrorResponse', + '\Bandwidth\Model\BrtcErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); diff --git a/src/Api/MFAApi.php b/src/Api/MFAApi.php index ed2f8c27..3c5ef3ef 100644 --- a/src/Api/MFAApi.php +++ b/src/Api/MFAApi.php @@ -3,7 +3,7 @@ * MFAApi * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Api; +namespace Bandwidth\Api; use InvalidArgumentException; use GuzzleHttp\Client; @@ -38,16 +38,16 @@ use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ApiException; +use Bandwidth\Configuration; +use Bandwidth\HeaderSelector; +use Bandwidth\FormDataProcessor; +use Bandwidth\ObjectSerializer; /** * MFAApi Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -142,22 +142,22 @@ public function getConfig(): Configuration * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param \Bandwidth\Model\CodeRequest $code_request MFA code request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateMessagingCode'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\MessagingCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError + * @return \Bandwidth\Model\MessagingCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError */ public function generateMessagingCode( string $account_id, - \OpenAPI\Client\Model\CodeRequest $code_request, + \Bandwidth\Model\CodeRequest $code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['generateMessagingCode'][0] - ): \OpenAPI\Client\Model\MessagingCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError + ): \Bandwidth\Model\MessagingCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError { list($response) = $this->generateMessagingCodeWithHttpInfo($account_id, $code_request, $hostIndex, $variables, $contentType); return $response; @@ -173,18 +173,18 @@ public function generateMessagingCode( * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param \Bandwidth\Model\CodeRequest $code_request MFA code request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateMessagingCode'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\MessagingCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError|\OpenAPI\Client\Model\MfaRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\MessagingCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError|\Bandwidth\Model\MfaRequestError, HTTP status code, HTTP response headers (array of strings) */ public function generateMessagingCodeWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\CodeRequest $code_request, + \Bandwidth\Model\CodeRequest $code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['generateMessagingCode'][0] @@ -217,31 +217,31 @@ public function generateMessagingCodeWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingCodeResponse', + '\Bandwidth\Model\MessagingCodeResponse', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MfaUnauthorizedRequestError', + '\Bandwidth\Model\MfaUnauthorizedRequestError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MfaForbiddenRequestError', + '\Bandwidth\Model\MfaForbiddenRequestError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $request, $response, ); @@ -262,7 +262,7 @@ public function generateMessagingCodeWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingCodeResponse', + '\Bandwidth\Model\MessagingCodeResponse', $request, $response, ); @@ -271,7 +271,7 @@ public function generateMessagingCodeWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingCodeResponse', + '\Bandwidth\Model\MessagingCodeResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -279,7 +279,7 @@ public function generateMessagingCodeWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -287,7 +287,7 @@ public function generateMessagingCodeWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MfaUnauthorizedRequestError', + '\Bandwidth\Model\MfaUnauthorizedRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -295,7 +295,7 @@ public function generateMessagingCodeWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MfaForbiddenRequestError', + '\Bandwidth\Model\MfaForbiddenRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -303,7 +303,7 @@ public function generateMessagingCodeWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -324,7 +324,7 @@ public function generateMessagingCodeWithHttpInfo( * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param \Bandwidth\Model\CodeRequest $code_request MFA code request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateMessagingCode'] to see the possible values for this operation @@ -334,7 +334,7 @@ public function generateMessagingCodeWithHttpInfo( */ public function generateMessagingCodeAsync( string $account_id, - \OpenAPI\Client\Model\CodeRequest $code_request, + \Bandwidth\Model\CodeRequest $code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['generateMessagingCode'][0] @@ -358,7 +358,7 @@ function ($response) { * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param \Bandwidth\Model\CodeRequest $code_request MFA code request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateMessagingCode'] to see the possible values for this operation @@ -368,13 +368,13 @@ function ($response) { */ public function generateMessagingCodeAsyncWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\CodeRequest $code_request, + \Bandwidth\Model\CodeRequest $code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['generateMessagingCode'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\MessagingCodeResponse'; + $returnType = '\Bandwidth\Model\MessagingCodeResponse'; $request = $this->generateMessagingCodeRequest($account_id, $code_request, $hostIndex, $variables, $contentType); return $this->client @@ -421,7 +421,7 @@ function ($exception) { * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param \Bandwidth\Model\CodeRequest $code_request MFA code request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateMessagingCode'] to see the possible values for this operation @@ -431,7 +431,7 @@ function ($exception) { */ public function generateMessagingCodeRequest( string $account_id, - \OpenAPI\Client\Model\CodeRequest $code_request, + \Bandwidth\Model\CodeRequest $code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['generateMessagingCode'][0] @@ -576,22 +576,22 @@ protected function getHostSettingsForgenerateMessagingCode(): array * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param \Bandwidth\Model\CodeRequest $code_request MFA code request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateVoiceCode'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\VoiceCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError + * @return \Bandwidth\Model\VoiceCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError */ public function generateVoiceCode( string $account_id, - \OpenAPI\Client\Model\CodeRequest $code_request, + \Bandwidth\Model\CodeRequest $code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['generateVoiceCode'][0] - ): \OpenAPI\Client\Model\VoiceCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError + ): \Bandwidth\Model\VoiceCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError { list($response) = $this->generateVoiceCodeWithHttpInfo($account_id, $code_request, $hostIndex, $variables, $contentType); return $response; @@ -607,18 +607,18 @@ public function generateVoiceCode( * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param \Bandwidth\Model\CodeRequest $code_request MFA code request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateVoiceCode'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\VoiceCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError|\OpenAPI\Client\Model\MfaRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\VoiceCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError|\Bandwidth\Model\MfaRequestError, HTTP status code, HTTP response headers (array of strings) */ public function generateVoiceCodeWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\CodeRequest $code_request, + \Bandwidth\Model\CodeRequest $code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['generateVoiceCode'][0] @@ -651,31 +651,31 @@ public function generateVoiceCodeWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceCodeResponse', + '\Bandwidth\Model\VoiceCodeResponse', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MfaUnauthorizedRequestError', + '\Bandwidth\Model\MfaUnauthorizedRequestError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MfaForbiddenRequestError', + '\Bandwidth\Model\MfaForbiddenRequestError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $request, $response, ); @@ -696,7 +696,7 @@ public function generateVoiceCodeWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceCodeResponse', + '\Bandwidth\Model\VoiceCodeResponse', $request, $response, ); @@ -705,7 +705,7 @@ public function generateVoiceCodeWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceCodeResponse', + '\Bandwidth\Model\VoiceCodeResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -713,7 +713,7 @@ public function generateVoiceCodeWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -721,7 +721,7 @@ public function generateVoiceCodeWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MfaUnauthorizedRequestError', + '\Bandwidth\Model\MfaUnauthorizedRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -729,7 +729,7 @@ public function generateVoiceCodeWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MfaForbiddenRequestError', + '\Bandwidth\Model\MfaForbiddenRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -737,7 +737,7 @@ public function generateVoiceCodeWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -758,7 +758,7 @@ public function generateVoiceCodeWithHttpInfo( * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param \Bandwidth\Model\CodeRequest $code_request MFA code request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateVoiceCode'] to see the possible values for this operation @@ -768,7 +768,7 @@ public function generateVoiceCodeWithHttpInfo( */ public function generateVoiceCodeAsync( string $account_id, - \OpenAPI\Client\Model\CodeRequest $code_request, + \Bandwidth\Model\CodeRequest $code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['generateVoiceCode'][0] @@ -792,7 +792,7 @@ function ($response) { * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param \Bandwidth\Model\CodeRequest $code_request MFA code request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateVoiceCode'] to see the possible values for this operation @@ -802,13 +802,13 @@ function ($response) { */ public function generateVoiceCodeAsyncWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\CodeRequest $code_request, + \Bandwidth\Model\CodeRequest $code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['generateVoiceCode'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\VoiceCodeResponse'; + $returnType = '\Bandwidth\Model\VoiceCodeResponse'; $request = $this->generateVoiceCodeRequest($account_id, $code_request, $hostIndex, $variables, $contentType); return $this->client @@ -855,7 +855,7 @@ function ($exception) { * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\CodeRequest $code_request MFA code request body. (required) + * @param \Bandwidth\Model\CodeRequest $code_request MFA code request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['generateVoiceCode'] to see the possible values for this operation @@ -865,7 +865,7 @@ function ($exception) { */ public function generateVoiceCodeRequest( string $account_id, - \OpenAPI\Client\Model\CodeRequest $code_request, + \Bandwidth\Model\CodeRequest $code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['generateVoiceCode'][0] @@ -1010,22 +1010,22 @@ protected function getHostSettingsForgenerateVoiceCode(): array * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) + * @param \Bandwidth\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['verifyCode'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\VerifyCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError + * @return \Bandwidth\Model\VerifyCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError */ public function verifyCode( string $account_id, - \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request, + \Bandwidth\Model\VerifyCodeRequest $verify_code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['verifyCode'][0] - ): \OpenAPI\Client\Model\VerifyCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError + ): \Bandwidth\Model\VerifyCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError { list($response) = $this->verifyCodeWithHttpInfo($account_id, $verify_code_request, $hostIndex, $variables, $contentType); return $response; @@ -1041,18 +1041,18 @@ public function verifyCode( * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) + * @param \Bandwidth\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['verifyCode'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\VerifyCodeResponse|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaUnauthorizedRequestError|\OpenAPI\Client\Model\MfaForbiddenRequestError|\OpenAPI\Client\Model\MfaRequestError|\OpenAPI\Client\Model\MfaRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\VerifyCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaRequestError, HTTP status code, HTTP response headers (array of strings) */ public function verifyCodeWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request, + \Bandwidth\Model\VerifyCodeRequest $verify_code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['verifyCode'][0] @@ -1085,37 +1085,37 @@ public function verifyCodeWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VerifyCodeResponse', + '\Bandwidth\Model\VerifyCodeResponse', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MfaUnauthorizedRequestError', + '\Bandwidth\Model\MfaUnauthorizedRequestError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MfaForbiddenRequestError', + '\Bandwidth\Model\MfaForbiddenRequestError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $request, $response, ); @@ -1136,7 +1136,7 @@ public function verifyCodeWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VerifyCodeResponse', + '\Bandwidth\Model\VerifyCodeResponse', $request, $response, ); @@ -1145,7 +1145,7 @@ public function verifyCodeWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VerifyCodeResponse', + '\Bandwidth\Model\VerifyCodeResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1153,7 +1153,7 @@ public function verifyCodeWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1161,7 +1161,7 @@ public function verifyCodeWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MfaUnauthorizedRequestError', + '\Bandwidth\Model\MfaUnauthorizedRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1169,7 +1169,7 @@ public function verifyCodeWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MfaForbiddenRequestError', + '\Bandwidth\Model\MfaForbiddenRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1177,7 +1177,7 @@ public function verifyCodeWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1185,7 +1185,7 @@ public function verifyCodeWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MfaRequestError', + '\Bandwidth\Model\MfaRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1206,7 +1206,7 @@ public function verifyCodeWithHttpInfo( * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) + * @param \Bandwidth\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['verifyCode'] to see the possible values for this operation @@ -1216,7 +1216,7 @@ public function verifyCodeWithHttpInfo( */ public function verifyCodeAsync( string $account_id, - \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request, + \Bandwidth\Model\VerifyCodeRequest $verify_code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['verifyCode'][0] @@ -1240,7 +1240,7 @@ function ($response) { * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) + * @param \Bandwidth\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['verifyCode'] to see the possible values for this operation @@ -1250,13 +1250,13 @@ function ($response) { */ public function verifyCodeAsyncWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request, + \Bandwidth\Model\VerifyCodeRequest $verify_code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['verifyCode'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\VerifyCodeResponse'; + $returnType = '\Bandwidth\Model\VerifyCodeResponse'; $request = $this->verifyCodeRequest($account_id, $verify_code_request, $hostIndex, $variables, $contentType); return $this->client @@ -1303,7 +1303,7 @@ function ($exception) { * URL: https://mfa.bandwidth.com/api/v1 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) + * @param \Bandwidth\Model\VerifyCodeRequest $verify_code_request MFA code verify request body. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['verifyCode'] to see the possible values for this operation @@ -1313,7 +1313,7 @@ function ($exception) { */ public function verifyCodeRequest( string $account_id, - \OpenAPI\Client\Model\VerifyCodeRequest $verify_code_request, + \Bandwidth\Model\VerifyCodeRequest $verify_code_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['verifyCode'][0] diff --git a/src/Api/MediaApi.php b/src/Api/MediaApi.php index c7641c35..c35847a1 100644 --- a/src/Api/MediaApi.php +++ b/src/Api/MediaApi.php @@ -3,7 +3,7 @@ * MediaApi * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Api; +namespace Bandwidth\Api; use InvalidArgumentException; use GuzzleHttp\Client; @@ -38,16 +38,16 @@ use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ApiException; +use Bandwidth\Configuration; +use Bandwidth\HeaderSelector; +use Bandwidth\FormDataProcessor; +use Bandwidth\ObjectSerializer; /** * MediaApi Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -199,7 +199,7 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\MessagingRequestError|null + * @return \Bandwidth\Model\MessagingRequestError|null */ public function deleteMedia( string $account_id, @@ -207,7 +207,7 @@ public function deleteMedia( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['deleteMedia'][0] - ): ?\OpenAPI\Client\Model\MessagingRequestError + ): ?\Bandwidth\Model\MessagingRequestError { list($response) = $this->deleteMediaWithHttpInfo($account_id, $media_id, $hostIndex, $variables, $contentType); return $response; @@ -271,7 +271,7 @@ public function deleteMediaWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -279,7 +279,7 @@ public function deleteMediaWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -287,7 +287,7 @@ public function deleteMediaWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -295,7 +295,7 @@ public function deleteMediaWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -303,7 +303,7 @@ public function deleteMediaWithHttpInfo( case 406: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -311,7 +311,7 @@ public function deleteMediaWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -319,7 +319,7 @@ public function deleteMediaWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -327,7 +327,7 @@ public function deleteMediaWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -595,7 +595,7 @@ protected function getHostSettingsFordeleteMedia(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SplFileObject|\OpenAPI\Client\Model\MessagingRequestError + * @return \SplFileObject|\Bandwidth\Model\MessagingRequestError */ public function getMedia( string $account_id, @@ -603,7 +603,7 @@ public function getMedia( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['getMedia'][0] - ): \SplFileObject|\OpenAPI\Client\Model\MessagingRequestError + ): \SplFileObject|\Bandwidth\Model\MessagingRequestError { list($response) = $this->getMediaWithHttpInfo($account_id, $media_id, $hostIndex, $variables, $contentType); return $response; @@ -626,7 +626,7 @@ public function getMedia( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SplFileObject|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array of \SplFileObject|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) */ public function getMediaWithHttpInfo( string $account_id, @@ -669,49 +669,49 @@ public function getMediaWithHttpInfo( ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 406: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); @@ -749,7 +749,7 @@ public function getMediaWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -757,7 +757,7 @@ public function getMediaWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -765,7 +765,7 @@ public function getMediaWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -773,7 +773,7 @@ public function getMediaWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -781,7 +781,7 @@ public function getMediaWithHttpInfo( case 406: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -789,7 +789,7 @@ public function getMediaWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -797,7 +797,7 @@ public function getMediaWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -805,7 +805,7 @@ public function getMediaWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1086,7 +1086,7 @@ protected function getHostSettingsForgetMedia(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\Media[]|\OpenAPI\Client\Model\MessagingRequestError + * @return \Bandwidth\Model\Media[]|\Bandwidth\Model\MessagingRequestError */ public function listMedia( string $account_id, @@ -1094,7 +1094,7 @@ public function listMedia( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['listMedia'][0] - ): array|\OpenAPI\Client\Model\MessagingRequestError + ): array|\Bandwidth\Model\MessagingRequestError { list($response) = $this->listMediaWithHttpInfo($account_id, $continuation_token, $hostIndex, $variables, $contentType); return $response; @@ -1117,7 +1117,7 @@ public function listMedia( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\Media[]|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\Media[]|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) */ public function listMediaWithHttpInfo( string $account_id, @@ -1154,55 +1154,55 @@ public function listMediaWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\Media[]', + '\Bandwidth\Model\Media[]', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 406: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); @@ -1223,7 +1223,7 @@ public function listMediaWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\Media[]', + '\Bandwidth\Model\Media[]', $request, $response, ); @@ -1232,7 +1232,7 @@ public function listMediaWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\Media[]', + '\Bandwidth\Model\Media[]', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1240,7 +1240,7 @@ public function listMediaWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1248,7 +1248,7 @@ public function listMediaWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1256,7 +1256,7 @@ public function listMediaWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1264,7 +1264,7 @@ public function listMediaWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1272,7 +1272,7 @@ public function listMediaWithHttpInfo( case 406: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1280,7 +1280,7 @@ public function listMediaWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1288,7 +1288,7 @@ public function listMediaWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1296,7 +1296,7 @@ public function listMediaWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1367,7 +1367,7 @@ public function listMediaAsyncWithHttpInfo( string $contentType = self::contentTypes['listMedia'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\Media[]'; + $returnType = '\Bandwidth\Model\Media[]'; $request = $this->listMediaRequest($account_id, $continuation_token, $hostIndex, $variables, $contentType); return $this->client @@ -1570,7 +1570,7 @@ protected function getHostSettingsForlistMedia(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\MessagingRequestError|null + * @return \Bandwidth\Model\MessagingRequestError|null */ public function uploadMedia( string $account_id, @@ -1581,7 +1581,7 @@ public function uploadMedia( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['uploadMedia'][0] - ): ?\OpenAPI\Client\Model\MessagingRequestError + ): ?\Bandwidth\Model\MessagingRequestError { list($response) = $this->uploadMediaWithHttpInfo($account_id, $media_id, $body, $content_type, $cache_control, $hostIndex, $variables, $contentType); return $response; @@ -1651,7 +1651,7 @@ public function uploadMediaWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1659,7 +1659,7 @@ public function uploadMediaWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1667,7 +1667,7 @@ public function uploadMediaWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1675,7 +1675,7 @@ public function uploadMediaWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1683,7 +1683,7 @@ public function uploadMediaWithHttpInfo( case 406: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1691,7 +1691,7 @@ public function uploadMediaWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1699,7 +1699,7 @@ public function uploadMediaWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1707,7 +1707,7 @@ public function uploadMediaWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); diff --git a/src/Api/MessagesApi.php b/src/Api/MessagesApi.php index 062b5000..2b24ca24 100644 --- a/src/Api/MessagesApi.php +++ b/src/Api/MessagesApi.php @@ -3,7 +3,7 @@ * MessagesApi * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Api; +namespace Bandwidth\Api; use InvalidArgumentException; use GuzzleHttp\Client; @@ -38,16 +38,16 @@ use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ApiException; +use Bandwidth\Configuration; +use Bandwidth\HeaderSelector; +use Bandwidth\FormDataProcessor; +use Bandwidth\ObjectSerializer; /** * MessagesApi Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -139,22 +139,22 @@ public function getConfig(): Configuration * URL: https://messaging.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\MessageRequest $message_request message_request (required) + * @param \Bandwidth\Model\MessageRequest $message_request message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMessage'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\Message|\OpenAPI\Client\Model\CreateMessageRequestError|\OpenAPI\Client\Model\MessagingRequestError + * @return \Bandwidth\Model\Message|\Bandwidth\Model\CreateMessageRequestError|\Bandwidth\Model\MessagingRequestError */ public function createMessage( string $account_id, - \OpenAPI\Client\Model\MessageRequest $message_request, + \Bandwidth\Model\MessageRequest $message_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createMessage'][0] - ): \OpenAPI\Client\Model\Message|\OpenAPI\Client\Model\CreateMessageRequestError|\OpenAPI\Client\Model\MessagingRequestError + ): \Bandwidth\Model\Message|\Bandwidth\Model\CreateMessageRequestError|\Bandwidth\Model\MessagingRequestError { list($response) = $this->createMessageWithHttpInfo($account_id, $message_request, $hostIndex, $variables, $contentType); return $response; @@ -170,18 +170,18 @@ public function createMessage( * URL: https://messaging.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\MessageRequest $message_request (required) + * @param \Bandwidth\Model\MessageRequest $message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMessage'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\Message|\OpenAPI\Client\Model\CreateMessageRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\Message|\Bandwidth\Model\CreateMessageRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) */ public function createMessageWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\MessageRequest $message_request, + \Bandwidth\Model\MessageRequest $message_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createMessage'][0] @@ -214,61 +214,61 @@ public function createMessageWithHttpInfo( switch($statusCode) { case 202: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\Message', + '\Bandwidth\Model\Message', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CreateMessageRequestError', + '\Bandwidth\Model\CreateMessageRequestError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 406: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); @@ -289,7 +289,7 @@ public function createMessageWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\Message', + '\Bandwidth\Model\Message', $request, $response, ); @@ -298,7 +298,7 @@ public function createMessageWithHttpInfo( case 202: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\Message', + '\Bandwidth\Model\Message', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -306,7 +306,7 @@ public function createMessageWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\CreateMessageRequestError', + '\Bandwidth\Model\CreateMessageRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -314,7 +314,7 @@ public function createMessageWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -322,7 +322,7 @@ public function createMessageWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -330,7 +330,7 @@ public function createMessageWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -338,7 +338,7 @@ public function createMessageWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -346,7 +346,7 @@ public function createMessageWithHttpInfo( case 406: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -354,7 +354,7 @@ public function createMessageWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -362,7 +362,7 @@ public function createMessageWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -370,7 +370,7 @@ public function createMessageWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -391,7 +391,7 @@ public function createMessageWithHttpInfo( * URL: https://messaging.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\MessageRequest $message_request (required) + * @param \Bandwidth\Model\MessageRequest $message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMessage'] to see the possible values for this operation @@ -401,7 +401,7 @@ public function createMessageWithHttpInfo( */ public function createMessageAsync( string $account_id, - \OpenAPI\Client\Model\MessageRequest $message_request, + \Bandwidth\Model\MessageRequest $message_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createMessage'][0] @@ -425,7 +425,7 @@ function ($response) { * URL: https://messaging.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\MessageRequest $message_request (required) + * @param \Bandwidth\Model\MessageRequest $message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMessage'] to see the possible values for this operation @@ -435,13 +435,13 @@ function ($response) { */ public function createMessageAsyncWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\MessageRequest $message_request, + \Bandwidth\Model\MessageRequest $message_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createMessage'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\Message'; + $returnType = '\Bandwidth\Model\Message'; $request = $this->createMessageRequest($account_id, $message_request, $hostIndex, $variables, $contentType); return $this->client @@ -488,7 +488,7 @@ function ($exception) { * URL: https://messaging.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\MessageRequest $message_request (required) + * @param \Bandwidth\Model\MessageRequest $message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMessage'] to see the possible values for this operation @@ -498,7 +498,7 @@ function ($exception) { */ public function createMessageRequest( string $account_id, - \OpenAPI\Client\Model\MessageRequest $message_request, + \Bandwidth\Model\MessageRequest $message_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createMessage'][0] @@ -646,17 +646,17 @@ protected function getHostSettingsForcreateMessage(): array * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) - * @param \OpenAPI\Client\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) - * @param \OpenAPI\Client\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) + * @param \Bandwidth\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) + * @param \Bandwidth\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) * @param string|null $carrier_name The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). (optional) - * @param \OpenAPI\Client\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) + * @param \Bandwidth\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) * @param int|null $error_code The error code of the message. (optional) * @param string|null $from_date_time The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param string|null $to_date_time The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param string|null $campaign_id The campaign ID of the message. (optional) * @param int|null $from_bw_latency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) * @param bool|null $bw_queued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) - * @param \OpenAPI\Client\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) + * @param \Bandwidth\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) * @param string|null $location Location Id associated with the message. (optional) * @param bool|null $carrier_queued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) * @param int|null $from_carrier_latency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) @@ -676,24 +676,24 @@ protected function getHostSettingsForcreateMessage(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\MessagesList|\OpenAPI\Client\Model\MessagingRequestError + * @return \Bandwidth\Model\MessagesList|\Bandwidth\Model\MessagingRequestError */ public function listMessages( string $account_id, ?string $message_id = null, ?string $source_tn = null, ?string $destination_tn = null, - ?\OpenAPI\Client\Model\MessageStatusEnum $message_status = null, - ?\OpenAPI\Client\Model\ListMessageDirectionEnum $message_direction = null, + ?\Bandwidth\Model\MessageStatusEnum $message_status = null, + ?\Bandwidth\Model\ListMessageDirectionEnum $message_direction = null, ?string $carrier_name = null, - ?\OpenAPI\Client\Model\MessageTypeEnum $message_type = null, + ?\Bandwidth\Model\MessageTypeEnum $message_type = null, ?int $error_code = null, ?string $from_date_time = null, ?string $to_date_time = null, ?string $campaign_id = null, ?int $from_bw_latency = null, ?bool $bw_queued = null, - ?\OpenAPI\Client\Model\ProductTypeEnum $product = null, + ?\Bandwidth\Model\ProductTypeEnum $product = null, ?string $location = null, ?bool $carrier_queued = null, ?int $from_carrier_latency = null, @@ -710,7 +710,7 @@ public function listMessages( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['listMessages'][0] - ): \OpenAPI\Client\Model\MessagesList|\OpenAPI\Client\Model\MessagingRequestError + ): \Bandwidth\Model\MessagesList|\Bandwidth\Model\MessagingRequestError { list($response) = $this->listMessagesWithHttpInfo($account_id, $message_id, $source_tn, $destination_tn, $message_status, $message_direction, $carrier_name, $message_type, $error_code, $from_date_time, $to_date_time, $campaign_id, $from_bw_latency, $bw_queued, $product, $location, $carrier_queued, $from_carrier_latency, $calling_number_country_a3, $called_number_country_a3, $from_segment_count, $to_segment_count, $from_message_size, $to_message_size, $sort, $page_token, $limit, $limit_total_count, $hostIndex, $variables, $contentType); return $response; @@ -729,17 +729,17 @@ public function listMessages( * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) - * @param \OpenAPI\Client\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) - * @param \OpenAPI\Client\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) + * @param \Bandwidth\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) + * @param \Bandwidth\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) * @param string|null $carrier_name The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). (optional) - * @param \OpenAPI\Client\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) + * @param \Bandwidth\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) * @param int|null $error_code The error code of the message. (optional) * @param string|null $from_date_time The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param string|null $to_date_time The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param string|null $campaign_id The campaign ID of the message. (optional) * @param int|null $from_bw_latency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) * @param bool|null $bw_queued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) - * @param \OpenAPI\Client\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) + * @param \Bandwidth\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) * @param string|null $location Location Id associated with the message. (optional) * @param bool|null $carrier_queued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) * @param int|null $from_carrier_latency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) @@ -759,24 +759,24 @@ public function listMessages( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\MessagesList|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError|\OpenAPI\Client\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\MessagesList|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) */ public function listMessagesWithHttpInfo( string $account_id, ?string $message_id = null, ?string $source_tn = null, ?string $destination_tn = null, - ?\OpenAPI\Client\Model\MessageStatusEnum $message_status = null, - ?\OpenAPI\Client\Model\ListMessageDirectionEnum $message_direction = null, + ?\Bandwidth\Model\MessageStatusEnum $message_status = null, + ?\Bandwidth\Model\ListMessageDirectionEnum $message_direction = null, ?string $carrier_name = null, - ?\OpenAPI\Client\Model\MessageTypeEnum $message_type = null, + ?\Bandwidth\Model\MessageTypeEnum $message_type = null, ?int $error_code = null, ?string $from_date_time = null, ?string $to_date_time = null, ?string $campaign_id = null, ?int $from_bw_latency = null, ?bool $bw_queued = null, - ?\OpenAPI\Client\Model\ProductTypeEnum $product = null, + ?\Bandwidth\Model\ProductTypeEnum $product = null, ?string $location = null, ?bool $carrier_queued = null, ?int $from_carrier_latency = null, @@ -822,55 +822,55 @@ public function listMessagesWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagesList', + '\Bandwidth\Model\MessagesList', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $request, $response, ); @@ -891,7 +891,7 @@ public function listMessagesWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MessagesList', + '\Bandwidth\Model\MessagesList', $request, $response, ); @@ -900,7 +900,7 @@ public function listMessagesWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagesList', + '\Bandwidth\Model\MessagesList', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -908,7 +908,7 @@ public function listMessagesWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -916,7 +916,7 @@ public function listMessagesWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -924,7 +924,7 @@ public function listMessagesWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -932,7 +932,7 @@ public function listMessagesWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -940,7 +940,7 @@ public function listMessagesWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -948,7 +948,7 @@ public function listMessagesWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -956,7 +956,7 @@ public function listMessagesWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -964,7 +964,7 @@ public function listMessagesWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MessagingRequestError', + '\Bandwidth\Model\MessagingRequestError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -988,17 +988,17 @@ public function listMessagesWithHttpInfo( * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) - * @param \OpenAPI\Client\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) - * @param \OpenAPI\Client\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) + * @param \Bandwidth\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) + * @param \Bandwidth\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) * @param string|null $carrier_name The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). (optional) - * @param \OpenAPI\Client\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) + * @param \Bandwidth\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) * @param int|null $error_code The error code of the message. (optional) * @param string|null $from_date_time The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param string|null $to_date_time The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param string|null $campaign_id The campaign ID of the message. (optional) * @param int|null $from_bw_latency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) * @param bool|null $bw_queued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) - * @param \OpenAPI\Client\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) + * @param \Bandwidth\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) * @param string|null $location Location Id associated with the message. (optional) * @param bool|null $carrier_queued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) * @param int|null $from_carrier_latency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) @@ -1024,17 +1024,17 @@ public function listMessagesAsync( ?string $message_id = null, ?string $source_tn = null, ?string $destination_tn = null, - ?\OpenAPI\Client\Model\MessageStatusEnum $message_status = null, - ?\OpenAPI\Client\Model\ListMessageDirectionEnum $message_direction = null, + ?\Bandwidth\Model\MessageStatusEnum $message_status = null, + ?\Bandwidth\Model\ListMessageDirectionEnum $message_direction = null, ?string $carrier_name = null, - ?\OpenAPI\Client\Model\MessageTypeEnum $message_type = null, + ?\Bandwidth\Model\MessageTypeEnum $message_type = null, ?int $error_code = null, ?string $from_date_time = null, ?string $to_date_time = null, ?string $campaign_id = null, ?int $from_bw_latency = null, ?bool $bw_queued = null, - ?\OpenAPI\Client\Model\ProductTypeEnum $product = null, + ?\Bandwidth\Model\ProductTypeEnum $product = null, ?string $location = null, ?bool $carrier_queued = null, ?int $from_carrier_latency = null, @@ -1074,17 +1074,17 @@ function ($response) { * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) - * @param \OpenAPI\Client\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) - * @param \OpenAPI\Client\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) + * @param \Bandwidth\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) + * @param \Bandwidth\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) * @param string|null $carrier_name The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). (optional) - * @param \OpenAPI\Client\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) + * @param \Bandwidth\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) * @param int|null $error_code The error code of the message. (optional) * @param string|null $from_date_time The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param string|null $to_date_time The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param string|null $campaign_id The campaign ID of the message. (optional) * @param int|null $from_bw_latency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) * @param bool|null $bw_queued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) - * @param \OpenAPI\Client\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) + * @param \Bandwidth\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) * @param string|null $location Location Id associated with the message. (optional) * @param bool|null $carrier_queued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) * @param int|null $from_carrier_latency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) @@ -1110,17 +1110,17 @@ public function listMessagesAsyncWithHttpInfo( ?string $message_id = null, ?string $source_tn = null, ?string $destination_tn = null, - ?\OpenAPI\Client\Model\MessageStatusEnum $message_status = null, - ?\OpenAPI\Client\Model\ListMessageDirectionEnum $message_direction = null, + ?\Bandwidth\Model\MessageStatusEnum $message_status = null, + ?\Bandwidth\Model\ListMessageDirectionEnum $message_direction = null, ?string $carrier_name = null, - ?\OpenAPI\Client\Model\MessageTypeEnum $message_type = null, + ?\Bandwidth\Model\MessageTypeEnum $message_type = null, ?int $error_code = null, ?string $from_date_time = null, ?string $to_date_time = null, ?string $campaign_id = null, ?int $from_bw_latency = null, ?bool $bw_queued = null, - ?\OpenAPI\Client\Model\ProductTypeEnum $product = null, + ?\Bandwidth\Model\ProductTypeEnum $product = null, ?string $location = null, ?bool $carrier_queued = null, ?int $from_carrier_latency = null, @@ -1139,7 +1139,7 @@ public function listMessagesAsyncWithHttpInfo( string $contentType = self::contentTypes['listMessages'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\MessagesList'; + $returnType = '\Bandwidth\Model\MessagesList'; $request = $this->listMessagesRequest($account_id, $message_id, $source_tn, $destination_tn, $message_status, $message_direction, $carrier_name, $message_type, $error_code, $from_date_time, $to_date_time, $campaign_id, $from_bw_latency, $bw_queued, $product, $location, $carrier_queued, $from_carrier_latency, $calling_number_country_a3, $called_number_country_a3, $from_segment_count, $to_segment_count, $from_message_size, $to_message_size, $sort, $page_token, $limit, $limit_total_count, $hostIndex, $variables, $contentType); return $this->client @@ -1189,17 +1189,17 @@ function ($exception) { * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) - * @param \OpenAPI\Client\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) - * @param \OpenAPI\Client\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) + * @param \Bandwidth\Model\MessageStatusEnum|null $message_status The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. (optional) + * @param \Bandwidth\Model\ListMessageDirectionEnum|null $message_direction The direction of the message. One of INBOUND OUTBOUND. (optional) * @param string|null $carrier_name The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). (optional) - * @param \OpenAPI\Client\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) + * @param \Bandwidth\Model\MessageTypeEnum|null $message_type The type of message. Either sms or mms. (optional) * @param int|null $error_code The error code of the message. (optional) * @param string|null $from_date_time The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param string|null $to_date_time The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) * @param string|null $campaign_id The campaign ID of the message. (optional) * @param int|null $from_bw_latency The minimum Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled. (optional) * @param bool|null $bw_queued A boolean value indicating whether the message is queued in the Bandwidth network. (optional) - * @param \OpenAPI\Client\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) + * @param \Bandwidth\Model\ProductTypeEnum|null $product Messaging product associated with the message. (optional) * @param string|null $location Location Id associated with the message. (optional) * @param bool|null $carrier_queued A boolean value indicating whether the message is queued in the carrier network. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) * @param int|null $from_carrier_latency The minimum carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled. (optional) @@ -1225,17 +1225,17 @@ public function listMessagesRequest( ?string $message_id = null, ?string $source_tn = null, ?string $destination_tn = null, - ?\OpenAPI\Client\Model\MessageStatusEnum $message_status = null, - ?\OpenAPI\Client\Model\ListMessageDirectionEnum $message_direction = null, + ?\Bandwidth\Model\MessageStatusEnum $message_status = null, + ?\Bandwidth\Model\ListMessageDirectionEnum $message_direction = null, ?string $carrier_name = null, - ?\OpenAPI\Client\Model\MessageTypeEnum $message_type = null, + ?\Bandwidth\Model\MessageTypeEnum $message_type = null, ?int $error_code = null, ?string $from_date_time = null, ?string $to_date_time = null, ?string $campaign_id = null, ?int $from_bw_latency = null, ?bool $bw_queued = null, - ?\OpenAPI\Client\Model\ProductTypeEnum $product = null, + ?\Bandwidth\Model\ProductTypeEnum $product = null, ?string $location = null, ?bool $carrier_queued = null, ?int $from_carrier_latency = null, diff --git a/src/Api/MultiChannelApi.php b/src/Api/MultiChannelApi.php index 596c01be..894e1830 100644 --- a/src/Api/MultiChannelApi.php +++ b/src/Api/MultiChannelApi.php @@ -3,7 +3,7 @@ * MultiChannelApi * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Api; +namespace Bandwidth\Api; use InvalidArgumentException; use GuzzleHttp\Client; @@ -38,16 +38,16 @@ use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ApiException; +use Bandwidth\Configuration; +use Bandwidth\HeaderSelector; +use Bandwidth\FormDataProcessor; +use Bandwidth\ObjectSerializer; /** * MultiChannelApi Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -136,22 +136,22 @@ public function getConfig(): Configuration * URL: https://messaging.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request multi_channel_message_request (required) + * @param \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request multi_channel_message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMultiChannelMessage'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\CreateMultiChannelMessageResponse|\OpenAPI\Client\Model\MultiChannelError|null + * @return \Bandwidth\Model\CreateMultiChannelMessageResponse|\Bandwidth\Model\MultiChannelError|null */ public function createMultiChannelMessage( string $account_id, - \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request, + \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createMultiChannelMessage'][0] - ): \OpenAPI\Client\Model\CreateMultiChannelMessageResponse|\OpenAPI\Client\Model\MultiChannelError|null + ): \Bandwidth\Model\CreateMultiChannelMessageResponse|\Bandwidth\Model\MultiChannelError|null { list($response) = $this->createMultiChannelMessageWithHttpInfo($account_id, $multi_channel_message_request, $hostIndex, $variables, $contentType); return $response; @@ -167,18 +167,18 @@ public function createMultiChannelMessage( * URL: https://messaging.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request (required) + * @param \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMultiChannelMessage'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\CreateMultiChannelMessageResponse|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError|\OpenAPI\Client\Model\MultiChannelError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\CreateMultiChannelMessageResponse|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError, HTTP status code, HTTP response headers (array of strings) */ public function createMultiChannelMessageWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request, + \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createMultiChannelMessage'][0] @@ -211,55 +211,55 @@ public function createMultiChannelMessageWithHttpInfo( switch($statusCode) { case 202: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CreateMultiChannelMessageResponse', + '\Bandwidth\Model\CreateMultiChannelMessageResponse', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $request, $response, ); @@ -280,7 +280,7 @@ public function createMultiChannelMessageWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CreateMultiChannelMessageResponse', + '\Bandwidth\Model\CreateMultiChannelMessageResponse', $request, $response, ); @@ -289,7 +289,7 @@ public function createMultiChannelMessageWithHttpInfo( case 202: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\CreateMultiChannelMessageResponse', + '\Bandwidth\Model\CreateMultiChannelMessageResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -297,7 +297,7 @@ public function createMultiChannelMessageWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -305,7 +305,7 @@ public function createMultiChannelMessageWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -313,7 +313,7 @@ public function createMultiChannelMessageWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -321,7 +321,7 @@ public function createMultiChannelMessageWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -329,7 +329,7 @@ public function createMultiChannelMessageWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -337,7 +337,7 @@ public function createMultiChannelMessageWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -345,7 +345,7 @@ public function createMultiChannelMessageWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -353,7 +353,7 @@ public function createMultiChannelMessageWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\MultiChannelError', + '\Bandwidth\Model\MultiChannelError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -374,7 +374,7 @@ public function createMultiChannelMessageWithHttpInfo( * URL: https://messaging.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request (required) + * @param \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMultiChannelMessage'] to see the possible values for this operation @@ -384,7 +384,7 @@ public function createMultiChannelMessageWithHttpInfo( */ public function createMultiChannelMessageAsync( string $account_id, - \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request, + \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createMultiChannelMessage'][0] @@ -408,7 +408,7 @@ function ($response) { * URL: https://messaging.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request (required) + * @param \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMultiChannelMessage'] to see the possible values for this operation @@ -418,13 +418,13 @@ function ($response) { */ public function createMultiChannelMessageAsyncWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request, + \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createMultiChannelMessage'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\CreateMultiChannelMessageResponse'; + $returnType = '\Bandwidth\Model\CreateMultiChannelMessageResponse'; $request = $this->createMultiChannelMessageRequest($account_id, $multi_channel_message_request, $hostIndex, $variables, $contentType); return $this->client @@ -471,7 +471,7 @@ function ($exception) { * URL: https://messaging.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request (required) + * @param \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createMultiChannelMessage'] to see the possible values for this operation @@ -481,7 +481,7 @@ function ($exception) { */ public function createMultiChannelMessageRequest( string $account_id, - \OpenAPI\Client\Model\MultiChannelMessageRequest $multi_channel_message_request, + \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createMultiChannelMessage'][0] diff --git a/src/Api/PhoneNumberLookupApi.php b/src/Api/PhoneNumberLookupApi.php index e95dc413..700a2d63 100644 --- a/src/Api/PhoneNumberLookupApi.php +++ b/src/Api/PhoneNumberLookupApi.php @@ -3,7 +3,7 @@ * PhoneNumberLookupApi * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Api; +namespace Bandwidth\Api; use InvalidArgumentException; use GuzzleHttp\Client; @@ -38,16 +38,16 @@ use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ApiException; +use Bandwidth\Configuration; +use Bandwidth\HeaderSelector; +use Bandwidth\FormDataProcessor; +use Bandwidth\ObjectSerializer; /** * PhoneNumberLookupApi Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -142,22 +142,22 @@ public function getConfig(): Configuration * URL: https://api.bandwidth.com/v2 * * @param string $account_id account_id (required) - * @param \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) + * @param \Bandwidth\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAsyncBulkLookup'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\CreateAsyncBulkLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse + * @return \Bandwidth\Model\CreateAsyncBulkLookupResponse|\Bandwidth\Model\LookupErrorResponse */ public function createAsyncBulkLookup( string $account_id, - \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request, + \Bandwidth\Model\AsyncLookupRequest $async_lookup_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createAsyncBulkLookup'][0] - ): \OpenAPI\Client\Model\CreateAsyncBulkLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse + ): \Bandwidth\Model\CreateAsyncBulkLookupResponse|\Bandwidth\Model\LookupErrorResponse { list($response) = $this->createAsyncBulkLookupWithHttpInfo($account_id, $async_lookup_request, $hostIndex, $variables, $contentType); return $response; @@ -173,18 +173,18 @@ public function createAsyncBulkLookup( * URL: https://api.bandwidth.com/v2 * * @param string $account_id (required) - * @param \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) + * @param \Bandwidth\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAsyncBulkLookup'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\CreateAsyncBulkLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\CreateAsyncBulkLookupResponse|\Bandwidth\Model\LookupErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function createAsyncBulkLookupWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request, + \Bandwidth\Model\AsyncLookupRequest $async_lookup_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createAsyncBulkLookup'][0] @@ -217,13 +217,13 @@ public function createAsyncBulkLookupWithHttpInfo( switch($statusCode) { case 202: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CreateAsyncBulkLookupResponse', + '\Bandwidth\Model\CreateAsyncBulkLookupResponse', $request, $response, ); default: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\LookupErrorResponse', + '\Bandwidth\Model\LookupErrorResponse', $request, $response, ); @@ -244,7 +244,7 @@ public function createAsyncBulkLookupWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CreateAsyncBulkLookupResponse', + '\Bandwidth\Model\CreateAsyncBulkLookupResponse', $request, $response, ); @@ -253,7 +253,7 @@ public function createAsyncBulkLookupWithHttpInfo( case 202: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\CreateAsyncBulkLookupResponse', + '\Bandwidth\Model\CreateAsyncBulkLookupResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -261,7 +261,7 @@ public function createAsyncBulkLookupWithHttpInfo( default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\LookupErrorResponse', + '\Bandwidth\Model\LookupErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -282,7 +282,7 @@ public function createAsyncBulkLookupWithHttpInfo( * URL: https://api.bandwidth.com/v2 * * @param string $account_id (required) - * @param \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) + * @param \Bandwidth\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAsyncBulkLookup'] to see the possible values for this operation @@ -292,7 +292,7 @@ public function createAsyncBulkLookupWithHttpInfo( */ public function createAsyncBulkLookupAsync( string $account_id, - \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request, + \Bandwidth\Model\AsyncLookupRequest $async_lookup_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createAsyncBulkLookup'][0] @@ -316,7 +316,7 @@ function ($response) { * URL: https://api.bandwidth.com/v2 * * @param string $account_id (required) - * @param \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) + * @param \Bandwidth\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAsyncBulkLookup'] to see the possible values for this operation @@ -326,13 +326,13 @@ function ($response) { */ public function createAsyncBulkLookupAsyncWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request, + \Bandwidth\Model\AsyncLookupRequest $async_lookup_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createAsyncBulkLookup'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\CreateAsyncBulkLookupResponse'; + $returnType = '\Bandwidth\Model\CreateAsyncBulkLookupResponse'; $request = $this->createAsyncBulkLookupRequest($account_id, $async_lookup_request, $hostIndex, $variables, $contentType); return $this->client @@ -379,7 +379,7 @@ function ($exception) { * URL: https://api.bandwidth.com/v2 * * @param string $account_id (required) - * @param \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) + * @param \Bandwidth\Model\AsyncLookupRequest $async_lookup_request Asynchronous bulk phone number lookup request. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createAsyncBulkLookup'] to see the possible values for this operation @@ -389,7 +389,7 @@ function ($exception) { */ public function createAsyncBulkLookupRequest( string $account_id, - \OpenAPI\Client\Model\AsyncLookupRequest $async_lookup_request, + \Bandwidth\Model\AsyncLookupRequest $async_lookup_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createAsyncBulkLookup'][0] @@ -534,22 +534,22 @@ protected function getHostSettingsForcreateAsyncBulkLookup(): array * URL: https://api.bandwidth.com/v2 * * @param string $account_id account_id (required) - * @param \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) + * @param \Bandwidth\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSyncLookup'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\CreateSyncLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse + * @return \Bandwidth\Model\CreateSyncLookupResponse|\Bandwidth\Model\LookupErrorResponse */ public function createSyncLookup( string $account_id, - \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request, + \Bandwidth\Model\SyncLookupRequest $sync_lookup_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createSyncLookup'][0] - ): \OpenAPI\Client\Model\CreateSyncLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse + ): \Bandwidth\Model\CreateSyncLookupResponse|\Bandwidth\Model\LookupErrorResponse { list($response) = $this->createSyncLookupWithHttpInfo($account_id, $sync_lookup_request, $hostIndex, $variables, $contentType); return $response; @@ -565,18 +565,18 @@ public function createSyncLookup( * URL: https://api.bandwidth.com/v2 * * @param string $account_id (required) - * @param \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) + * @param \Bandwidth\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSyncLookup'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\CreateSyncLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\CreateSyncLookupResponse|\Bandwidth\Model\LookupErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function createSyncLookupWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request, + \Bandwidth\Model\SyncLookupRequest $sync_lookup_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createSyncLookup'][0] @@ -609,13 +609,13 @@ public function createSyncLookupWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CreateSyncLookupResponse', + '\Bandwidth\Model\CreateSyncLookupResponse', $request, $response, ); default: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\LookupErrorResponse', + '\Bandwidth\Model\LookupErrorResponse', $request, $response, ); @@ -636,7 +636,7 @@ public function createSyncLookupWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CreateSyncLookupResponse', + '\Bandwidth\Model\CreateSyncLookupResponse', $request, $response, ); @@ -645,7 +645,7 @@ public function createSyncLookupWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\CreateSyncLookupResponse', + '\Bandwidth\Model\CreateSyncLookupResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -653,7 +653,7 @@ public function createSyncLookupWithHttpInfo( default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\LookupErrorResponse', + '\Bandwidth\Model\LookupErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -674,7 +674,7 @@ public function createSyncLookupWithHttpInfo( * URL: https://api.bandwidth.com/v2 * * @param string $account_id (required) - * @param \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) + * @param \Bandwidth\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSyncLookup'] to see the possible values for this operation @@ -684,7 +684,7 @@ public function createSyncLookupWithHttpInfo( */ public function createSyncLookupAsync( string $account_id, - \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request, + \Bandwidth\Model\SyncLookupRequest $sync_lookup_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createSyncLookup'][0] @@ -708,7 +708,7 @@ function ($response) { * URL: https://api.bandwidth.com/v2 * * @param string $account_id (required) - * @param \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) + * @param \Bandwidth\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSyncLookup'] to see the possible values for this operation @@ -718,13 +718,13 @@ function ($response) { */ public function createSyncLookupAsyncWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request, + \Bandwidth\Model\SyncLookupRequest $sync_lookup_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createSyncLookup'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\CreateSyncLookupResponse'; + $returnType = '\Bandwidth\Model\CreateSyncLookupResponse'; $request = $this->createSyncLookupRequest($account_id, $sync_lookup_request, $hostIndex, $variables, $contentType); return $this->client @@ -771,7 +771,7 @@ function ($exception) { * URL: https://api.bandwidth.com/v2 * * @param string $account_id (required) - * @param \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) + * @param \Bandwidth\Model\SyncLookupRequest $sync_lookup_request Synchronous phone number lookup request. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createSyncLookup'] to see the possible values for this operation @@ -781,7 +781,7 @@ function ($exception) { */ public function createSyncLookupRequest( string $account_id, - \OpenAPI\Client\Model\SyncLookupRequest $sync_lookup_request, + \Bandwidth\Model\SyncLookupRequest $sync_lookup_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createSyncLookup'][0] @@ -933,7 +933,7 @@ protected function getHostSettingsForcreateSyncLookup(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\GetAsyncBulkLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse + * @return \Bandwidth\Model\GetAsyncBulkLookupResponse|\Bandwidth\Model\LookupErrorResponse */ public function getAsyncBulkLookup( string $account_id, @@ -941,7 +941,7 @@ public function getAsyncBulkLookup( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['getAsyncBulkLookup'][0] - ): \OpenAPI\Client\Model\GetAsyncBulkLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse + ): \Bandwidth\Model\GetAsyncBulkLookupResponse|\Bandwidth\Model\LookupErrorResponse { list($response) = $this->getAsyncBulkLookupWithHttpInfo($account_id, $request_id, $hostIndex, $variables, $contentType); return $response; @@ -964,7 +964,7 @@ public function getAsyncBulkLookup( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\GetAsyncBulkLookupResponse|\OpenAPI\Client\Model\LookupErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\GetAsyncBulkLookupResponse|\Bandwidth\Model\LookupErrorResponse, HTTP status code, HTTP response headers (array of strings) */ public function getAsyncBulkLookupWithHttpInfo( string $account_id, @@ -1001,13 +1001,13 @@ public function getAsyncBulkLookupWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\GetAsyncBulkLookupResponse', + '\Bandwidth\Model\GetAsyncBulkLookupResponse', $request, $response, ); default: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\LookupErrorResponse', + '\Bandwidth\Model\LookupErrorResponse', $request, $response, ); @@ -1028,7 +1028,7 @@ public function getAsyncBulkLookupWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\GetAsyncBulkLookupResponse', + '\Bandwidth\Model\GetAsyncBulkLookupResponse', $request, $response, ); @@ -1037,7 +1037,7 @@ public function getAsyncBulkLookupWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\GetAsyncBulkLookupResponse', + '\Bandwidth\Model\GetAsyncBulkLookupResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1045,7 +1045,7 @@ public function getAsyncBulkLookupWithHttpInfo( default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\LookupErrorResponse', + '\Bandwidth\Model\LookupErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1116,7 +1116,7 @@ public function getAsyncBulkLookupAsyncWithHttpInfo( string $contentType = self::contentTypes['getAsyncBulkLookup'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\GetAsyncBulkLookupResponse'; + $returnType = '\Bandwidth\Model\GetAsyncBulkLookupResponse'; $request = $this->getAsyncBulkLookupRequest($account_id, $request_id, $hostIndex, $variables, $contentType); return $this->client diff --git a/src/Api/RecordingsApi.php b/src/Api/RecordingsApi.php index 9259667a..b5b4fc6e 100644 --- a/src/Api/RecordingsApi.php +++ b/src/Api/RecordingsApi.php @@ -3,7 +3,7 @@ * RecordingsApi * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Api; +namespace Bandwidth\Api; use InvalidArgumentException; use GuzzleHttp\Client; @@ -38,16 +38,16 @@ use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ApiException; +use Bandwidth\Configuration; +use Bandwidth\HeaderSelector; +use Bandwidth\FormDataProcessor; +use Bandwidth\ObjectSerializer; /** * RecordingsApi Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -171,7 +171,7 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\VoiceApiError|null + * @return \Bandwidth\Model\VoiceApiError|null */ public function deleteRecording( string $account_id, @@ -180,7 +180,7 @@ public function deleteRecording( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['deleteRecording'][0] - ): ?\OpenAPI\Client\Model\VoiceApiError + ): ?\Bandwidth\Model\VoiceApiError { list($response) = $this->deleteRecordingWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); return $response; @@ -246,7 +246,7 @@ public function deleteRecordingWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -254,7 +254,7 @@ public function deleteRecordingWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -262,7 +262,7 @@ public function deleteRecordingWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -270,7 +270,7 @@ public function deleteRecordingWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -278,7 +278,7 @@ public function deleteRecordingWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -286,7 +286,7 @@ public function deleteRecordingWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -294,7 +294,7 @@ public function deleteRecordingWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -302,7 +302,7 @@ public function deleteRecordingWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -592,7 +592,7 @@ protected function getHostSettingsFordeleteRecording(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\VoiceApiError|null + * @return \Bandwidth\Model\VoiceApiError|null */ public function deleteRecordingMedia( string $account_id, @@ -601,7 +601,7 @@ public function deleteRecordingMedia( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['deleteRecordingMedia'][0] - ): ?\OpenAPI\Client\Model\VoiceApiError + ): ?\Bandwidth\Model\VoiceApiError { list($response) = $this->deleteRecordingMediaWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); return $response; @@ -667,7 +667,7 @@ public function deleteRecordingMediaWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -675,7 +675,7 @@ public function deleteRecordingMediaWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -683,7 +683,7 @@ public function deleteRecordingMediaWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -691,7 +691,7 @@ public function deleteRecordingMediaWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -699,7 +699,7 @@ public function deleteRecordingMediaWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -707,7 +707,7 @@ public function deleteRecordingMediaWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -715,7 +715,7 @@ public function deleteRecordingMediaWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -723,7 +723,7 @@ public function deleteRecordingMediaWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1013,7 +1013,7 @@ protected function getHostSettingsFordeleteRecordingMedia(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\VoiceApiError|null + * @return \Bandwidth\Model\VoiceApiError|null */ public function deleteRecordingTranscription( string $account_id, @@ -1022,7 +1022,7 @@ public function deleteRecordingTranscription( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['deleteRecordingTranscription'][0] - ): ?\OpenAPI\Client\Model\VoiceApiError + ): ?\Bandwidth\Model\VoiceApiError { list($response) = $this->deleteRecordingTranscriptionWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); return $response; @@ -1088,7 +1088,7 @@ public function deleteRecordingTranscriptionWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1096,7 +1096,7 @@ public function deleteRecordingTranscriptionWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1104,7 +1104,7 @@ public function deleteRecordingTranscriptionWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1112,7 +1112,7 @@ public function deleteRecordingTranscriptionWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1120,7 +1120,7 @@ public function deleteRecordingTranscriptionWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1128,7 +1128,7 @@ public function deleteRecordingTranscriptionWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1136,7 +1136,7 @@ public function deleteRecordingTranscriptionWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1144,7 +1144,7 @@ public function deleteRecordingTranscriptionWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1434,7 +1434,7 @@ protected function getHostSettingsFordeleteRecordingTranscription(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \SplFileObject|\OpenAPI\Client\Model\VoiceApiError + * @return \SplFileObject|\Bandwidth\Model\VoiceApiError */ public function downloadCallRecording( string $account_id, @@ -1443,7 +1443,7 @@ public function downloadCallRecording( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['downloadCallRecording'][0] - ): \SplFileObject|\OpenAPI\Client\Model\VoiceApiError + ): \SplFileObject|\Bandwidth\Model\VoiceApiError { list($response) = $this->downloadCallRecordingWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); return $response; @@ -1467,7 +1467,7 @@ public function downloadCallRecording( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SplFileObject|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \SplFileObject|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function downloadCallRecordingWithHttpInfo( string $account_id, @@ -1511,49 +1511,49 @@ public function downloadCallRecordingWithHttpInfo( ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -1591,7 +1591,7 @@ public function downloadCallRecordingWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1599,7 +1599,7 @@ public function downloadCallRecordingWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1607,7 +1607,7 @@ public function downloadCallRecordingWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1615,7 +1615,7 @@ public function downloadCallRecordingWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1623,7 +1623,7 @@ public function downloadCallRecordingWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1631,7 +1631,7 @@ public function downloadCallRecordingWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1639,7 +1639,7 @@ public function downloadCallRecordingWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1647,7 +1647,7 @@ public function downloadCallRecordingWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1950,7 +1950,7 @@ protected function getHostSettingsFordownloadCallRecording(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\CallRecordingMetadata|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\CallRecordingMetadata|\Bandwidth\Model\VoiceApiError */ public function getCallRecording( string $account_id, @@ -1959,7 +1959,7 @@ public function getCallRecording( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['getCallRecording'][0] - ): \OpenAPI\Client\Model\CallRecordingMetadata|\OpenAPI\Client\Model\VoiceApiError + ): \Bandwidth\Model\CallRecordingMetadata|\Bandwidth\Model\VoiceApiError { list($response) = $this->getCallRecordingWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); return $response; @@ -1983,7 +1983,7 @@ public function getCallRecording( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\CallRecordingMetadata|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\CallRecordingMetadata|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function getCallRecordingWithHttpInfo( string $account_id, @@ -2021,55 +2021,55 @@ public function getCallRecordingWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallRecordingMetadata', + '\Bandwidth\Model\CallRecordingMetadata', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -2090,7 +2090,7 @@ public function getCallRecordingWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallRecordingMetadata', + '\Bandwidth\Model\CallRecordingMetadata', $request, $response, ); @@ -2099,7 +2099,7 @@ public function getCallRecordingWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\CallRecordingMetadata', + '\Bandwidth\Model\CallRecordingMetadata', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2107,7 +2107,7 @@ public function getCallRecordingWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2115,7 +2115,7 @@ public function getCallRecordingWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2123,7 +2123,7 @@ public function getCallRecordingWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2131,7 +2131,7 @@ public function getCallRecordingWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2139,7 +2139,7 @@ public function getCallRecordingWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2147,7 +2147,7 @@ public function getCallRecordingWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2155,7 +2155,7 @@ public function getCallRecordingWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2163,7 +2163,7 @@ public function getCallRecordingWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2238,7 +2238,7 @@ public function getCallRecordingAsyncWithHttpInfo( string $contentType = self::contentTypes['getCallRecording'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\CallRecordingMetadata'; + $returnType = '\Bandwidth\Model\CallRecordingMetadata'; $request = $this->getCallRecordingRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); return $this->client @@ -2466,7 +2466,7 @@ protected function getHostSettingsForgetCallRecording(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\RecordingTranscriptions|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\RecordingTranscriptions|\Bandwidth\Model\VoiceApiError */ public function getRecordingTranscription( string $account_id, @@ -2475,7 +2475,7 @@ public function getRecordingTranscription( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['getRecordingTranscription'][0] - ): \OpenAPI\Client\Model\RecordingTranscriptions|\OpenAPI\Client\Model\VoiceApiError + ): \Bandwidth\Model\RecordingTranscriptions|\Bandwidth\Model\VoiceApiError { list($response) = $this->getRecordingTranscriptionWithHttpInfo($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); return $response; @@ -2499,7 +2499,7 @@ public function getRecordingTranscription( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\RecordingTranscriptions|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\RecordingTranscriptions|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function getRecordingTranscriptionWithHttpInfo( string $account_id, @@ -2537,55 +2537,55 @@ public function getRecordingTranscriptionWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\RecordingTranscriptions', + '\Bandwidth\Model\RecordingTranscriptions', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -2606,7 +2606,7 @@ public function getRecordingTranscriptionWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\RecordingTranscriptions', + '\Bandwidth\Model\RecordingTranscriptions', $request, $response, ); @@ -2615,7 +2615,7 @@ public function getRecordingTranscriptionWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\RecordingTranscriptions', + '\Bandwidth\Model\RecordingTranscriptions', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2623,7 +2623,7 @@ public function getRecordingTranscriptionWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2631,7 +2631,7 @@ public function getRecordingTranscriptionWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2639,7 +2639,7 @@ public function getRecordingTranscriptionWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2647,7 +2647,7 @@ public function getRecordingTranscriptionWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2655,7 +2655,7 @@ public function getRecordingTranscriptionWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2663,7 +2663,7 @@ public function getRecordingTranscriptionWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2671,7 +2671,7 @@ public function getRecordingTranscriptionWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2679,7 +2679,7 @@ public function getRecordingTranscriptionWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2754,7 +2754,7 @@ public function getRecordingTranscriptionAsyncWithHttpInfo( string $contentType = self::contentTypes['getRecordingTranscription'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\RecordingTranscriptions'; + $returnType = '\Bandwidth\Model\RecordingTranscriptions'; $request = $this->getRecordingTranscriptionRequest($account_id, $call_id, $recording_id, $hostIndex, $variables, $contentType); return $this->client @@ -2984,7 +2984,7 @@ protected function getHostSettingsForgetRecordingTranscription(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\CallRecordingMetadata[]|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\CallRecordingMetadata[]|\Bandwidth\Model\VoiceApiError */ public function listAccountCallRecordings( string $account_id, @@ -2995,7 +2995,7 @@ public function listAccountCallRecordings( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['listAccountCallRecordings'][0] - ): array|\OpenAPI\Client\Model\VoiceApiError + ): array|\Bandwidth\Model\VoiceApiError { list($response) = $this->listAccountCallRecordingsWithHttpInfo($account_id, $to, $from, $min_start_time, $max_start_time, $hostIndex, $variables, $contentType); return $response; @@ -3021,7 +3021,7 @@ public function listAccountCallRecordings( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\CallRecordingMetadata[]|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\CallRecordingMetadata[]|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function listAccountCallRecordingsWithHttpInfo( string $account_id, @@ -3061,55 +3061,55 @@ public function listAccountCallRecordingsWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallRecordingMetadata[]', + '\Bandwidth\Model\CallRecordingMetadata[]', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -3130,7 +3130,7 @@ public function listAccountCallRecordingsWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallRecordingMetadata[]', + '\Bandwidth\Model\CallRecordingMetadata[]', $request, $response, ); @@ -3139,7 +3139,7 @@ public function listAccountCallRecordingsWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\CallRecordingMetadata[]', + '\Bandwidth\Model\CallRecordingMetadata[]', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3147,7 +3147,7 @@ public function listAccountCallRecordingsWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3155,7 +3155,7 @@ public function listAccountCallRecordingsWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3163,7 +3163,7 @@ public function listAccountCallRecordingsWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3171,7 +3171,7 @@ public function listAccountCallRecordingsWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3179,7 +3179,7 @@ public function listAccountCallRecordingsWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3187,7 +3187,7 @@ public function listAccountCallRecordingsWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3195,7 +3195,7 @@ public function listAccountCallRecordingsWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3203,7 +3203,7 @@ public function listAccountCallRecordingsWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3286,7 +3286,7 @@ public function listAccountCallRecordingsAsyncWithHttpInfo( string $contentType = self::contentTypes['listAccountCallRecordings'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\CallRecordingMetadata[]'; + $returnType = '\Bandwidth\Model\CallRecordingMetadata[]'; $request = $this->listAccountCallRecordingsRequest($account_id, $to, $from, $min_start_time, $max_start_time, $hostIndex, $variables, $contentType); return $this->client @@ -3527,7 +3527,7 @@ protected function getHostSettingsForlistAccountCallRecordings(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\CallRecordingMetadata[]|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\CallRecordingMetadata[]|\Bandwidth\Model\VoiceApiError */ public function listCallRecordings( string $account_id, @@ -3535,7 +3535,7 @@ public function listCallRecordings( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['listCallRecordings'][0] - ): array|\OpenAPI\Client\Model\VoiceApiError + ): array|\Bandwidth\Model\VoiceApiError { list($response) = $this->listCallRecordingsWithHttpInfo($account_id, $call_id, $hostIndex, $variables, $contentType); return $response; @@ -3558,7 +3558,7 @@ public function listCallRecordings( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\CallRecordingMetadata[]|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\CallRecordingMetadata[]|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function listCallRecordingsWithHttpInfo( string $account_id, @@ -3595,55 +3595,55 @@ public function listCallRecordingsWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallRecordingMetadata[]', + '\Bandwidth\Model\CallRecordingMetadata[]', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -3664,7 +3664,7 @@ public function listCallRecordingsWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallRecordingMetadata[]', + '\Bandwidth\Model\CallRecordingMetadata[]', $request, $response, ); @@ -3673,7 +3673,7 @@ public function listCallRecordingsWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\CallRecordingMetadata[]', + '\Bandwidth\Model\CallRecordingMetadata[]', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3681,7 +3681,7 @@ public function listCallRecordingsWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3689,7 +3689,7 @@ public function listCallRecordingsWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3697,7 +3697,7 @@ public function listCallRecordingsWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3705,7 +3705,7 @@ public function listCallRecordingsWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3713,7 +3713,7 @@ public function listCallRecordingsWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3721,7 +3721,7 @@ public function listCallRecordingsWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3729,7 +3729,7 @@ public function listCallRecordingsWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3737,7 +3737,7 @@ public function listCallRecordingsWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3808,7 +3808,7 @@ public function listCallRecordingsAsyncWithHttpInfo( string $contentType = self::contentTypes['listCallRecordings'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\CallRecordingMetadata[]'; + $returnType = '\Bandwidth\Model\CallRecordingMetadata[]'; $request = $this->listCallRecordingsRequest($account_id, $call_id, $hostIndex, $variables, $contentType); return $this->client @@ -4013,24 +4013,24 @@ protected function getHostSettingsForlistCallRecordings(): array * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) * @param string $recording_id Programmable Voice API Recording ID. (required) - * @param \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording transcribe_recording (required) + * @param \Bandwidth\Model\TranscribeRecording $transcribe_recording transcribe_recording (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transcribeCallRecording'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\VoiceApiError|null + * @return \Bandwidth\Model\VoiceApiError|null */ public function transcribeCallRecording( string $account_id, string $call_id, string $recording_id, - \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording, + \Bandwidth\Model\TranscribeRecording $transcribe_recording, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['transcribeCallRecording'][0] - ): ?\OpenAPI\Client\Model\VoiceApiError + ): ?\Bandwidth\Model\VoiceApiError { list($response) = $this->transcribeCallRecordingWithHttpInfo($account_id, $call_id, $recording_id, $transcribe_recording, $hostIndex, $variables, $contentType); return $response; @@ -4048,7 +4048,7 @@ public function transcribeCallRecording( * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) * @param string $recording_id Programmable Voice API Recording ID. (required) - * @param \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording (required) + * @param \Bandwidth\Model\TranscribeRecording $transcribe_recording (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transcribeCallRecording'] to see the possible values for this operation @@ -4061,7 +4061,7 @@ public function transcribeCallRecordingWithHttpInfo( string $account_id, string $call_id, string $recording_id, - \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording, + \Bandwidth\Model\TranscribeRecording $transcribe_recording, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['transcribeCallRecording'][0] @@ -4098,7 +4098,7 @@ public function transcribeCallRecordingWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4106,7 +4106,7 @@ public function transcribeCallRecordingWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4114,7 +4114,7 @@ public function transcribeCallRecordingWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4122,7 +4122,7 @@ public function transcribeCallRecordingWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4130,7 +4130,7 @@ public function transcribeCallRecordingWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4138,7 +4138,7 @@ public function transcribeCallRecordingWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4146,7 +4146,7 @@ public function transcribeCallRecordingWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4154,7 +4154,7 @@ public function transcribeCallRecordingWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4177,7 +4177,7 @@ public function transcribeCallRecordingWithHttpInfo( * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) * @param string $recording_id Programmable Voice API Recording ID. (required) - * @param \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording (required) + * @param \Bandwidth\Model\TranscribeRecording $transcribe_recording (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transcribeCallRecording'] to see the possible values for this operation @@ -4189,7 +4189,7 @@ public function transcribeCallRecordingAsync( string $account_id, string $call_id, string $recording_id, - \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording, + \Bandwidth\Model\TranscribeRecording $transcribe_recording, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['transcribeCallRecording'][0] @@ -4215,7 +4215,7 @@ function ($response) { * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) * @param string $recording_id Programmable Voice API Recording ID. (required) - * @param \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording (required) + * @param \Bandwidth\Model\TranscribeRecording $transcribe_recording (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transcribeCallRecording'] to see the possible values for this operation @@ -4227,7 +4227,7 @@ public function transcribeCallRecordingAsyncWithHttpInfo( string $account_id, string $call_id, string $recording_id, - \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording, + \Bandwidth\Model\TranscribeRecording $transcribe_recording, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['transcribeCallRecording'][0] @@ -4269,7 +4269,7 @@ function ($exception) { * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) * @param string $recording_id Programmable Voice API Recording ID. (required) - * @param \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording (required) + * @param \Bandwidth\Model\TranscribeRecording $transcribe_recording (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['transcribeCallRecording'] to see the possible values for this operation @@ -4281,7 +4281,7 @@ public function transcribeCallRecordingRequest( string $account_id, string $call_id, string $recording_id, - \OpenAPI\Client\Model\TranscribeRecording $transcribe_recording, + \Bandwidth\Model\TranscribeRecording $transcribe_recording, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['transcribeCallRecording'][0] @@ -4457,23 +4457,23 @@ protected function getHostSettingsFortranscribeCallRecording(): array * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) - * @param \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording update_call_recording (required) + * @param \Bandwidth\Model\UpdateCallRecording $update_call_recording update_call_recording (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallRecordingState'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\VoiceApiError|null + * @return \Bandwidth\Model\VoiceApiError|null */ public function updateCallRecordingState( string $account_id, string $call_id, - \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording, + \Bandwidth\Model\UpdateCallRecording $update_call_recording, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateCallRecordingState'][0] - ): ?\OpenAPI\Client\Model\VoiceApiError + ): ?\Bandwidth\Model\VoiceApiError { list($response) = $this->updateCallRecordingStateWithHttpInfo($account_id, $call_id, $update_call_recording, $hostIndex, $variables, $contentType); return $response; @@ -4490,7 +4490,7 @@ public function updateCallRecordingState( * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) - * @param \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording (required) + * @param \Bandwidth\Model\UpdateCallRecording $update_call_recording (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallRecordingState'] to see the possible values for this operation @@ -4502,7 +4502,7 @@ public function updateCallRecordingState( public function updateCallRecordingStateWithHttpInfo( string $account_id, string $call_id, - \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording, + \Bandwidth\Model\UpdateCallRecording $update_call_recording, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateCallRecordingState'][0] @@ -4539,7 +4539,7 @@ public function updateCallRecordingStateWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4547,7 +4547,7 @@ public function updateCallRecordingStateWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4555,7 +4555,7 @@ public function updateCallRecordingStateWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4563,7 +4563,7 @@ public function updateCallRecordingStateWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4571,7 +4571,7 @@ public function updateCallRecordingStateWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4579,7 +4579,7 @@ public function updateCallRecordingStateWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4587,7 +4587,7 @@ public function updateCallRecordingStateWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4595,7 +4595,7 @@ public function updateCallRecordingStateWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4617,7 +4617,7 @@ public function updateCallRecordingStateWithHttpInfo( * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) - * @param \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording (required) + * @param \Bandwidth\Model\UpdateCallRecording $update_call_recording (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallRecordingState'] to see the possible values for this operation @@ -4628,7 +4628,7 @@ public function updateCallRecordingStateWithHttpInfo( public function updateCallRecordingStateAsync( string $account_id, string $call_id, - \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording, + \Bandwidth\Model\UpdateCallRecording $update_call_recording, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateCallRecordingState'][0] @@ -4653,7 +4653,7 @@ function ($response) { * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) - * @param \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording (required) + * @param \Bandwidth\Model\UpdateCallRecording $update_call_recording (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallRecordingState'] to see the possible values for this operation @@ -4664,7 +4664,7 @@ function ($response) { public function updateCallRecordingStateAsyncWithHttpInfo( string $account_id, string $call_id, - \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording, + \Bandwidth\Model\UpdateCallRecording $update_call_recording, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateCallRecordingState'][0] @@ -4705,7 +4705,7 @@ function ($exception) { * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $call_id Programmable Voice API Call ID. (required) - * @param \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording (required) + * @param \Bandwidth\Model\UpdateCallRecording $update_call_recording (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateCallRecordingState'] to see the possible values for this operation @@ -4716,7 +4716,7 @@ function ($exception) { public function updateCallRecordingStateRequest( string $account_id, string $call_id, - \OpenAPI\Client\Model\UpdateCallRecording $update_call_recording, + \Bandwidth\Model\UpdateCallRecording $update_call_recording, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateCallRecordingState'][0] diff --git a/src/Api/StatisticsApi.php b/src/Api/StatisticsApi.php index a1daad66..a9037c9c 100644 --- a/src/Api/StatisticsApi.php +++ b/src/Api/StatisticsApi.php @@ -3,7 +3,7 @@ * StatisticsApi * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Api; +namespace Bandwidth\Api; use InvalidArgumentException; use GuzzleHttp\Client; @@ -38,16 +38,16 @@ use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ApiException; +use Bandwidth\Configuration; +use Bandwidth\HeaderSelector; +use Bandwidth\FormDataProcessor; +use Bandwidth\ObjectSerializer; /** * StatisticsApi Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -142,14 +142,14 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\AccountStatistics|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\AccountStatistics|\Bandwidth\Model\VoiceApiError */ public function getStatistics( string $account_id, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['getStatistics'][0] - ): \OpenAPI\Client\Model\AccountStatistics|\OpenAPI\Client\Model\VoiceApiError + ): \Bandwidth\Model\AccountStatistics|\Bandwidth\Model\VoiceApiError { list($response) = $this->getStatisticsWithHttpInfo($account_id, $hostIndex, $variables, $contentType); return $response; @@ -171,7 +171,7 @@ public function getStatistics( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\AccountStatistics|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\AccountStatistics|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function getStatisticsWithHttpInfo( string $account_id, @@ -207,55 +207,55 @@ public function getStatisticsWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\AccountStatistics', + '\Bandwidth\Model\AccountStatistics', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -276,7 +276,7 @@ public function getStatisticsWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\AccountStatistics', + '\Bandwidth\Model\AccountStatistics', $request, $response, ); @@ -285,7 +285,7 @@ public function getStatisticsWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\AccountStatistics', + '\Bandwidth\Model\AccountStatistics', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -293,7 +293,7 @@ public function getStatisticsWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -301,7 +301,7 @@ public function getStatisticsWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -309,7 +309,7 @@ public function getStatisticsWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -317,7 +317,7 @@ public function getStatisticsWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -325,7 +325,7 @@ public function getStatisticsWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -333,7 +333,7 @@ public function getStatisticsWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -341,7 +341,7 @@ public function getStatisticsWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -349,7 +349,7 @@ public function getStatisticsWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -416,7 +416,7 @@ public function getStatisticsAsyncWithHttpInfo( string $contentType = self::contentTypes['getStatistics'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\AccountStatistics'; + $returnType = '\Bandwidth\Model\AccountStatistics'; $request = $this->getStatisticsRequest($account_id, $hostIndex, $variables, $contentType); return $this->client diff --git a/src/Api/TollFreeVerificationApi.php b/src/Api/TollFreeVerificationApi.php index ab646b82..44b62c0c 100644 --- a/src/Api/TollFreeVerificationApi.php +++ b/src/Api/TollFreeVerificationApi.php @@ -3,7 +3,7 @@ * TollFreeVerificationApi * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Api; +namespace Bandwidth\Api; use InvalidArgumentException; use GuzzleHttp\Client; @@ -38,16 +38,16 @@ use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ApiException; +use Bandwidth\Configuration; +use Bandwidth\HeaderSelector; +use Bandwidth\FormDataProcessor; +use Bandwidth\ObjectSerializer; /** * TollFreeVerificationApi Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -160,22 +160,22 @@ public function getConfig(): Configuration * URL: https://api.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createWebhookSubscription'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\WebhookSubscription|\OpenAPI\Client\Model\TfvError + * @return \Bandwidth\Model\WebhookSubscription|\Bandwidth\Model\TfvError */ public function createWebhookSubscription( string $account_id, - \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createWebhookSubscription'][0] - ): \OpenAPI\Client\Model\WebhookSubscription|\OpenAPI\Client\Model\TfvError + ): \Bandwidth\Model\WebhookSubscription|\Bandwidth\Model\TfvError { list($response) = $this->createWebhookSubscriptionWithHttpInfo($account_id, $webhook_subscription_request_schema, $hostIndex, $variables, $contentType); return $response; @@ -191,18 +191,18 @@ public function createWebhookSubscription( * URL: https://api.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createWebhookSubscription'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\WebhookSubscription|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\WebhookSubscription|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError, HTTP status code, HTTP response headers (array of strings) */ public function createWebhookSubscriptionWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createWebhookSubscription'][0] @@ -235,55 +235,55 @@ public function createWebhookSubscriptionWithHttpInfo( switch($statusCode) { case 201: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\WebhookSubscription', + '\Bandwidth\Model\WebhookSubscription', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 503: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); @@ -304,7 +304,7 @@ public function createWebhookSubscriptionWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\WebhookSubscription', + '\Bandwidth\Model\WebhookSubscription', $request, $response, ); @@ -313,7 +313,7 @@ public function createWebhookSubscriptionWithHttpInfo( case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\WebhookSubscription', + '\Bandwidth\Model\WebhookSubscription', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -321,7 +321,7 @@ public function createWebhookSubscriptionWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -329,7 +329,7 @@ public function createWebhookSubscriptionWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -337,7 +337,7 @@ public function createWebhookSubscriptionWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -345,7 +345,7 @@ public function createWebhookSubscriptionWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -353,7 +353,7 @@ public function createWebhookSubscriptionWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -361,7 +361,7 @@ public function createWebhookSubscriptionWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -369,7 +369,7 @@ public function createWebhookSubscriptionWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -377,7 +377,7 @@ public function createWebhookSubscriptionWithHttpInfo( case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -398,7 +398,7 @@ public function createWebhookSubscriptionWithHttpInfo( * URL: https://api.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createWebhookSubscription'] to see the possible values for this operation @@ -408,7 +408,7 @@ public function createWebhookSubscriptionWithHttpInfo( */ public function createWebhookSubscriptionAsync( string $account_id, - \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createWebhookSubscription'][0] @@ -432,7 +432,7 @@ function ($response) { * URL: https://api.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createWebhookSubscription'] to see the possible values for this operation @@ -442,13 +442,13 @@ function ($response) { */ public function createWebhookSubscriptionAsyncWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createWebhookSubscription'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\WebhookSubscription'; + $returnType = '\Bandwidth\Model\WebhookSubscription'; $request = $this->createWebhookSubscriptionRequest($account_id, $webhook_subscription_request_schema, $hostIndex, $variables, $contentType); return $this->client @@ -495,7 +495,7 @@ function ($exception) { * URL: https://api.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createWebhookSubscription'] to see the possible values for this operation @@ -505,7 +505,7 @@ function ($exception) { */ public function createWebhookSubscriptionRequest( string $account_id, - \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createWebhookSubscription'][0] @@ -657,7 +657,7 @@ protected function getHostSettingsForcreateWebhookSubscription(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\TfvError|null + * @return \Bandwidth\Model\TfvError|null */ public function deleteVerificationRequest( string $account_id, @@ -665,7 +665,7 @@ public function deleteVerificationRequest( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['deleteVerificationRequest'][0] - ): ?\OpenAPI\Client\Model\TfvError + ): ?\Bandwidth\Model\TfvError { list($response) = $this->deleteVerificationRequestWithHttpInfo($account_id, $phone_number, $hostIndex, $variables, $contentType); return $response; @@ -729,7 +729,7 @@ public function deleteVerificationRequestWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -737,7 +737,7 @@ public function deleteVerificationRequestWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -745,7 +745,7 @@ public function deleteVerificationRequestWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -753,7 +753,7 @@ public function deleteVerificationRequestWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -761,7 +761,7 @@ public function deleteVerificationRequestWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -769,7 +769,7 @@ public function deleteVerificationRequestWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -777,7 +777,7 @@ public function deleteVerificationRequestWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -785,7 +785,7 @@ public function deleteVerificationRequestWithHttpInfo( case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1062,7 +1062,7 @@ protected function getHostSettingsFordeleteVerificationRequest(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\TfvError|null + * @return \Bandwidth\Model\TfvError|null */ public function deleteWebhookSubscription( string $account_id, @@ -1070,7 +1070,7 @@ public function deleteWebhookSubscription( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['deleteWebhookSubscription'][0] - ): ?\OpenAPI\Client\Model\TfvError + ): ?\Bandwidth\Model\TfvError { list($response) = $this->deleteWebhookSubscriptionWithHttpInfo($account_id, $id, $hostIndex, $variables, $contentType); return $response; @@ -1134,7 +1134,7 @@ public function deleteWebhookSubscriptionWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1142,7 +1142,7 @@ public function deleteWebhookSubscriptionWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1150,7 +1150,7 @@ public function deleteWebhookSubscriptionWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1158,7 +1158,7 @@ public function deleteWebhookSubscriptionWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1166,7 +1166,7 @@ public function deleteWebhookSubscriptionWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1174,7 +1174,7 @@ public function deleteWebhookSubscriptionWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1182,7 +1182,7 @@ public function deleteWebhookSubscriptionWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1190,7 +1190,7 @@ public function deleteWebhookSubscriptionWithHttpInfo( case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1458,7 +1458,7 @@ protected function getHostSettingsFordeleteWebhookSubscription(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\TfvStatus|\OpenAPI\Client\Model\TfvError + * @return \Bandwidth\Model\TfvStatus|\Bandwidth\Model\TfvError */ public function getTollFreeVerificationStatus( string $account_id, @@ -1466,7 +1466,7 @@ public function getTollFreeVerificationStatus( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['getTollFreeVerificationStatus'][0] - ): \OpenAPI\Client\Model\TfvStatus|\OpenAPI\Client\Model\TfvError + ): \Bandwidth\Model\TfvStatus|\Bandwidth\Model\TfvError { list($response) = $this->getTollFreeVerificationStatusWithHttpInfo($account_id, $phone_number, $hostIndex, $variables, $contentType); return $response; @@ -1489,7 +1489,7 @@ public function getTollFreeVerificationStatus( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\TfvStatus|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\TfvStatus|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError, HTTP status code, HTTP response headers (array of strings) */ public function getTollFreeVerificationStatusWithHttpInfo( string $account_id, @@ -1526,55 +1526,55 @@ public function getTollFreeVerificationStatusWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvStatus', + '\Bandwidth\Model\TfvStatus', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 503: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); @@ -1595,7 +1595,7 @@ public function getTollFreeVerificationStatusWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvStatus', + '\Bandwidth\Model\TfvStatus', $request, $response, ); @@ -1604,7 +1604,7 @@ public function getTollFreeVerificationStatusWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvStatus', + '\Bandwidth\Model\TfvStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1612,7 +1612,7 @@ public function getTollFreeVerificationStatusWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1620,7 +1620,7 @@ public function getTollFreeVerificationStatusWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1628,7 +1628,7 @@ public function getTollFreeVerificationStatusWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1636,7 +1636,7 @@ public function getTollFreeVerificationStatusWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1644,7 +1644,7 @@ public function getTollFreeVerificationStatusWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1652,7 +1652,7 @@ public function getTollFreeVerificationStatusWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1660,7 +1660,7 @@ public function getTollFreeVerificationStatusWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1668,7 +1668,7 @@ public function getTollFreeVerificationStatusWithHttpInfo( case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1739,7 +1739,7 @@ public function getTollFreeVerificationStatusAsyncWithHttpInfo( string $contentType = self::contentTypes['getTollFreeVerificationStatus'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\TfvStatus'; + $returnType = '\Bandwidth\Model\TfvStatus'; $request = $this->getTollFreeVerificationStatusRequest($account_id, $phone_number, $hostIndex, $variables, $contentType); return $this->client @@ -1956,13 +1956,13 @@ protected function getHostSettingsForgetTollFreeVerificationStatus(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return string[]|\OpenAPI\Client\Model\TfvError + * @return string[]|\Bandwidth\Model\TfvError */ public function listTollFreeUseCases( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['listTollFreeUseCases'][0] - ): array|\OpenAPI\Client\Model\TfvError + ): array|\Bandwidth\Model\TfvError { list($response) = $this->listTollFreeUseCasesWithHttpInfo($hostIndex, $variables, $contentType); return $response; @@ -1983,7 +1983,7 @@ public function listTollFreeUseCases( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of string[]|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + * @return array of string[]|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError, HTTP status code, HTTP response headers (array of strings) */ public function listTollFreeUseCasesWithHttpInfo( ?int $hostIndex = null, @@ -2024,49 +2024,49 @@ public function listTollFreeUseCasesWithHttpInfo( ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 503: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); @@ -2104,7 +2104,7 @@ public function listTollFreeUseCasesWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2112,7 +2112,7 @@ public function listTollFreeUseCasesWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2120,7 +2120,7 @@ public function listTollFreeUseCasesWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2128,7 +2128,7 @@ public function listTollFreeUseCasesWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2136,7 +2136,7 @@ public function listTollFreeUseCasesWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2144,7 +2144,7 @@ public function listTollFreeUseCasesWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2152,7 +2152,7 @@ public function listTollFreeUseCasesWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2160,7 +2160,7 @@ public function listTollFreeUseCasesWithHttpInfo( case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2398,14 +2398,14 @@ protected function getHostSettingsForlistTollFreeUseCases(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\WebhookSubscriptionsListBody|\OpenAPI\Client\Model\TfvError + * @return \Bandwidth\Model\WebhookSubscriptionsListBody|\Bandwidth\Model\TfvError */ public function listWebhookSubscriptions( string $account_id, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['listWebhookSubscriptions'][0] - ): \OpenAPI\Client\Model\WebhookSubscriptionsListBody|\OpenAPI\Client\Model\TfvError + ): \Bandwidth\Model\WebhookSubscriptionsListBody|\Bandwidth\Model\TfvError { list($response) = $this->listWebhookSubscriptionsWithHttpInfo($account_id, $hostIndex, $variables, $contentType); return $response; @@ -2427,7 +2427,7 @@ public function listWebhookSubscriptions( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\WebhookSubscriptionsListBody|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\WebhookSubscriptionsListBody|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError, HTTP status code, HTTP response headers (array of strings) */ public function listWebhookSubscriptionsWithHttpInfo( string $account_id, @@ -2463,49 +2463,49 @@ public function listWebhookSubscriptionsWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\WebhookSubscriptionsListBody', + '\Bandwidth\Model\WebhookSubscriptionsListBody', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 503: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); @@ -2526,7 +2526,7 @@ public function listWebhookSubscriptionsWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\WebhookSubscriptionsListBody', + '\Bandwidth\Model\WebhookSubscriptionsListBody', $request, $response, ); @@ -2535,7 +2535,7 @@ public function listWebhookSubscriptionsWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\WebhookSubscriptionsListBody', + '\Bandwidth\Model\WebhookSubscriptionsListBody', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2543,7 +2543,7 @@ public function listWebhookSubscriptionsWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2551,7 +2551,7 @@ public function listWebhookSubscriptionsWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2559,7 +2559,7 @@ public function listWebhookSubscriptionsWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2567,7 +2567,7 @@ public function listWebhookSubscriptionsWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2575,7 +2575,7 @@ public function listWebhookSubscriptionsWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2583,7 +2583,7 @@ public function listWebhookSubscriptionsWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2591,7 +2591,7 @@ public function listWebhookSubscriptionsWithHttpInfo( case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2658,7 +2658,7 @@ public function listWebhookSubscriptionsAsyncWithHttpInfo( string $contentType = self::contentTypes['listWebhookSubscriptions'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\WebhookSubscriptionsListBody'; + $returnType = '\Bandwidth\Model\WebhookSubscriptionsListBody'; $request = $this->listWebhookSubscriptionsRequest($account_id, $hostIndex, $variables, $contentType); return $this->client @@ -2844,22 +2844,22 @@ protected function getHostSettingsForlistWebhookSubscriptions(): array * URL: https://api.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) + * @param \Bandwidth\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requestTollFreeVerification'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\TfvError|null + * @return \Bandwidth\Model\TfvError|null */ public function requestTollFreeVerification( string $account_id, - \OpenAPI\Client\Model\VerificationRequest $verification_request, + \Bandwidth\Model\VerificationRequest $verification_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['requestTollFreeVerification'][0] - ): ?\OpenAPI\Client\Model\TfvError + ): ?\Bandwidth\Model\TfvError { list($response) = $this->requestTollFreeVerificationWithHttpInfo($account_id, $verification_request, $hostIndex, $variables, $contentType); return $response; @@ -2875,7 +2875,7 @@ public function requestTollFreeVerification( * URL: https://api.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) + * @param \Bandwidth\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requestTollFreeVerification'] to see the possible values for this operation @@ -2886,7 +2886,7 @@ public function requestTollFreeVerification( */ public function requestTollFreeVerificationWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\VerificationRequest $verification_request, + \Bandwidth\Model\VerificationRequest $verification_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['requestTollFreeVerification'][0] @@ -2923,7 +2923,7 @@ public function requestTollFreeVerificationWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2931,7 +2931,7 @@ public function requestTollFreeVerificationWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2939,7 +2939,7 @@ public function requestTollFreeVerificationWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2947,7 +2947,7 @@ public function requestTollFreeVerificationWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2955,7 +2955,7 @@ public function requestTollFreeVerificationWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2963,7 +2963,7 @@ public function requestTollFreeVerificationWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2971,7 +2971,7 @@ public function requestTollFreeVerificationWithHttpInfo( case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2992,7 +2992,7 @@ public function requestTollFreeVerificationWithHttpInfo( * URL: https://api.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) + * @param \Bandwidth\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requestTollFreeVerification'] to see the possible values for this operation @@ -3002,7 +3002,7 @@ public function requestTollFreeVerificationWithHttpInfo( */ public function requestTollFreeVerificationAsync( string $account_id, - \OpenAPI\Client\Model\VerificationRequest $verification_request, + \Bandwidth\Model\VerificationRequest $verification_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['requestTollFreeVerification'][0] @@ -3026,7 +3026,7 @@ function ($response) { * URL: https://api.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) + * @param \Bandwidth\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requestTollFreeVerification'] to see the possible values for this operation @@ -3036,7 +3036,7 @@ function ($response) { */ public function requestTollFreeVerificationAsyncWithHttpInfo( string $account_id, - \OpenAPI\Client\Model\VerificationRequest $verification_request, + \Bandwidth\Model\VerificationRequest $verification_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['requestTollFreeVerification'][0] @@ -3076,7 +3076,7 @@ function ($exception) { * URL: https://api.bandwidth.com/api/v2 * * @param string $account_id Your Bandwidth Account ID. (required) - * @param \OpenAPI\Client\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) + * @param \Bandwidth\Model\VerificationRequest $verification_request Request for verification of a toll-free phone number. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['requestTollFreeVerification'] to see the possible values for this operation @@ -3086,7 +3086,7 @@ function ($exception) { */ public function requestTollFreeVerificationRequest( string $account_id, - \OpenAPI\Client\Model\VerificationRequest $verification_request, + \Bandwidth\Model\VerificationRequest $verification_request, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['requestTollFreeVerification'][0] @@ -3232,23 +3232,23 @@ protected function getHostSettingsForrequestTollFreeVerification(): array * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) - * @param \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) + * @param \Bandwidth\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateTollFreeVerificationRequest'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\TfvError|null + * @return \Bandwidth\Model\TfvError|null */ public function updateTollFreeVerificationRequest( string $account_id, string $phone_number, - \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper, + \Bandwidth\Model\TfvSubmissionWrapper $tfv_submission_wrapper, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateTollFreeVerificationRequest'][0] - ): ?\OpenAPI\Client\Model\TfvError + ): ?\Bandwidth\Model\TfvError { list($response) = $this->updateTollFreeVerificationRequestWithHttpInfo($account_id, $phone_number, $tfv_submission_wrapper, $hostIndex, $variables, $contentType); return $response; @@ -3265,7 +3265,7 @@ public function updateTollFreeVerificationRequest( * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) - * @param \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) + * @param \Bandwidth\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateTollFreeVerificationRequest'] to see the possible values for this operation @@ -3277,7 +3277,7 @@ public function updateTollFreeVerificationRequest( public function updateTollFreeVerificationRequestWithHttpInfo( string $account_id, string $phone_number, - \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper, + \Bandwidth\Model\TfvSubmissionWrapper $tfv_submission_wrapper, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateTollFreeVerificationRequest'][0] @@ -3314,7 +3314,7 @@ public function updateTollFreeVerificationRequestWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3322,7 +3322,7 @@ public function updateTollFreeVerificationRequestWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3330,7 +3330,7 @@ public function updateTollFreeVerificationRequestWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3338,7 +3338,7 @@ public function updateTollFreeVerificationRequestWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3346,7 +3346,7 @@ public function updateTollFreeVerificationRequestWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3354,7 +3354,7 @@ public function updateTollFreeVerificationRequestWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3362,7 +3362,7 @@ public function updateTollFreeVerificationRequestWithHttpInfo( case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3384,7 +3384,7 @@ public function updateTollFreeVerificationRequestWithHttpInfo( * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) - * @param \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) + * @param \Bandwidth\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateTollFreeVerificationRequest'] to see the possible values for this operation @@ -3395,7 +3395,7 @@ public function updateTollFreeVerificationRequestWithHttpInfo( public function updateTollFreeVerificationRequestAsync( string $account_id, string $phone_number, - \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper, + \Bandwidth\Model\TfvSubmissionWrapper $tfv_submission_wrapper, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateTollFreeVerificationRequest'][0] @@ -3420,7 +3420,7 @@ function ($response) { * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) - * @param \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) + * @param \Bandwidth\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateTollFreeVerificationRequest'] to see the possible values for this operation @@ -3431,7 +3431,7 @@ function ($response) { public function updateTollFreeVerificationRequestAsyncWithHttpInfo( string $account_id, string $phone_number, - \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper, + \Bandwidth\Model\TfvSubmissionWrapper $tfv_submission_wrapper, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateTollFreeVerificationRequest'][0] @@ -3472,7 +3472,7 @@ function ($exception) { * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $phone_number Valid Toll-Free telephone number in E.164 format. (required) - * @param \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) + * @param \Bandwidth\Model\TfvSubmissionWrapper $tfv_submission_wrapper Update a request for verification of a toll-free phone number. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateTollFreeVerificationRequest'] to see the possible values for this operation @@ -3483,7 +3483,7 @@ function ($exception) { public function updateTollFreeVerificationRequestRequest( string $account_id, string $phone_number, - \OpenAPI\Client\Model\TfvSubmissionWrapper $tfv_submission_wrapper, + \Bandwidth\Model\TfvSubmissionWrapper $tfv_submission_wrapper, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateTollFreeVerificationRequest'][0] @@ -3653,23 +3653,23 @@ protected function getHostSettingsForupdateTollFreeVerificationRequest(): array * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $id Webhook subscription ID (required) - * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhookSubscription'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\WebhookSubscription|\OpenAPI\Client\Model\TfvError + * @return \Bandwidth\Model\WebhookSubscription|\Bandwidth\Model\TfvError */ public function updateWebhookSubscription( string $account_id, string $id, - \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateWebhookSubscription'][0] - ): \OpenAPI\Client\Model\WebhookSubscription|\OpenAPI\Client\Model\TfvError + ): \Bandwidth\Model\WebhookSubscription|\Bandwidth\Model\TfvError { list($response) = $this->updateWebhookSubscriptionWithHttpInfo($account_id, $id, $webhook_subscription_request_schema, $hostIndex, $variables, $contentType); return $response; @@ -3686,19 +3686,19 @@ public function updateWebhookSubscription( * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $id Webhook subscription ID (required) - * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhookSubscription'] to see the possible values for this operation * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\WebhookSubscription|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError|\OpenAPI\Client\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\WebhookSubscription|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError, HTTP status code, HTTP response headers (array of strings) */ public function updateWebhookSubscriptionWithHttpInfo( string $account_id, string $id, - \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateWebhookSubscription'][0] @@ -3731,55 +3731,55 @@ public function updateWebhookSubscriptionWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\WebhookSubscription', + '\Bandwidth\Model\WebhookSubscription', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); case 503: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $request, $response, ); @@ -3800,7 +3800,7 @@ public function updateWebhookSubscriptionWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\WebhookSubscription', + '\Bandwidth\Model\WebhookSubscription', $request, $response, ); @@ -3809,7 +3809,7 @@ public function updateWebhookSubscriptionWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\WebhookSubscription', + '\Bandwidth\Model\WebhookSubscription', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3817,7 +3817,7 @@ public function updateWebhookSubscriptionWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3825,7 +3825,7 @@ public function updateWebhookSubscriptionWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3833,7 +3833,7 @@ public function updateWebhookSubscriptionWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3841,7 +3841,7 @@ public function updateWebhookSubscriptionWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3849,7 +3849,7 @@ public function updateWebhookSubscriptionWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3857,7 +3857,7 @@ public function updateWebhookSubscriptionWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3865,7 +3865,7 @@ public function updateWebhookSubscriptionWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3873,7 +3873,7 @@ public function updateWebhookSubscriptionWithHttpInfo( case 503: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\TfvError', + '\Bandwidth\Model\TfvError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3895,7 +3895,7 @@ public function updateWebhookSubscriptionWithHttpInfo( * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $id Webhook subscription ID (required) - * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhookSubscription'] to see the possible values for this operation @@ -3906,7 +3906,7 @@ public function updateWebhookSubscriptionWithHttpInfo( public function updateWebhookSubscriptionAsync( string $account_id, string $id, - \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateWebhookSubscription'][0] @@ -3931,7 +3931,7 @@ function ($response) { * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $id Webhook subscription ID (required) - * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhookSubscription'] to see the possible values for this operation @@ -3942,13 +3942,13 @@ function ($response) { public function updateWebhookSubscriptionAsyncWithHttpInfo( string $account_id, string $id, - \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateWebhookSubscription'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\WebhookSubscription'; + $returnType = '\Bandwidth\Model\WebhookSubscription'; $request = $this->updateWebhookSubscriptionRequest($account_id, $id, $webhook_subscription_request_schema, $hostIndex, $variables, $contentType); return $this->client @@ -3996,7 +3996,7 @@ function ($exception) { * * @param string $account_id Your Bandwidth Account ID. (required) * @param string $id Webhook subscription ID (required) - * @param \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) + * @param \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema Information about a webhook that Bandwidth should send upon the completion of event customer is trying to subscribe to. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateWebhookSubscription'] to see the possible values for this operation @@ -4007,7 +4007,7 @@ function ($exception) { public function updateWebhookSubscriptionRequest( string $account_id, string $id, - \OpenAPI\Client\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, + \Bandwidth\Model\WebhookSubscriptionRequestSchema $webhook_subscription_request_schema, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updateWebhookSubscription'][0] diff --git a/src/Api/TranscriptionsApi.php b/src/Api/TranscriptionsApi.php index 6e8e3ac8..680e266d 100644 --- a/src/Api/TranscriptionsApi.php +++ b/src/Api/TranscriptionsApi.php @@ -3,7 +3,7 @@ * TranscriptionsApi * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,7 +25,7 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Api; +namespace Bandwidth\Api; use InvalidArgumentException; use GuzzleHttp\Client; @@ -38,16 +38,16 @@ use GuzzleHttp\Promise\PromiseInterface; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ApiException; +use Bandwidth\Configuration; +use Bandwidth\HeaderSelector; +use Bandwidth\FormDataProcessor; +use Bandwidth\ObjectSerializer; /** * TranscriptionsApi Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -150,7 +150,7 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\VoiceApiError|null + * @return \Bandwidth\Model\VoiceApiError|null */ public function deleteRealTimeTranscription( string $account_id, @@ -159,7 +159,7 @@ public function deleteRealTimeTranscription( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['deleteRealTimeTranscription'][0] - ): ?\OpenAPI\Client\Model\VoiceApiError + ): ?\Bandwidth\Model\VoiceApiError { list($response) = $this->deleteRealTimeTranscriptionWithHttpInfo($account_id, $call_id, $transcription_id, $hostIndex, $variables, $contentType); return $response; @@ -225,7 +225,7 @@ public function deleteRealTimeTranscriptionWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -233,7 +233,7 @@ public function deleteRealTimeTranscriptionWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -241,7 +241,7 @@ public function deleteRealTimeTranscriptionWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -249,7 +249,7 @@ public function deleteRealTimeTranscriptionWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -257,7 +257,7 @@ public function deleteRealTimeTranscriptionWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -265,7 +265,7 @@ public function deleteRealTimeTranscriptionWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -273,7 +273,7 @@ public function deleteRealTimeTranscriptionWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -281,7 +281,7 @@ public function deleteRealTimeTranscriptionWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -571,7 +571,7 @@ protected function getHostSettingsFordeleteRealTimeTranscription(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\CallTranscriptionResponse|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\CallTranscriptionResponse|\Bandwidth\Model\VoiceApiError */ public function getRealTimeTranscription( string $account_id, @@ -580,7 +580,7 @@ public function getRealTimeTranscription( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['getRealTimeTranscription'][0] - ): \OpenAPI\Client\Model\CallTranscriptionResponse|\OpenAPI\Client\Model\VoiceApiError + ): \Bandwidth\Model\CallTranscriptionResponse|\Bandwidth\Model\VoiceApiError { list($response) = $this->getRealTimeTranscriptionWithHttpInfo($account_id, $call_id, $transcription_id, $hostIndex, $variables, $contentType); return $response; @@ -604,7 +604,7 @@ public function getRealTimeTranscription( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\CallTranscriptionResponse|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\CallTranscriptionResponse|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function getRealTimeTranscriptionWithHttpInfo( string $account_id, @@ -642,55 +642,55 @@ public function getRealTimeTranscriptionWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallTranscriptionResponse', + '\Bandwidth\Model\CallTranscriptionResponse', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -711,7 +711,7 @@ public function getRealTimeTranscriptionWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallTranscriptionResponse', + '\Bandwidth\Model\CallTranscriptionResponse', $request, $response, ); @@ -720,7 +720,7 @@ public function getRealTimeTranscriptionWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\CallTranscriptionResponse', + '\Bandwidth\Model\CallTranscriptionResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -728,7 +728,7 @@ public function getRealTimeTranscriptionWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -736,7 +736,7 @@ public function getRealTimeTranscriptionWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -744,7 +744,7 @@ public function getRealTimeTranscriptionWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -752,7 +752,7 @@ public function getRealTimeTranscriptionWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -760,7 +760,7 @@ public function getRealTimeTranscriptionWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -768,7 +768,7 @@ public function getRealTimeTranscriptionWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -776,7 +776,7 @@ public function getRealTimeTranscriptionWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -784,7 +784,7 @@ public function getRealTimeTranscriptionWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -859,7 +859,7 @@ public function getRealTimeTranscriptionAsyncWithHttpInfo( string $contentType = self::contentTypes['getRealTimeTranscription'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\CallTranscriptionResponse'; + $returnType = '\Bandwidth\Model\CallTranscriptionResponse'; $request = $this->getRealTimeTranscriptionRequest($account_id, $call_id, $transcription_id, $hostIndex, $variables, $contentType); return $this->client @@ -1086,7 +1086,7 @@ protected function getHostSettingsForgetRealTimeTranscription(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \OpenAPI\Client\Model\CallTranscriptionMetadata[]|\OpenAPI\Client\Model\VoiceApiError + * @return \Bandwidth\Model\CallTranscriptionMetadata[]|\Bandwidth\Model\VoiceApiError */ public function listRealTimeTranscriptions( string $account_id, @@ -1094,7 +1094,7 @@ public function listRealTimeTranscriptions( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['listRealTimeTranscriptions'][0] - ): array|\OpenAPI\Client\Model\VoiceApiError + ): array|\Bandwidth\Model\VoiceApiError { list($response) = $this->listRealTimeTranscriptionsWithHttpInfo($account_id, $call_id, $hostIndex, $variables, $contentType); return $response; @@ -1117,7 +1117,7 @@ public function listRealTimeTranscriptions( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \OpenAPI\Client\Model\CallTranscriptionMetadata[]|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError|\OpenAPI\Client\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array of \Bandwidth\Model\CallTranscriptionMetadata[]|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) */ public function listRealTimeTranscriptionsWithHttpInfo( string $account_id, @@ -1154,55 +1154,55 @@ public function listRealTimeTranscriptionsWithHttpInfo( switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallTranscriptionMetadata[]', + '\Bandwidth\Model\CallTranscriptionMetadata[]', $request, $response, ); case 400: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 401: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 403: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 404: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 405: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 415: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 429: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); case 500: return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $request, $response, ); @@ -1223,7 +1223,7 @@ public function listRealTimeTranscriptionsWithHttpInfo( } return $this->handleResponseWithDataType( - '\OpenAPI\Client\Model\CallTranscriptionMetadata[]', + '\Bandwidth\Model\CallTranscriptionMetadata[]', $request, $response, ); @@ -1232,7 +1232,7 @@ public function listRealTimeTranscriptionsWithHttpInfo( case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\CallTranscriptionMetadata[]', + '\Bandwidth\Model\CallTranscriptionMetadata[]', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1240,7 +1240,7 @@ public function listRealTimeTranscriptionsWithHttpInfo( case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1248,7 +1248,7 @@ public function listRealTimeTranscriptionsWithHttpInfo( case 401: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1256,7 +1256,7 @@ public function listRealTimeTranscriptionsWithHttpInfo( case 403: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1264,7 +1264,7 @@ public function listRealTimeTranscriptionsWithHttpInfo( case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1272,7 +1272,7 @@ public function listRealTimeTranscriptionsWithHttpInfo( case 405: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1280,7 +1280,7 @@ public function listRealTimeTranscriptionsWithHttpInfo( case 415: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1288,7 +1288,7 @@ public function listRealTimeTranscriptionsWithHttpInfo( case 429: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1296,7 +1296,7 @@ public function listRealTimeTranscriptionsWithHttpInfo( case 500: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\OpenAPI\Client\Model\VoiceApiError', + '\Bandwidth\Model\VoiceApiError', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1367,7 +1367,7 @@ public function listRealTimeTranscriptionsAsyncWithHttpInfo( string $contentType = self::contentTypes['listRealTimeTranscriptions'][0] ): PromiseInterface { - $returnType = '\OpenAPI\Client\Model\CallTranscriptionMetadata[]'; + $returnType = '\Bandwidth\Model\CallTranscriptionMetadata[]'; $request = $this->listRealTimeTranscriptionsRequest($account_id, $call_id, $hostIndex, $variables, $contentType); return $this->client diff --git a/src/Configuration.php b/src/Configuration.php index 6eac769d..81418c14 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -3,7 +3,7 @@ * Configuration * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,14 +25,14 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client; +namespace Bandwidth; use InvalidArgumentException; /** * Configuration Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -425,7 +425,7 @@ public static function setDefaultConfiguration(Configuration $config): void */ public static function toDebugReport(): string { - $report = 'PHP SDK (OpenAPI\Client) Debug Report:' . PHP_EOL; + $report = 'PHP SDK (Bandwidth) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: 1.0.0' . PHP_EOL; diff --git a/src/FormDataProcessor.php b/src/FormDataProcessor.php index 8cb45316..11339da6 100644 --- a/src/FormDataProcessor.php +++ b/src/FormDataProcessor.php @@ -4,7 +4,7 @@ * PHP version 8.1 * * @category Class - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,14 +26,14 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client; +namespace Bandwidth; use ArrayAccess; use DateTime; use GuzzleHttp\Psr7\Utils; use Psr\Http\Message\StreamInterface; use SplFileObject; -use OpenAPI\Client\Model\ModelInterface; +use Bandwidth\Model\ModelInterface; class FormDataProcessor { diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php index 14ccd5cc..ec7f74c6 100644 --- a/src/HeaderSelector.php +++ b/src/HeaderSelector.php @@ -3,7 +3,7 @@ * HeaderSelector * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,12 +25,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client; +namespace Bandwidth; /** * HeaderSelector Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/AccountStatistics.php b/src/Model/AccountStatistics.php index 78a0801e..3ccb9616 100644 --- a/src/Model/AccountStatistics.php +++ b/src/Model/AccountStatistics.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * AccountStatistics Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/AdditionalDenialReason.php b/src/Model/AdditionalDenialReason.php index 6beeb564..e61d06a1 100644 --- a/src/Model/AdditionalDenialReason.php +++ b/src/Model/AdditionalDenialReason.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * AdditionalDenialReason Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/Address.php b/src/Model/Address.php index 60bdae62..fba90a85 100644 --- a/src/Model/Address.php +++ b/src/Model/Address.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * Address Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/AnswerCallback.php b/src/Model/AnswerCallback.php index f2724e0e..68fad616 100644 --- a/src/Model/AnswerCallback.php +++ b/src/Model/AnswerCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * AnswerCallback Class Doc Comment * * @description The Answer event is sent to the answerUrl specified in the createCall request when an outbound call is answered. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,14 +66,14 @@ class AnswerCallback implements ModelInterface, ArrayAccess, JsonSerializable 'application_id' => 'string', 'from' => 'string', 'to' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_id' => 'string', 'call_url' => 'string', 'enqueued_time' => '\DateTime', 'start_time' => '\DateTime', 'answer_time' => '\DateTime', 'tag' => 'string', - 'machine_detection_result' => '\OpenAPI\Client\Model\MachineDetectionResult' + 'machine_detection_result' => '\Bandwidth\Model\MachineDetectionResult' ]; /** @@ -521,9 +521,9 @@ public function setTo(?string $to): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -531,11 +531,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); @@ -731,9 +731,9 @@ public function setTag(?string $tag): static /** * Gets machine_detection_result * - * @return \OpenAPI\Client\Model\MachineDetectionResult|null + * @return \Bandwidth\Model\MachineDetectionResult|null */ - public function getMachineDetectionResult(): ?\OpenAPI\Client\Model\MachineDetectionResult + public function getMachineDetectionResult(): ?\Bandwidth\Model\MachineDetectionResult { return $this->container['machine_detection_result']; } @@ -741,11 +741,11 @@ public function getMachineDetectionResult(): ?\OpenAPI\Client\Model\MachineDetec /** * Sets machine_detection_result * - * @param \OpenAPI\Client\Model\MachineDetectionResult|null $machine_detection_result machine_detection_result + * @param \Bandwidth\Model\MachineDetectionResult|null $machine_detection_result machine_detection_result * * @return $this */ - public function setMachineDetectionResult(?\OpenAPI\Client\Model\MachineDetectionResult $machine_detection_result): static + public function setMachineDetectionResult(?\Bandwidth\Model\MachineDetectionResult $machine_detection_result): static { if (is_null($machine_detection_result)) { array_push($this->openAPINullablesSetToNull, 'machine_detection_result'); diff --git a/src/Model/AsyncLookupRequest.php b/src/Model/AsyncLookupRequest.php index 576d182d..62065a52 100644 --- a/src/Model/AsyncLookupRequest.php +++ b/src/Model/AsyncLookupRequest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * AsyncLookupRequest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/BlockedWebhook.php b/src/Model/BlockedWebhook.php index 91f5b712..9c5b7f2e 100644 --- a/src/Model/BlockedWebhook.php +++ b/src/Model/BlockedWebhook.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * BlockedWebhook Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,7 +61,7 @@ class BlockedWebhook implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPITypes = [ 'account_id' => 'string', 'phone_number' => 'string', - 'status' => '\OpenAPI\Client\Model\TfvCallbackStatusEnum', + 'status' => '\Bandwidth\Model\TfvCallbackStatusEnum', 'internal_ticket_number' => 'string', 'blocked' => 'bool', 'blocked_reason' => 'string' @@ -378,9 +378,9 @@ public function setPhoneNumber(?string $phone_number): static /** * Gets status * - * @return \OpenAPI\Client\Model\TfvCallbackStatusEnum|null + * @return \Bandwidth\Model\TfvCallbackStatusEnum|null */ - public function getStatus(): ?\OpenAPI\Client\Model\TfvCallbackStatusEnum + public function getStatus(): ?\Bandwidth\Model\TfvCallbackStatusEnum { return $this->container['status']; } @@ -388,11 +388,11 @@ public function getStatus(): ?\OpenAPI\Client\Model\TfvCallbackStatusEnum /** * Sets status * - * @param \OpenAPI\Client\Model\TfvCallbackStatusEnum|null $status status + * @param \Bandwidth\Model\TfvCallbackStatusEnum|null $status status * * @return $this */ - public function setStatus(?\OpenAPI\Client\Model\TfvCallbackStatusEnum $status): static + public function setStatus(?\Bandwidth\Model\TfvCallbackStatusEnum $status): static { if (is_null($status)) { throw new InvalidArgumentException('non-nullable status cannot be null'); diff --git a/src/Model/BridgeCompleteCallback.php b/src/Model/BridgeCompleteCallback.php index 3c65a627..8d55f6be 100644 --- a/src/Model/BridgeCompleteCallback.php +++ b/src/Model/BridgeCompleteCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * BridgeCompleteCallback Class Doc Comment * * @description If the target call leaves the <Bridge>, then this callback is sent to the bridgeCompleteUrl, and the BXML returned in it is executed on the call. If this webhook is sent, the Bridge Target Complete webhook is NOT sent. This callback is also sent if any problem occurs that prevents the calls to be bridged. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,7 +66,7 @@ class BridgeCompleteCallback implements ModelInterface, ArrayAccess, JsonSeriali 'application_id' => 'string', 'from' => 'string', 'to' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_id' => 'string', 'call_url' => 'string', 'enqueued_time' => '\DateTime', @@ -535,9 +535,9 @@ public function setTo(?string $to): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -545,11 +545,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); diff --git a/src/Model/BridgeTargetCompleteCallback.php b/src/Model/BridgeTargetCompleteCallback.php index f0248349..2fda7902 100644 --- a/src/Model/BridgeTargetCompleteCallback.php +++ b/src/Model/BridgeTargetCompleteCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * BridgeTargetCompleteCallback Class Doc Comment * * @description If the originating call leaves the <Bridge>, then this callback is sent to the bridgeTargetCompleteUrl, and the BXML returned in it is executed on the target call. If this webhook is sent, the Bridge Complete webhook is NOT sent. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,7 +66,7 @@ class BridgeTargetCompleteCallback implements ModelInterface, ArrayAccess, JsonS 'application_id' => 'string', 'from' => 'string', 'to' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_id' => 'string', 'call_url' => 'string', 'enqueued_time' => '\DateTime', @@ -514,9 +514,9 @@ public function setTo(?string $to): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -524,11 +524,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); diff --git a/src/Model/BrtcError.php b/src/Model/BrtcError.php index a0fa5b5d..c7cda10a 100644 --- a/src/Model/BrtcError.php +++ b/src/Model/BrtcError.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * BrtcError Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -63,7 +63,7 @@ class BrtcError implements ModelInterface, ArrayAccess, JsonSerializable 'type' => 'string', 'description' => 'string', 'code' => 'string', - 'source' => '\OpenAPI\Client\Model\BrtcErrorSource' + 'source' => '\Bandwidth\Model\BrtcErrorSource' ]; /** @@ -409,9 +409,9 @@ public function setCode(?string $code): static /** * Gets source * - * @return \OpenAPI\Client\Model\BrtcErrorSource|null + * @return \Bandwidth\Model\BrtcErrorSource|null */ - public function getSource(): ?\OpenAPI\Client\Model\BrtcErrorSource + public function getSource(): ?\Bandwidth\Model\BrtcErrorSource { return $this->container['source']; } @@ -419,11 +419,11 @@ public function getSource(): ?\OpenAPI\Client\Model\BrtcErrorSource /** * Sets source * - * @param \OpenAPI\Client\Model\BrtcErrorSource|null $source source + * @param \Bandwidth\Model\BrtcErrorSource|null $source source * * @return $this */ - public function setSource(?\OpenAPI\Client\Model\BrtcErrorSource $source): static + public function setSource(?\Bandwidth\Model\BrtcErrorSource $source): static { if (is_null($source)) { throw new InvalidArgumentException('non-nullable source cannot be null'); diff --git a/src/Model/BrtcErrorResponse.php b/src/Model/BrtcErrorResponse.php index 4b26c434..4190f041 100644 --- a/src/Model/BrtcErrorResponse.php +++ b/src/Model/BrtcErrorResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * BrtcErrorResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,9 +59,9 @@ class BrtcErrorResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'links' => '\OpenAPI\Client\Model\BrtcLink[]', + 'links' => '\Bandwidth\Model\BrtcLink[]', 'data' => 'object', - 'errors' => '\OpenAPI\Client\Model\BrtcError[]' + 'errors' => '\Bandwidth\Model\BrtcError[]' ]; /** @@ -290,7 +290,7 @@ public function valid(): bool /** * Gets links * - * @return \OpenAPI\Client\Model\BrtcLink[] + * @return \Bandwidth\Model\BrtcLink[] */ public function getLinks(): array { @@ -300,7 +300,7 @@ public function getLinks(): array /** * Sets links * - * @param \OpenAPI\Client\Model\BrtcLink[] $links links + * @param \Bandwidth\Model\BrtcLink[] $links links * * @return $this */ @@ -351,7 +351,7 @@ public function setData(?object $data): static /** * Gets errors * - * @return \OpenAPI\Client\Model\BrtcError[] + * @return \Bandwidth\Model\BrtcError[] */ public function getErrors(): array { @@ -361,7 +361,7 @@ public function getErrors(): array /** * Sets errors * - * @param \OpenAPI\Client\Model\BrtcError[] $errors errors + * @param \Bandwidth\Model\BrtcError[] $errors errors * * @return $this */ diff --git a/src/Model/BrtcErrorSource.php b/src/Model/BrtcErrorSource.php index db505dcb..674b275d 100644 --- a/src/Model/BrtcErrorSource.php +++ b/src/Model/BrtcErrorSource.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * BrtcErrorSource Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/BrtcLink.php b/src/Model/BrtcLink.php index 347f4d30..786e57b3 100644 --- a/src/Model/BrtcLink.php +++ b/src/Model/BrtcLink.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * BrtcLink Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/BusinessEntityTypeEnum.php b/src/Model/BusinessEntityTypeEnum.php index 93e9865a..c3aa86a6 100644 --- a/src/Model/BusinessEntityTypeEnum.php +++ b/src/Model/BusinessEntityTypeEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * BusinessEntityTypeEnum Class Doc Comment * * @description The type of registered business. **Note: As of October 19th, 2026 submissions using a value other than `SOLE_PROPRIETOR` must provide a value for `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Submissions using `SOLE_PROPRIETOR` must _omit_ `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Failure to adhere to these constraints will result in a 400 Bad Request rejection.** - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/BusinessRegistrationTypeEnum.php b/src/Model/BusinessRegistrationTypeEnum.php index 5aa42f20..d7ef2bca 100644 --- a/src/Model/BusinessRegistrationTypeEnum.php +++ b/src/Model/BusinessRegistrationTypeEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * BusinessRegistrationTypeEnum Class Doc Comment * * @description The type of business registration number. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/CallDirectionEnum.php b/src/Model/CallDirectionEnum.php index c05e3bb8..17fcbc47 100644 --- a/src/Model/CallDirectionEnum.php +++ b/src/Model/CallDirectionEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * CallDirectionEnum Class Doc Comment * * @description The direction of the call. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/CallRecordingMetadata.php b/src/Model/CallRecordingMetadata.php index 6981080c..cd1ca0c0 100644 --- a/src/Model/CallRecordingMetadata.php +++ b/src/Model/CallRecordingMetadata.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CallRecordingMetadata Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -69,14 +69,14 @@ class CallRecordingMetadata implements ModelInterface, ArrayAccess, JsonSerializ 'transfer_caller_id' => 'string', 'transfer_to' => 'string', 'duration' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'channels' => 'int', 'start_time' => '\DateTime', 'end_time' => '\DateTime', - 'file_format' => '\OpenAPI\Client\Model\FileFormatEnum', + 'file_format' => '\Bandwidth\Model\FileFormatEnum', 'status' => 'string', 'media_url' => 'string', - 'transcription' => '\OpenAPI\Client\Model\RecordingTranscriptionMetadata', + 'transcription' => '\Bandwidth\Model\RecordingTranscriptionMetadata', 'recording_name' => 'string' ]; @@ -663,9 +663,9 @@ public function setDuration(?string $duration): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -673,11 +673,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); @@ -771,9 +771,9 @@ public function setEndTime(?\DateTime $end_time): static /** * Gets file_format * - * @return \OpenAPI\Client\Model\FileFormatEnum|null + * @return \Bandwidth\Model\FileFormatEnum|null */ - public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum + public function getFileFormat(): ?\Bandwidth\Model\FileFormatEnum { return $this->container['file_format']; } @@ -781,11 +781,11 @@ public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum /** * Sets file_format * - * @param \OpenAPI\Client\Model\FileFormatEnum|null $file_format file_format + * @param \Bandwidth\Model\FileFormatEnum|null $file_format file_format * * @return $this */ - public function setFileFormat(?\OpenAPI\Client\Model\FileFormatEnum $file_format): static + public function setFileFormat(?\Bandwidth\Model\FileFormatEnum $file_format): static { if (is_null($file_format)) { throw new InvalidArgumentException('non-nullable file_format cannot be null'); @@ -859,9 +859,9 @@ public function setMediaUrl(?string $media_url): static /** * Gets transcription * - * @return \OpenAPI\Client\Model\RecordingTranscriptionMetadata|null + * @return \Bandwidth\Model\RecordingTranscriptionMetadata|null */ - public function getTranscription(): ?\OpenAPI\Client\Model\RecordingTranscriptionMetadata + public function getTranscription(): ?\Bandwidth\Model\RecordingTranscriptionMetadata { return $this->container['transcription']; } @@ -869,11 +869,11 @@ public function getTranscription(): ?\OpenAPI\Client\Model\RecordingTranscriptio /** * Sets transcription * - * @param \OpenAPI\Client\Model\RecordingTranscriptionMetadata|null $transcription transcription + * @param \Bandwidth\Model\RecordingTranscriptionMetadata|null $transcription transcription * * @return $this */ - public function setTranscription(?\OpenAPI\Client\Model\RecordingTranscriptionMetadata $transcription): static + public function setTranscription(?\Bandwidth\Model\RecordingTranscriptionMetadata $transcription): static { if (is_null($transcription)) { array_push($this->openAPINullablesSetToNull, 'transcription'); diff --git a/src/Model/CallState.php b/src/Model/CallState.php index e58c7f2a..644b2155 100644 --- a/src/Model/CallState.php +++ b/src/Model/CallState.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CallState Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -65,7 +65,7 @@ class CallState implements ModelInterface, ArrayAccess, JsonSerializable 'parent_call_id' => 'string', 'to' => 'string', 'from' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'state' => 'string', 'stir_shaken' => 'array', 'identity' => 'string', @@ -555,9 +555,9 @@ public function setFrom(?string $from): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -565,11 +565,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); diff --git a/src/Model/CallStateEnum.php b/src/Model/CallStateEnum.php index 7103ec82..a54228b2 100644 --- a/src/Model/CallStateEnum.php +++ b/src/Model/CallStateEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * CallStateEnum Class Doc Comment * * @description The call state. Possible values:<br>`active` to redirect the call (default)<br>`completed` to hang up the call if it is answered, cancel it if it is an unanswered outbound call, or reject it if it an unanswered inbound call - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/CallTranscription.php b/src/Model/CallTranscription.php index 8fba8d4f..8dfa0188 100644 --- a/src/Model/CallTranscription.php +++ b/src/Model/CallTranscription.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CallTranscription Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,8 +59,8 @@ class CallTranscription implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'detected_language' => '\OpenAPI\Client\Model\CallTranscriptionDetectedLanguageEnum', - 'track' => '\OpenAPI\Client\Model\CallTranscriptionTrackEnum', + 'detected_language' => '\Bandwidth\Model\CallTranscriptionDetectedLanguageEnum', + 'track' => '\Bandwidth\Model\CallTranscriptionTrackEnum', 'transcript' => 'string', 'confidence' => 'float' ]; @@ -296,9 +296,9 @@ public function valid(): bool /** * Gets detected_language * - * @return \OpenAPI\Client\Model\CallTranscriptionDetectedLanguageEnum|null + * @return \Bandwidth\Model\CallTranscriptionDetectedLanguageEnum|null */ - public function getDetectedLanguage(): ?\OpenAPI\Client\Model\CallTranscriptionDetectedLanguageEnum + public function getDetectedLanguage(): ?\Bandwidth\Model\CallTranscriptionDetectedLanguageEnum { return $this->container['detected_language']; } @@ -306,11 +306,11 @@ public function getDetectedLanguage(): ?\OpenAPI\Client\Model\CallTranscriptionD /** * Sets detected_language * - * @param \OpenAPI\Client\Model\CallTranscriptionDetectedLanguageEnum|null $detected_language detected_language + * @param \Bandwidth\Model\CallTranscriptionDetectedLanguageEnum|null $detected_language detected_language * * @return $this */ - public function setDetectedLanguage(?\OpenAPI\Client\Model\CallTranscriptionDetectedLanguageEnum $detected_language): static + public function setDetectedLanguage(?\Bandwidth\Model\CallTranscriptionDetectedLanguageEnum $detected_language): static { if (is_null($detected_language)) { throw new InvalidArgumentException('non-nullable detected_language cannot be null'); @@ -323,9 +323,9 @@ public function setDetectedLanguage(?\OpenAPI\Client\Model\CallTranscriptionDete /** * Gets track * - * @return \OpenAPI\Client\Model\CallTranscriptionTrackEnum|null + * @return \Bandwidth\Model\CallTranscriptionTrackEnum|null */ - public function getTrack(): ?\OpenAPI\Client\Model\CallTranscriptionTrackEnum + public function getTrack(): ?\Bandwidth\Model\CallTranscriptionTrackEnum { return $this->container['track']; } @@ -333,11 +333,11 @@ public function getTrack(): ?\OpenAPI\Client\Model\CallTranscriptionTrackEnum /** * Sets track * - * @param \OpenAPI\Client\Model\CallTranscriptionTrackEnum|null $track track + * @param \Bandwidth\Model\CallTranscriptionTrackEnum|null $track track * * @return $this */ - public function setTrack(?\OpenAPI\Client\Model\CallTranscriptionTrackEnum $track): static + public function setTrack(?\Bandwidth\Model\CallTranscriptionTrackEnum $track): static { if (is_null($track)) { throw new InvalidArgumentException('non-nullable track cannot be null'); diff --git a/src/Model/CallTranscriptionDetectedLanguageEnum.php b/src/Model/CallTranscriptionDetectedLanguageEnum.php index 7ac107cf..56dfcc4f 100644 --- a/src/Model/CallTranscriptionDetectedLanguageEnum.php +++ b/src/Model/CallTranscriptionDetectedLanguageEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * CallTranscriptionDetectedLanguageEnum Class Doc Comment * * @description The detected language for this transcription. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/CallTranscriptionMetadata.php b/src/Model/CallTranscriptionMetadata.php index 6d20f289..729e626e 100644 --- a/src/Model/CallTranscriptionMetadata.php +++ b/src/Model/CallTranscriptionMetadata.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CallTranscriptionMetadata Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/CallTranscriptionResponse.php b/src/Model/CallTranscriptionResponse.php index 13ccb616..796d33eb 100644 --- a/src/Model/CallTranscriptionResponse.php +++ b/src/Model/CallTranscriptionResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CallTranscriptionResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -62,7 +62,7 @@ class CallTranscriptionResponse implements ModelInterface, ArrayAccess, JsonSeri 'account_id' => 'string', 'call_id' => 'string', 'transcription_id' => 'string', - 'tracks' => '\OpenAPI\Client\Model\CallTranscription[]' + 'tracks' => '\Bandwidth\Model\CallTranscription[]' ]; /** @@ -369,7 +369,7 @@ public function setTranscriptionId(?string $transcription_id): static /** * Gets tracks * - * @return \OpenAPI\Client\Model\CallTranscription[]|null + * @return \Bandwidth\Model\CallTranscription[]|null */ public function getTracks(): ?array { @@ -379,7 +379,7 @@ public function getTracks(): ?array /** * Sets tracks * - * @param \OpenAPI\Client\Model\CallTranscription[]|null $tracks tracks + * @param \Bandwidth\Model\CallTranscription[]|null $tracks tracks * * @return $this */ diff --git a/src/Model/CallTranscriptionTrackEnum.php b/src/Model/CallTranscriptionTrackEnum.php index 0c008e1b..3531596a 100644 --- a/src/Model/CallTranscriptionTrackEnum.php +++ b/src/Model/CallTranscriptionTrackEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * CallTranscriptionTrackEnum Class Doc Comment * * @description Which `track` this transcription is derived from. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/Callback.php b/src/Model/Callback.php index 831eefbc..d6e2f0a4 100644 --- a/src/Model/Callback.php +++ b/src/Model/Callback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * Callback Class Doc Comment * * @description Callbacks are divided into two types based on direction of the related message: - `statusCallback` indicates status of an outbound MT SMS, MMS, or RBM message. - `inboundCallback` indicates an inbound MO message or a multichannel message client's response to a suggestion or location request. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -62,10 +62,10 @@ class Callback implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPITypes = [ 'time' => '\DateTime', 'event_time' => '\DateTime', - 'type' => '\OpenAPI\Client\Model\InboundCallbackTypeEnum', + 'type' => '\Bandwidth\Model\InboundCallbackTypeEnum', 'to' => 'string', 'description' => 'string', - 'message' => '\OpenAPI\Client\Model\InboundCallbackMessage', + 'message' => '\Bandwidth\Model\InboundCallbackMessage', 'error_code' => 'int', 'carrier_name' => 'string' ]; @@ -397,9 +397,9 @@ public function setEventTime(?\DateTime $event_time): static /** * Gets type * - * @return \OpenAPI\Client\Model\InboundCallbackTypeEnum + * @return \Bandwidth\Model\InboundCallbackTypeEnum */ - public function getType(): \OpenAPI\Client\Model\InboundCallbackTypeEnum + public function getType(): \Bandwidth\Model\InboundCallbackTypeEnum { return $this->container['type']; } @@ -407,11 +407,11 @@ public function getType(): \OpenAPI\Client\Model\InboundCallbackTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\InboundCallbackTypeEnum $type type + * @param \Bandwidth\Model\InboundCallbackTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\InboundCallbackTypeEnum $type): static + public function setType(\Bandwidth\Model\InboundCallbackTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); @@ -478,9 +478,9 @@ public function setDescription(string $description): static /** * Gets message * - * @return \OpenAPI\Client\Model\InboundCallbackMessage + * @return \Bandwidth\Model\InboundCallbackMessage */ - public function getMessage(): \OpenAPI\Client\Model\InboundCallbackMessage + public function getMessage(): \Bandwidth\Model\InboundCallbackMessage { return $this->container['message']; } @@ -488,11 +488,11 @@ public function getMessage(): \OpenAPI\Client\Model\InboundCallbackMessage /** * Sets message * - * @param \OpenAPI\Client\Model\InboundCallbackMessage $message message + * @param \Bandwidth\Model\InboundCallbackMessage $message message * * @return $this */ - public function setMessage(\OpenAPI\Client\Model\InboundCallbackMessage $message): static + public function setMessage(\Bandwidth\Model\InboundCallbackMessage $message): static { if (is_null($message)) { throw new InvalidArgumentException('non-nullable message cannot be null'); diff --git a/src/Model/CallbackMethodEnum.php b/src/Model/CallbackMethodEnum.php index 7b57f5e1..002aabb2 100644 --- a/src/Model/CallbackMethodEnum.php +++ b/src/Model/CallbackMethodEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * CallbackMethodEnum Class Doc Comment * * @description The HTTP method to use to deliver the callback. GET or POST. Default value is POST. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/CardWidthEnum.php b/src/Model/CardWidthEnum.php index 51d57e07..cfcd4892 100644 --- a/src/Model/CardWidthEnum.php +++ b/src/Model/CardWidthEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * CardWidthEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/CodeRequest.php b/src/Model/CodeRequest.php index 334e14e9..7397a8e3 100644 --- a/src/Model/CodeRequest.php +++ b/src/Model/CodeRequest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CodeRequest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/CompletedLookupStatusEnum.php b/src/Model/CompletedLookupStatusEnum.php index 24ea98bb..ce103be2 100644 --- a/src/Model/CompletedLookupStatusEnum.php +++ b/src/Model/CompletedLookupStatusEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * CompletedLookupStatusEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/Conference.php b/src/Model/Conference.php index e77ab5f0..86269965 100644 --- a/src/Model/Conference.php +++ b/src/Model/Conference.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * Conference Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -64,9 +64,9 @@ class Conference implements ModelInterface, ArrayAccess, JsonSerializable 'created_time' => '\DateTime', 'completed_time' => '\DateTime', 'conference_event_url' => 'string', - 'conference_event_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'conference_event_method' => '\Bandwidth\Model\CallbackMethodEnum', 'tag' => 'string', - 'active_members' => '\OpenAPI\Client\Model\ConferenceMember[]' + 'active_members' => '\Bandwidth\Model\ConferenceMember[]' ]; /** @@ -465,9 +465,9 @@ public function setConferenceEventUrl(?string $conference_event_url): static /** * Gets conference_event_method * - * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + * @return \Bandwidth\Model\CallbackMethodEnum|null */ - public function getConferenceEventMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + public function getConferenceEventMethod(): ?\Bandwidth\Model\CallbackMethodEnum { return $this->container['conference_event_method']; } @@ -475,11 +475,11 @@ public function getConferenceEventMethod(): ?\OpenAPI\Client\Model\CallbackMetho /** * Sets conference_event_method * - * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $conference_event_method conference_event_method + * @param \Bandwidth\Model\CallbackMethodEnum|null $conference_event_method conference_event_method * * @return $this */ - public function setConferenceEventMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $conference_event_method): static + public function setConferenceEventMethod(?\Bandwidth\Model\CallbackMethodEnum $conference_event_method): static { if (is_null($conference_event_method)) { array_push($this->openAPINullablesSetToNull, 'conference_event_method'); @@ -533,7 +533,7 @@ public function setTag(?string $tag): static /** * Gets active_members * - * @return \OpenAPI\Client\Model\ConferenceMember[]|null + * @return \Bandwidth\Model\ConferenceMember[]|null */ public function getActiveMembers(): ?array { @@ -543,7 +543,7 @@ public function getActiveMembers(): ?array /** * Sets active_members * - * @param \OpenAPI\Client\Model\ConferenceMember[]|null $active_members A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences). + * @param \Bandwidth\Model\ConferenceMember[]|null $active_members A list of active members of the conference. Omitted if this is a response to the [Get Conferences endpoint](/apis/voice#tag/Conferences/operation/listConferences). * * @return $this */ diff --git a/src/Model/ConferenceCompletedCallback.php b/src/Model/ConferenceCompletedCallback.php index 79f5f59b..2ddcf41c 100644 --- a/src/Model/ConferenceCompletedCallback.php +++ b/src/Model/ConferenceCompletedCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * ConferenceCompletedCallback Class Doc Comment * * @description The Conference Completed event is fired when the last member leaves the conference. The response to this event may not contain BXML. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/ConferenceCreatedCallback.php b/src/Model/ConferenceCreatedCallback.php index 9b211ecf..4a989ac9 100644 --- a/src/Model/ConferenceCreatedCallback.php +++ b/src/Model/ConferenceCreatedCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * ConferenceCreatedCallback Class Doc Comment * * @description The Conference Created event is fired whenever a new conference that specified a callbackUrl is created. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/ConferenceMember.php b/src/Model/ConferenceMember.php index d1f0dfc4..d319074a 100644 --- a/src/Model/ConferenceMember.php +++ b/src/Model/ConferenceMember.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * ConferenceMember Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/ConferenceMemberExitCallback.php b/src/Model/ConferenceMemberExitCallback.php index 5184e645..28752004 100644 --- a/src/Model/ConferenceMemberExitCallback.php +++ b/src/Model/ConferenceMemberExitCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * ConferenceMemberExitCallback Class Doc Comment * * @description The Conference Member Exit event is fired whenever a caller exits a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/ConferenceMemberJoinCallback.php b/src/Model/ConferenceMemberJoinCallback.php index 112ae433..4ee6963c 100644 --- a/src/Model/ConferenceMemberJoinCallback.php +++ b/src/Model/ConferenceMemberJoinCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * ConferenceMemberJoinCallback Class Doc Comment * * @description The Conference Member Join event is fired whenever a caller joins a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/ConferenceRecordingAvailableCallback.php b/src/Model/ConferenceRecordingAvailableCallback.php index 718b23f8..604aa82c 100644 --- a/src/Model/ConferenceRecordingAvailableCallback.php +++ b/src/Model/ConferenceRecordingAvailableCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * ConferenceRecordingAvailableCallback Class Doc Comment * * @description The Conference Recording Available event is sent after a conference recording has been processed. It indicates that the recording is available for download. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -70,7 +70,7 @@ class ConferenceRecordingAvailableCallback implements ModelInterface, ArrayAcces 'start_time' => '\DateTime', 'end_time' => '\DateTime', 'duration' => 'string', - 'file_format' => '\OpenAPI\Client\Model\FileFormatEnum', + 'file_format' => '\Bandwidth\Model\FileFormatEnum', 'media_url' => 'string', 'tag' => 'string', 'status' => 'string' @@ -629,9 +629,9 @@ public function setDuration(?string $duration): static /** * Gets file_format * - * @return \OpenAPI\Client\Model\FileFormatEnum|null + * @return \Bandwidth\Model\FileFormatEnum|null */ - public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum + public function getFileFormat(): ?\Bandwidth\Model\FileFormatEnum { return $this->container['file_format']; } @@ -639,11 +639,11 @@ public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum /** * Sets file_format * - * @param \OpenAPI\Client\Model\FileFormatEnum|null $file_format file_format + * @param \Bandwidth\Model\FileFormatEnum|null $file_format file_format * * @return $this */ - public function setFileFormat(?\OpenAPI\Client\Model\FileFormatEnum $file_format): static + public function setFileFormat(?\Bandwidth\Model\FileFormatEnum $file_format): static { if (is_null($file_format)) { throw new InvalidArgumentException('non-nullable file_format cannot be null'); diff --git a/src/Model/ConferenceRecordingMetadata.php b/src/Model/ConferenceRecordingMetadata.php index 17533456..d2036ea2 100644 --- a/src/Model/ConferenceRecordingMetadata.php +++ b/src/Model/ConferenceRecordingMetadata.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * ConferenceRecordingMetadata Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -67,7 +67,7 @@ class ConferenceRecordingMetadata implements ModelInterface, ArrayAccess, JsonSe 'channels' => 'int', 'start_time' => '\DateTime', 'end_time' => '\DateTime', - 'file_format' => '\OpenAPI\Client\Model\FileFormatEnum', + 'file_format' => '\Bandwidth\Model\FileFormatEnum', 'status' => 'string', 'media_url' => 'string', 'recording_name' => 'string' @@ -560,9 +560,9 @@ public function setEndTime(?\DateTime $end_time): static /** * Gets file_format * - * @return \OpenAPI\Client\Model\FileFormatEnum|null + * @return \Bandwidth\Model\FileFormatEnum|null */ - public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum + public function getFileFormat(): ?\Bandwidth\Model\FileFormatEnum { return $this->container['file_format']; } @@ -570,11 +570,11 @@ public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum /** * Sets file_format * - * @param \OpenAPI\Client\Model\FileFormatEnum|null $file_format file_format + * @param \Bandwidth\Model\FileFormatEnum|null $file_format file_format * * @return $this */ - public function setFileFormat(?\OpenAPI\Client\Model\FileFormatEnum $file_format): static + public function setFileFormat(?\Bandwidth\Model\FileFormatEnum $file_format): static { if (is_null($file_format)) { throw new InvalidArgumentException('non-nullable file_format cannot be null'); diff --git a/src/Model/ConferenceRedirectCallback.php b/src/Model/ConferenceRedirectCallback.php index 38a9aae1..8fe3332e 100644 --- a/src/Model/ConferenceRedirectCallback.php +++ b/src/Model/ConferenceRedirectCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * ConferenceRedirectCallback Class Doc Comment * * @description The Conference Redirect event is fired whenever an existing conference is modified via a POST request made to the /conferences/{conferenceId} endpoint. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/ConferenceStateEnum.php b/src/Model/ConferenceStateEnum.php index 5ca32929..8329ea3b 100644 --- a/src/Model/ConferenceStateEnum.php +++ b/src/Model/ConferenceStateEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * ConferenceStateEnum Class Doc Comment * * @description Setting the conference state to `completed` ends the conference and ejects all members. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 42cebfbf..93b85107 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * Contact Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/CreateAsyncBulkLookupResponse.php b/src/Model/CreateAsyncBulkLookupResponse.php index 4cd0eafa..abf00bde 100644 --- a/src/Model/CreateAsyncBulkLookupResponse.php +++ b/src/Model/CreateAsyncBulkLookupResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CreateAsyncBulkLookupResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,9 +59,9 @@ class CreateAsyncBulkLookupResponse implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'links' => '\OpenAPI\Client\Model\LinkSchema[]', - 'data' => '\OpenAPI\Client\Model\CreateAsyncBulkLookupResponseData', - 'errors' => '\OpenAPI\Client\Model\LookupErrorSchema[]' + 'links' => '\Bandwidth\Model\LinkSchema[]', + 'data' => '\Bandwidth\Model\CreateAsyncBulkLookupResponseData', + 'errors' => '\Bandwidth\Model\LookupErrorSchema[]' ]; /** @@ -281,7 +281,7 @@ public function valid(): bool /** * Gets links * - * @return \OpenAPI\Client\Model\LinkSchema[]|null + * @return \Bandwidth\Model\LinkSchema[]|null */ public function getLinks(): ?array { @@ -291,7 +291,7 @@ public function getLinks(): ?array /** * Sets links * - * @param \OpenAPI\Client\Model\LinkSchema[]|null $links Links for pagination (if applicable) + * @param \Bandwidth\Model\LinkSchema[]|null $links Links for pagination (if applicable) * * @return $this */ @@ -308,9 +308,9 @@ public function setLinks(?array $links): static /** * Gets data * - * @return \OpenAPI\Client\Model\CreateAsyncBulkLookupResponseData|null + * @return \Bandwidth\Model\CreateAsyncBulkLookupResponseData|null */ - public function getData(): ?\OpenAPI\Client\Model\CreateAsyncBulkLookupResponseData + public function getData(): ?\Bandwidth\Model\CreateAsyncBulkLookupResponseData { return $this->container['data']; } @@ -318,11 +318,11 @@ public function getData(): ?\OpenAPI\Client\Model\CreateAsyncBulkLookupResponseD /** * Sets data * - * @param \OpenAPI\Client\Model\CreateAsyncBulkLookupResponseData|null $data data + * @param \Bandwidth\Model\CreateAsyncBulkLookupResponseData|null $data data * * @return $this */ - public function setData(?\OpenAPI\Client\Model\CreateAsyncBulkLookupResponseData $data): static + public function setData(?\Bandwidth\Model\CreateAsyncBulkLookupResponseData $data): static { if (is_null($data)) { throw new InvalidArgumentException('non-nullable data cannot be null'); @@ -335,7 +335,7 @@ public function setData(?\OpenAPI\Client\Model\CreateAsyncBulkLookupResponseData /** * Gets errors * - * @return \OpenAPI\Client\Model\LookupErrorSchema[]|null + * @return \Bandwidth\Model\LookupErrorSchema[]|null */ public function getErrors(): ?array { @@ -345,7 +345,7 @@ public function getErrors(): ?array /** * Sets errors * - * @param \OpenAPI\Client\Model\LookupErrorSchema[]|null $errors errors + * @param \Bandwidth\Model\LookupErrorSchema[]|null $errors errors * * @return $this */ diff --git a/src/Model/CreateAsyncBulkLookupResponseData.php b/src/Model/CreateAsyncBulkLookupResponseData.php index 036d2265..d822a52d 100644 --- a/src/Model/CreateAsyncBulkLookupResponseData.php +++ b/src/Model/CreateAsyncBulkLookupResponseData.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CreateAsyncBulkLookupResponseData Class Doc Comment * * @description The phone number lookup response data - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,7 +61,7 @@ class CreateAsyncBulkLookupResponseData implements ModelInterface, ArrayAccess, */ protected static array $openAPITypes = [ 'request_id' => 'string', - 'status' => '\OpenAPI\Client\Model\InProgressLookupStatusEnum' + 'status' => '\Bandwidth\Model\InProgressLookupStatusEnum' ]; /** @@ -302,9 +302,9 @@ public function setRequestId(?string $request_id): static /** * Gets status * - * @return \OpenAPI\Client\Model\InProgressLookupStatusEnum|null + * @return \Bandwidth\Model\InProgressLookupStatusEnum|null */ - public function getStatus(): ?\OpenAPI\Client\Model\InProgressLookupStatusEnum + public function getStatus(): ?\Bandwidth\Model\InProgressLookupStatusEnum { return $this->container['status']; } @@ -312,11 +312,11 @@ public function getStatus(): ?\OpenAPI\Client\Model\InProgressLookupStatusEnum /** * Sets status * - * @param \OpenAPI\Client\Model\InProgressLookupStatusEnum|null $status status + * @param \Bandwidth\Model\InProgressLookupStatusEnum|null $status status * * @return $this */ - public function setStatus(?\OpenAPI\Client\Model\InProgressLookupStatusEnum $status): static + public function setStatus(?\Bandwidth\Model\InProgressLookupStatusEnum $status): static { if (is_null($status)) { throw new InvalidArgumentException('non-nullable status cannot be null'); diff --git a/src/Model/CreateCall.php b/src/Model/CreateCall.php index b0ee285d..55987f29 100644 --- a/src/Model/CreateCall.php +++ b/src/Model/CreateCall.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CreateCall Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,18 +66,18 @@ class CreateCall implements ModelInterface, ArrayAccess, JsonSerializable 'uui' => 'string', 'application_id' => 'string', 'answer_url' => 'string', - 'answer_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'answer_method' => '\Bandwidth\Model\CallbackMethodEnum', 'username' => 'string', 'password' => 'string', 'answer_fallback_url' => 'string', - 'answer_fallback_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'answer_fallback_method' => '\Bandwidth\Model\CallbackMethodEnum', 'fallback_username' => 'string', 'fallback_password' => 'string', 'disconnect_url' => 'string', - 'disconnect_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'disconnect_method' => '\Bandwidth\Model\CallbackMethodEnum', 'call_timeout' => 'float', 'callback_timeout' => 'float', - 'machine_detection' => '\OpenAPI\Client\Model\MachineDetectionConfiguration', + 'machine_detection' => '\Bandwidth\Model\MachineDetectionConfiguration', 'priority' => 'int', 'tag' => 'string' ]; @@ -697,9 +697,9 @@ public function setAnswerUrl(string $answer_url): static /** * Gets answer_method * - * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + * @return \Bandwidth\Model\CallbackMethodEnum|null */ - public function getAnswerMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + public function getAnswerMethod(): ?\Bandwidth\Model\CallbackMethodEnum { return $this->container['answer_method']; } @@ -707,11 +707,11 @@ public function getAnswerMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum /** * Sets answer_method * - * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $answer_method answer_method + * @param \Bandwidth\Model\CallbackMethodEnum|null $answer_method answer_method * * @return $this */ - public function setAnswerMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $answer_method): static + public function setAnswerMethod(?\Bandwidth\Model\CallbackMethodEnum $answer_method): static { if (is_null($answer_method)) { array_push($this->openAPINullablesSetToNull, 'answer_method'); @@ -845,9 +845,9 @@ public function setAnswerFallbackUrl(?string $answer_fallback_url): static /** * Gets answer_fallback_method * - * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + * @return \Bandwidth\Model\CallbackMethodEnum|null */ - public function getAnswerFallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + public function getAnswerFallbackMethod(): ?\Bandwidth\Model\CallbackMethodEnum { return $this->container['answer_fallback_method']; } @@ -855,11 +855,11 @@ public function getAnswerFallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethod /** * Sets answer_fallback_method * - * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $answer_fallback_method answer_fallback_method + * @param \Bandwidth\Model\CallbackMethodEnum|null $answer_fallback_method answer_fallback_method * * @return $this */ - public function setAnswerFallbackMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $answer_fallback_method): static + public function setAnswerFallbackMethod(?\Bandwidth\Model\CallbackMethodEnum $answer_fallback_method): static { if (is_null($answer_fallback_method)) { array_push($this->openAPINullablesSetToNull, 'answer_fallback_method'); @@ -993,9 +993,9 @@ public function setDisconnectUrl(?string $disconnect_url): static /** * Gets disconnect_method * - * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + * @return \Bandwidth\Model\CallbackMethodEnum|null */ - public function getDisconnectMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + public function getDisconnectMethod(): ?\Bandwidth\Model\CallbackMethodEnum { return $this->container['disconnect_method']; } @@ -1003,11 +1003,11 @@ public function getDisconnectMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum /** * Sets disconnect_method * - * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $disconnect_method disconnect_method + * @param \Bandwidth\Model\CallbackMethodEnum|null $disconnect_method disconnect_method * * @return $this */ - public function setDisconnectMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $disconnect_method): static + public function setDisconnectMethod(?\Bandwidth\Model\CallbackMethodEnum $disconnect_method): static { if (is_null($disconnect_method)) { array_push($this->openAPINullablesSetToNull, 'disconnect_method'); @@ -1111,9 +1111,9 @@ public function setCallbackTimeout(?float $callback_timeout): static /** * Gets machine_detection * - * @return \OpenAPI\Client\Model\MachineDetectionConfiguration|null + * @return \Bandwidth\Model\MachineDetectionConfiguration|null */ - public function getMachineDetection(): ?\OpenAPI\Client\Model\MachineDetectionConfiguration + public function getMachineDetection(): ?\Bandwidth\Model\MachineDetectionConfiguration { return $this->container['machine_detection']; } @@ -1121,11 +1121,11 @@ public function getMachineDetection(): ?\OpenAPI\Client\Model\MachineDetectionCo /** * Sets machine_detection * - * @param \OpenAPI\Client\Model\MachineDetectionConfiguration|null $machine_detection machine_detection + * @param \Bandwidth\Model\MachineDetectionConfiguration|null $machine_detection machine_detection * * @return $this */ - public function setMachineDetection(?\OpenAPI\Client\Model\MachineDetectionConfiguration $machine_detection): static + public function setMachineDetection(?\Bandwidth\Model\MachineDetectionConfiguration $machine_detection): static { if (is_null($machine_detection)) { throw new InvalidArgumentException('non-nullable machine_detection cannot be null'); diff --git a/src/Model/CreateCallResponse.php b/src/Model/CreateCallResponse.php index 8443916f..f7b5a313 100644 --- a/src/Model/CreateCallResponse.php +++ b/src/Model/CreateCallResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CreateCallResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -69,11 +69,11 @@ class CreateCallResponse implements ModelInterface, ArrayAccess, JsonSerializabl 'call_timeout' => 'float', 'callback_timeout' => 'float', 'tag' => 'string', - 'answer_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'answer_method' => '\Bandwidth\Model\CallbackMethodEnum', 'answer_url' => 'string', - 'answer_fallback_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'answer_fallback_method' => '\Bandwidth\Model\CallbackMethodEnum', 'answer_fallback_url' => 'string', - 'disconnect_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'disconnect_method' => '\Bandwidth\Model\CallbackMethodEnum', 'disconnect_url' => 'string', 'username' => 'string', 'password' => 'string', @@ -734,9 +734,9 @@ public function setTag(?string $tag): static /** * Gets answer_method * - * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + * @return \Bandwidth\Model\CallbackMethodEnum|null */ - public function getAnswerMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + public function getAnswerMethod(): ?\Bandwidth\Model\CallbackMethodEnum { return $this->container['answer_method']; } @@ -744,11 +744,11 @@ public function getAnswerMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum /** * Sets answer_method * - * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $answer_method answer_method + * @param \Bandwidth\Model\CallbackMethodEnum|null $answer_method answer_method * * @return $this */ - public function setAnswerMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $answer_method): static + public function setAnswerMethod(?\Bandwidth\Model\CallbackMethodEnum $answer_method): static { if (is_null($answer_method)) { array_push($this->openAPINullablesSetToNull, 'answer_method'); @@ -795,9 +795,9 @@ public function setAnswerUrl(string $answer_url): static /** * Gets answer_fallback_method * - * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + * @return \Bandwidth\Model\CallbackMethodEnum|null */ - public function getAnswerFallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + public function getAnswerFallbackMethod(): ?\Bandwidth\Model\CallbackMethodEnum { return $this->container['answer_fallback_method']; } @@ -805,11 +805,11 @@ public function getAnswerFallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethod /** * Sets answer_fallback_method * - * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $answer_fallback_method answer_fallback_method + * @param \Bandwidth\Model\CallbackMethodEnum|null $answer_fallback_method answer_fallback_method * * @return $this */ - public function setAnswerFallbackMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $answer_fallback_method): static + public function setAnswerFallbackMethod(?\Bandwidth\Model\CallbackMethodEnum $answer_fallback_method): static { if (is_null($answer_fallback_method)) { array_push($this->openAPINullablesSetToNull, 'answer_fallback_method'); @@ -863,9 +863,9 @@ public function setAnswerFallbackUrl(?string $answer_fallback_url): static /** * Gets disconnect_method * - * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + * @return \Bandwidth\Model\CallbackMethodEnum|null */ - public function getDisconnectMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + public function getDisconnectMethod(): ?\Bandwidth\Model\CallbackMethodEnum { return $this->container['disconnect_method']; } @@ -873,11 +873,11 @@ public function getDisconnectMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum /** * Sets disconnect_method * - * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $disconnect_method disconnect_method + * @param \Bandwidth\Model\CallbackMethodEnum|null $disconnect_method disconnect_method * * @return $this */ - public function setDisconnectMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $disconnect_method): static + public function setDisconnectMethod(?\Bandwidth\Model\CallbackMethodEnum $disconnect_method): static { if (is_null($disconnect_method)) { array_push($this->openAPINullablesSetToNull, 'disconnect_method'); diff --git a/src/Model/CreateEndpointRequestBase.php b/src/Model/CreateEndpointRequestBase.php index 395b5fa2..515bbc59 100644 --- a/src/Model/CreateEndpointRequestBase.php +++ b/src/Model/CreateEndpointRequestBase.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CreateEndpointRequestBase Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,8 +59,8 @@ class CreateEndpointRequestBase implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPITypes = [ - 'type' => '\OpenAPI\Client\Model\EndpointTypeEnum', - 'direction' => '\OpenAPI\Client\Model\EndpointDirectionEnum', + 'type' => '\Bandwidth\Model\EndpointTypeEnum', + 'direction' => '\Bandwidth\Model\EndpointDirectionEnum', 'event_callback_url' => 'string', 'event_fallback_url' => 'string', 'tag' => 'string' @@ -301,9 +301,9 @@ public function valid(): bool /** * Gets type * - * @return \OpenAPI\Client\Model\EndpointTypeEnum + * @return \Bandwidth\Model\EndpointTypeEnum */ - public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum + public function getType(): \Bandwidth\Model\EndpointTypeEnum { return $this->container['type']; } @@ -311,11 +311,11 @@ public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\EndpointTypeEnum $type type + * @param \Bandwidth\Model\EndpointTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static + public function setType(\Bandwidth\Model\EndpointTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); @@ -328,9 +328,9 @@ public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static /** * Gets direction * - * @return \OpenAPI\Client\Model\EndpointDirectionEnum + * @return \Bandwidth\Model\EndpointDirectionEnum */ - public function getDirection(): \OpenAPI\Client\Model\EndpointDirectionEnum + public function getDirection(): \Bandwidth\Model\EndpointDirectionEnum { return $this->container['direction']; } @@ -338,11 +338,11 @@ public function getDirection(): \OpenAPI\Client\Model\EndpointDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\EndpointDirectionEnum $direction direction + * @param \Bandwidth\Model\EndpointDirectionEnum $direction direction * * @return $this */ - public function setDirection(\OpenAPI\Client\Model\EndpointDirectionEnum $direction): static + public function setDirection(\Bandwidth\Model\EndpointDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); diff --git a/src/Model/CreateEndpointResponse.php b/src/Model/CreateEndpointResponse.php index 7e3577c9..7c8b1ab3 100644 --- a/src/Model/CreateEndpointResponse.php +++ b/src/Model/CreateEndpointResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CreateEndpointResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,9 +59,9 @@ class CreateEndpointResponse implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'links' => '\OpenAPI\Client\Model\BrtcLink[]', - 'data' => '\OpenAPI\Client\Model\CreateEndpointResponseData', - 'errors' => '\OpenAPI\Client\Model\BrtcError[]' + 'links' => '\Bandwidth\Model\BrtcLink[]', + 'data' => '\Bandwidth\Model\CreateEndpointResponseData', + 'errors' => '\Bandwidth\Model\BrtcError[]' ]; /** @@ -290,7 +290,7 @@ public function valid(): bool /** * Gets links * - * @return \OpenAPI\Client\Model\BrtcLink[] + * @return \Bandwidth\Model\BrtcLink[] */ public function getLinks(): array { @@ -300,7 +300,7 @@ public function getLinks(): array /** * Sets links * - * @param \OpenAPI\Client\Model\BrtcLink[] $links links + * @param \Bandwidth\Model\BrtcLink[] $links links * * @return $this */ @@ -317,9 +317,9 @@ public function setLinks(array $links): static /** * Gets data * - * @return \OpenAPI\Client\Model\CreateEndpointResponseData + * @return \Bandwidth\Model\CreateEndpointResponseData */ - public function getData(): \OpenAPI\Client\Model\CreateEndpointResponseData + public function getData(): \Bandwidth\Model\CreateEndpointResponseData { return $this->container['data']; } @@ -327,11 +327,11 @@ public function getData(): \OpenAPI\Client\Model\CreateEndpointResponseData /** * Sets data * - * @param \OpenAPI\Client\Model\CreateEndpointResponseData $data data + * @param \Bandwidth\Model\CreateEndpointResponseData $data data * * @return $this */ - public function setData(\OpenAPI\Client\Model\CreateEndpointResponseData $data): static + public function setData(\Bandwidth\Model\CreateEndpointResponseData $data): static { if (is_null($data)) { throw new InvalidArgumentException('non-nullable data cannot be null'); @@ -344,7 +344,7 @@ public function setData(\OpenAPI\Client\Model\CreateEndpointResponseData $data): /** * Gets errors * - * @return \OpenAPI\Client\Model\BrtcError[] + * @return \Bandwidth\Model\BrtcError[] */ public function getErrors(): array { @@ -354,7 +354,7 @@ public function getErrors(): array /** * Sets errors * - * @param \OpenAPI\Client\Model\BrtcError[] $errors errors + * @param \Bandwidth\Model\BrtcError[] $errors errors * * @return $this */ diff --git a/src/Model/CreateEndpointResponseData.php b/src/Model/CreateEndpointResponseData.php index 2c754573..5c71df81 100644 --- a/src/Model/CreateEndpointResponseData.php +++ b/src/Model/CreateEndpointResponseData.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CreateEndpointResponseData Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -60,12 +60,12 @@ class CreateEndpointResponseData implements ModelInterface, ArrayAccess, JsonSer */ protected static array $openAPITypes = [ 'endpoint_id' => 'string', - 'type' => '\OpenAPI\Client\Model\EndpointTypeEnum', - 'status' => '\OpenAPI\Client\Model\EndpointStatusEnum', + 'type' => '\Bandwidth\Model\EndpointTypeEnum', + 'status' => '\Bandwidth\Model\EndpointStatusEnum', 'creation_timestamp' => '\DateTime', 'expiration_timestamp' => '\DateTime', 'tag' => 'string', - 'devices' => '\OpenAPI\Client\Model\Device[]', + 'devices' => '\Bandwidth\Model\Device[]', 'token' => 'string' ]; @@ -361,9 +361,9 @@ public function setEndpointId(string $endpoint_id): static /** * Gets type * - * @return \OpenAPI\Client\Model\EndpointTypeEnum + * @return \Bandwidth\Model\EndpointTypeEnum */ - public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum + public function getType(): \Bandwidth\Model\EndpointTypeEnum { return $this->container['type']; } @@ -371,11 +371,11 @@ public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\EndpointTypeEnum $type type + * @param \Bandwidth\Model\EndpointTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static + public function setType(\Bandwidth\Model\EndpointTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); @@ -388,9 +388,9 @@ public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static /** * Gets status * - * @return \OpenAPI\Client\Model\EndpointStatusEnum + * @return \Bandwidth\Model\EndpointStatusEnum */ - public function getStatus(): \OpenAPI\Client\Model\EndpointStatusEnum + public function getStatus(): \Bandwidth\Model\EndpointStatusEnum { return $this->container['status']; } @@ -398,11 +398,11 @@ public function getStatus(): \OpenAPI\Client\Model\EndpointStatusEnum /** * Sets status * - * @param \OpenAPI\Client\Model\EndpointStatusEnum $status status + * @param \Bandwidth\Model\EndpointStatusEnum $status status * * @return $this */ - public function setStatus(\OpenAPI\Client\Model\EndpointStatusEnum $status): static + public function setStatus(\Bandwidth\Model\EndpointStatusEnum $status): static { if (is_null($status)) { throw new InvalidArgumentException('non-nullable status cannot be null'); @@ -498,7 +498,7 @@ public function setTag(?string $tag): static /** * Gets devices * - * @return \OpenAPI\Client\Model\Device[]|null + * @return \Bandwidth\Model\Device[]|null */ public function getDevices(): ?array { @@ -508,7 +508,7 @@ public function getDevices(): ?array /** * Sets devices * - * @param \OpenAPI\Client\Model\Device[]|null $devices devices + * @param \Bandwidth\Model\Device[]|null $devices devices * * @return $this */ diff --git a/src/Model/CreateMessageRequestError.php b/src/Model/CreateMessageRequestError.php index cfed8fdf..4dd47a7a 100644 --- a/src/Model/CreateMessageRequestError.php +++ b/src/Model/CreateMessageRequestError.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CreateMessageRequestError Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,7 +61,7 @@ class CreateMessageRequestError implements ModelInterface, ArrayAccess, JsonSeri protected static array $openAPITypes = [ 'type' => 'string', 'description' => 'string', - 'field_errors' => '\OpenAPI\Client\Model\FieldError[]' + 'field_errors' => '\Bandwidth\Model\FieldError[]' ]; /** @@ -341,7 +341,7 @@ public function setDescription(string $description): static /** * Gets field_errors * - * @return \OpenAPI\Client\Model\FieldError[]|null + * @return \Bandwidth\Model\FieldError[]|null */ public function getFieldErrors(): ?array { @@ -351,7 +351,7 @@ public function getFieldErrors(): ?array /** * Sets field_errors * - * @param \OpenAPI\Client\Model\FieldError[]|null $field_errors field_errors + * @param \Bandwidth\Model\FieldError[]|null $field_errors field_errors * * @return $this */ diff --git a/src/Model/CreateMultiChannelMessageResponse.php b/src/Model/CreateMultiChannelMessageResponse.php index 7f7718d6..f743d031 100644 --- a/src/Model/CreateMultiChannelMessageResponse.php +++ b/src/Model/CreateMultiChannelMessageResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CreateMultiChannelMessageResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,9 +59,9 @@ class CreateMultiChannelMessageResponse implements ModelInterface, ArrayAccess, * @var array */ protected static array $openAPITypes = [ - 'links' => '\OpenAPI\Client\Model\Link[]', - 'data' => '\OpenAPI\Client\Model\MultiChannelMessageResponseData', - 'errors' => '\OpenAPI\Client\Model\ErrorObject[]' + 'links' => '\Bandwidth\Model\Link[]', + 'data' => '\Bandwidth\Model\MultiChannelMessageResponseData', + 'errors' => '\Bandwidth\Model\ErrorObject[]' ]; /** @@ -281,7 +281,7 @@ public function valid(): bool /** * Gets links * - * @return \OpenAPI\Client\Model\Link[]|null + * @return \Bandwidth\Model\Link[]|null */ public function getLinks(): ?array { @@ -291,7 +291,7 @@ public function getLinks(): ?array /** * Sets links * - * @param \OpenAPI\Client\Model\Link[]|null $links links + * @param \Bandwidth\Model\Link[]|null $links links * * @return $this */ @@ -308,9 +308,9 @@ public function setLinks(?array $links): static /** * Gets data * - * @return \OpenAPI\Client\Model\MultiChannelMessageResponseData|null + * @return \Bandwidth\Model\MultiChannelMessageResponseData|null */ - public function getData(): ?\OpenAPI\Client\Model\MultiChannelMessageResponseData + public function getData(): ?\Bandwidth\Model\MultiChannelMessageResponseData { return $this->container['data']; } @@ -318,11 +318,11 @@ public function getData(): ?\OpenAPI\Client\Model\MultiChannelMessageResponseDat /** * Sets data * - * @param \OpenAPI\Client\Model\MultiChannelMessageResponseData|null $data data + * @param \Bandwidth\Model\MultiChannelMessageResponseData|null $data data * * @return $this */ - public function setData(?\OpenAPI\Client\Model\MultiChannelMessageResponseData $data): static + public function setData(?\Bandwidth\Model\MultiChannelMessageResponseData $data): static { if (is_null($data)) { throw new InvalidArgumentException('non-nullable data cannot be null'); @@ -335,7 +335,7 @@ public function setData(?\OpenAPI\Client\Model\MultiChannelMessageResponseData $ /** * Gets errors * - * @return \OpenAPI\Client\Model\ErrorObject[]|null + * @return \Bandwidth\Model\ErrorObject[]|null */ public function getErrors(): ?array { @@ -345,7 +345,7 @@ public function getErrors(): ?array /** * Sets errors * - * @param \OpenAPI\Client\Model\ErrorObject[]|null $errors errors + * @param \Bandwidth\Model\ErrorObject[]|null $errors errors * * @return $this */ diff --git a/src/Model/CreateSyncLookupResponse.php b/src/Model/CreateSyncLookupResponse.php index 0a65a4ea..bf74e7f4 100644 --- a/src/Model/CreateSyncLookupResponse.php +++ b/src/Model/CreateSyncLookupResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CreateSyncLookupResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,9 +59,9 @@ class CreateSyncLookupResponse implements ModelInterface, ArrayAccess, JsonSeria * @var array */ protected static array $openAPITypes = [ - 'links' => '\OpenAPI\Client\Model\LinkSchema[]', - 'data' => '\OpenAPI\Client\Model\CreateSyncLookupResponseData', - 'errors' => '\OpenAPI\Client\Model\LookupErrorSchema[]' + 'links' => '\Bandwidth\Model\LinkSchema[]', + 'data' => '\Bandwidth\Model\CreateSyncLookupResponseData', + 'errors' => '\Bandwidth\Model\LookupErrorSchema[]' ]; /** @@ -281,7 +281,7 @@ public function valid(): bool /** * Gets links * - * @return \OpenAPI\Client\Model\LinkSchema[]|null + * @return \Bandwidth\Model\LinkSchema[]|null */ public function getLinks(): ?array { @@ -291,7 +291,7 @@ public function getLinks(): ?array /** * Sets links * - * @param \OpenAPI\Client\Model\LinkSchema[]|null $links links + * @param \Bandwidth\Model\LinkSchema[]|null $links links * * @return $this */ @@ -308,9 +308,9 @@ public function setLinks(?array $links): static /** * Gets data * - * @return \OpenAPI\Client\Model\CreateSyncLookupResponseData|null + * @return \Bandwidth\Model\CreateSyncLookupResponseData|null */ - public function getData(): ?\OpenAPI\Client\Model\CreateSyncLookupResponseData + public function getData(): ?\Bandwidth\Model\CreateSyncLookupResponseData { return $this->container['data']; } @@ -318,11 +318,11 @@ public function getData(): ?\OpenAPI\Client\Model\CreateSyncLookupResponseData /** * Sets data * - * @param \OpenAPI\Client\Model\CreateSyncLookupResponseData|null $data data + * @param \Bandwidth\Model\CreateSyncLookupResponseData|null $data data * * @return $this */ - public function setData(?\OpenAPI\Client\Model\CreateSyncLookupResponseData $data): static + public function setData(?\Bandwidth\Model\CreateSyncLookupResponseData $data): static { if (is_null($data)) { throw new InvalidArgumentException('non-nullable data cannot be null'); @@ -335,7 +335,7 @@ public function setData(?\OpenAPI\Client\Model\CreateSyncLookupResponseData $dat /** * Gets errors * - * @return \OpenAPI\Client\Model\LookupErrorSchema[]|null + * @return \Bandwidth\Model\LookupErrorSchema[]|null */ public function getErrors(): ?array { @@ -345,7 +345,7 @@ public function getErrors(): ?array /** * Sets errors * - * @param \OpenAPI\Client\Model\LookupErrorSchema[]|null $errors errors + * @param \Bandwidth\Model\LookupErrorSchema[]|null $errors errors * * @return $this */ diff --git a/src/Model/CreateSyncLookupResponseData.php b/src/Model/CreateSyncLookupResponseData.php index 4235ce9b..bca6421f 100644 --- a/src/Model/CreateSyncLookupResponseData.php +++ b/src/Model/CreateSyncLookupResponseData.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CreateSyncLookupResponseData Class Doc Comment * * @description The phone number lookup response data - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,8 +61,8 @@ class CreateSyncLookupResponseData implements ModelInterface, ArrayAccess, JsonS */ protected static array $openAPITypes = [ 'request_id' => 'string', - 'status' => '\OpenAPI\Client\Model\CompletedLookupStatusEnum', - 'results' => '\OpenAPI\Client\Model\LookupResult[]' + 'status' => '\Bandwidth\Model\CompletedLookupStatusEnum', + 'results' => '\Bandwidth\Model\LookupResult[]' ]; /** @@ -309,9 +309,9 @@ public function setRequestId(?string $request_id): static /** * Gets status * - * @return \OpenAPI\Client\Model\CompletedLookupStatusEnum|null + * @return \Bandwidth\Model\CompletedLookupStatusEnum|null */ - public function getStatus(): ?\OpenAPI\Client\Model\CompletedLookupStatusEnum + public function getStatus(): ?\Bandwidth\Model\CompletedLookupStatusEnum { return $this->container['status']; } @@ -319,11 +319,11 @@ public function getStatus(): ?\OpenAPI\Client\Model\CompletedLookupStatusEnum /** * Sets status * - * @param \OpenAPI\Client\Model\CompletedLookupStatusEnum|null $status status + * @param \Bandwidth\Model\CompletedLookupStatusEnum|null $status status * * @return $this */ - public function setStatus(?\OpenAPI\Client\Model\CompletedLookupStatusEnum $status): static + public function setStatus(?\Bandwidth\Model\CompletedLookupStatusEnum $status): static { if (is_null($status)) { throw new InvalidArgumentException('non-nullable status cannot be null'); @@ -336,7 +336,7 @@ public function setStatus(?\OpenAPI\Client\Model\CompletedLookupStatusEnum $stat /** * Gets results * - * @return \OpenAPI\Client\Model\LookupResult[]|null + * @return \Bandwidth\Model\LookupResult[]|null */ public function getResults(): ?array { @@ -346,7 +346,7 @@ public function getResults(): ?array /** * Sets results * - * @param \OpenAPI\Client\Model\LookupResult[]|null $results The carrier information results for the specified telephone numbers. + * @param \Bandwidth\Model\LookupResult[]|null $results The carrier information results for the specified telephone numbers. * * @return $this */ diff --git a/src/Model/CreateWebRtcConnectionRequest.php b/src/Model/CreateWebRtcConnectionRequest.php index b7fe4c50..913f0c97 100644 --- a/src/Model/CreateWebRtcConnectionRequest.php +++ b/src/Model/CreateWebRtcConnectionRequest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * CreateWebRtcConnectionRequest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,8 +59,8 @@ class CreateWebRtcConnectionRequest implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'type' => '\OpenAPI\Client\Model\EndpointTypeEnum', - 'direction' => '\OpenAPI\Client\Model\EndpointDirectionEnum', + 'type' => '\Bandwidth\Model\EndpointTypeEnum', + 'direction' => '\Bandwidth\Model\EndpointDirectionEnum', 'event_callback_url' => 'string', 'event_fallback_url' => 'string', 'tag' => 'string', @@ -308,9 +308,9 @@ public function valid(): bool /** * Gets type * - * @return \OpenAPI\Client\Model\EndpointTypeEnum + * @return \Bandwidth\Model\EndpointTypeEnum */ - public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum + public function getType(): \Bandwidth\Model\EndpointTypeEnum { return $this->container['type']; } @@ -318,11 +318,11 @@ public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\EndpointTypeEnum $type type + * @param \Bandwidth\Model\EndpointTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static + public function setType(\Bandwidth\Model\EndpointTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); @@ -335,9 +335,9 @@ public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static /** * Gets direction * - * @return \OpenAPI\Client\Model\EndpointDirectionEnum + * @return \Bandwidth\Model\EndpointDirectionEnum */ - public function getDirection(): \OpenAPI\Client\Model\EndpointDirectionEnum + public function getDirection(): \Bandwidth\Model\EndpointDirectionEnum { return $this->container['direction']; } @@ -345,11 +345,11 @@ public function getDirection(): \OpenAPI\Client\Model\EndpointDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\EndpointDirectionEnum $direction direction + * @param \Bandwidth\Model\EndpointDirectionEnum $direction direction * * @return $this */ - public function setDirection(\OpenAPI\Client\Model\EndpointDirectionEnum $direction): static + public function setDirection(\Bandwidth\Model\EndpointDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); diff --git a/src/Model/DeactivationEventEnum.php b/src/Model/DeactivationEventEnum.php index 53bc9b4e..a571b843 100644 --- a/src/Model/DeactivationEventEnum.php +++ b/src/Model/DeactivationEventEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * DeactivationEventEnum Class Doc Comment * * @description [DNI-Only](#section/DNI-Only). `DEACTIVATED` if the carrier reported a deactivation event for this phone number. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/Device.php b/src/Model/Device.php index da3bdb79..17985aae 100644 --- a/src/Model/Device.php +++ b/src/Model/Device.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * Device Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,7 +61,7 @@ class Device implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPITypes = [ 'device_id' => 'string', 'device_name' => 'string', - 'status' => '\OpenAPI\Client\Model\DeviceStatusEnum', + 'status' => '\Bandwidth\Model\DeviceStatusEnum', 'creation_timestamp' => '\DateTime' ]; @@ -353,9 +353,9 @@ public function setDeviceName(?string $device_name): static /** * Gets status * - * @return \OpenAPI\Client\Model\DeviceStatusEnum + * @return \Bandwidth\Model\DeviceStatusEnum */ - public function getStatus(): \OpenAPI\Client\Model\DeviceStatusEnum + public function getStatus(): \Bandwidth\Model\DeviceStatusEnum { return $this->container['status']; } @@ -363,11 +363,11 @@ public function getStatus(): \OpenAPI\Client\Model\DeviceStatusEnum /** * Sets status * - * @param \OpenAPI\Client\Model\DeviceStatusEnum $status status + * @param \Bandwidth\Model\DeviceStatusEnum $status status * * @return $this */ - public function setStatus(\OpenAPI\Client\Model\DeviceStatusEnum $status): static + public function setStatus(\Bandwidth\Model\DeviceStatusEnum $status): static { if (is_null($status)) { throw new InvalidArgumentException('non-nullable status cannot be null'); diff --git a/src/Model/DeviceStatusEnum.php b/src/Model/DeviceStatusEnum.php index a6290257..a1e719d2 100644 --- a/src/Model/DeviceStatusEnum.php +++ b/src/Model/DeviceStatusEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * DeviceStatusEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/DisconnectCallback.php b/src/Model/DisconnectCallback.php index 08184f91..c795608c 100644 --- a/src/Model/DisconnectCallback.php +++ b/src/Model/DisconnectCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * DisconnectCallback Class Doc Comment * * @description The Disconnect event is fired when a call ends, for any reason. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -67,7 +67,7 @@ class DisconnectCallback implements ModelInterface, ArrayAccess, JsonSerializabl 'from' => 'string', 'to' => 'string', 'call_id' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_url' => 'string', 'enqueued_time' => '\DateTime', 'start_time' => '\DateTime', @@ -569,9 +569,9 @@ public function setCallId(?string $call_id): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -579,11 +579,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); diff --git a/src/Model/Diversion.php b/src/Model/Diversion.php index 836ed955..40be62a2 100644 --- a/src/Model/Diversion.php +++ b/src/Model/Diversion.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * Diversion Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/DtmfCallback.php b/src/Model/DtmfCallback.php index 6f7e9bac..d93d33b9 100644 --- a/src/Model/DtmfCallback.php +++ b/src/Model/DtmfCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * DtmfCallback Class Doc Comment * * @description The DTMF event is sent for every digit detected after a <StartGather> verb is executed. You may not respond to this event with BXML. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -67,7 +67,7 @@ class DtmfCallback implements ModelInterface, ArrayAccess, JsonSerializable 'from' => 'string', 'to' => 'string', 'call_id' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'digit' => 'string', 'call_url' => 'string', 'enqueued_time' => '\DateTime', @@ -569,9 +569,9 @@ public function setCallId(?string $call_id): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -579,11 +579,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); diff --git a/src/Model/Endpoint.php b/src/Model/Endpoint.php index fdff2327..9679c6cb 100644 --- a/src/Model/Endpoint.php +++ b/src/Model/Endpoint.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * Endpoint Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -60,12 +60,12 @@ class Endpoint implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'endpoint_id' => 'string', - 'type' => '\OpenAPI\Client\Model\EndpointTypeEnum', - 'status' => '\OpenAPI\Client\Model\EndpointStatusEnum', + 'type' => '\Bandwidth\Model\EndpointTypeEnum', + 'status' => '\Bandwidth\Model\EndpointStatusEnum', 'creation_timestamp' => '\DateTime', 'expiration_timestamp' => '\DateTime', 'tag' => 'string', - 'devices' => '\OpenAPI\Client\Model\Device[]' + 'devices' => '\Bandwidth\Model\Device[]' ]; /** @@ -351,9 +351,9 @@ public function setEndpointId(string $endpoint_id): static /** * Gets type * - * @return \OpenAPI\Client\Model\EndpointTypeEnum + * @return \Bandwidth\Model\EndpointTypeEnum */ - public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum + public function getType(): \Bandwidth\Model\EndpointTypeEnum { return $this->container['type']; } @@ -361,11 +361,11 @@ public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\EndpointTypeEnum $type type + * @param \Bandwidth\Model\EndpointTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static + public function setType(\Bandwidth\Model\EndpointTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); @@ -378,9 +378,9 @@ public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static /** * Gets status * - * @return \OpenAPI\Client\Model\EndpointStatusEnum + * @return \Bandwidth\Model\EndpointStatusEnum */ - public function getStatus(): \OpenAPI\Client\Model\EndpointStatusEnum + public function getStatus(): \Bandwidth\Model\EndpointStatusEnum { return $this->container['status']; } @@ -388,11 +388,11 @@ public function getStatus(): \OpenAPI\Client\Model\EndpointStatusEnum /** * Sets status * - * @param \OpenAPI\Client\Model\EndpointStatusEnum $status status + * @param \Bandwidth\Model\EndpointStatusEnum $status status * * @return $this */ - public function setStatus(\OpenAPI\Client\Model\EndpointStatusEnum $status): static + public function setStatus(\Bandwidth\Model\EndpointStatusEnum $status): static { if (is_null($status)) { throw new InvalidArgumentException('non-nullable status cannot be null'); @@ -488,7 +488,7 @@ public function setTag(?string $tag): static /** * Gets devices * - * @return \OpenAPI\Client\Model\Device[]|null + * @return \Bandwidth\Model\Device[]|null */ public function getDevices(): ?array { @@ -498,7 +498,7 @@ public function getDevices(): ?array /** * Sets devices * - * @param \OpenAPI\Client\Model\Device[]|null $devices devices + * @param \Bandwidth\Model\Device[]|null $devices devices * * @return $this */ diff --git a/src/Model/EndpointDirectionEnum.php b/src/Model/EndpointDirectionEnum.php index 5f5471f8..cf36d523 100644 --- a/src/Model/EndpointDirectionEnum.php +++ b/src/Model/EndpointDirectionEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * EndpointDirectionEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/EndpointEvent.php b/src/Model/EndpointEvent.php index 08731e47..d7ef3945 100644 --- a/src/Model/EndpointEvent.php +++ b/src/Model/EndpointEvent.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * EndpointEvent Class Doc Comment * * @description An event that occurred on an endpoint. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,14 +61,14 @@ class EndpointEvent implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'endpoint_id' => 'string', - 'type' => '\OpenAPI\Client\Model\EndpointTypeEnum', - 'status' => '\OpenAPI\Client\Model\EndpointStatusEnum', + 'type' => '\Bandwidth\Model\EndpointTypeEnum', + 'status' => '\Bandwidth\Model\EndpointStatusEnum', 'creation_timestamp' => '\DateTime', 'expiration_timestamp' => '\DateTime', 'tag' => 'string', 'event_time' => '\DateTime', - 'event_type' => '\OpenAPI\Client\Model\EndpointEventTypeEnum', - 'device' => '\OpenAPI\Client\Model\Device' + 'event_type' => '\Bandwidth\Model\EndpointEventTypeEnum', + 'device' => '\Bandwidth\Model\Device' ]; /** @@ -372,9 +372,9 @@ public function setEndpointId(string $endpoint_id): static /** * Gets type * - * @return \OpenAPI\Client\Model\EndpointTypeEnum + * @return \Bandwidth\Model\EndpointTypeEnum */ - public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum + public function getType(): \Bandwidth\Model\EndpointTypeEnum { return $this->container['type']; } @@ -382,11 +382,11 @@ public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\EndpointTypeEnum $type type + * @param \Bandwidth\Model\EndpointTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static + public function setType(\Bandwidth\Model\EndpointTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); @@ -399,9 +399,9 @@ public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static /** * Gets status * - * @return \OpenAPI\Client\Model\EndpointStatusEnum + * @return \Bandwidth\Model\EndpointStatusEnum */ - public function getStatus(): \OpenAPI\Client\Model\EndpointStatusEnum + public function getStatus(): \Bandwidth\Model\EndpointStatusEnum { return $this->container['status']; } @@ -409,11 +409,11 @@ public function getStatus(): \OpenAPI\Client\Model\EndpointStatusEnum /** * Sets status * - * @param \OpenAPI\Client\Model\EndpointStatusEnum $status status + * @param \Bandwidth\Model\EndpointStatusEnum $status status * * @return $this */ - public function setStatus(\OpenAPI\Client\Model\EndpointStatusEnum $status): static + public function setStatus(\Bandwidth\Model\EndpointStatusEnum $status): static { if (is_null($status)) { throw new InvalidArgumentException('non-nullable status cannot be null'); @@ -536,9 +536,9 @@ public function setEventTime(\DateTime $event_time): static /** * Gets event_type * - * @return \OpenAPI\Client\Model\EndpointEventTypeEnum + * @return \Bandwidth\Model\EndpointEventTypeEnum */ - public function getEventType(): \OpenAPI\Client\Model\EndpointEventTypeEnum + public function getEventType(): \Bandwidth\Model\EndpointEventTypeEnum { return $this->container['event_type']; } @@ -546,11 +546,11 @@ public function getEventType(): \OpenAPI\Client\Model\EndpointEventTypeEnum /** * Sets event_type * - * @param \OpenAPI\Client\Model\EndpointEventTypeEnum $event_type event_type + * @param \Bandwidth\Model\EndpointEventTypeEnum $event_type event_type * * @return $this */ - public function setEventType(\OpenAPI\Client\Model\EndpointEventTypeEnum $event_type): static + public function setEventType(\Bandwidth\Model\EndpointEventTypeEnum $event_type): static { if (is_null($event_type)) { throw new InvalidArgumentException('non-nullable event_type cannot be null'); @@ -563,9 +563,9 @@ public function setEventType(\OpenAPI\Client\Model\EndpointEventTypeEnum $event_ /** * Gets device * - * @return \OpenAPI\Client\Model\Device|null + * @return \Bandwidth\Model\Device|null */ - public function getDevice(): ?\OpenAPI\Client\Model\Device + public function getDevice(): ?\Bandwidth\Model\Device { return $this->container['device']; } @@ -573,11 +573,11 @@ public function getDevice(): ?\OpenAPI\Client\Model\Device /** * Sets device * - * @param \OpenAPI\Client\Model\Device|null $device device + * @param \Bandwidth\Model\Device|null $device device * * @return $this */ - public function setDevice(?\OpenAPI\Client\Model\Device $device): static + public function setDevice(?\Bandwidth\Model\Device $device): static { if (is_null($device)) { throw new InvalidArgumentException('non-nullable device cannot be null'); diff --git a/src/Model/EndpointEventTypeEnum.php b/src/Model/EndpointEventTypeEnum.php index 040fa18a..16dddd5c 100644 --- a/src/Model/EndpointEventTypeEnum.php +++ b/src/Model/EndpointEventTypeEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * EndpointEventTypeEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/EndpointResponse.php b/src/Model/EndpointResponse.php index 01d52dc5..66f57ad0 100644 --- a/src/Model/EndpointResponse.php +++ b/src/Model/EndpointResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * EndpointResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,9 +59,9 @@ class EndpointResponse implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'links' => '\OpenAPI\Client\Model\BrtcLink[]', - 'data' => '\OpenAPI\Client\Model\Endpoint', - 'errors' => '\OpenAPI\Client\Model\BrtcError[]' + 'links' => '\Bandwidth\Model\BrtcLink[]', + 'data' => '\Bandwidth\Model\Endpoint', + 'errors' => '\Bandwidth\Model\BrtcError[]' ]; /** @@ -290,7 +290,7 @@ public function valid(): bool /** * Gets links * - * @return \OpenAPI\Client\Model\BrtcLink[] + * @return \Bandwidth\Model\BrtcLink[] */ public function getLinks(): array { @@ -300,7 +300,7 @@ public function getLinks(): array /** * Sets links * - * @param \OpenAPI\Client\Model\BrtcLink[] $links links + * @param \Bandwidth\Model\BrtcLink[] $links links * * @return $this */ @@ -317,9 +317,9 @@ public function setLinks(array $links): static /** * Gets data * - * @return \OpenAPI\Client\Model\Endpoint + * @return \Bandwidth\Model\Endpoint */ - public function getData(): \OpenAPI\Client\Model\Endpoint + public function getData(): \Bandwidth\Model\Endpoint { return $this->container['data']; } @@ -327,11 +327,11 @@ public function getData(): \OpenAPI\Client\Model\Endpoint /** * Sets data * - * @param \OpenAPI\Client\Model\Endpoint $data data + * @param \Bandwidth\Model\Endpoint $data data * * @return $this */ - public function setData(\OpenAPI\Client\Model\Endpoint $data): static + public function setData(\Bandwidth\Model\Endpoint $data): static { if (is_null($data)) { throw new InvalidArgumentException('non-nullable data cannot be null'); @@ -344,7 +344,7 @@ public function setData(\OpenAPI\Client\Model\Endpoint $data): static /** * Gets errors * - * @return \OpenAPI\Client\Model\BrtcError[] + * @return \Bandwidth\Model\BrtcError[] */ public function getErrors(): array { @@ -354,7 +354,7 @@ public function getErrors(): array /** * Sets errors * - * @param \OpenAPI\Client\Model\BrtcError[] $errors errors + * @param \Bandwidth\Model\BrtcError[] $errors errors * * @return $this */ diff --git a/src/Model/EndpointStatusEnum.php b/src/Model/EndpointStatusEnum.php index e6249a3f..c60c20fb 100644 --- a/src/Model/EndpointStatusEnum.php +++ b/src/Model/EndpointStatusEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * EndpointStatusEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/EndpointTypeEnum.php b/src/Model/EndpointTypeEnum.php index df593159..191db9c2 100644 --- a/src/Model/EndpointTypeEnum.php +++ b/src/Model/EndpointTypeEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * EndpointTypeEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/Endpoints.php b/src/Model/Endpoints.php index d27409a7..75a5333a 100644 --- a/src/Model/Endpoints.php +++ b/src/Model/Endpoints.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * Endpoints Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -60,8 +60,8 @@ class Endpoints implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'endpoint_id' => 'string', - 'type' => '\OpenAPI\Client\Model\EndpointTypeEnum', - 'status' => '\OpenAPI\Client\Model\EndpointStatusEnum', + 'type' => '\Bandwidth\Model\EndpointTypeEnum', + 'status' => '\Bandwidth\Model\EndpointStatusEnum', 'creation_timestamp' => '\DateTime', 'expiration_timestamp' => '\DateTime', 'tag' => 'string' @@ -344,9 +344,9 @@ public function setEndpointId(string $endpoint_id): static /** * Gets type * - * @return \OpenAPI\Client\Model\EndpointTypeEnum + * @return \Bandwidth\Model\EndpointTypeEnum */ - public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum + public function getType(): \Bandwidth\Model\EndpointTypeEnum { return $this->container['type']; } @@ -354,11 +354,11 @@ public function getType(): \OpenAPI\Client\Model\EndpointTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\EndpointTypeEnum $type type + * @param \Bandwidth\Model\EndpointTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static + public function setType(\Bandwidth\Model\EndpointTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); @@ -371,9 +371,9 @@ public function setType(\OpenAPI\Client\Model\EndpointTypeEnum $type): static /** * Gets status * - * @return \OpenAPI\Client\Model\EndpointStatusEnum + * @return \Bandwidth\Model\EndpointStatusEnum */ - public function getStatus(): \OpenAPI\Client\Model\EndpointStatusEnum + public function getStatus(): \Bandwidth\Model\EndpointStatusEnum { return $this->container['status']; } @@ -381,11 +381,11 @@ public function getStatus(): \OpenAPI\Client\Model\EndpointStatusEnum /** * Sets status * - * @param \OpenAPI\Client\Model\EndpointStatusEnum $status status + * @param \Bandwidth\Model\EndpointStatusEnum $status status * * @return $this */ - public function setStatus(\OpenAPI\Client\Model\EndpointStatusEnum $status): static + public function setStatus(\Bandwidth\Model\EndpointStatusEnum $status): static { if (is_null($status)) { throw new InvalidArgumentException('non-nullable status cannot be null'); diff --git a/src/Model/ErrorObject.php b/src/Model/ErrorObject.php index 8d65de74..5a13b623 100644 --- a/src/Model/ErrorObject.php +++ b/src/Model/ErrorObject.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * ErrorObject Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,7 +61,7 @@ class ErrorObject implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPITypes = [ 'type' => 'string', 'description' => 'string', - 'source' => '\OpenAPI\Client\Model\ErrorSource' + 'source' => '\Bandwidth\Model\ErrorSource' ]; /** @@ -344,9 +344,9 @@ public function setDescription(string $description): static /** * Gets source * - * @return \OpenAPI\Client\Model\ErrorSource + * @return \Bandwidth\Model\ErrorSource */ - public function getSource(): \OpenAPI\Client\Model\ErrorSource + public function getSource(): \Bandwidth\Model\ErrorSource { return $this->container['source']; } @@ -354,11 +354,11 @@ public function getSource(): \OpenAPI\Client\Model\ErrorSource /** * Sets source * - * @param \OpenAPI\Client\Model\ErrorSource $source source + * @param \Bandwidth\Model\ErrorSource $source source * * @return $this */ - public function setSource(\OpenAPI\Client\Model\ErrorSource $source): static + public function setSource(\Bandwidth\Model\ErrorSource $source): static { if (is_null($source)) { throw new InvalidArgumentException('non-nullable source cannot be null'); diff --git a/src/Model/ErrorSource.php b/src/Model/ErrorSource.php index 4788bef1..49327fc4 100644 --- a/src/Model/ErrorSource.php +++ b/src/Model/ErrorSource.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * ErrorSource Class Doc Comment * * @description Specifies relevant sources of the error, if any. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/FailureWebhook.php b/src/Model/FailureWebhook.php index f599341a..e03ece1e 100644 --- a/src/Model/FailureWebhook.php +++ b/src/Model/FailureWebhook.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * FailureWebhook Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/FieldError.php b/src/Model/FieldError.php index 224e4760..d18b2ebb 100644 --- a/src/Model/FieldError.php +++ b/src/Model/FieldError.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * FieldError Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/FileFormatEnum.php b/src/Model/FileFormatEnum.php index 2ba57c25..efd29074 100644 --- a/src/Model/FileFormatEnum.php +++ b/src/Model/FileFormatEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * FileFormatEnum Class Doc Comment * * @description The format that the recording is stored in. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/GatherCallback.php b/src/Model/GatherCallback.php index 9a37cb93..85bb6012 100644 --- a/src/Model/GatherCallback.php +++ b/src/Model/GatherCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * GatherCallback Class Doc Comment * * @description The gather event is sent after a <Gather> verb is executed. Its purpose is to report the gathered digits to the calling application. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,7 +66,7 @@ class GatherCallback implements ModelInterface, ArrayAccess, JsonSerializable 'application_id' => 'string', 'from' => 'string', 'to' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_id' => 'string', 'digits' => 'string', 'call_url' => 'string', @@ -549,9 +549,9 @@ public function setTo(?string $to): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -559,11 +559,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); diff --git a/src/Model/GetAsyncBulkLookupResponse.php b/src/Model/GetAsyncBulkLookupResponse.php index 4ab1e534..b9f29d7a 100644 --- a/src/Model/GetAsyncBulkLookupResponse.php +++ b/src/Model/GetAsyncBulkLookupResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * GetAsyncBulkLookupResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,9 +59,9 @@ class GetAsyncBulkLookupResponse implements ModelInterface, ArrayAccess, JsonSer * @var array */ protected static array $openAPITypes = [ - 'links' => '\OpenAPI\Client\Model\LinkSchema[]', - 'data' => '\OpenAPI\Client\Model\GetAsyncBulkLookupResponseData', - 'errors' => '\OpenAPI\Client\Model\LookupErrorSchema[]' + 'links' => '\Bandwidth\Model\LinkSchema[]', + 'data' => '\Bandwidth\Model\GetAsyncBulkLookupResponseData', + 'errors' => '\Bandwidth\Model\LookupErrorSchema[]' ]; /** @@ -281,7 +281,7 @@ public function valid(): bool /** * Gets links * - * @return \OpenAPI\Client\Model\LinkSchema[]|null + * @return \Bandwidth\Model\LinkSchema[]|null */ public function getLinks(): ?array { @@ -291,7 +291,7 @@ public function getLinks(): ?array /** * Sets links * - * @param \OpenAPI\Client\Model\LinkSchema[]|null $links links + * @param \Bandwidth\Model\LinkSchema[]|null $links links * * @return $this */ @@ -308,9 +308,9 @@ public function setLinks(?array $links): static /** * Gets data * - * @return \OpenAPI\Client\Model\GetAsyncBulkLookupResponseData|null + * @return \Bandwidth\Model\GetAsyncBulkLookupResponseData|null */ - public function getData(): ?\OpenAPI\Client\Model\GetAsyncBulkLookupResponseData + public function getData(): ?\Bandwidth\Model\GetAsyncBulkLookupResponseData { return $this->container['data']; } @@ -318,11 +318,11 @@ public function getData(): ?\OpenAPI\Client\Model\GetAsyncBulkLookupResponseData /** * Sets data * - * @param \OpenAPI\Client\Model\GetAsyncBulkLookupResponseData|null $data data + * @param \Bandwidth\Model\GetAsyncBulkLookupResponseData|null $data data * * @return $this */ - public function setData(?\OpenAPI\Client\Model\GetAsyncBulkLookupResponseData $data): static + public function setData(?\Bandwidth\Model\GetAsyncBulkLookupResponseData $data): static { if (is_null($data)) { throw new InvalidArgumentException('non-nullable data cannot be null'); @@ -335,7 +335,7 @@ public function setData(?\OpenAPI\Client\Model\GetAsyncBulkLookupResponseData $d /** * Gets errors * - * @return \OpenAPI\Client\Model\LookupErrorSchema[]|null + * @return \Bandwidth\Model\LookupErrorSchema[]|null */ public function getErrors(): ?array { @@ -345,7 +345,7 @@ public function getErrors(): ?array /** * Sets errors * - * @param \OpenAPI\Client\Model\LookupErrorSchema[]|null $errors errors + * @param \Bandwidth\Model\LookupErrorSchema[]|null $errors errors * * @return $this */ diff --git a/src/Model/GetAsyncBulkLookupResponseData.php b/src/Model/GetAsyncBulkLookupResponseData.php index 8af32a2d..754422a6 100644 --- a/src/Model/GetAsyncBulkLookupResponseData.php +++ b/src/Model/GetAsyncBulkLookupResponseData.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * GetAsyncBulkLookupResponseData Class Doc Comment * * @description The phone number lookup response data - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,8 +61,8 @@ class GetAsyncBulkLookupResponseData implements ModelInterface, ArrayAccess, Jso */ protected static array $openAPITypes = [ 'request_id' => 'string', - 'status' => '\OpenAPI\Client\Model\InProgressLookupStatusEnum', - 'results' => '\OpenAPI\Client\Model\LookupResult[]' + 'status' => '\Bandwidth\Model\InProgressLookupStatusEnum', + 'results' => '\Bandwidth\Model\LookupResult[]' ]; /** @@ -309,9 +309,9 @@ public function setRequestId(?string $request_id): static /** * Gets status * - * @return \OpenAPI\Client\Model\InProgressLookupStatusEnum|null + * @return \Bandwidth\Model\InProgressLookupStatusEnum|null */ - public function getStatus(): ?\OpenAPI\Client\Model\InProgressLookupStatusEnum + public function getStatus(): ?\Bandwidth\Model\InProgressLookupStatusEnum { return $this->container['status']; } @@ -319,11 +319,11 @@ public function getStatus(): ?\OpenAPI\Client\Model\InProgressLookupStatusEnum /** * Sets status * - * @param \OpenAPI\Client\Model\InProgressLookupStatusEnum|null $status status + * @param \Bandwidth\Model\InProgressLookupStatusEnum|null $status status * * @return $this */ - public function setStatus(?\OpenAPI\Client\Model\InProgressLookupStatusEnum $status): static + public function setStatus(?\Bandwidth\Model\InProgressLookupStatusEnum $status): static { if (is_null($status)) { throw new InvalidArgumentException('non-nullable status cannot be null'); @@ -336,7 +336,7 @@ public function setStatus(?\OpenAPI\Client\Model\InProgressLookupStatusEnum $sta /** * Gets results * - * @return \OpenAPI\Client\Model\LookupResult[]|null + * @return \Bandwidth\Model\LookupResult[]|null */ public function getResults(): ?array { @@ -346,7 +346,7 @@ public function getResults(): ?array /** * Sets results * - * @param \OpenAPI\Client\Model\LookupResult[]|null $results The carrier information results for the specified telephone number. + * @param \Bandwidth\Model\LookupResult[]|null $results The carrier information results for the specified telephone number. * * @return $this */ diff --git a/src/Model/InProgressLookupStatusEnum.php b/src/Model/InProgressLookupStatusEnum.php index 984c5f7c..14199e80 100644 --- a/src/Model/InProgressLookupStatusEnum.php +++ b/src/Model/InProgressLookupStatusEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * InProgressLookupStatusEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/InboundCallback.php b/src/Model/InboundCallback.php index 7bfea937..0325fddd 100644 --- a/src/Model/InboundCallback.php +++ b/src/Model/InboundCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * InboundCallback Class Doc Comment * * @description Represents an inbound callback. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,10 +61,10 @@ class InboundCallback implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'time' => '\DateTime', - 'type' => '\OpenAPI\Client\Model\InboundCallbackTypeEnum', + 'type' => '\Bandwidth\Model\InboundCallbackTypeEnum', 'to' => 'string', 'description' => 'string', - 'message' => '\OpenAPI\Client\Model\InboundCallbackMessage', + 'message' => '\Bandwidth\Model\InboundCallbackMessage', 'carrier_name' => 'string' ]; @@ -345,9 +345,9 @@ public function setTime(\DateTime $time): static /** * Gets type * - * @return \OpenAPI\Client\Model\InboundCallbackTypeEnum + * @return \Bandwidth\Model\InboundCallbackTypeEnum */ - public function getType(): \OpenAPI\Client\Model\InboundCallbackTypeEnum + public function getType(): \Bandwidth\Model\InboundCallbackTypeEnum { return $this->container['type']; } @@ -355,11 +355,11 @@ public function getType(): \OpenAPI\Client\Model\InboundCallbackTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\InboundCallbackTypeEnum $type type + * @param \Bandwidth\Model\InboundCallbackTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\InboundCallbackTypeEnum $type): static + public function setType(\Bandwidth\Model\InboundCallbackTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); @@ -426,9 +426,9 @@ public function setDescription(string $description): static /** * Gets message * - * @return \OpenAPI\Client\Model\InboundCallbackMessage + * @return \Bandwidth\Model\InboundCallbackMessage */ - public function getMessage(): \OpenAPI\Client\Model\InboundCallbackMessage + public function getMessage(): \Bandwidth\Model\InboundCallbackMessage { return $this->container['message']; } @@ -436,11 +436,11 @@ public function getMessage(): \OpenAPI\Client\Model\InboundCallbackMessage /** * Sets message * - * @param \OpenAPI\Client\Model\InboundCallbackMessage $message message + * @param \Bandwidth\Model\InboundCallbackMessage $message message * * @return $this */ - public function setMessage(\OpenAPI\Client\Model\InboundCallbackMessage $message): static + public function setMessage(\Bandwidth\Model\InboundCallbackMessage $message): static { if (is_null($message)) { throw new InvalidArgumentException('non-nullable message cannot be null'); diff --git a/src/Model/InboundCallbackMessage.php b/src/Model/InboundCallbackMessage.php index 0119a4d5..f85b44bd 100644 --- a/src/Model/InboundCallbackMessage.php +++ b/src/Model/InboundCallbackMessage.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * InboundCallbackMessage Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -64,17 +64,17 @@ class InboundCallbackMessage implements ModelInterface, ArrayAccess, JsonSeriali 'application_id' => 'string', 'time' => '\DateTime', 'segment_count' => 'int', - 'direction' => '\OpenAPI\Client\Model\MessageDirectionEnum', + 'direction' => '\Bandwidth\Model\MessageDirectionEnum', 'to' => 'string[]', 'from' => 'string', 'text' => 'string', 'tag' => 'string', 'media' => 'string[]', - 'priority' => '\OpenAPI\Client\Model\PriorityEnum', - 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', - 'content' => '\OpenAPI\Client\Model\MultiChannelMessageContent', - 'suggestion_response' => '\OpenAPI\Client\Model\RbmSuggestionResponse', - 'location_response' => '\OpenAPI\Client\Model\RbmLocationResponse' + 'priority' => '\Bandwidth\Model\PriorityEnum', + 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum', + 'content' => '\Bandwidth\Model\MultiChannelMessageContent', + 'suggestion_response' => '\Bandwidth\Model\RbmSuggestionResponse', + 'location_response' => '\Bandwidth\Model\RbmLocationResponse' ]; /** @@ -531,9 +531,9 @@ public function setSegmentCount(int $segment_count): static /** * Gets direction * - * @return \OpenAPI\Client\Model\MessageDirectionEnum + * @return \Bandwidth\Model\MessageDirectionEnum */ - public function getDirection(): \OpenAPI\Client\Model\MessageDirectionEnum + public function getDirection(): \Bandwidth\Model\MessageDirectionEnum { return $this->container['direction']; } @@ -541,11 +541,11 @@ public function getDirection(): \OpenAPI\Client\Model\MessageDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\MessageDirectionEnum $direction direction + * @param \Bandwidth\Model\MessageDirectionEnum $direction direction * * @return $this */ - public function setDirection(\OpenAPI\Client\Model\MessageDirectionEnum $direction): static + public function setDirection(\Bandwidth\Model\MessageDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); @@ -695,9 +695,9 @@ public function setMedia(?array $media): static /** * Gets priority * - * @return \OpenAPI\Client\Model\PriorityEnum|null + * @return \Bandwidth\Model\PriorityEnum|null */ - public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum + public function getPriority(): ?\Bandwidth\Model\PriorityEnum { return $this->container['priority']; } @@ -705,11 +705,11 @@ public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum /** * Sets priority * - * @param \OpenAPI\Client\Model\PriorityEnum|null $priority priority + * @param \Bandwidth\Model\PriorityEnum|null $priority priority * * @return $this */ - public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): static + public function setPriority(?\Bandwidth\Model\PriorityEnum $priority): static { if (is_null($priority)) { throw new InvalidArgumentException('non-nullable priority cannot be null'); @@ -722,9 +722,9 @@ public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): stat /** * Gets channel * - * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum|null + * @return \Bandwidth\Model\MultiChannelMessageChannelEnum|null */ - public function getChannel(): ?\OpenAPI\Client\Model\MultiChannelMessageChannelEnum + public function getChannel(): ?\Bandwidth\Model\MultiChannelMessageChannelEnum { return $this->container['channel']; } @@ -732,11 +732,11 @@ public function getChannel(): ?\OpenAPI\Client\Model\MultiChannelMessageChannelE /** * Sets channel * - * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum|null $channel channel + * @param \Bandwidth\Model\MultiChannelMessageChannelEnum|null $channel channel * * @return $this */ - public function setChannel(?\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + public function setChannel(?\Bandwidth\Model\MultiChannelMessageChannelEnum $channel): static { if (is_null($channel)) { throw new InvalidArgumentException('non-nullable channel cannot be null'); @@ -749,9 +749,9 @@ public function setChannel(?\OpenAPI\Client\Model\MultiChannelMessageChannelEnum /** * Gets content * - * @return \OpenAPI\Client\Model\MultiChannelMessageContent|null + * @return \Bandwidth\Model\MultiChannelMessageContent|null */ - public function getContent(): ?\OpenAPI\Client\Model\MultiChannelMessageContent + public function getContent(): ?\Bandwidth\Model\MultiChannelMessageContent { return $this->container['content']; } @@ -759,11 +759,11 @@ public function getContent(): ?\OpenAPI\Client\Model\MultiChannelMessageContent /** * Sets content * - * @param \OpenAPI\Client\Model\MultiChannelMessageContent|null $content content + * @param \Bandwidth\Model\MultiChannelMessageContent|null $content content * * @return $this */ - public function setContent(?\OpenAPI\Client\Model\MultiChannelMessageContent $content): static + public function setContent(?\Bandwidth\Model\MultiChannelMessageContent $content): static { if (is_null($content)) { throw new InvalidArgumentException('non-nullable content cannot be null'); @@ -776,9 +776,9 @@ public function setContent(?\OpenAPI\Client\Model\MultiChannelMessageContent $co /** * Gets suggestion_response * - * @return \OpenAPI\Client\Model\RbmSuggestionResponse|null + * @return \Bandwidth\Model\RbmSuggestionResponse|null */ - public function getSuggestionResponse(): ?\OpenAPI\Client\Model\RbmSuggestionResponse + public function getSuggestionResponse(): ?\Bandwidth\Model\RbmSuggestionResponse { return $this->container['suggestion_response']; } @@ -786,11 +786,11 @@ public function getSuggestionResponse(): ?\OpenAPI\Client\Model\RbmSuggestionRes /** * Sets suggestion_response * - * @param \OpenAPI\Client\Model\RbmSuggestionResponse|null $suggestion_response suggestion_response + * @param \Bandwidth\Model\RbmSuggestionResponse|null $suggestion_response suggestion_response * * @return $this */ - public function setSuggestionResponse(?\OpenAPI\Client\Model\RbmSuggestionResponse $suggestion_response): static + public function setSuggestionResponse(?\Bandwidth\Model\RbmSuggestionResponse $suggestion_response): static { if (is_null($suggestion_response)) { throw new InvalidArgumentException('non-nullable suggestion_response cannot be null'); @@ -803,9 +803,9 @@ public function setSuggestionResponse(?\OpenAPI\Client\Model\RbmSuggestionRespon /** * Gets location_response * - * @return \OpenAPI\Client\Model\RbmLocationResponse|null + * @return \Bandwidth\Model\RbmLocationResponse|null */ - public function getLocationResponse(): ?\OpenAPI\Client\Model\RbmLocationResponse + public function getLocationResponse(): ?\Bandwidth\Model\RbmLocationResponse { return $this->container['location_response']; } @@ -813,11 +813,11 @@ public function getLocationResponse(): ?\OpenAPI\Client\Model\RbmLocationRespons /** * Sets location_response * - * @param \OpenAPI\Client\Model\RbmLocationResponse|null $location_response location_response + * @param \Bandwidth\Model\RbmLocationResponse|null $location_response location_response * * @return $this */ - public function setLocationResponse(?\OpenAPI\Client\Model\RbmLocationResponse $location_response): static + public function setLocationResponse(?\Bandwidth\Model\RbmLocationResponse $location_response): static { if (is_null($location_response)) { throw new InvalidArgumentException('non-nullable location_response cannot be null'); diff --git a/src/Model/InboundCallbackTypeEnum.php b/src/Model/InboundCallbackTypeEnum.php index 7ff174d5..cafd9ceb 100644 --- a/src/Model/InboundCallbackTypeEnum.php +++ b/src/Model/InboundCallbackTypeEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * InboundCallbackTypeEnum Class Doc Comment * * @description The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user's client to a Bandwidth number. - `requested-location-response` indicates a response to a location request sent by the Bandwidth user's client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/InitiateCallback.php b/src/Model/InitiateCallback.php index 7725abdd..851be3dd 100644 --- a/src/Model/InitiateCallback.php +++ b/src/Model/InitiateCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * InitiateCallback Class Doc Comment * * @description The Initiate event is fired when an inbound call is received for a Telephone Number on your Account. It is sent to the URL specified in the application associated with the location (sip-peer) that the called telephone number belongs to. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,12 +66,12 @@ class InitiateCallback implements ModelInterface, ArrayAccess, JsonSerializable 'application_id' => 'string', 'from' => 'string', 'to' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_id' => 'string', 'call_url' => 'string', 'start_time' => '\DateTime', - 'diversion' => '\OpenAPI\Client\Model\Diversion', - 'stir_shaken' => '\OpenAPI\Client\Model\StirShaken', + 'diversion' => '\Bandwidth\Model\Diversion', + 'stir_shaken' => '\Bandwidth\Model\StirShaken', 'uui' => 'string' ]; @@ -518,9 +518,9 @@ public function setTo(?string $to): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -528,11 +528,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); @@ -626,9 +626,9 @@ public function setStartTime(?\DateTime $start_time): static /** * Gets diversion * - * @return \OpenAPI\Client\Model\Diversion|null + * @return \Bandwidth\Model\Diversion|null */ - public function getDiversion(): ?\OpenAPI\Client\Model\Diversion + public function getDiversion(): ?\Bandwidth\Model\Diversion { return $this->container['diversion']; } @@ -636,11 +636,11 @@ public function getDiversion(): ?\OpenAPI\Client\Model\Diversion /** * Sets diversion * - * @param \OpenAPI\Client\Model\Diversion|null $diversion diversion + * @param \Bandwidth\Model\Diversion|null $diversion diversion * * @return $this */ - public function setDiversion(?\OpenAPI\Client\Model\Diversion $diversion): static + public function setDiversion(?\Bandwidth\Model\Diversion $diversion): static { if (is_null($diversion)) { throw new InvalidArgumentException('non-nullable diversion cannot be null'); @@ -653,9 +653,9 @@ public function setDiversion(?\OpenAPI\Client\Model\Diversion $diversion): stati /** * Gets stir_shaken * - * @return \OpenAPI\Client\Model\StirShaken|null + * @return \Bandwidth\Model\StirShaken|null */ - public function getStirShaken(): ?\OpenAPI\Client\Model\StirShaken + public function getStirShaken(): ?\Bandwidth\Model\StirShaken { return $this->container['stir_shaken']; } @@ -663,11 +663,11 @@ public function getStirShaken(): ?\OpenAPI\Client\Model\StirShaken /** * Sets stir_shaken * - * @param \OpenAPI\Client\Model\StirShaken|null $stir_shaken stir_shaken + * @param \Bandwidth\Model\StirShaken|null $stir_shaken stir_shaken * * @return $this */ - public function setStirShaken(?\OpenAPI\Client\Model\StirShaken $stir_shaken): static + public function setStirShaken(?\Bandwidth\Model\StirShaken $stir_shaken): static { if (is_null($stir_shaken)) { throw new InvalidArgumentException('non-nullable stir_shaken cannot be null'); diff --git a/src/Model/LatestMessageDeliveryStatusEnum.php b/src/Model/LatestMessageDeliveryStatusEnum.php index 788b30f7..9c759f2e 100644 --- a/src/Model/LatestMessageDeliveryStatusEnum.php +++ b/src/Model/LatestMessageDeliveryStatusEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * LatestMessageDeliveryStatusEnum Class Doc Comment * * @description [DNI-Only](#section/DNI-Only). The current delivery status of the phone number. - ACTIVE: A message was successfully sent to the number (delivery code 0). - DEACTIVATED: A message was not delivered to a number (delivery code 720) - UNKNOWN: Bandwidth cannot find an delivery status entry for the number. - NOT_ENABLED: The phone number is not enabled for messaging, so there is no delivery status information. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/LineTypeEnum.php b/src/Model/LineTypeEnum.php index 8bd3406b..a89ab78a 100644 --- a/src/Model/LineTypeEnum.php +++ b/src/Model/LineTypeEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * LineTypeEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/Link.php b/src/Model/Link.php index beaf8eca..f2960f3f 100644 --- a/src/Model/Link.php +++ b/src/Model/Link.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * Link Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/LinkSchema.php b/src/Model/LinkSchema.php index de7298c6..55e456f4 100644 --- a/src/Model/LinkSchema.php +++ b/src/Model/LinkSchema.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * LinkSchema Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/LinksObject.php b/src/Model/LinksObject.php index 20bc4282..f99c5c26 100644 --- a/src/Model/LinksObject.php +++ b/src/Model/LinksObject.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * LinksObject Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/ListEndpointsResponse.php b/src/Model/ListEndpointsResponse.php index 4a6a35a2..e7cce0b4 100644 --- a/src/Model/ListEndpointsResponse.php +++ b/src/Model/ListEndpointsResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * ListEndpointsResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,10 +59,10 @@ class ListEndpointsResponse implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPITypes = [ - 'links' => '\OpenAPI\Client\Model\BrtcLink[]', - 'page' => '\OpenAPI\Client\Model\Page', - 'data' => '\OpenAPI\Client\Model\Endpoints[]', - 'errors' => '\OpenAPI\Client\Model\BrtcError[]' + 'links' => '\Bandwidth\Model\BrtcLink[]', + 'page' => '\Bandwidth\Model\Page', + 'data' => '\Bandwidth\Model\Endpoints[]', + 'errors' => '\Bandwidth\Model\BrtcError[]' ]; /** @@ -297,7 +297,7 @@ public function valid(): bool /** * Gets links * - * @return \OpenAPI\Client\Model\BrtcLink[] + * @return \Bandwidth\Model\BrtcLink[] */ public function getLinks(): array { @@ -307,7 +307,7 @@ public function getLinks(): array /** * Sets links * - * @param \OpenAPI\Client\Model\BrtcLink[] $links links + * @param \Bandwidth\Model\BrtcLink[] $links links * * @return $this */ @@ -324,9 +324,9 @@ public function setLinks(array $links): static /** * Gets page * - * @return \OpenAPI\Client\Model\Page|null + * @return \Bandwidth\Model\Page|null */ - public function getPage(): ?\OpenAPI\Client\Model\Page + public function getPage(): ?\Bandwidth\Model\Page { return $this->container['page']; } @@ -334,11 +334,11 @@ public function getPage(): ?\OpenAPI\Client\Model\Page /** * Sets page * - * @param \OpenAPI\Client\Model\Page|null $page page + * @param \Bandwidth\Model\Page|null $page page * * @return $this */ - public function setPage(?\OpenAPI\Client\Model\Page $page): static + public function setPage(?\Bandwidth\Model\Page $page): static { if (is_null($page)) { throw new InvalidArgumentException('non-nullable page cannot be null'); @@ -351,7 +351,7 @@ public function setPage(?\OpenAPI\Client\Model\Page $page): static /** * Gets data * - * @return \OpenAPI\Client\Model\Endpoints[] + * @return \Bandwidth\Model\Endpoints[] */ public function getData(): array { @@ -361,7 +361,7 @@ public function getData(): array /** * Sets data * - * @param \OpenAPI\Client\Model\Endpoints[] $data data + * @param \Bandwidth\Model\Endpoints[] $data data * * @return $this */ @@ -378,7 +378,7 @@ public function setData(array $data): static /** * Gets errors * - * @return \OpenAPI\Client\Model\BrtcError[] + * @return \Bandwidth\Model\BrtcError[] */ public function getErrors(): array { @@ -388,7 +388,7 @@ public function getErrors(): array /** * Sets errors * - * @param \OpenAPI\Client\Model\BrtcError[] $errors errors + * @param \Bandwidth\Model\BrtcError[] $errors errors * * @return $this */ diff --git a/src/Model/ListMessageDirectionEnum.php b/src/Model/ListMessageDirectionEnum.php index 674da8dc..bb9f45fb 100644 --- a/src/Model/ListMessageDirectionEnum.php +++ b/src/Model/ListMessageDirectionEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * ListMessageDirectionEnum Class Doc Comment * * @description The direction of the message. One of INBOUND OUTBOUND. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/ListMessageItem.php b/src/Model/ListMessageItem.php index d404eba1..770aac48 100644 --- a/src/Model/ListMessageItem.php +++ b/src/Model/ListMessageItem.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * ListMessageItem Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -63,9 +63,9 @@ class ListMessageItem implements ModelInterface, ArrayAccess, JsonSerializable 'account_id' => 'string', 'source_tn' => 'string', 'destination_tn' => 'string', - 'message_status' => '\OpenAPI\Client\Model\MessageStatusEnum', - 'message_direction' => '\OpenAPI\Client\Model\ListMessageDirectionEnum', - 'message_type' => '\OpenAPI\Client\Model\MessageTypeEnum', + 'message_status' => '\Bandwidth\Model\MessageStatusEnum', + 'message_direction' => '\Bandwidth\Model\ListMessageDirectionEnum', + 'message_type' => '\Bandwidth\Model\MessageTypeEnum', 'segment_count' => 'int', 'error_code' => 'int', 'receive_time' => '\DateTime', @@ -529,9 +529,9 @@ public function setDestinationTn(?string $destination_tn): static /** * Gets message_status * - * @return \OpenAPI\Client\Model\MessageStatusEnum|null + * @return \Bandwidth\Model\MessageStatusEnum|null */ - public function getMessageStatus(): ?\OpenAPI\Client\Model\MessageStatusEnum + public function getMessageStatus(): ?\Bandwidth\Model\MessageStatusEnum { return $this->container['message_status']; } @@ -539,11 +539,11 @@ public function getMessageStatus(): ?\OpenAPI\Client\Model\MessageStatusEnum /** * Sets message_status * - * @param \OpenAPI\Client\Model\MessageStatusEnum|null $message_status message_status + * @param \Bandwidth\Model\MessageStatusEnum|null $message_status message_status * * @return $this */ - public function setMessageStatus(?\OpenAPI\Client\Model\MessageStatusEnum $message_status): static + public function setMessageStatus(?\Bandwidth\Model\MessageStatusEnum $message_status): static { if (is_null($message_status)) { throw new InvalidArgumentException('non-nullable message_status cannot be null'); @@ -556,9 +556,9 @@ public function setMessageStatus(?\OpenAPI\Client\Model\MessageStatusEnum $messa /** * Gets message_direction * - * @return \OpenAPI\Client\Model\ListMessageDirectionEnum|null + * @return \Bandwidth\Model\ListMessageDirectionEnum|null */ - public function getMessageDirection(): ?\OpenAPI\Client\Model\ListMessageDirectionEnum + public function getMessageDirection(): ?\Bandwidth\Model\ListMessageDirectionEnum { return $this->container['message_direction']; } @@ -566,11 +566,11 @@ public function getMessageDirection(): ?\OpenAPI\Client\Model\ListMessageDirecti /** * Sets message_direction * - * @param \OpenAPI\Client\Model\ListMessageDirectionEnum|null $message_direction message_direction + * @param \Bandwidth\Model\ListMessageDirectionEnum|null $message_direction message_direction * * @return $this */ - public function setMessageDirection(?\OpenAPI\Client\Model\ListMessageDirectionEnum $message_direction): static + public function setMessageDirection(?\Bandwidth\Model\ListMessageDirectionEnum $message_direction): static { if (is_null($message_direction)) { throw new InvalidArgumentException('non-nullable message_direction cannot be null'); @@ -583,9 +583,9 @@ public function setMessageDirection(?\OpenAPI\Client\Model\ListMessageDirectionE /** * Gets message_type * - * @return \OpenAPI\Client\Model\MessageTypeEnum|null + * @return \Bandwidth\Model\MessageTypeEnum|null */ - public function getMessageType(): ?\OpenAPI\Client\Model\MessageTypeEnum + public function getMessageType(): ?\Bandwidth\Model\MessageTypeEnum { return $this->container['message_type']; } @@ -593,11 +593,11 @@ public function getMessageType(): ?\OpenAPI\Client\Model\MessageTypeEnum /** * Sets message_type * - * @param \OpenAPI\Client\Model\MessageTypeEnum|null $message_type message_type + * @param \Bandwidth\Model\MessageTypeEnum|null $message_type message_type * * @return $this */ - public function setMessageType(?\OpenAPI\Client\Model\MessageTypeEnum $message_type): static + public function setMessageType(?\Bandwidth\Model\MessageTypeEnum $message_type): static { if (is_null($message_type)) { throw new InvalidArgumentException('non-nullable message_type cannot be null'); diff --git a/src/Model/LookupErrorResponse.php b/src/Model/LookupErrorResponse.php index 10987aef..7f171441 100644 --- a/src/Model/LookupErrorResponse.php +++ b/src/Model/LookupErrorResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * LookupErrorResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,9 +59,9 @@ class LookupErrorResponse implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ - 'links' => '\OpenAPI\Client\Model\LinkSchema[]', + 'links' => '\Bandwidth\Model\LinkSchema[]', 'data' => 'object', - 'errors' => '\OpenAPI\Client\Model\LookupErrorSchema[]' + 'errors' => '\Bandwidth\Model\LookupErrorSchema[]' ]; /** @@ -281,7 +281,7 @@ public function valid(): bool /** * Gets links * - * @return \OpenAPI\Client\Model\LinkSchema[]|null + * @return \Bandwidth\Model\LinkSchema[]|null */ public function getLinks(): ?array { @@ -291,7 +291,7 @@ public function getLinks(): ?array /** * Sets links * - * @param \OpenAPI\Client\Model\LinkSchema[]|null $links links + * @param \Bandwidth\Model\LinkSchema[]|null $links links * * @return $this */ @@ -335,7 +335,7 @@ public function setData(?object $data): static /** * Gets errors * - * @return \OpenAPI\Client\Model\LookupErrorSchema[]|null + * @return \Bandwidth\Model\LookupErrorSchema[]|null */ public function getErrors(): ?array { @@ -345,7 +345,7 @@ public function getErrors(): ?array /** * Sets errors * - * @param \OpenAPI\Client\Model\LookupErrorSchema[]|null $errors errors + * @param \Bandwidth\Model\LookupErrorSchema[]|null $errors errors * * @return $this */ diff --git a/src/Model/LookupErrorSchema.php b/src/Model/LookupErrorSchema.php index 9561fae5..adb7cd92 100644 --- a/src/Model/LookupErrorSchema.php +++ b/src/Model/LookupErrorSchema.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * LookupErrorSchema Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -62,7 +62,7 @@ class LookupErrorSchema implements ModelInterface, ArrayAccess, JsonSerializable 'code' => 'string', 'description' => 'string', 'type' => 'string', - 'meta' => '\OpenAPI\Client\Model\LookupErrorSchemaMeta' + 'meta' => '\Bandwidth\Model\LookupErrorSchemaMeta' ]; /** @@ -378,9 +378,9 @@ public function setType(string $type): static /** * Gets meta * - * @return \OpenAPI\Client\Model\LookupErrorSchemaMeta|null + * @return \Bandwidth\Model\LookupErrorSchemaMeta|null */ - public function getMeta(): ?\OpenAPI\Client\Model\LookupErrorSchemaMeta + public function getMeta(): ?\Bandwidth\Model\LookupErrorSchemaMeta { return $this->container['meta']; } @@ -388,11 +388,11 @@ public function getMeta(): ?\OpenAPI\Client\Model\LookupErrorSchemaMeta /** * Sets meta * - * @param \OpenAPI\Client\Model\LookupErrorSchemaMeta|null $meta meta + * @param \Bandwidth\Model\LookupErrorSchemaMeta|null $meta meta * * @return $this */ - public function setMeta(?\OpenAPI\Client\Model\LookupErrorSchemaMeta $meta): static + public function setMeta(?\Bandwidth\Model\LookupErrorSchemaMeta $meta): static { if (is_null($meta)) { throw new InvalidArgumentException('non-nullable meta cannot be null'); diff --git a/src/Model/LookupErrorSchemaMeta.php b/src/Model/LookupErrorSchemaMeta.php index c8df17c3..6b5ffd3c 100644 --- a/src/Model/LookupErrorSchemaMeta.php +++ b/src/Model/LookupErrorSchemaMeta.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * LookupErrorSchemaMeta Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/LookupResult.php b/src/Model/LookupResult.php index 4b12517e..bca63923 100644 --- a/src/Model/LookupResult.php +++ b/src/Model/LookupResult.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * LookupResult Class Doc Comment * * @description Carrier information results for the specified telephone number. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,14 +61,14 @@ class LookupResult implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'phone_number' => 'string', - 'line_type' => '\OpenAPI\Client\Model\LineTypeEnum', + 'line_type' => '\Bandwidth\Model\LineTypeEnum', 'messaging_provider' => 'string', 'voice_provider' => 'string', 'country_code_a3' => 'string', 'deactivation_reporter' => 'string', 'deactivation_date' => 'string', - 'deactivation_event' => '\OpenAPI\Client\Model\DeactivationEventEnum', - 'latest_message_delivery_status' => '\OpenAPI\Client\Model\LatestMessageDeliveryStatusEnum', + 'deactivation_event' => '\Bandwidth\Model\DeactivationEventEnum', + 'latest_message_delivery_status' => '\Bandwidth\Model\LatestMessageDeliveryStatusEnum', 'initial_message_delivery_status_date' => '\DateTime', 'latest_message_delivery_status_date' => '\DateTime', 'rcs_enabled' => 'bool' @@ -372,9 +372,9 @@ public function setPhoneNumber(?string $phone_number): static /** * Gets line_type * - * @return \OpenAPI\Client\Model\LineTypeEnum|null + * @return \Bandwidth\Model\LineTypeEnum|null */ - public function getLineType(): ?\OpenAPI\Client\Model\LineTypeEnum + public function getLineType(): ?\Bandwidth\Model\LineTypeEnum { return $this->container['line_type']; } @@ -382,11 +382,11 @@ public function getLineType(): ?\OpenAPI\Client\Model\LineTypeEnum /** * Sets line_type * - * @param \OpenAPI\Client\Model\LineTypeEnum|null $line_type line_type + * @param \Bandwidth\Model\LineTypeEnum|null $line_type line_type * * @return $this */ - public function setLineType(?\OpenAPI\Client\Model\LineTypeEnum $line_type): static + public function setLineType(?\Bandwidth\Model\LineTypeEnum $line_type): static { if (is_null($line_type)) { throw new InvalidArgumentException('non-nullable line_type cannot be null'); @@ -534,9 +534,9 @@ public function setDeactivationDate(?string $deactivation_date): static /** * Gets deactivation_event * - * @return \OpenAPI\Client\Model\DeactivationEventEnum|null + * @return \Bandwidth\Model\DeactivationEventEnum|null */ - public function getDeactivationEvent(): ?\OpenAPI\Client\Model\DeactivationEventEnum + public function getDeactivationEvent(): ?\Bandwidth\Model\DeactivationEventEnum { return $this->container['deactivation_event']; } @@ -544,11 +544,11 @@ public function getDeactivationEvent(): ?\OpenAPI\Client\Model\DeactivationEvent /** * Sets deactivation_event * - * @param \OpenAPI\Client\Model\DeactivationEventEnum|null $deactivation_event deactivation_event + * @param \Bandwidth\Model\DeactivationEventEnum|null $deactivation_event deactivation_event * * @return $this */ - public function setDeactivationEvent(?\OpenAPI\Client\Model\DeactivationEventEnum $deactivation_event): static + public function setDeactivationEvent(?\Bandwidth\Model\DeactivationEventEnum $deactivation_event): static { if (is_null($deactivation_event)) { throw new InvalidArgumentException('non-nullable deactivation_event cannot be null'); @@ -561,9 +561,9 @@ public function setDeactivationEvent(?\OpenAPI\Client\Model\DeactivationEventEnu /** * Gets latest_message_delivery_status * - * @return \OpenAPI\Client\Model\LatestMessageDeliveryStatusEnum|null + * @return \Bandwidth\Model\LatestMessageDeliveryStatusEnum|null */ - public function getLatestMessageDeliveryStatus(): ?\OpenAPI\Client\Model\LatestMessageDeliveryStatusEnum + public function getLatestMessageDeliveryStatus(): ?\Bandwidth\Model\LatestMessageDeliveryStatusEnum { return $this->container['latest_message_delivery_status']; } @@ -571,11 +571,11 @@ public function getLatestMessageDeliveryStatus(): ?\OpenAPI\Client\Model\LatestM /** * Sets latest_message_delivery_status * - * @param \OpenAPI\Client\Model\LatestMessageDeliveryStatusEnum|null $latest_message_delivery_status latest_message_delivery_status + * @param \Bandwidth\Model\LatestMessageDeliveryStatusEnum|null $latest_message_delivery_status latest_message_delivery_status * * @return $this */ - public function setLatestMessageDeliveryStatus(?\OpenAPI\Client\Model\LatestMessageDeliveryStatusEnum $latest_message_delivery_status): static + public function setLatestMessageDeliveryStatus(?\Bandwidth\Model\LatestMessageDeliveryStatusEnum $latest_message_delivery_status): static { if (is_null($latest_message_delivery_status)) { throw new InvalidArgumentException('non-nullable latest_message_delivery_status cannot be null'); diff --git a/src/Model/MachineDetectionCompleteCallback.php b/src/Model/MachineDetectionCompleteCallback.php index d4c9aab8..df540491 100644 --- a/src/Model/MachineDetectionCompleteCallback.php +++ b/src/Model/MachineDetectionCompleteCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MachineDetectionCompleteCallback Class Doc Comment * * @description This event is sent to the url informed when requesting a machine detection operation. It contains the machine detection operation result, which can be: human, answering-machine, silence, timeout, error. This event is not sent when sync answering machine detection mode is chosen. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,14 +66,14 @@ class MachineDetectionCompleteCallback implements ModelInterface, ArrayAccess, J 'application_id' => 'string', 'from' => 'string', 'to' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_id' => 'string', 'call_url' => 'string', 'enqueued_time' => '\DateTime', 'start_time' => '\DateTime', 'answer_time' => '\DateTime', 'tag' => 'string', - 'machine_detection_result' => '\OpenAPI\Client\Model\MachineDetectionResult' + 'machine_detection_result' => '\Bandwidth\Model\MachineDetectionResult' ]; /** @@ -521,9 +521,9 @@ public function setTo(?string $to): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -531,11 +531,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); @@ -731,9 +731,9 @@ public function setTag(?string $tag): static /** * Gets machine_detection_result * - * @return \OpenAPI\Client\Model\MachineDetectionResult|null + * @return \Bandwidth\Model\MachineDetectionResult|null */ - public function getMachineDetectionResult(): ?\OpenAPI\Client\Model\MachineDetectionResult + public function getMachineDetectionResult(): ?\Bandwidth\Model\MachineDetectionResult { return $this->container['machine_detection_result']; } @@ -741,11 +741,11 @@ public function getMachineDetectionResult(): ?\OpenAPI\Client\Model\MachineDetec /** * Sets machine_detection_result * - * @param \OpenAPI\Client\Model\MachineDetectionResult|null $machine_detection_result machine_detection_result + * @param \Bandwidth\Model\MachineDetectionResult|null $machine_detection_result machine_detection_result * * @return $this */ - public function setMachineDetectionResult(?\OpenAPI\Client\Model\MachineDetectionResult $machine_detection_result): static + public function setMachineDetectionResult(?\Bandwidth\Model\MachineDetectionResult $machine_detection_result): static { if (is_null($machine_detection_result)) { array_push($this->openAPINullablesSetToNull, 'machine_detection_result'); diff --git a/src/Model/MachineDetectionConfiguration.php b/src/Model/MachineDetectionConfiguration.php index 68e45493..f590e5e0 100644 --- a/src/Model/MachineDetectionConfiguration.php +++ b/src/Model/MachineDetectionConfiguration.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MachineDetectionConfiguration Class Doc Comment * * @description The machine detection request used to perform <a href='/docs/voice/guides/machineDetection'>machine detection</a> on the call. Currently, there is an issue where decimal values are not getting processed correctly. Please use whole number values. We are working to resolve this issue. Please contact Bandwidth Support if you need more information. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -60,7 +60,7 @@ class MachineDetectionConfiguration implements ModelInterface, ArrayAccess, Json * @var array */ protected static array $openAPITypes = [ - 'mode' => '\OpenAPI\Client\Model\MachineDetectionModeEnum', + 'mode' => '\Bandwidth\Model\MachineDetectionModeEnum', 'detection_timeout' => 'float', 'silence_timeout' => 'float', 'speech_threshold' => 'float', @@ -68,11 +68,11 @@ class MachineDetectionConfiguration implements ModelInterface, ArrayAccess, Json 'machine_speech_end_threshold' => 'float', 'delay_result' => 'bool', 'callback_url' => 'string', - 'callback_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'callback_method' => '\Bandwidth\Model\CallbackMethodEnum', 'username' => 'string', 'password' => 'string', 'fallback_url' => 'string', - 'fallback_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'fallback_method' => '\Bandwidth\Model\CallbackMethodEnum', 'fallback_username' => 'string', 'fallback_password' => 'string' ]; @@ -390,9 +390,9 @@ public function valid(): bool /** * Gets mode * - * @return \OpenAPI\Client\Model\MachineDetectionModeEnum|null + * @return \Bandwidth\Model\MachineDetectionModeEnum|null */ - public function getMode(): ?\OpenAPI\Client\Model\MachineDetectionModeEnum + public function getMode(): ?\Bandwidth\Model\MachineDetectionModeEnum { return $this->container['mode']; } @@ -400,11 +400,11 @@ public function getMode(): ?\OpenAPI\Client\Model\MachineDetectionModeEnum /** * Sets mode * - * @param \OpenAPI\Client\Model\MachineDetectionModeEnum|null $mode mode + * @param \Bandwidth\Model\MachineDetectionModeEnum|null $mode mode * * @return $this */ - public function setMode(?\OpenAPI\Client\Model\MachineDetectionModeEnum $mode): static + public function setMode(?\Bandwidth\Model\MachineDetectionModeEnum $mode): static { if (is_null($mode)) { throw new InvalidArgumentException('non-nullable mode cannot be null'); @@ -659,9 +659,9 @@ public function setCallbackUrl(?string $callback_url): static /** * Gets callback_method * - * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + * @return \Bandwidth\Model\CallbackMethodEnum|null */ - public function getCallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + public function getCallbackMethod(): ?\Bandwidth\Model\CallbackMethodEnum { return $this->container['callback_method']; } @@ -669,11 +669,11 @@ public function getCallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum /** * Sets callback_method * - * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $callback_method callback_method + * @param \Bandwidth\Model\CallbackMethodEnum|null $callback_method callback_method * * @return $this */ - public function setCallbackMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $callback_method): static + public function setCallbackMethod(?\Bandwidth\Model\CallbackMethodEnum $callback_method): static { if (is_null($callback_method)) { array_push($this->openAPINullablesSetToNull, 'callback_method'); @@ -807,9 +807,9 @@ public function setFallbackUrl(?string $fallback_url): static /** * Gets fallback_method * - * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + * @return \Bandwidth\Model\CallbackMethodEnum|null */ - public function getFallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + public function getFallbackMethod(): ?\Bandwidth\Model\CallbackMethodEnum { return $this->container['fallback_method']; } @@ -817,11 +817,11 @@ public function getFallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum /** * Sets fallback_method * - * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $fallback_method fallback_method + * @param \Bandwidth\Model\CallbackMethodEnum|null $fallback_method fallback_method * * @return $this */ - public function setFallbackMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $fallback_method): static + public function setFallbackMethod(?\Bandwidth\Model\CallbackMethodEnum $fallback_method): static { if (is_null($fallback_method)) { array_push($this->openAPINullablesSetToNull, 'fallback_method'); diff --git a/src/Model/MachineDetectionModeEnum.php b/src/Model/MachineDetectionModeEnum.php index 40b806e5..ad65f80f 100644 --- a/src/Model/MachineDetectionModeEnum.php +++ b/src/Model/MachineDetectionModeEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * MachineDetectionModeEnum Class Doc Comment * * @description The machine detection mode. If set to 'async', the detection result will be sent in a 'machineDetectionComplete' callback. If set to 'sync', the 'answer' callback will wait for the machine detection to complete and will include its result. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/MachineDetectionResult.php b/src/Model/MachineDetectionResult.php index a3a3d3f7..a7ed156d 100644 --- a/src/Model/MachineDetectionResult.php +++ b/src/Model/MachineDetectionResult.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MachineDetectionResult Class Doc Comment * * @description (optional) if machine detection was requested in sync mode, the result will be specified here. Possible values are the same as the async counterpart: Machine Detection Complete - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/Media.php b/src/Model/Media.php index 43626ef4..28a58d18 100644 --- a/src/Model/Media.php +++ b/src/Model/Media.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * Media Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/Message.php b/src/Model/Message.php index 811f95b5..dd4e4c7f 100644 --- a/src/Model/Message.php +++ b/src/Model/Message.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * Message Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -64,13 +64,13 @@ class Message implements ModelInterface, ArrayAccess, JsonSerializable 'application_id' => 'string', 'time' => '\DateTime', 'segment_count' => 'int', - 'direction' => '\OpenAPI\Client\Model\MessageDirectionEnum', + 'direction' => '\Bandwidth\Model\MessageDirectionEnum', 'to' => 'string[]', 'from' => 'string', 'media' => 'string[]', 'text' => 'string', 'tag' => 'string', - 'priority' => '\OpenAPI\Client\Model\PriorityEnum', + 'priority' => '\Bandwidth\Model\PriorityEnum', 'expiration' => '\DateTime' ]; @@ -486,9 +486,9 @@ public function setSegmentCount(?int $segment_count): static /** * Gets direction * - * @return \OpenAPI\Client\Model\MessageDirectionEnum|null + * @return \Bandwidth\Model\MessageDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\MessageDirectionEnum + public function getDirection(): ?\Bandwidth\Model\MessageDirectionEnum { return $this->container['direction']; } @@ -496,11 +496,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\MessageDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\MessageDirectionEnum|null $direction direction + * @param \Bandwidth\Model\MessageDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\MessageDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\MessageDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); @@ -652,9 +652,9 @@ public function setTag(?string $tag): static /** * Gets priority * - * @return \OpenAPI\Client\Model\PriorityEnum|null + * @return \Bandwidth\Model\PriorityEnum|null */ - public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum + public function getPriority(): ?\Bandwidth\Model\PriorityEnum { return $this->container['priority']; } @@ -662,11 +662,11 @@ public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum /** * Sets priority * - * @param \OpenAPI\Client\Model\PriorityEnum|null $priority priority + * @param \Bandwidth\Model\PriorityEnum|null $priority priority * * @return $this */ - public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): static + public function setPriority(?\Bandwidth\Model\PriorityEnum $priority): static { if (is_null($priority)) { throw new InvalidArgumentException('non-nullable priority cannot be null'); diff --git a/src/Model/MessageDirectionEnum.php b/src/Model/MessageDirectionEnum.php index 7f5b7021..18013b8c 100644 --- a/src/Model/MessageDirectionEnum.php +++ b/src/Model/MessageDirectionEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * MessageDirectionEnum Class Doc Comment * * @description The direction of the message. One of in out. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/MessageRequest.php b/src/Model/MessageRequest.php index 9039ea61..9afe9464 100644 --- a/src/Model/MessageRequest.php +++ b/src/Model/MessageRequest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MessageRequest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -65,7 +65,7 @@ class MessageRequest implements ModelInterface, ArrayAccess, JsonSerializable 'text' => 'string', 'media' => 'string[]', 'tag' => 'string', - 'priority' => '\OpenAPI\Client\Model\PriorityEnum', + 'priority' => '\Bandwidth\Model\PriorityEnum', 'expiration' => '\DateTime' ]; @@ -497,9 +497,9 @@ public function setTag(?string $tag): static /** * Gets priority * - * @return \OpenAPI\Client\Model\PriorityEnum|null + * @return \Bandwidth\Model\PriorityEnum|null */ - public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum + public function getPriority(): ?\Bandwidth\Model\PriorityEnum { return $this->container['priority']; } @@ -507,11 +507,11 @@ public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum /** * Sets priority * - * @param \OpenAPI\Client\Model\PriorityEnum|null $priority priority + * @param \Bandwidth\Model\PriorityEnum|null $priority priority * * @return $this */ - public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): static + public function setPriority(?\Bandwidth\Model\PriorityEnum $priority): static { if (is_null($priority)) { throw new InvalidArgumentException('non-nullable priority cannot be null'); diff --git a/src/Model/MessageStatusEnum.php b/src/Model/MessageStatusEnum.php index aa1756fb..3cb2f232 100644 --- a/src/Model/MessageStatusEnum.php +++ b/src/Model/MessageStatusEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * MessageStatusEnum Class Doc Comment * * @description The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/MessageTypeEnum.php b/src/Model/MessageTypeEnum.php index 4a1b1df3..9a51804c 100644 --- a/src/Model/MessageTypeEnum.php +++ b/src/Model/MessageTypeEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * MessageTypeEnum Class Doc Comment * * @description The type of message. Either SMS or MMS. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/MessagesList.php b/src/Model/MessagesList.php index f2bc0cd3..6fd7c2ca 100644 --- a/src/Model/MessagesList.php +++ b/src/Model/MessagesList.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MessagesList Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -60,8 +60,8 @@ class MessagesList implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'total_count' => 'int', - 'page_info' => '\OpenAPI\Client\Model\PageInfo', - 'messages' => '\OpenAPI\Client\Model\ListMessageItem[]' + 'page_info' => '\Bandwidth\Model\PageInfo', + 'messages' => '\Bandwidth\Model\ListMessageItem[]' ]; /** @@ -308,9 +308,9 @@ public function setTotalCount(?int $total_count): static /** * Gets page_info * - * @return \OpenAPI\Client\Model\PageInfo|null + * @return \Bandwidth\Model\PageInfo|null */ - public function getPageInfo(): ?\OpenAPI\Client\Model\PageInfo + public function getPageInfo(): ?\Bandwidth\Model\PageInfo { return $this->container['page_info']; } @@ -318,11 +318,11 @@ public function getPageInfo(): ?\OpenAPI\Client\Model\PageInfo /** * Sets page_info * - * @param \OpenAPI\Client\Model\PageInfo|null $page_info page_info + * @param \Bandwidth\Model\PageInfo|null $page_info page_info * * @return $this */ - public function setPageInfo(?\OpenAPI\Client\Model\PageInfo $page_info): static + public function setPageInfo(?\Bandwidth\Model\PageInfo $page_info): static { if (is_null($page_info)) { throw new InvalidArgumentException('non-nullable page_info cannot be null'); @@ -335,7 +335,7 @@ public function setPageInfo(?\OpenAPI\Client\Model\PageInfo $page_info): static /** * Gets messages * - * @return \OpenAPI\Client\Model\ListMessageItem[]|null + * @return \Bandwidth\Model\ListMessageItem[]|null */ public function getMessages(): ?array { @@ -345,7 +345,7 @@ public function getMessages(): ?array /** * Sets messages * - * @param \OpenAPI\Client\Model\ListMessageItem[]|null $messages messages + * @param \Bandwidth\Model\ListMessageItem[]|null $messages messages * * @return $this */ diff --git a/src/Model/MessagingCodeResponse.php b/src/Model/MessagingCodeResponse.php index 581e27b1..2f51d034 100644 --- a/src/Model/MessagingCodeResponse.php +++ b/src/Model/MessagingCodeResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MessagingCodeResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/MessagingRequestError.php b/src/Model/MessagingRequestError.php index b96cb649..3caae141 100644 --- a/src/Model/MessagingRequestError.php +++ b/src/Model/MessagingRequestError.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MessagingRequestError Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/MfaForbiddenRequestError.php b/src/Model/MfaForbiddenRequestError.php index 0dedab5c..83fecbd4 100644 --- a/src/Model/MfaForbiddenRequestError.php +++ b/src/Model/MfaForbiddenRequestError.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MfaForbiddenRequestError Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/MfaRequestError.php b/src/Model/MfaRequestError.php index e02cc463..96525b7a 100644 --- a/src/Model/MfaRequestError.php +++ b/src/Model/MfaRequestError.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MfaRequestError Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/MfaUnauthorizedRequestError.php b/src/Model/MfaUnauthorizedRequestError.php index 39dea859..23df0729 100644 --- a/src/Model/MfaUnauthorizedRequestError.php +++ b/src/Model/MfaUnauthorizedRequestError.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MfaUnauthorizedRequestError Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/MmsMessageContent.php b/src/Model/MmsMessageContent.php index f255b293..d4fee67b 100644 --- a/src/Model/MmsMessageContent.php +++ b/src/Model/MmsMessageContent.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MmsMessageContent Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -60,7 +60,7 @@ class MmsMessageContent implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'text' => 'string', - 'media' => '\OpenAPI\Client\Model\MmsMessageContentFile[]' + 'media' => '\Bandwidth\Model\MmsMessageContentFile[]' ]; /** @@ -309,7 +309,7 @@ public function setText(?string $text): static /** * Gets media * - * @return \OpenAPI\Client\Model\MmsMessageContentFile[]|null + * @return \Bandwidth\Model\MmsMessageContentFile[]|null */ public function getMedia(): ?array { @@ -319,7 +319,7 @@ public function getMedia(): ?array /** * Sets media * - * @param \OpenAPI\Client\Model\MmsMessageContentFile[]|null $media media + * @param \Bandwidth\Model\MmsMessageContentFile[]|null $media media * * @return $this */ diff --git a/src/Model/MmsMessageContentFile.php b/src/Model/MmsMessageContentFile.php index 4948e3c6..fb0a2778 100644 --- a/src/Model/MmsMessageContentFile.php +++ b/src/Model/MmsMessageContentFile.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MmsMessageContentFile Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index 2ec30f63..6a75f36b 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client\Model + * @package Bandwidth\Model * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * Interface abstracting model access. * - * @package OpenAPI\Client\Model + * @package Bandwidth\Model * @author OpenAPI Generator team */ interface ModelInterface diff --git a/src/Model/MultiChannelAction.php b/src/Model/MultiChannelAction.php index 1bf63d2e..a9221efd 100644 --- a/src/Model/MultiChannelAction.php +++ b/src/Model/MultiChannelAction.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelAction Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,7 +59,7 @@ class MultiChannelAction implements ModelInterface, ArrayAccess, JsonSerializabl * @var array */ protected static array $openAPITypes = [ - 'type' => '\OpenAPI\Client\Model\RbmActionTypeEnum', + 'type' => '\Bandwidth\Model\RbmActionTypeEnum', 'text' => 'string', 'postback_data' => 'string', 'phone_number' => 'string', @@ -71,8 +71,8 @@ class MultiChannelAction implements ModelInterface, ArrayAccess, JsonSerializabl 'end_time' => '\DateTime', 'description' => 'string', 'url' => 'string', - 'application' => '\OpenAPI\Client\Model\RbmOpenUrlEnum', - 'webview_view_mode' => '\OpenAPI\Client\Model\RbmWebViewEnum' + 'application' => '\Bandwidth\Model\RbmOpenUrlEnum', + 'webview_view_mode' => '\Bandwidth\Model\RbmWebViewEnum' ]; /** @@ -421,9 +421,9 @@ public function valid(): bool /** * Gets type * - * @return \OpenAPI\Client\Model\RbmActionTypeEnum + * @return \Bandwidth\Model\RbmActionTypeEnum */ - public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum + public function getType(): \Bandwidth\Model\RbmActionTypeEnum { return $this->container['type']; } @@ -431,11 +431,11 @@ public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\RbmActionTypeEnum $type type + * @param \Bandwidth\Model\RbmActionTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\RbmActionTypeEnum $type): static + public function setType(\Bandwidth\Model\RbmActionTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); @@ -769,9 +769,9 @@ public function setUrl(string $url): static /** * Gets application * - * @return \OpenAPI\Client\Model\RbmOpenUrlEnum|null + * @return \Bandwidth\Model\RbmOpenUrlEnum|null */ - public function getApplication(): ?\OpenAPI\Client\Model\RbmOpenUrlEnum + public function getApplication(): ?\Bandwidth\Model\RbmOpenUrlEnum { return $this->container['application']; } @@ -779,11 +779,11 @@ public function getApplication(): ?\OpenAPI\Client\Model\RbmOpenUrlEnum /** * Sets application * - * @param \OpenAPI\Client\Model\RbmOpenUrlEnum|null $application application + * @param \Bandwidth\Model\RbmOpenUrlEnum|null $application application * * @return $this */ - public function setApplication(?\OpenAPI\Client\Model\RbmOpenUrlEnum $application): static + public function setApplication(?\Bandwidth\Model\RbmOpenUrlEnum $application): static { if (is_null($application)) { throw new InvalidArgumentException('non-nullable application cannot be null'); @@ -796,9 +796,9 @@ public function setApplication(?\OpenAPI\Client\Model\RbmOpenUrlEnum $applicatio /** * Gets webview_view_mode * - * @return \OpenAPI\Client\Model\RbmWebViewEnum|null + * @return \Bandwidth\Model\RbmWebViewEnum|null */ - public function getWebviewViewMode(): ?\OpenAPI\Client\Model\RbmWebViewEnum + public function getWebviewViewMode(): ?\Bandwidth\Model\RbmWebViewEnum { return $this->container['webview_view_mode']; } @@ -806,11 +806,11 @@ public function getWebviewViewMode(): ?\OpenAPI\Client\Model\RbmWebViewEnum /** * Sets webview_view_mode * - * @param \OpenAPI\Client\Model\RbmWebViewEnum|null $webview_view_mode webview_view_mode + * @param \Bandwidth\Model\RbmWebViewEnum|null $webview_view_mode webview_view_mode * * @return $this */ - public function setWebviewViewMode(?\OpenAPI\Client\Model\RbmWebViewEnum $webview_view_mode): static + public function setWebviewViewMode(?\Bandwidth\Model\RbmWebViewEnum $webview_view_mode): static { if (is_null($webview_view_mode)) { throw new InvalidArgumentException('non-nullable webview_view_mode cannot be null'); diff --git a/src/Model/MultiChannelActionCalendarEvent.php b/src/Model/MultiChannelActionCalendarEvent.php index 991d9f49..502981cc 100644 --- a/src/Model/MultiChannelActionCalendarEvent.php +++ b/src/Model/MultiChannelActionCalendarEvent.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelActionCalendarEvent Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,7 +59,7 @@ class MultiChannelActionCalendarEvent implements ModelInterface, ArrayAccess, Js * @var array */ protected static array $openAPITypes = [ - 'type' => '\OpenAPI\Client\Model\RbmActionTypeEnum', + 'type' => '\Bandwidth\Model\RbmActionTypeEnum', 'text' => 'string', 'postback_data' => 'string', 'title' => 'string', @@ -343,9 +343,9 @@ public function valid(): bool /** * Gets type * - * @return \OpenAPI\Client\Model\RbmActionTypeEnum + * @return \Bandwidth\Model\RbmActionTypeEnum */ - public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum + public function getType(): \Bandwidth\Model\RbmActionTypeEnum { return $this->container['type']; } @@ -353,11 +353,11 @@ public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\RbmActionTypeEnum $type type + * @param \Bandwidth\Model\RbmActionTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\RbmActionTypeEnum $type): static + public function setType(\Bandwidth\Model\RbmActionTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); diff --git a/src/Model/MultiChannelChannelListMMSObject.php b/src/Model/MultiChannelChannelListMMSObject.php index 902b6858..294b600b 100644 --- a/src/Model/MultiChannelChannelListMMSObject.php +++ b/src/Model/MultiChannelChannelListMMSObject.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelChannelListMMSObject Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,8 +61,8 @@ class MultiChannelChannelListMMSObject implements ModelInterface, ArrayAccess, J protected static array $openAPITypes = [ 'from' => 'string', 'application_id' => 'string', - 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', - 'content' => '\OpenAPI\Client\Model\MmsMessageContent' + 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum', + 'content' => '\Bandwidth\Model\MmsMessageContent' ]; /** @@ -354,9 +354,9 @@ public function setApplicationId(string $application_id): static /** * Gets channel * - * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + * @return \Bandwidth\Model\MultiChannelMessageChannelEnum */ - public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + public function getChannel(): \Bandwidth\Model\MultiChannelMessageChannelEnum { return $this->container['channel']; } @@ -364,11 +364,11 @@ public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEn /** * Sets channel * - * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * @param \Bandwidth\Model\MultiChannelMessageChannelEnum $channel channel * * @return $this */ - public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + public function setChannel(\Bandwidth\Model\MultiChannelMessageChannelEnum $channel): static { if (is_null($channel)) { throw new InvalidArgumentException('non-nullable channel cannot be null'); @@ -381,9 +381,9 @@ public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum /** * Gets content * - * @return \OpenAPI\Client\Model\MmsMessageContent + * @return \Bandwidth\Model\MmsMessageContent */ - public function getContent(): \OpenAPI\Client\Model\MmsMessageContent + public function getContent(): \Bandwidth\Model\MmsMessageContent { return $this->container['content']; } @@ -391,11 +391,11 @@ public function getContent(): \OpenAPI\Client\Model\MmsMessageContent /** * Sets content * - * @param \OpenAPI\Client\Model\MmsMessageContent $content content + * @param \Bandwidth\Model\MmsMessageContent $content content * * @return $this */ - public function setContent(\OpenAPI\Client\Model\MmsMessageContent $content): static + public function setContent(\Bandwidth\Model\MmsMessageContent $content): static { if (is_null($content)) { throw new InvalidArgumentException('non-nullable content cannot be null'); diff --git a/src/Model/MultiChannelChannelListMMSResponseObject.php b/src/Model/MultiChannelChannelListMMSResponseObject.php index fb406129..031a89f0 100644 --- a/src/Model/MultiChannelChannelListMMSResponseObject.php +++ b/src/Model/MultiChannelChannelListMMSResponseObject.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelChannelListMMSResponseObject Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,8 +61,8 @@ class MultiChannelChannelListMMSResponseObject implements ModelInterface, ArrayA protected static array $openAPITypes = [ 'from' => 'string', 'application_id' => 'string', - 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', - 'content' => '\OpenAPI\Client\Model\MmsMessageContent', + 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum', + 'content' => '\Bandwidth\Model\MmsMessageContent', 'owner' => 'string' ]; @@ -364,9 +364,9 @@ public function setApplicationId(string $application_id): static /** * Gets channel * - * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + * @return \Bandwidth\Model\MultiChannelMessageChannelEnum */ - public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + public function getChannel(): \Bandwidth\Model\MultiChannelMessageChannelEnum { return $this->container['channel']; } @@ -374,11 +374,11 @@ public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEn /** * Sets channel * - * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * @param \Bandwidth\Model\MultiChannelMessageChannelEnum $channel channel * * @return $this */ - public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + public function setChannel(\Bandwidth\Model\MultiChannelMessageChannelEnum $channel): static { if (is_null($channel)) { throw new InvalidArgumentException('non-nullable channel cannot be null'); @@ -391,9 +391,9 @@ public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum /** * Gets content * - * @return \OpenAPI\Client\Model\MmsMessageContent + * @return \Bandwidth\Model\MmsMessageContent */ - public function getContent(): \OpenAPI\Client\Model\MmsMessageContent + public function getContent(): \Bandwidth\Model\MmsMessageContent { return $this->container['content']; } @@ -401,11 +401,11 @@ public function getContent(): \OpenAPI\Client\Model\MmsMessageContent /** * Sets content * - * @param \OpenAPI\Client\Model\MmsMessageContent $content content + * @param \Bandwidth\Model\MmsMessageContent $content content * * @return $this */ - public function setContent(\OpenAPI\Client\Model\MmsMessageContent $content): static + public function setContent(\Bandwidth\Model\MmsMessageContent $content): static { if (is_null($content)) { throw new InvalidArgumentException('non-nullable content cannot be null'); diff --git a/src/Model/MultiChannelChannelListObjectBase.php b/src/Model/MultiChannelChannelListObjectBase.php index acc08da9..2caba3e9 100644 --- a/src/Model/MultiChannelChannelListObjectBase.php +++ b/src/Model/MultiChannelChannelListObjectBase.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelChannelListObjectBase Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,7 +61,7 @@ class MultiChannelChannelListObjectBase implements ModelInterface, ArrayAccess, protected static array $openAPITypes = [ 'from' => 'string', 'application_id' => 'string', - 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum' + 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum' ]; /** @@ -344,9 +344,9 @@ public function setApplicationId(string $application_id): static /** * Gets channel * - * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + * @return \Bandwidth\Model\MultiChannelMessageChannelEnum */ - public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + public function getChannel(): \Bandwidth\Model\MultiChannelMessageChannelEnum { return $this->container['channel']; } @@ -354,11 +354,11 @@ public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEn /** * Sets channel * - * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * @param \Bandwidth\Model\MultiChannelMessageChannelEnum $channel channel * * @return $this */ - public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + public function setChannel(\Bandwidth\Model\MultiChannelMessageChannelEnum $channel): static { if (is_null($channel)) { throw new InvalidArgumentException('non-nullable channel cannot be null'); diff --git a/src/Model/MultiChannelChannelListOwnerObject.php b/src/Model/MultiChannelChannelListOwnerObject.php index ea86e0dc..7c396157 100644 --- a/src/Model/MultiChannelChannelListOwnerObject.php +++ b/src/Model/MultiChannelChannelListOwnerObject.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelChannelListOwnerObject Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/MultiChannelChannelListRBMObject.php b/src/Model/MultiChannelChannelListRBMObject.php index 9a3e97c4..9bd9312b 100644 --- a/src/Model/MultiChannelChannelListRBMObject.php +++ b/src/Model/MultiChannelChannelListRBMObject.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelChannelListRBMObject Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,8 +61,8 @@ class MultiChannelChannelListRBMObject implements ModelInterface, ArrayAccess, J protected static array $openAPITypes = [ 'from' => 'string', 'application_id' => 'string', - 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', - 'content' => '\OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent' + 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum', + 'content' => '\Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent' ]; /** @@ -354,9 +354,9 @@ public function setApplicationId(string $application_id): static /** * Gets channel * - * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + * @return \Bandwidth\Model\MultiChannelMessageChannelEnum */ - public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + public function getChannel(): \Bandwidth\Model\MultiChannelMessageChannelEnum { return $this->container['channel']; } @@ -364,11 +364,11 @@ public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEn /** * Sets channel * - * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * @param \Bandwidth\Model\MultiChannelMessageChannelEnum $channel channel * * @return $this */ - public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + public function setChannel(\Bandwidth\Model\MultiChannelMessageChannelEnum $channel): static { if (is_null($channel)) { throw new InvalidArgumentException('non-nullable channel cannot be null'); @@ -381,9 +381,9 @@ public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum /** * Gets content * - * @return \OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent + * @return \Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent */ - public function getContent(): \OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent + public function getContent(): \Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent { return $this->container['content']; } @@ -391,11 +391,11 @@ public function getContent(): \OpenAPI\Client\Model\MultiChannelChannelListRBMOb /** * Sets content * - * @param \OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent $content content + * @param \Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent $content content * * @return $this */ - public function setContent(\OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent $content): static + public function setContent(\Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent $content): static { if (is_null($content)) { throw new InvalidArgumentException('non-nullable content cannot be null'); diff --git a/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php b/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php index e7b18bb3..64a34935 100644 --- a/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php +++ b/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelChannelListRBMObjectAllOfContent Class Doc Comment * * @description The content of the message. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,13 +61,13 @@ class MultiChannelChannelListRBMObjectAllOfContent implements ModelInterface, Ar */ protected static array $openAPITypes = [ 'text' => 'string', - 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]', - 'media' => '\OpenAPI\Client\Model\RbmMessageContentFile[]', - 'orientation' => '\OpenAPI\Client\Model\StandaloneCardOrientationEnum', - 'thumbnail_image_alignment' => '\OpenAPI\Client\Model\ThumbnailAlignmentEnum', - 'card_content' => '\OpenAPI\Client\Model\RbmCardContent', - 'card_width' => '\OpenAPI\Client\Model\CardWidthEnum', - 'card_contents' => '\OpenAPI\Client\Model\RbmCardContent[]' + 'suggestions' => '\Bandwidth\Model\MultiChannelAction[]', + 'media' => '\Bandwidth\Model\RbmMessageContentFile[]', + 'orientation' => '\Bandwidth\Model\StandaloneCardOrientationEnum', + 'thumbnail_image_alignment' => '\Bandwidth\Model\ThumbnailAlignmentEnum', + 'card_content' => '\Bandwidth\Model\RbmCardContent', + 'card_width' => '\Bandwidth\Model\CardWidthEnum', + 'card_contents' => '\Bandwidth\Model\RbmCardContent[]' ]; /** @@ -382,7 +382,7 @@ public function setText(string $text): static /** * Gets suggestions * - * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + * @return \Bandwidth\Model\MultiChannelAction[]|null */ public function getSuggestions(): ?array { @@ -392,7 +392,7 @@ public function getSuggestions(): ?array /** * Sets suggestions * - * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. * * @return $this */ @@ -413,7 +413,7 @@ public function setSuggestions(?array $suggestions): static /** * Gets media * - * @return \OpenAPI\Client\Model\RbmMessageContentFile[] + * @return \Bandwidth\Model\RbmMessageContentFile[] */ public function getMedia(): array { @@ -423,7 +423,7 @@ public function getMedia(): array /** * Sets media * - * @param \OpenAPI\Client\Model\RbmMessageContentFile[] $media media + * @param \Bandwidth\Model\RbmMessageContentFile[] $media media * * @return $this */ @@ -440,9 +440,9 @@ public function setMedia(array $media): static /** * Gets orientation * - * @return \OpenAPI\Client\Model\StandaloneCardOrientationEnum + * @return \Bandwidth\Model\StandaloneCardOrientationEnum */ - public function getOrientation(): \OpenAPI\Client\Model\StandaloneCardOrientationEnum + public function getOrientation(): \Bandwidth\Model\StandaloneCardOrientationEnum { return $this->container['orientation']; } @@ -450,11 +450,11 @@ public function getOrientation(): \OpenAPI\Client\Model\StandaloneCardOrientatio /** * Sets orientation * - * @param \OpenAPI\Client\Model\StandaloneCardOrientationEnum $orientation orientation + * @param \Bandwidth\Model\StandaloneCardOrientationEnum $orientation orientation * * @return $this */ - public function setOrientation(\OpenAPI\Client\Model\StandaloneCardOrientationEnum $orientation): static + public function setOrientation(\Bandwidth\Model\StandaloneCardOrientationEnum $orientation): static { if (is_null($orientation)) { throw new InvalidArgumentException('non-nullable orientation cannot be null'); @@ -467,9 +467,9 @@ public function setOrientation(\OpenAPI\Client\Model\StandaloneCardOrientationEn /** * Gets thumbnail_image_alignment * - * @return \OpenAPI\Client\Model\ThumbnailAlignmentEnum|null + * @return \Bandwidth\Model\ThumbnailAlignmentEnum|null */ - public function getThumbnailImageAlignment(): ?\OpenAPI\Client\Model\ThumbnailAlignmentEnum + public function getThumbnailImageAlignment(): ?\Bandwidth\Model\ThumbnailAlignmentEnum { return $this->container['thumbnail_image_alignment']; } @@ -477,11 +477,11 @@ public function getThumbnailImageAlignment(): ?\OpenAPI\Client\Model\ThumbnailAl /** * Sets thumbnail_image_alignment * - * @param \OpenAPI\Client\Model\ThumbnailAlignmentEnum|null $thumbnail_image_alignment thumbnail_image_alignment + * @param \Bandwidth\Model\ThumbnailAlignmentEnum|null $thumbnail_image_alignment thumbnail_image_alignment * * @return $this */ - public function setThumbnailImageAlignment(?\OpenAPI\Client\Model\ThumbnailAlignmentEnum $thumbnail_image_alignment): static + public function setThumbnailImageAlignment(?\Bandwidth\Model\ThumbnailAlignmentEnum $thumbnail_image_alignment): static { if (is_null($thumbnail_image_alignment)) { throw new InvalidArgumentException('non-nullable thumbnail_image_alignment cannot be null'); @@ -494,9 +494,9 @@ public function setThumbnailImageAlignment(?\OpenAPI\Client\Model\ThumbnailAlign /** * Gets card_content * - * @return \OpenAPI\Client\Model\RbmCardContent + * @return \Bandwidth\Model\RbmCardContent */ - public function getCardContent(): \OpenAPI\Client\Model\RbmCardContent + public function getCardContent(): \Bandwidth\Model\RbmCardContent { return $this->container['card_content']; } @@ -504,11 +504,11 @@ public function getCardContent(): \OpenAPI\Client\Model\RbmCardContent /** * Sets card_content * - * @param \OpenAPI\Client\Model\RbmCardContent $card_content card_content + * @param \Bandwidth\Model\RbmCardContent $card_content card_content * * @return $this */ - public function setCardContent(\OpenAPI\Client\Model\RbmCardContent $card_content): static + public function setCardContent(\Bandwidth\Model\RbmCardContent $card_content): static { if (is_null($card_content)) { throw new InvalidArgumentException('non-nullable card_content cannot be null'); @@ -521,9 +521,9 @@ public function setCardContent(\OpenAPI\Client\Model\RbmCardContent $card_conten /** * Gets card_width * - * @return \OpenAPI\Client\Model\CardWidthEnum + * @return \Bandwidth\Model\CardWidthEnum */ - public function getCardWidth(): \OpenAPI\Client\Model\CardWidthEnum + public function getCardWidth(): \Bandwidth\Model\CardWidthEnum { return $this->container['card_width']; } @@ -531,11 +531,11 @@ public function getCardWidth(): \OpenAPI\Client\Model\CardWidthEnum /** * Sets card_width * - * @param \OpenAPI\Client\Model\CardWidthEnum $card_width card_width + * @param \Bandwidth\Model\CardWidthEnum $card_width card_width * * @return $this */ - public function setCardWidth(\OpenAPI\Client\Model\CardWidthEnum $card_width): static + public function setCardWidth(\Bandwidth\Model\CardWidthEnum $card_width): static { if (is_null($card_width)) { throw new InvalidArgumentException('non-nullable card_width cannot be null'); @@ -548,7 +548,7 @@ public function setCardWidth(\OpenAPI\Client\Model\CardWidthEnum $card_width): s /** * Gets card_contents * - * @return \OpenAPI\Client\Model\RbmCardContent[] + * @return \Bandwidth\Model\RbmCardContent[] */ public function getCardContents(): array { @@ -558,7 +558,7 @@ public function getCardContents(): array /** * Sets card_contents * - * @param \OpenAPI\Client\Model\RbmCardContent[] $card_contents card_contents + * @param \Bandwidth\Model\RbmCardContent[] $card_contents card_contents * * @return $this */ diff --git a/src/Model/MultiChannelChannelListRBMResponseObject.php b/src/Model/MultiChannelChannelListRBMResponseObject.php index 48298d40..f3c5ecf0 100644 --- a/src/Model/MultiChannelChannelListRBMResponseObject.php +++ b/src/Model/MultiChannelChannelListRBMResponseObject.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelChannelListRBMResponseObject Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,8 +61,8 @@ class MultiChannelChannelListRBMResponseObject implements ModelInterface, ArrayA protected static array $openAPITypes = [ 'from' => 'string', 'application_id' => 'string', - 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', - 'content' => '\OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent', + 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum', + 'content' => '\Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent', 'owner' => 'string' ]; @@ -364,9 +364,9 @@ public function setApplicationId(string $application_id): static /** * Gets channel * - * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + * @return \Bandwidth\Model\MultiChannelMessageChannelEnum */ - public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + public function getChannel(): \Bandwidth\Model\MultiChannelMessageChannelEnum { return $this->container['channel']; } @@ -374,11 +374,11 @@ public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEn /** * Sets channel * - * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * @param \Bandwidth\Model\MultiChannelMessageChannelEnum $channel channel * * @return $this */ - public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + public function setChannel(\Bandwidth\Model\MultiChannelMessageChannelEnum $channel): static { if (is_null($channel)) { throw new InvalidArgumentException('non-nullable channel cannot be null'); @@ -391,9 +391,9 @@ public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum /** * Gets content * - * @return \OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent + * @return \Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent */ - public function getContent(): \OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent + public function getContent(): \Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent { return $this->container['content']; } @@ -401,11 +401,11 @@ public function getContent(): \OpenAPI\Client\Model\MultiChannelChannelListRBMOb /** * Sets content * - * @param \OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent $content content + * @param \Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent $content content * * @return $this */ - public function setContent(\OpenAPI\Client\Model\MultiChannelChannelListRBMObjectAllOfContent $content): static + public function setContent(\Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent $content): static { if (is_null($content)) { throw new InvalidArgumentException('non-nullable content cannot be null'); diff --git a/src/Model/MultiChannelChannelListRequestObject.php b/src/Model/MultiChannelChannelListRequestObject.php index 681e2ac9..0f24829c 100644 --- a/src/Model/MultiChannelChannelListRequestObject.php +++ b/src/Model/MultiChannelChannelListRequestObject.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelChannelListRequestObject Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,8 +61,8 @@ class MultiChannelChannelListRequestObject implements ModelInterface, ArrayAcces protected static array $openAPITypes = [ 'from' => 'string', 'application_id' => 'string', - 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', - 'content' => '\OpenAPI\Client\Model\MmsMessageContent' + 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum', + 'content' => '\Bandwidth\Model\MmsMessageContent' ]; /** @@ -360,9 +360,9 @@ public function setApplicationId(string $application_id): static /** * Gets channel * - * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + * @return \Bandwidth\Model\MultiChannelMessageChannelEnum */ - public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + public function getChannel(): \Bandwidth\Model\MultiChannelMessageChannelEnum { return $this->container['channel']; } @@ -370,11 +370,11 @@ public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEn /** * Sets channel * - * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * @param \Bandwidth\Model\MultiChannelMessageChannelEnum $channel channel * * @return $this */ - public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + public function setChannel(\Bandwidth\Model\MultiChannelMessageChannelEnum $channel): static { if (is_null($channel)) { throw new InvalidArgumentException('non-nullable channel cannot be null'); @@ -387,9 +387,9 @@ public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum /** * Gets content * - * @return \OpenAPI\Client\Model\MmsMessageContent + * @return \Bandwidth\Model\MmsMessageContent */ - public function getContent(): \OpenAPI\Client\Model\MmsMessageContent + public function getContent(): \Bandwidth\Model\MmsMessageContent { return $this->container['content']; } @@ -397,11 +397,11 @@ public function getContent(): \OpenAPI\Client\Model\MmsMessageContent /** * Sets content * - * @param \OpenAPI\Client\Model\MmsMessageContent $content content + * @param \Bandwidth\Model\MmsMessageContent $content content * * @return $this */ - public function setContent(\OpenAPI\Client\Model\MmsMessageContent $content): static + public function setContent(\Bandwidth\Model\MmsMessageContent $content): static { if (is_null($content)) { throw new InvalidArgumentException('non-nullable content cannot be null'); diff --git a/src/Model/MultiChannelChannelListResponseObject.php b/src/Model/MultiChannelChannelListResponseObject.php index 038544bf..dbead3ff 100644 --- a/src/Model/MultiChannelChannelListResponseObject.php +++ b/src/Model/MultiChannelChannelListResponseObject.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelChannelListResponseObject Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,8 +61,8 @@ class MultiChannelChannelListResponseObject implements ModelInterface, ArrayAcce protected static array $openAPITypes = [ 'from' => 'string', 'application_id' => 'string', - 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', - 'content' => '\OpenAPI\Client\Model\MmsMessageContent', + 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum', + 'content' => '\Bandwidth\Model\MmsMessageContent', 'owner' => 'string' ]; @@ -370,9 +370,9 @@ public function setApplicationId(string $application_id): static /** * Gets channel * - * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + * @return \Bandwidth\Model\MultiChannelMessageChannelEnum */ - public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + public function getChannel(): \Bandwidth\Model\MultiChannelMessageChannelEnum { return $this->container['channel']; } @@ -380,11 +380,11 @@ public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEn /** * Sets channel * - * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * @param \Bandwidth\Model\MultiChannelMessageChannelEnum $channel channel * * @return $this */ - public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + public function setChannel(\Bandwidth\Model\MultiChannelMessageChannelEnum $channel): static { if (is_null($channel)) { throw new InvalidArgumentException('non-nullable channel cannot be null'); @@ -397,9 +397,9 @@ public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum /** * Gets content * - * @return \OpenAPI\Client\Model\MmsMessageContent + * @return \Bandwidth\Model\MmsMessageContent */ - public function getContent(): \OpenAPI\Client\Model\MmsMessageContent + public function getContent(): \Bandwidth\Model\MmsMessageContent { return $this->container['content']; } @@ -407,11 +407,11 @@ public function getContent(): \OpenAPI\Client\Model\MmsMessageContent /** * Sets content * - * @param \OpenAPI\Client\Model\MmsMessageContent $content content + * @param \Bandwidth\Model\MmsMessageContent $content content * * @return $this */ - public function setContent(\OpenAPI\Client\Model\MmsMessageContent $content): static + public function setContent(\Bandwidth\Model\MmsMessageContent $content): static { if (is_null($content)) { throw new InvalidArgumentException('non-nullable content cannot be null'); diff --git a/src/Model/MultiChannelChannelListSMSObject.php b/src/Model/MultiChannelChannelListSMSObject.php index 535094eb..408faec0 100644 --- a/src/Model/MultiChannelChannelListSMSObject.php +++ b/src/Model/MultiChannelChannelListSMSObject.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelChannelListSMSObject Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,8 +61,8 @@ class MultiChannelChannelListSMSObject implements ModelInterface, ArrayAccess, J protected static array $openAPITypes = [ 'from' => 'string', 'application_id' => 'string', - 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', - 'content' => '\OpenAPI\Client\Model\SmsMessageContent' + 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum', + 'content' => '\Bandwidth\Model\SmsMessageContent' ]; /** @@ -354,9 +354,9 @@ public function setApplicationId(string $application_id): static /** * Gets channel * - * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + * @return \Bandwidth\Model\MultiChannelMessageChannelEnum */ - public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + public function getChannel(): \Bandwidth\Model\MultiChannelMessageChannelEnum { return $this->container['channel']; } @@ -364,11 +364,11 @@ public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEn /** * Sets channel * - * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * @param \Bandwidth\Model\MultiChannelMessageChannelEnum $channel channel * * @return $this */ - public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + public function setChannel(\Bandwidth\Model\MultiChannelMessageChannelEnum $channel): static { if (is_null($channel)) { throw new InvalidArgumentException('non-nullable channel cannot be null'); @@ -381,9 +381,9 @@ public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum /** * Gets content * - * @return \OpenAPI\Client\Model\SmsMessageContent + * @return \Bandwidth\Model\SmsMessageContent */ - public function getContent(): \OpenAPI\Client\Model\SmsMessageContent + public function getContent(): \Bandwidth\Model\SmsMessageContent { return $this->container['content']; } @@ -391,11 +391,11 @@ public function getContent(): \OpenAPI\Client\Model\SmsMessageContent /** * Sets content * - * @param \OpenAPI\Client\Model\SmsMessageContent $content content + * @param \Bandwidth\Model\SmsMessageContent $content content * * @return $this */ - public function setContent(\OpenAPI\Client\Model\SmsMessageContent $content): static + public function setContent(\Bandwidth\Model\SmsMessageContent $content): static { if (is_null($content)) { throw new InvalidArgumentException('non-nullable content cannot be null'); diff --git a/src/Model/MultiChannelChannelListSMSResponseObject.php b/src/Model/MultiChannelChannelListSMSResponseObject.php index ba2c4fce..bae669d6 100644 --- a/src/Model/MultiChannelChannelListSMSResponseObject.php +++ b/src/Model/MultiChannelChannelListSMSResponseObject.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelChannelListSMSResponseObject Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,8 +61,8 @@ class MultiChannelChannelListSMSResponseObject implements ModelInterface, ArrayA protected static array $openAPITypes = [ 'from' => 'string', 'application_id' => 'string', - 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum', - 'content' => '\OpenAPI\Client\Model\SmsMessageContent', + 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum', + 'content' => '\Bandwidth\Model\SmsMessageContent', 'owner' => 'string' ]; @@ -364,9 +364,9 @@ public function setApplicationId(string $application_id): static /** * Gets channel * - * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + * @return \Bandwidth\Model\MultiChannelMessageChannelEnum */ - public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEnum + public function getChannel(): \Bandwidth\Model\MultiChannelMessageChannelEnum { return $this->container['channel']; } @@ -374,11 +374,11 @@ public function getChannel(): \OpenAPI\Client\Model\MultiChannelMessageChannelEn /** * Sets channel * - * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel channel + * @param \Bandwidth\Model\MultiChannelMessageChannelEnum $channel channel * * @return $this */ - public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + public function setChannel(\Bandwidth\Model\MultiChannelMessageChannelEnum $channel): static { if (is_null($channel)) { throw new InvalidArgumentException('non-nullable channel cannot be null'); @@ -391,9 +391,9 @@ public function setChannel(\OpenAPI\Client\Model\MultiChannelMessageChannelEnum /** * Gets content * - * @return \OpenAPI\Client\Model\SmsMessageContent + * @return \Bandwidth\Model\SmsMessageContent */ - public function getContent(): \OpenAPI\Client\Model\SmsMessageContent + public function getContent(): \Bandwidth\Model\SmsMessageContent { return $this->container['content']; } @@ -401,11 +401,11 @@ public function getContent(): \OpenAPI\Client\Model\SmsMessageContent /** * Sets content * - * @param \OpenAPI\Client\Model\SmsMessageContent $content content + * @param \Bandwidth\Model\SmsMessageContent $content content * * @return $this */ - public function setContent(\OpenAPI\Client\Model\SmsMessageContent $content): static + public function setContent(\Bandwidth\Model\SmsMessageContent $content): static { if (is_null($content)) { throw new InvalidArgumentException('non-nullable content cannot be null'); diff --git a/src/Model/MultiChannelError.php b/src/Model/MultiChannelError.php index 28abd251..576c4e1e 100644 --- a/src/Model/MultiChannelError.php +++ b/src/Model/MultiChannelError.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelError Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,9 +59,9 @@ class MultiChannelError implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'links' => '\OpenAPI\Client\Model\Link[]', + 'links' => '\Bandwidth\Model\Link[]', 'data' => 'object', - 'errors' => '\OpenAPI\Client\Model\ErrorObject[]' + 'errors' => '\Bandwidth\Model\ErrorObject[]' ]; /** @@ -281,7 +281,7 @@ public function valid(): bool /** * Gets links * - * @return \OpenAPI\Client\Model\Link[]|null + * @return \Bandwidth\Model\Link[]|null */ public function getLinks(): ?array { @@ -291,7 +291,7 @@ public function getLinks(): ?array /** * Sets links * - * @param \OpenAPI\Client\Model\Link[]|null $links links + * @param \Bandwidth\Model\Link[]|null $links links * * @return $this */ @@ -342,7 +342,7 @@ public function setData(?object $data): static /** * Gets errors * - * @return \OpenAPI\Client\Model\ErrorObject[]|null + * @return \Bandwidth\Model\ErrorObject[]|null */ public function getErrors(): ?array { @@ -352,7 +352,7 @@ public function getErrors(): ?array /** * Sets errors * - * @param \OpenAPI\Client\Model\ErrorObject[]|null $errors errors + * @param \Bandwidth\Model\ErrorObject[]|null $errors errors * * @return $this */ diff --git a/src/Model/MultiChannelMessageChannelEnum.php b/src/Model/MultiChannelMessageChannelEnum.php index 3ca97007..7e2169d5 100644 --- a/src/Model/MultiChannelMessageChannelEnum.php +++ b/src/Model/MultiChannelMessageChannelEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * MultiChannelMessageChannelEnum Class Doc Comment * * @description The channel of the multi-channel message. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/MultiChannelMessageContent.php b/src/Model/MultiChannelMessageContent.php index 1fc7dfa1..b3ff7ab0 100644 --- a/src/Model/MultiChannelMessageContent.php +++ b/src/Model/MultiChannelMessageContent.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelMessageContent Class Doc Comment * * @description The structure of the content field of a multichannel message. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,7 +61,7 @@ class MultiChannelMessageContent implements ModelInterface, ArrayAccess, JsonSer */ protected static array $openAPITypes = [ 'text' => 'string', - 'media' => '\OpenAPI\Client\Model\RbmMessageContentFile' + 'media' => '\Bandwidth\Model\RbmMessageContentFile' ]; /** @@ -302,9 +302,9 @@ public function setText(?string $text): static /** * Gets media * - * @return \OpenAPI\Client\Model\RbmMessageContentFile|null + * @return \Bandwidth\Model\RbmMessageContentFile|null */ - public function getMedia(): ?\OpenAPI\Client\Model\RbmMessageContentFile + public function getMedia(): ?\Bandwidth\Model\RbmMessageContentFile { return $this->container['media']; } @@ -312,11 +312,11 @@ public function getMedia(): ?\OpenAPI\Client\Model\RbmMessageContentFile /** * Sets media * - * @param \OpenAPI\Client\Model\RbmMessageContentFile|null $media media + * @param \Bandwidth\Model\RbmMessageContentFile|null $media media * * @return $this */ - public function setMedia(?\OpenAPI\Client\Model\RbmMessageContentFile $media): static + public function setMedia(?\Bandwidth\Model\RbmMessageContentFile $media): static { if (is_null($media)) { throw new InvalidArgumentException('non-nullable media cannot be null'); diff --git a/src/Model/MultiChannelMessageRequest.php b/src/Model/MultiChannelMessageRequest.php index 946646bb..22379b96 100644 --- a/src/Model/MultiChannelMessageRequest.php +++ b/src/Model/MultiChannelMessageRequest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelMessageRequest Class Doc Comment * * @description Multi-Channel Message Request - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,9 +61,9 @@ class MultiChannelMessageRequest implements ModelInterface, ArrayAccess, JsonSer */ protected static array $openAPITypes = [ 'to' => 'string', - 'channel_list' => '\OpenAPI\Client\Model\MultiChannelChannelListRequestObject[]', + 'channel_list' => '\Bandwidth\Model\MultiChannelChannelListRequestObject[]', 'tag' => 'string', - 'priority' => '\OpenAPI\Client\Model\PriorityEnum', + 'priority' => '\Bandwidth\Model\PriorityEnum', 'expiration' => '\DateTime' ]; @@ -333,7 +333,7 @@ public function setTo(string $to): static /** * Gets channel_list * - * @return \OpenAPI\Client\Model\MultiChannelChannelListRequestObject[] + * @return \Bandwidth\Model\MultiChannelChannelListRequestObject[] */ public function getChannelList(): array { @@ -343,7 +343,7 @@ public function getChannelList(): array /** * Sets channel_list * - * @param \OpenAPI\Client\Model\MultiChannelChannelListRequestObject[] $channel_list A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. + * @param \Bandwidth\Model\MultiChannelChannelListRequestObject[] $channel_list A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. * * @return $this */ @@ -391,9 +391,9 @@ public function setTag(?string $tag): static /** * Gets priority * - * @return \OpenAPI\Client\Model\PriorityEnum|null + * @return \Bandwidth\Model\PriorityEnum|null */ - public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum + public function getPriority(): ?\Bandwidth\Model\PriorityEnum { return $this->container['priority']; } @@ -401,11 +401,11 @@ public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum /** * Sets priority * - * @param \OpenAPI\Client\Model\PriorityEnum|null $priority priority + * @param \Bandwidth\Model\PriorityEnum|null $priority priority * * @return $this */ - public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): static + public function setPriority(?\Bandwidth\Model\PriorityEnum $priority): static { if (is_null($priority)) { throw new InvalidArgumentException('non-nullable priority cannot be null'); diff --git a/src/Model/MultiChannelMessageResponseData.php b/src/Model/MultiChannelMessageResponseData.php index a922b82e..bece48ca 100644 --- a/src/Model/MultiChannelMessageResponseData.php +++ b/src/Model/MultiChannelMessageResponseData.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * MultiChannelMessageResponseData Class Doc Comment * * @description The data returned in a multichannel message response. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -62,11 +62,11 @@ class MultiChannelMessageResponseData implements ModelInterface, ArrayAccess, Js protected static array $openAPITypes = [ 'id' => 'string', 'time' => '\DateTime', - 'direction' => '\OpenAPI\Client\Model\MessageDirectionEnum', + 'direction' => '\Bandwidth\Model\MessageDirectionEnum', 'to' => 'string[]', - 'channel_list' => '\OpenAPI\Client\Model\MultiChannelChannelListResponseObject[]', + 'channel_list' => '\Bandwidth\Model\MultiChannelChannelListResponseObject[]', 'tag' => 'string', - 'priority' => '\OpenAPI\Client\Model\PriorityEnum', + 'priority' => '\Bandwidth\Model\PriorityEnum', 'expiration' => '\DateTime' ]; @@ -390,9 +390,9 @@ public function setTime(\DateTime $time): static /** * Gets direction * - * @return \OpenAPI\Client\Model\MessageDirectionEnum + * @return \Bandwidth\Model\MessageDirectionEnum */ - public function getDirection(): \OpenAPI\Client\Model\MessageDirectionEnum + public function getDirection(): \Bandwidth\Model\MessageDirectionEnum { return $this->container['direction']; } @@ -400,11 +400,11 @@ public function getDirection(): \OpenAPI\Client\Model\MessageDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\MessageDirectionEnum $direction direction + * @param \Bandwidth\Model\MessageDirectionEnum $direction direction * * @return $this */ - public function setDirection(\OpenAPI\Client\Model\MessageDirectionEnum $direction): static + public function setDirection(\Bandwidth\Model\MessageDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); @@ -446,7 +446,7 @@ public function setTo(array $to): static /** * Gets channel_list * - * @return \OpenAPI\Client\Model\MultiChannelChannelListResponseObject[] + * @return \Bandwidth\Model\MultiChannelChannelListResponseObject[] */ public function getChannelList(): array { @@ -456,7 +456,7 @@ public function getChannelList(): array /** * Sets channel_list * - * @param \OpenAPI\Client\Model\MultiChannelChannelListResponseObject[] $channel_list A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. + * @param \Bandwidth\Model\MultiChannelChannelListResponseObject[] $channel_list A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. * * @return $this */ @@ -504,9 +504,9 @@ public function setTag(?string $tag): static /** * Gets priority * - * @return \OpenAPI\Client\Model\PriorityEnum|null + * @return \Bandwidth\Model\PriorityEnum|null */ - public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum + public function getPriority(): ?\Bandwidth\Model\PriorityEnum { return $this->container['priority']; } @@ -514,11 +514,11 @@ public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum /** * Sets priority * - * @param \OpenAPI\Client\Model\PriorityEnum|null $priority priority + * @param \Bandwidth\Model\PriorityEnum|null $priority priority * * @return $this */ - public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): static + public function setPriority(?\Bandwidth\Model\PriorityEnum $priority): static { if (is_null($priority)) { throw new InvalidArgumentException('non-nullable priority cannot be null'); diff --git a/src/Model/OptInWorkflow.php b/src/Model/OptInWorkflow.php index c2bea953..0b46ddc6 100644 --- a/src/Model/OptInWorkflow.php +++ b/src/Model/OptInWorkflow.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * OptInWorkflow Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/Page.php b/src/Model/Page.php index b6bf2228..31592b50 100644 --- a/src/Model/Page.php +++ b/src/Model/Page.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * Page Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/PageInfo.php b/src/Model/PageInfo.php index a189b58f..5d8e6a82 100644 --- a/src/Model/PageInfo.php +++ b/src/Model/PageInfo.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * PageInfo Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/PriorityEnum.php b/src/Model/PriorityEnum.php index 69a4272d..8d67af45 100644 --- a/src/Model/PriorityEnum.php +++ b/src/Model/PriorityEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * PriorityEnum Class Doc Comment * * @description Specifies the message's sending priority with respect to other messages in your account. For best results and optimal throughput, reserve the 'high' priority setting for critical messages only. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/ProductTypeEnum.php b/src/Model/ProductTypeEnum.php index 7e92d72d..fe32e99f 100644 --- a/src/Model/ProductTypeEnum.php +++ b/src/Model/ProductTypeEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * ProductTypeEnum Class Doc Comment * * @description The type of product associated with the message. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/RbmActionBase.php b/src/Model/RbmActionBase.php index faa4fe19..69713879 100644 --- a/src/Model/RbmActionBase.php +++ b/src/Model/RbmActionBase.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmActionBase Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,7 +59,7 @@ class RbmActionBase implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => '\OpenAPI\Client\Model\RbmActionTypeEnum', + 'type' => '\Bandwidth\Model\RbmActionTypeEnum', 'text' => 'string', 'postback_data' => 'string' ]; @@ -298,9 +298,9 @@ public function valid(): bool /** * Gets type * - * @return \OpenAPI\Client\Model\RbmActionTypeEnum + * @return \Bandwidth\Model\RbmActionTypeEnum */ - public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum + public function getType(): \Bandwidth\Model\RbmActionTypeEnum { return $this->container['type']; } @@ -308,11 +308,11 @@ public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\RbmActionTypeEnum $type type + * @param \Bandwidth\Model\RbmActionTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\RbmActionTypeEnum $type): static + public function setType(\Bandwidth\Model\RbmActionTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); diff --git a/src/Model/RbmActionDial.php b/src/Model/RbmActionDial.php index 5ee6effb..4139d7e5 100644 --- a/src/Model/RbmActionDial.php +++ b/src/Model/RbmActionDial.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmActionDial Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,7 +59,7 @@ class RbmActionDial implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => '\OpenAPI\Client\Model\RbmActionTypeEnum', + 'type' => '\Bandwidth\Model\RbmActionTypeEnum', 'text' => 'string', 'postback_data' => 'string', 'phone_number' => 'string' @@ -308,9 +308,9 @@ public function valid(): bool /** * Gets type * - * @return \OpenAPI\Client\Model\RbmActionTypeEnum + * @return \Bandwidth\Model\RbmActionTypeEnum */ - public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum + public function getType(): \Bandwidth\Model\RbmActionTypeEnum { return $this->container['type']; } @@ -318,11 +318,11 @@ public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\RbmActionTypeEnum $type type + * @param \Bandwidth\Model\RbmActionTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\RbmActionTypeEnum $type): static + public function setType(\Bandwidth\Model\RbmActionTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); diff --git a/src/Model/RbmActionOpenUrl.php b/src/Model/RbmActionOpenUrl.php index b536cf5d..a1e29523 100644 --- a/src/Model/RbmActionOpenUrl.php +++ b/src/Model/RbmActionOpenUrl.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmActionOpenUrl Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,12 +59,12 @@ class RbmActionOpenUrl implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'type' => '\OpenAPI\Client\Model\RbmActionTypeEnum', + 'type' => '\Bandwidth\Model\RbmActionTypeEnum', 'text' => 'string', 'postback_data' => 'string', 'url' => 'string', - 'application' => '\OpenAPI\Client\Model\RbmOpenUrlEnum', - 'webview_view_mode' => '\OpenAPI\Client\Model\RbmWebViewEnum' + 'application' => '\Bandwidth\Model\RbmOpenUrlEnum', + 'webview_view_mode' => '\Bandwidth\Model\RbmWebViewEnum' ]; /** @@ -326,9 +326,9 @@ public function valid(): bool /** * Gets type * - * @return \OpenAPI\Client\Model\RbmActionTypeEnum + * @return \Bandwidth\Model\RbmActionTypeEnum */ - public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum + public function getType(): \Bandwidth\Model\RbmActionTypeEnum { return $this->container['type']; } @@ -336,11 +336,11 @@ public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\RbmActionTypeEnum $type type + * @param \Bandwidth\Model\RbmActionTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\RbmActionTypeEnum $type): static + public function setType(\Bandwidth\Model\RbmActionTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); @@ -446,9 +446,9 @@ public function setUrl(string $url): static /** * Gets application * - * @return \OpenAPI\Client\Model\RbmOpenUrlEnum|null + * @return \Bandwidth\Model\RbmOpenUrlEnum|null */ - public function getApplication(): ?\OpenAPI\Client\Model\RbmOpenUrlEnum + public function getApplication(): ?\Bandwidth\Model\RbmOpenUrlEnum { return $this->container['application']; } @@ -456,11 +456,11 @@ public function getApplication(): ?\OpenAPI\Client\Model\RbmOpenUrlEnum /** * Sets application * - * @param \OpenAPI\Client\Model\RbmOpenUrlEnum|null $application application + * @param \Bandwidth\Model\RbmOpenUrlEnum|null $application application * * @return $this */ - public function setApplication(?\OpenAPI\Client\Model\RbmOpenUrlEnum $application): static + public function setApplication(?\Bandwidth\Model\RbmOpenUrlEnum $application): static { if (is_null($application)) { throw new InvalidArgumentException('non-nullable application cannot be null'); @@ -473,9 +473,9 @@ public function setApplication(?\OpenAPI\Client\Model\RbmOpenUrlEnum $applicatio /** * Gets webview_view_mode * - * @return \OpenAPI\Client\Model\RbmWebViewEnum|null + * @return \Bandwidth\Model\RbmWebViewEnum|null */ - public function getWebviewViewMode(): ?\OpenAPI\Client\Model\RbmWebViewEnum + public function getWebviewViewMode(): ?\Bandwidth\Model\RbmWebViewEnum { return $this->container['webview_view_mode']; } @@ -483,11 +483,11 @@ public function getWebviewViewMode(): ?\OpenAPI\Client\Model\RbmWebViewEnum /** * Sets webview_view_mode * - * @param \OpenAPI\Client\Model\RbmWebViewEnum|null $webview_view_mode webview_view_mode + * @param \Bandwidth\Model\RbmWebViewEnum|null $webview_view_mode webview_view_mode * * @return $this */ - public function setWebviewViewMode(?\OpenAPI\Client\Model\RbmWebViewEnum $webview_view_mode): static + public function setWebviewViewMode(?\Bandwidth\Model\RbmWebViewEnum $webview_view_mode): static { if (is_null($webview_view_mode)) { throw new InvalidArgumentException('non-nullable webview_view_mode cannot be null'); diff --git a/src/Model/RbmActionTypeEnum.php b/src/Model/RbmActionTypeEnum.php index 377f3c2c..e804b570 100644 --- a/src/Model/RbmActionTypeEnum.php +++ b/src/Model/RbmActionTypeEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * RbmActionTypeEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/RbmActionViewLocation.php b/src/Model/RbmActionViewLocation.php index ada6cbd9..665739f3 100644 --- a/src/Model/RbmActionViewLocation.php +++ b/src/Model/RbmActionViewLocation.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmActionViewLocation Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,7 +59,7 @@ class RbmActionViewLocation implements ModelInterface, ArrayAccess, JsonSerializ * @var array */ protected static array $openAPITypes = [ - 'type' => '\OpenAPI\Client\Model\RbmActionTypeEnum', + 'type' => '\Bandwidth\Model\RbmActionTypeEnum', 'text' => 'string', 'postback_data' => 'string', 'latitude' => 'float', @@ -329,9 +329,9 @@ public function valid(): bool /** * Gets type * - * @return \OpenAPI\Client\Model\RbmActionTypeEnum + * @return \Bandwidth\Model\RbmActionTypeEnum */ - public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum + public function getType(): \Bandwidth\Model\RbmActionTypeEnum { return $this->container['type']; } @@ -339,11 +339,11 @@ public function getType(): \OpenAPI\Client\Model\RbmActionTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\RbmActionTypeEnum $type type + * @param \Bandwidth\Model\RbmActionTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\RbmActionTypeEnum $type): static + public function setType(\Bandwidth\Model\RbmActionTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); diff --git a/src/Model/RbmCardContent.php b/src/Model/RbmCardContent.php index 8a228a75..15e577f7 100644 --- a/src/Model/RbmCardContent.php +++ b/src/Model/RbmCardContent.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmCardContent Class Doc Comment * * @description Must contain at least one of title, description, or media to be valid. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -62,8 +62,8 @@ class RbmCardContent implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPITypes = [ 'title' => 'string', 'description' => 'string', - 'media' => '\OpenAPI\Client\Model\RbmCardContentMedia', - 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]' + 'media' => '\Bandwidth\Model\RbmCardContentMedia', + 'suggestions' => '\Bandwidth\Model\MultiChannelAction[]' ]; /** @@ -363,9 +363,9 @@ public function setDescription(?string $description): static /** * Gets media * - * @return \OpenAPI\Client\Model\RbmCardContentMedia|null + * @return \Bandwidth\Model\RbmCardContentMedia|null */ - public function getMedia(): ?\OpenAPI\Client\Model\RbmCardContentMedia + public function getMedia(): ?\Bandwidth\Model\RbmCardContentMedia { return $this->container['media']; } @@ -373,11 +373,11 @@ public function getMedia(): ?\OpenAPI\Client\Model\RbmCardContentMedia /** * Sets media * - * @param \OpenAPI\Client\Model\RbmCardContentMedia|null $media media + * @param \Bandwidth\Model\RbmCardContentMedia|null $media media * * @return $this */ - public function setMedia(?\OpenAPI\Client\Model\RbmCardContentMedia $media): static + public function setMedia(?\Bandwidth\Model\RbmCardContentMedia $media): static { if (is_null($media)) { throw new InvalidArgumentException('non-nullable media cannot be null'); @@ -390,7 +390,7 @@ public function setMedia(?\OpenAPI\Client\Model\RbmCardContentMedia $media): sta /** * Gets suggestions * - * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + * @return \Bandwidth\Model\MultiChannelAction[]|null */ public function getSuggestions(): ?array { @@ -400,7 +400,7 @@ public function getSuggestions(): ?array /** * Sets suggestions * - * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient that will be displayed on the rich card. + * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient that will be displayed on the rich card. * * @return $this */ diff --git a/src/Model/RbmCardContentMedia.php b/src/Model/RbmCardContentMedia.php index 038404fc..9a017c99 100644 --- a/src/Model/RbmCardContentMedia.php +++ b/src/Model/RbmCardContentMedia.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmCardContentMedia Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,7 +61,7 @@ class RbmCardContentMedia implements ModelInterface, ArrayAccess, JsonSerializab protected static array $openAPITypes = [ 'file_url' => 'string', 'thumbnail_url' => 'string', - 'height' => '\OpenAPI\Client\Model\RbmMediaHeightEnum' + 'height' => '\Bandwidth\Model\RbmMediaHeightEnum' ]; /** @@ -357,9 +357,9 @@ public function setThumbnailUrl(?string $thumbnail_url): static /** * Gets height * - * @return \OpenAPI\Client\Model\RbmMediaHeightEnum + * @return \Bandwidth\Model\RbmMediaHeightEnum */ - public function getHeight(): \OpenAPI\Client\Model\RbmMediaHeightEnum + public function getHeight(): \Bandwidth\Model\RbmMediaHeightEnum { return $this->container['height']; } @@ -367,11 +367,11 @@ public function getHeight(): \OpenAPI\Client\Model\RbmMediaHeightEnum /** * Sets height * - * @param \OpenAPI\Client\Model\RbmMediaHeightEnum $height height + * @param \Bandwidth\Model\RbmMediaHeightEnum $height height * * @return $this */ - public function setHeight(\OpenAPI\Client\Model\RbmMediaHeightEnum $height): static + public function setHeight(\Bandwidth\Model\RbmMediaHeightEnum $height): static { if (is_null($height)) { throw new InvalidArgumentException('non-nullable height cannot be null'); diff --git a/src/Model/RbmLocationResponse.php b/src/Model/RbmLocationResponse.php index e625c543..e668dbdb 100644 --- a/src/Model/RbmLocationResponse.php +++ b/src/Model/RbmLocationResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmLocationResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/RbmMediaHeightEnum.php b/src/Model/RbmMediaHeightEnum.php index 31380061..2bb905df 100644 --- a/src/Model/RbmMediaHeightEnum.php +++ b/src/Model/RbmMediaHeightEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * RbmMediaHeightEnum Class Doc Comment * * @description The height of the media. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/RbmMessageCarouselCard.php b/src/Model/RbmMessageCarouselCard.php index 710446b1..454a33ab 100644 --- a/src/Model/RbmMessageCarouselCard.php +++ b/src/Model/RbmMessageCarouselCard.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmMessageCarouselCard Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,9 +59,9 @@ class RbmMessageCarouselCard implements ModelInterface, ArrayAccess, JsonSeriali * @var array */ protected static array $openAPITypes = [ - 'card_width' => '\OpenAPI\Client\Model\CardWidthEnum', - 'card_contents' => '\OpenAPI\Client\Model\RbmCardContent[]', - 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]' + 'card_width' => '\Bandwidth\Model\CardWidthEnum', + 'card_contents' => '\Bandwidth\Model\RbmCardContent[]', + 'suggestions' => '\Bandwidth\Model\MultiChannelAction[]' ]; /** @@ -299,9 +299,9 @@ public function valid(): bool /** * Gets card_width * - * @return \OpenAPI\Client\Model\CardWidthEnum + * @return \Bandwidth\Model\CardWidthEnum */ - public function getCardWidth(): \OpenAPI\Client\Model\CardWidthEnum + public function getCardWidth(): \Bandwidth\Model\CardWidthEnum { return $this->container['card_width']; } @@ -309,11 +309,11 @@ public function getCardWidth(): \OpenAPI\Client\Model\CardWidthEnum /** * Sets card_width * - * @param \OpenAPI\Client\Model\CardWidthEnum $card_width card_width + * @param \Bandwidth\Model\CardWidthEnum $card_width card_width * * @return $this */ - public function setCardWidth(\OpenAPI\Client\Model\CardWidthEnum $card_width): static + public function setCardWidth(\Bandwidth\Model\CardWidthEnum $card_width): static { if (is_null($card_width)) { throw new InvalidArgumentException('non-nullable card_width cannot be null'); @@ -326,7 +326,7 @@ public function setCardWidth(\OpenAPI\Client\Model\CardWidthEnum $card_width): s /** * Gets card_contents * - * @return \OpenAPI\Client\Model\RbmCardContent[] + * @return \Bandwidth\Model\RbmCardContent[] */ public function getCardContents(): array { @@ -336,7 +336,7 @@ public function getCardContents(): array /** * Sets card_contents * - * @param \OpenAPI\Client\Model\RbmCardContent[] $card_contents card_contents + * @param \Bandwidth\Model\RbmCardContent[] $card_contents card_contents * * @return $this */ @@ -360,7 +360,7 @@ public function setCardContents(array $card_contents): static /** * Gets suggestions * - * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + * @return \Bandwidth\Model\MultiChannelAction[]|null */ public function getSuggestions(): ?array { @@ -370,7 +370,7 @@ public function getSuggestions(): ?array /** * Sets suggestions * - * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. * * @return $this */ diff --git a/src/Model/RbmMessageContentFile.php b/src/Model/RbmMessageContentFile.php index 47eb1c2f..744f3eca 100644 --- a/src/Model/RbmMessageContentFile.php +++ b/src/Model/RbmMessageContentFile.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmMessageContentFile Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/RbmMessageContentRichCard.php b/src/Model/RbmMessageContentRichCard.php index 4f43bd2a..1f6c41bc 100644 --- a/src/Model/RbmMessageContentRichCard.php +++ b/src/Model/RbmMessageContentRichCard.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmMessageContentRichCard Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,12 +59,12 @@ class RbmMessageContentRichCard implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPITypes = [ - 'orientation' => '\OpenAPI\Client\Model\StandaloneCardOrientationEnum', - 'thumbnail_image_alignment' => '\OpenAPI\Client\Model\ThumbnailAlignmentEnum', - 'card_content' => '\OpenAPI\Client\Model\RbmCardContent', - 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]', - 'card_width' => '\OpenAPI\Client\Model\CardWidthEnum', - 'card_contents' => '\OpenAPI\Client\Model\RbmCardContent[]' + 'orientation' => '\Bandwidth\Model\StandaloneCardOrientationEnum', + 'thumbnail_image_alignment' => '\Bandwidth\Model\ThumbnailAlignmentEnum', + 'card_content' => '\Bandwidth\Model\RbmCardContent', + 'suggestions' => '\Bandwidth\Model\MultiChannelAction[]', + 'card_width' => '\Bandwidth\Model\CardWidthEnum', + 'card_contents' => '\Bandwidth\Model\RbmCardContent[]' ]; /** @@ -326,9 +326,9 @@ public function valid(): bool /** * Gets orientation * - * @return \OpenAPI\Client\Model\StandaloneCardOrientationEnum + * @return \Bandwidth\Model\StandaloneCardOrientationEnum */ - public function getOrientation(): \OpenAPI\Client\Model\StandaloneCardOrientationEnum + public function getOrientation(): \Bandwidth\Model\StandaloneCardOrientationEnum { return $this->container['orientation']; } @@ -336,11 +336,11 @@ public function getOrientation(): \OpenAPI\Client\Model\StandaloneCardOrientatio /** * Sets orientation * - * @param \OpenAPI\Client\Model\StandaloneCardOrientationEnum $orientation orientation + * @param \Bandwidth\Model\StandaloneCardOrientationEnum $orientation orientation * * @return $this */ - public function setOrientation(\OpenAPI\Client\Model\StandaloneCardOrientationEnum $orientation): static + public function setOrientation(\Bandwidth\Model\StandaloneCardOrientationEnum $orientation): static { if (is_null($orientation)) { throw new InvalidArgumentException('non-nullable orientation cannot be null'); @@ -353,9 +353,9 @@ public function setOrientation(\OpenAPI\Client\Model\StandaloneCardOrientationEn /** * Gets thumbnail_image_alignment * - * @return \OpenAPI\Client\Model\ThumbnailAlignmentEnum|null + * @return \Bandwidth\Model\ThumbnailAlignmentEnum|null */ - public function getThumbnailImageAlignment(): ?\OpenAPI\Client\Model\ThumbnailAlignmentEnum + public function getThumbnailImageAlignment(): ?\Bandwidth\Model\ThumbnailAlignmentEnum { return $this->container['thumbnail_image_alignment']; } @@ -363,11 +363,11 @@ public function getThumbnailImageAlignment(): ?\OpenAPI\Client\Model\ThumbnailAl /** * Sets thumbnail_image_alignment * - * @param \OpenAPI\Client\Model\ThumbnailAlignmentEnum|null $thumbnail_image_alignment thumbnail_image_alignment + * @param \Bandwidth\Model\ThumbnailAlignmentEnum|null $thumbnail_image_alignment thumbnail_image_alignment * * @return $this */ - public function setThumbnailImageAlignment(?\OpenAPI\Client\Model\ThumbnailAlignmentEnum $thumbnail_image_alignment): static + public function setThumbnailImageAlignment(?\Bandwidth\Model\ThumbnailAlignmentEnum $thumbnail_image_alignment): static { if (is_null($thumbnail_image_alignment)) { throw new InvalidArgumentException('non-nullable thumbnail_image_alignment cannot be null'); @@ -380,9 +380,9 @@ public function setThumbnailImageAlignment(?\OpenAPI\Client\Model\ThumbnailAlign /** * Gets card_content * - * @return \OpenAPI\Client\Model\RbmCardContent + * @return \Bandwidth\Model\RbmCardContent */ - public function getCardContent(): \OpenAPI\Client\Model\RbmCardContent + public function getCardContent(): \Bandwidth\Model\RbmCardContent { return $this->container['card_content']; } @@ -390,11 +390,11 @@ public function getCardContent(): \OpenAPI\Client\Model\RbmCardContent /** * Sets card_content * - * @param \OpenAPI\Client\Model\RbmCardContent $card_content card_content + * @param \Bandwidth\Model\RbmCardContent $card_content card_content * * @return $this */ - public function setCardContent(\OpenAPI\Client\Model\RbmCardContent $card_content): static + public function setCardContent(\Bandwidth\Model\RbmCardContent $card_content): static { if (is_null($card_content)) { throw new InvalidArgumentException('non-nullable card_content cannot be null'); @@ -407,7 +407,7 @@ public function setCardContent(\OpenAPI\Client\Model\RbmCardContent $card_conten /** * Gets suggestions * - * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + * @return \Bandwidth\Model\MultiChannelAction[]|null */ public function getSuggestions(): ?array { @@ -417,7 +417,7 @@ public function getSuggestions(): ?array /** * Sets suggestions * - * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. * * @return $this */ @@ -438,9 +438,9 @@ public function setSuggestions(?array $suggestions): static /** * Gets card_width * - * @return \OpenAPI\Client\Model\CardWidthEnum + * @return \Bandwidth\Model\CardWidthEnum */ - public function getCardWidth(): \OpenAPI\Client\Model\CardWidthEnum + public function getCardWidth(): \Bandwidth\Model\CardWidthEnum { return $this->container['card_width']; } @@ -448,11 +448,11 @@ public function getCardWidth(): \OpenAPI\Client\Model\CardWidthEnum /** * Sets card_width * - * @param \OpenAPI\Client\Model\CardWidthEnum $card_width card_width + * @param \Bandwidth\Model\CardWidthEnum $card_width card_width * * @return $this */ - public function setCardWidth(\OpenAPI\Client\Model\CardWidthEnum $card_width): static + public function setCardWidth(\Bandwidth\Model\CardWidthEnum $card_width): static { if (is_null($card_width)) { throw new InvalidArgumentException('non-nullable card_width cannot be null'); @@ -465,7 +465,7 @@ public function setCardWidth(\OpenAPI\Client\Model\CardWidthEnum $card_width): s /** * Gets card_contents * - * @return \OpenAPI\Client\Model\RbmCardContent[] + * @return \Bandwidth\Model\RbmCardContent[] */ public function getCardContents(): array { @@ -475,7 +475,7 @@ public function getCardContents(): array /** * Sets card_contents * - * @param \OpenAPI\Client\Model\RbmCardContent[] $card_contents card_contents + * @param \Bandwidth\Model\RbmCardContent[] $card_contents card_contents * * @return $this */ diff --git a/src/Model/RbmMessageContentText.php b/src/Model/RbmMessageContentText.php index 73a0f889..ecd33d3f 100644 --- a/src/Model/RbmMessageContentText.php +++ b/src/Model/RbmMessageContentText.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmMessageContentText Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -60,7 +60,7 @@ class RbmMessageContentText implements ModelInterface, ArrayAccess, JsonSerializ */ protected static array $openAPITypes = [ 'text' => 'string', - 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]' + 'suggestions' => '\Bandwidth\Model\MultiChannelAction[]' ]; /** @@ -316,7 +316,7 @@ public function setText(string $text): static /** * Gets suggestions * - * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + * @return \Bandwidth\Model\MultiChannelAction[]|null */ public function getSuggestions(): ?array { @@ -326,7 +326,7 @@ public function getSuggestions(): ?array /** * Sets suggestions * - * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. * * @return $this */ diff --git a/src/Model/RbmMessageMedia.php b/src/Model/RbmMessageMedia.php index 481f0a9e..8cb7c3f8 100644 --- a/src/Model/RbmMessageMedia.php +++ b/src/Model/RbmMessageMedia.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmMessageMedia Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,8 +59,8 @@ class RbmMessageMedia implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'media' => '\OpenAPI\Client\Model\RbmMessageContentFile[]', - 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]' + 'media' => '\Bandwidth\Model\RbmMessageContentFile[]', + 'suggestions' => '\Bandwidth\Model\MultiChannelAction[]' ]; /** @@ -281,7 +281,7 @@ public function valid(): bool /** * Gets media * - * @return \OpenAPI\Client\Model\RbmMessageContentFile[] + * @return \Bandwidth\Model\RbmMessageContentFile[] */ public function getMedia(): array { @@ -291,7 +291,7 @@ public function getMedia(): array /** * Sets media * - * @param \OpenAPI\Client\Model\RbmMessageContentFile[] $media media + * @param \Bandwidth\Model\RbmMessageContentFile[] $media media * * @return $this */ @@ -308,7 +308,7 @@ public function setMedia(array $media): static /** * Gets suggestions * - * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + * @return \Bandwidth\Model\MultiChannelAction[]|null */ public function getSuggestions(): ?array { @@ -318,7 +318,7 @@ public function getSuggestions(): ?array /** * Sets suggestions * - * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. * * @return $this */ diff --git a/src/Model/RbmOpenUrlEnum.php b/src/Model/RbmOpenUrlEnum.php index 31cec292..0a850fc4 100644 --- a/src/Model/RbmOpenUrlEnum.php +++ b/src/Model/RbmOpenUrlEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * RbmOpenUrlEnum Class Doc Comment * * @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. - `WEBVIEW` Opens the URL in an in-app WebView. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/RbmStandaloneCard.php b/src/Model/RbmStandaloneCard.php index 66ca15a1..fb4f624a 100644 --- a/src/Model/RbmStandaloneCard.php +++ b/src/Model/RbmStandaloneCard.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmStandaloneCard Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,10 +59,10 @@ class RbmStandaloneCard implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'orientation' => '\OpenAPI\Client\Model\StandaloneCardOrientationEnum', - 'thumbnail_image_alignment' => '\OpenAPI\Client\Model\ThumbnailAlignmentEnum', - 'card_content' => '\OpenAPI\Client\Model\RbmCardContent', - 'suggestions' => '\OpenAPI\Client\Model\MultiChannelAction[]' + 'orientation' => '\Bandwidth\Model\StandaloneCardOrientationEnum', + 'thumbnail_image_alignment' => '\Bandwidth\Model\ThumbnailAlignmentEnum', + 'card_content' => '\Bandwidth\Model\RbmCardContent', + 'suggestions' => '\Bandwidth\Model\MultiChannelAction[]' ]; /** @@ -298,9 +298,9 @@ public function valid(): bool /** * Gets orientation * - * @return \OpenAPI\Client\Model\StandaloneCardOrientationEnum + * @return \Bandwidth\Model\StandaloneCardOrientationEnum */ - public function getOrientation(): \OpenAPI\Client\Model\StandaloneCardOrientationEnum + public function getOrientation(): \Bandwidth\Model\StandaloneCardOrientationEnum { return $this->container['orientation']; } @@ -308,11 +308,11 @@ public function getOrientation(): \OpenAPI\Client\Model\StandaloneCardOrientatio /** * Sets orientation * - * @param \OpenAPI\Client\Model\StandaloneCardOrientationEnum $orientation orientation + * @param \Bandwidth\Model\StandaloneCardOrientationEnum $orientation orientation * * @return $this */ - public function setOrientation(\OpenAPI\Client\Model\StandaloneCardOrientationEnum $orientation): static + public function setOrientation(\Bandwidth\Model\StandaloneCardOrientationEnum $orientation): static { if (is_null($orientation)) { throw new InvalidArgumentException('non-nullable orientation cannot be null'); @@ -325,9 +325,9 @@ public function setOrientation(\OpenAPI\Client\Model\StandaloneCardOrientationEn /** * Gets thumbnail_image_alignment * - * @return \OpenAPI\Client\Model\ThumbnailAlignmentEnum|null + * @return \Bandwidth\Model\ThumbnailAlignmentEnum|null */ - public function getThumbnailImageAlignment(): ?\OpenAPI\Client\Model\ThumbnailAlignmentEnum + public function getThumbnailImageAlignment(): ?\Bandwidth\Model\ThumbnailAlignmentEnum { return $this->container['thumbnail_image_alignment']; } @@ -335,11 +335,11 @@ public function getThumbnailImageAlignment(): ?\OpenAPI\Client\Model\ThumbnailAl /** * Sets thumbnail_image_alignment * - * @param \OpenAPI\Client\Model\ThumbnailAlignmentEnum|null $thumbnail_image_alignment thumbnail_image_alignment + * @param \Bandwidth\Model\ThumbnailAlignmentEnum|null $thumbnail_image_alignment thumbnail_image_alignment * * @return $this */ - public function setThumbnailImageAlignment(?\OpenAPI\Client\Model\ThumbnailAlignmentEnum $thumbnail_image_alignment): static + public function setThumbnailImageAlignment(?\Bandwidth\Model\ThumbnailAlignmentEnum $thumbnail_image_alignment): static { if (is_null($thumbnail_image_alignment)) { throw new InvalidArgumentException('non-nullable thumbnail_image_alignment cannot be null'); @@ -352,9 +352,9 @@ public function setThumbnailImageAlignment(?\OpenAPI\Client\Model\ThumbnailAlign /** * Gets card_content * - * @return \OpenAPI\Client\Model\RbmCardContent + * @return \Bandwidth\Model\RbmCardContent */ - public function getCardContent(): \OpenAPI\Client\Model\RbmCardContent + public function getCardContent(): \Bandwidth\Model\RbmCardContent { return $this->container['card_content']; } @@ -362,11 +362,11 @@ public function getCardContent(): \OpenAPI\Client\Model\RbmCardContent /** * Sets card_content * - * @param \OpenAPI\Client\Model\RbmCardContent $card_content card_content + * @param \Bandwidth\Model\RbmCardContent $card_content card_content * * @return $this */ - public function setCardContent(\OpenAPI\Client\Model\RbmCardContent $card_content): static + public function setCardContent(\Bandwidth\Model\RbmCardContent $card_content): static { if (is_null($card_content)) { throw new InvalidArgumentException('non-nullable card_content cannot be null'); @@ -379,7 +379,7 @@ public function setCardContent(\OpenAPI\Client\Model\RbmCardContent $card_conten /** * Gets suggestions * - * @return \OpenAPI\Client\Model\MultiChannelAction[]|null + * @return \Bandwidth\Model\MultiChannelAction[]|null */ public function getSuggestions(): ?array { @@ -389,7 +389,7 @@ public function getSuggestions(): ?array /** * Sets suggestions * - * @param \OpenAPI\Client\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. * * @return $this */ diff --git a/src/Model/RbmSuggestionResponse.php b/src/Model/RbmSuggestionResponse.php index 15e1d461..6603ef87 100644 --- a/src/Model/RbmSuggestionResponse.php +++ b/src/Model/RbmSuggestionResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RbmSuggestionResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/RbmWebViewEnum.php b/src/Model/RbmWebViewEnum.php index 8a716c4b..0e4574b6 100644 --- a/src/Model/RbmWebViewEnum.php +++ b/src/Model/RbmWebViewEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * RbmWebViewEnum Class Doc Comment * * @description Defines the layout of the WebView on a mobile device. It must be defined when application is set to `WEBVIEW` and must not be set when application is set to `BROWSER`. - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. - `TALL` WebView takes three-quarters of the screen. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/RecordingAvailableCallback.php b/src/Model/RecordingAvailableCallback.php index 350a8625..655613ce 100644 --- a/src/Model/RecordingAvailableCallback.php +++ b/src/Model/RecordingAvailableCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RecordingAvailableCallback Class Doc Comment * * @description The Recording Available event is sent after a recording has been processed. It indicates that the recording is available for download. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,7 +66,7 @@ class RecordingAvailableCallback implements ModelInterface, ArrayAccess, JsonSer 'application_id' => 'string', 'from' => 'string', 'to' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_id' => 'string', 'call_url' => 'string', 'parent_call_id' => 'string', @@ -76,7 +76,7 @@ class RecordingAvailableCallback implements ModelInterface, ArrayAccess, JsonSer 'start_time' => '\DateTime', 'end_time' => '\DateTime', 'duration' => 'string', - 'file_format' => '\OpenAPI\Client\Model\FileFormatEnum', + 'file_format' => '\Bandwidth\Model\FileFormatEnum', 'channels' => 'int', 'tag' => 'string', 'status' => 'string', @@ -577,9 +577,9 @@ public function setTo(?string $to): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -587,11 +587,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); @@ -861,9 +861,9 @@ public function setDuration(?string $duration): static /** * Gets file_format * - * @return \OpenAPI\Client\Model\FileFormatEnum|null + * @return \Bandwidth\Model\FileFormatEnum|null */ - public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum + public function getFileFormat(): ?\Bandwidth\Model\FileFormatEnum { return $this->container['file_format']; } @@ -871,11 +871,11 @@ public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum /** * Sets file_format * - * @param \OpenAPI\Client\Model\FileFormatEnum|null $file_format file_format + * @param \Bandwidth\Model\FileFormatEnum|null $file_format file_format * * @return $this */ - public function setFileFormat(?\OpenAPI\Client\Model\FileFormatEnum $file_format): static + public function setFileFormat(?\Bandwidth\Model\FileFormatEnum $file_format): static { if (is_null($file_format)) { throw new InvalidArgumentException('non-nullable file_format cannot be null'); diff --git a/src/Model/RecordingCompleteCallback.php b/src/Model/RecordingCompleteCallback.php index 8532d4b1..8df77dac 100644 --- a/src/Model/RecordingCompleteCallback.php +++ b/src/Model/RecordingCompleteCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RecordingCompleteCallback Class Doc Comment * * @description The Record Complete event is sent after a <Record> verb has executed if the call is still active. The BXML returned by this callback is executed next. When the recording is available for download, a Recording Available event will be sent. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,7 +66,7 @@ class RecordingCompleteCallback implements ModelInterface, ArrayAccess, JsonSeri 'application_id' => 'string', 'from' => 'string', 'to' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_id' => 'string', 'call_url' => 'string', 'parent_call_id' => 'string', @@ -77,7 +77,7 @@ class RecordingCompleteCallback implements ModelInterface, ArrayAccess, JsonSeri 'answer_time' => '\DateTime', 'end_time' => '\DateTime', 'duration' => 'string', - 'file_format' => '\OpenAPI\Client\Model\FileFormatEnum', + 'file_format' => '\Bandwidth\Model\FileFormatEnum', 'channels' => 'int', 'tag' => 'string', 'transfer_caller_id' => 'string', @@ -577,9 +577,9 @@ public function setTo(?string $to): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -587,11 +587,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); @@ -895,9 +895,9 @@ public function setDuration(?string $duration): static /** * Gets file_format * - * @return \OpenAPI\Client\Model\FileFormatEnum|null + * @return \Bandwidth\Model\FileFormatEnum|null */ - public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum + public function getFileFormat(): ?\Bandwidth\Model\FileFormatEnum { return $this->container['file_format']; } @@ -905,11 +905,11 @@ public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum /** * Sets file_format * - * @param \OpenAPI\Client\Model\FileFormatEnum|null $file_format file_format + * @param \Bandwidth\Model\FileFormatEnum|null $file_format file_format * * @return $this */ - public function setFileFormat(?\OpenAPI\Client\Model\FileFormatEnum $file_format): static + public function setFileFormat(?\Bandwidth\Model\FileFormatEnum $file_format): static { if (is_null($file_format)) { throw new InvalidArgumentException('non-nullable file_format cannot be null'); diff --git a/src/Model/RecordingStateEnum.php b/src/Model/RecordingStateEnum.php index b1f96f0a..44544203 100644 --- a/src/Model/RecordingStateEnum.php +++ b/src/Model/RecordingStateEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * RecordingStateEnum Class Doc Comment * * @description The recording state. Possible values: `paused` to pause an active recording `recording` to resume a paused recording - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/RecordingTranscriptionClip.php b/src/Model/RecordingTranscriptionClip.php index faf8a027..49237212 100644 --- a/src/Model/RecordingTranscriptionClip.php +++ b/src/Model/RecordingTranscriptionClip.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RecordingTranscriptionClip Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/RecordingTranscriptionMetadata.php b/src/Model/RecordingTranscriptionMetadata.php index f4962035..f0bdd88a 100644 --- a/src/Model/RecordingTranscriptionMetadata.php +++ b/src/Model/RecordingTranscriptionMetadata.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RecordingTranscriptionMetadata Class Doc Comment * * @description If the recording was transcribed, metadata about the transcription - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/RecordingTranscriptions.php b/src/Model/RecordingTranscriptions.php index 5baa8a50..365c731c 100644 --- a/src/Model/RecordingTranscriptions.php +++ b/src/Model/RecordingTranscriptions.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RecordingTranscriptions Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,8 +59,8 @@ class RecordingTranscriptions implements ModelInterface, ArrayAccess, JsonSerial * @var array */ protected static array $openAPITypes = [ - 'transcripts' => '\OpenAPI\Client\Model\Transcription[]', - 'clips' => '\OpenAPI\Client\Model\RecordingTranscriptionClip[]' + 'transcripts' => '\Bandwidth\Model\Transcription[]', + 'clips' => '\Bandwidth\Model\RecordingTranscriptionClip[]' ]; /** @@ -274,7 +274,7 @@ public function valid(): bool /** * Gets transcripts * - * @return \OpenAPI\Client\Model\Transcription[]|null + * @return \Bandwidth\Model\Transcription[]|null */ public function getTranscripts(): ?array { @@ -284,7 +284,7 @@ public function getTranscripts(): ?array /** * Sets transcripts * - * @param \OpenAPI\Client\Model\Transcription[]|null $transcripts transcripts + * @param \Bandwidth\Model\Transcription[]|null $transcripts transcripts * * @return $this */ @@ -301,7 +301,7 @@ public function setTranscripts(?array $transcripts): static /** * Gets clips * - * @return \OpenAPI\Client\Model\RecordingTranscriptionClip[]|null + * @return \Bandwidth\Model\RecordingTranscriptionClip[]|null */ public function getClips(): ?array { @@ -311,7 +311,7 @@ public function getClips(): ?array /** * Sets clips * - * @param \OpenAPI\Client\Model\RecordingTranscriptionClip[]|null $clips A list of individual speech clips with speaker, timing, and confidence information. + * @param \Bandwidth\Model\RecordingTranscriptionClip[]|null $clips A list of individual speech clips with speaker, timing, and confidence information. * * @return $this */ diff --git a/src/Model/RedirectCallback.php b/src/Model/RedirectCallback.php index f3d77aae..40dc0e5b 100644 --- a/src/Model/RedirectCallback.php +++ b/src/Model/RedirectCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * RedirectCallback Class Doc Comment * * @description The Redirect event is fired when a <Redirect> verb is executed. Its purpose is to get the next set of verbs from the calling application. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,7 +66,7 @@ class RedirectCallback implements ModelInterface, ArrayAccess, JsonSerializable 'application_id' => 'string', 'from' => 'string', 'to' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_id' => 'string', 'call_url' => 'string', 'parent_call_id' => 'string', @@ -535,9 +535,9 @@ public function setTo(?string $to): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -545,11 +545,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); diff --git a/src/Model/RedirectMethodEnum.php b/src/Model/RedirectMethodEnum.php index c026e434..7642ba07 100644 --- a/src/Model/RedirectMethodEnum.php +++ b/src/Model/RedirectMethodEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * RedirectMethodEnum Class Doc Comment * * @description The HTTP method to use for the request to `redirectUrl`. GET or POST. Default value is POST.<br><br>Not allowed if `state` is `completed`. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/SipConnectionMetadata.php b/src/Model/SipConnectionMetadata.php index f1930aab..73bc4619 100644 --- a/src/Model/SipConnectionMetadata.php +++ b/src/Model/SipConnectionMetadata.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * SipConnectionMetadata Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,7 +61,7 @@ class SipConnectionMetadata implements ModelInterface, ArrayAccess, JsonSerializ protected static array $openAPITypes = [ 'ip_address' => 'string', 'port' => 'int', - 'credentials' => '\OpenAPI\Client\Model\SipCredentials', + 'credentials' => '\Bandwidth\Model\SipCredentials', 'uui_header' => 'string' ]; @@ -342,9 +342,9 @@ public function setPort(?int $port): static /** * Gets credentials * - * @return \OpenAPI\Client\Model\SipCredentials|null + * @return \Bandwidth\Model\SipCredentials|null */ - public function getCredentials(): ?\OpenAPI\Client\Model\SipCredentials + public function getCredentials(): ?\Bandwidth\Model\SipCredentials { return $this->container['credentials']; } @@ -352,11 +352,11 @@ public function getCredentials(): ?\OpenAPI\Client\Model\SipCredentials /** * Sets credentials * - * @param \OpenAPI\Client\Model\SipCredentials|null $credentials credentials + * @param \Bandwidth\Model\SipCredentials|null $credentials credentials * * @return $this */ - public function setCredentials(?\OpenAPI\Client\Model\SipCredentials $credentials): static + public function setCredentials(?\Bandwidth\Model\SipCredentials $credentials): static { if (is_null($credentials)) { throw new InvalidArgumentException('non-nullable credentials cannot be null'); diff --git a/src/Model/SipCredentials.php b/src/Model/SipCredentials.php index 05494c56..5299ebf2 100644 --- a/src/Model/SipCredentials.php +++ b/src/Model/SipCredentials.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * SipCredentials Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/SmsMessageContent.php b/src/Model/SmsMessageContent.php index b0d0fb56..a8bf40d1 100644 --- a/src/Model/SmsMessageContent.php +++ b/src/Model/SmsMessageContent.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * SmsMessageContent Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/StandaloneCardOrientationEnum.php b/src/Model/StandaloneCardOrientationEnum.php index a6ed040d..d5c0e44d 100644 --- a/src/Model/StandaloneCardOrientationEnum.php +++ b/src/Model/StandaloneCardOrientationEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * StandaloneCardOrientationEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/StatusCallback.php b/src/Model/StatusCallback.php index 319eba7e..47dfb130 100644 --- a/src/Model/StatusCallback.php +++ b/src/Model/StatusCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * StatusCallback Class Doc Comment * * @description Represents a status callback for an outbound MT SMS or MMS or RBM message. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -62,10 +62,10 @@ class StatusCallback implements ModelInterface, ArrayAccess, JsonSerializable protected static array $openAPITypes = [ 'time' => '\DateTime', 'event_time' => '\DateTime', - 'type' => '\OpenAPI\Client\Model\StatusCallbackTypeEnum', + 'type' => '\Bandwidth\Model\StatusCallbackTypeEnum', 'to' => 'string', 'description' => 'string', - 'message' => '\OpenAPI\Client\Model\StatusCallbackMessage', + 'message' => '\Bandwidth\Model\StatusCallbackMessage', 'error_code' => 'int', 'carrier_name' => 'string' ]; @@ -386,9 +386,9 @@ public function setEventTime(?\DateTime $event_time): static /** * Gets type * - * @return \OpenAPI\Client\Model\StatusCallbackTypeEnum + * @return \Bandwidth\Model\StatusCallbackTypeEnum */ - public function getType(): \OpenAPI\Client\Model\StatusCallbackTypeEnum + public function getType(): \Bandwidth\Model\StatusCallbackTypeEnum { return $this->container['type']; } @@ -396,11 +396,11 @@ public function getType(): \OpenAPI\Client\Model\StatusCallbackTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\StatusCallbackTypeEnum $type type + * @param \Bandwidth\Model\StatusCallbackTypeEnum $type type * * @return $this */ - public function setType(\OpenAPI\Client\Model\StatusCallbackTypeEnum $type): static + public function setType(\Bandwidth\Model\StatusCallbackTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); @@ -467,9 +467,9 @@ public function setDescription(string $description): static /** * Gets message * - * @return \OpenAPI\Client\Model\StatusCallbackMessage + * @return \Bandwidth\Model\StatusCallbackMessage */ - public function getMessage(): \OpenAPI\Client\Model\StatusCallbackMessage + public function getMessage(): \Bandwidth\Model\StatusCallbackMessage { return $this->container['message']; } @@ -477,11 +477,11 @@ public function getMessage(): \OpenAPI\Client\Model\StatusCallbackMessage /** * Sets message * - * @param \OpenAPI\Client\Model\StatusCallbackMessage $message message + * @param \Bandwidth\Model\StatusCallbackMessage $message message * * @return $this */ - public function setMessage(\OpenAPI\Client\Model\StatusCallbackMessage $message): static + public function setMessage(\Bandwidth\Model\StatusCallbackMessage $message): static { if (is_null($message)) { throw new InvalidArgumentException('non-nullable message cannot be null'); diff --git a/src/Model/StatusCallbackMessage.php b/src/Model/StatusCallbackMessage.php index 57000e33..d8cc15e2 100644 --- a/src/Model/StatusCallbackMessage.php +++ b/src/Model/StatusCallbackMessage.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * StatusCallbackMessage Class Doc Comment * * @description Message payload schema within a callback - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -65,14 +65,14 @@ class StatusCallbackMessage implements ModelInterface, ArrayAccess, JsonSerializ 'application_id' => 'string', 'time' => '\DateTime', 'segment_count' => 'int', - 'direction' => '\OpenAPI\Client\Model\MessageDirectionEnum', + 'direction' => '\Bandwidth\Model\MessageDirectionEnum', 'to' => 'string[]', 'from' => 'string', 'text' => 'string', 'tag' => 'string', 'media' => 'string[]', - 'priority' => '\OpenAPI\Client\Model\PriorityEnum', - 'channel' => '\OpenAPI\Client\Model\MultiChannelMessageChannelEnum' + 'priority' => '\Bandwidth\Model\PriorityEnum', + 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum' ]; /** @@ -511,9 +511,9 @@ public function setSegmentCount(int $segment_count): static /** * Gets direction * - * @return \OpenAPI\Client\Model\MessageDirectionEnum + * @return \Bandwidth\Model\MessageDirectionEnum */ - public function getDirection(): \OpenAPI\Client\Model\MessageDirectionEnum + public function getDirection(): \Bandwidth\Model\MessageDirectionEnum { return $this->container['direction']; } @@ -521,11 +521,11 @@ public function getDirection(): \OpenAPI\Client\Model\MessageDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\MessageDirectionEnum $direction direction + * @param \Bandwidth\Model\MessageDirectionEnum $direction direction * * @return $this */ - public function setDirection(\OpenAPI\Client\Model\MessageDirectionEnum $direction): static + public function setDirection(\Bandwidth\Model\MessageDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); @@ -675,9 +675,9 @@ public function setMedia(?array $media): static /** * Gets priority * - * @return \OpenAPI\Client\Model\PriorityEnum|null + * @return \Bandwidth\Model\PriorityEnum|null */ - public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum + public function getPriority(): ?\Bandwidth\Model\PriorityEnum { return $this->container['priority']; } @@ -685,11 +685,11 @@ public function getPriority(): ?\OpenAPI\Client\Model\PriorityEnum /** * Sets priority * - * @param \OpenAPI\Client\Model\PriorityEnum|null $priority priority + * @param \Bandwidth\Model\PriorityEnum|null $priority priority * * @return $this */ - public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): static + public function setPriority(?\Bandwidth\Model\PriorityEnum $priority): static { if (is_null($priority)) { throw new InvalidArgumentException('non-nullable priority cannot be null'); @@ -702,9 +702,9 @@ public function setPriority(?\OpenAPI\Client\Model\PriorityEnum $priority): stat /** * Gets channel * - * @return \OpenAPI\Client\Model\MultiChannelMessageChannelEnum|null + * @return \Bandwidth\Model\MultiChannelMessageChannelEnum|null */ - public function getChannel(): ?\OpenAPI\Client\Model\MultiChannelMessageChannelEnum + public function getChannel(): ?\Bandwidth\Model\MultiChannelMessageChannelEnum { return $this->container['channel']; } @@ -712,11 +712,11 @@ public function getChannel(): ?\OpenAPI\Client\Model\MultiChannelMessageChannelE /** * Sets channel * - * @param \OpenAPI\Client\Model\MultiChannelMessageChannelEnum|null $channel channel + * @param \Bandwidth\Model\MultiChannelMessageChannelEnum|null $channel channel * * @return $this */ - public function setChannel(?\OpenAPI\Client\Model\MultiChannelMessageChannelEnum $channel): static + public function setChannel(?\Bandwidth\Model\MultiChannelMessageChannelEnum $channel): static { if (is_null($channel)) { throw new InvalidArgumentException('non-nullable channel cannot be null'); diff --git a/src/Model/StatusCallbackTypeEnum.php b/src/Model/StatusCallbackTypeEnum.php index ccc75797..28bbcd7f 100644 --- a/src/Model/StatusCallbackTypeEnum.php +++ b/src/Model/StatusCallbackTypeEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * StatusCallbackTypeEnum Class Doc Comment * * @description The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/StirShaken.php b/src/Model/StirShaken.php index e1193a57..de9ba5f6 100644 --- a/src/Model/StirShaken.php +++ b/src/Model/StirShaken.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * StirShaken Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/SyncLookupRequest.php b/src/Model/SyncLookupRequest.php index ac9cec90..a9385084 100644 --- a/src/Model/SyncLookupRequest.php +++ b/src/Model/SyncLookupRequest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * SyncLookupRequest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/TelephoneNumber.php b/src/Model/TelephoneNumber.php index 4739ed86..5599cdf8 100644 --- a/src/Model/TelephoneNumber.php +++ b/src/Model/TelephoneNumber.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * TelephoneNumber Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/TfvBasicAuthentication.php b/src/Model/TfvBasicAuthentication.php index 7fe8b8ce..c774065e 100644 --- a/src/Model/TfvBasicAuthentication.php +++ b/src/Model/TfvBasicAuthentication.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * TfvBasicAuthentication Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/TfvCallbackStatusEnum.php b/src/Model/TfvCallbackStatusEnum.php index 0bbf9cc7..fa96c67d 100644 --- a/src/Model/TfvCallbackStatusEnum.php +++ b/src/Model/TfvCallbackStatusEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * TfvCallbackStatusEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/TfvError.php b/src/Model/TfvError.php index 483e38d4..8f3597a5 100644 --- a/src/Model/TfvError.php +++ b/src/Model/TfvError.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * TfvError Class Doc Comment * * @description A generic error object. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/TfvStatus.php b/src/Model/TfvStatus.php index ae167646..5a90c34b 100644 --- a/src/Model/TfvStatus.php +++ b/src/Model/TfvStatus.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * TfvStatus Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -60,15 +60,15 @@ class TfvStatus implements ModelInterface, ArrayAccess, JsonSerializable */ protected static array $openAPITypes = [ 'phone_number' => 'string', - 'status' => '\OpenAPI\Client\Model\TfvStatusEnum', + 'status' => '\Bandwidth\Model\TfvStatusEnum', 'internal_ticket_number' => 'string', 'decline_reason_description' => 'string', 'denial_status_code' => 'int', - 'additional_denial_reasons' => '\OpenAPI\Client\Model\AdditionalDenialReason[]', + 'additional_denial_reasons' => '\Bandwidth\Model\AdditionalDenialReason[]', 'resubmit_allowed' => 'bool', 'created_date_time' => '\DateTime', 'modified_date_time' => '\DateTime', - 'submission' => '\OpenAPI\Client\Model\TfvSubmissionInfo', + 'submission' => '\Bandwidth\Model\TfvSubmissionInfo', 'blocked' => 'bool', 'blocked_reason' => 'string', 'cv_token' => 'string' @@ -408,9 +408,9 @@ public function setPhoneNumber(?string $phone_number): static /** * Gets status * - * @return \OpenAPI\Client\Model\TfvStatusEnum|null + * @return \Bandwidth\Model\TfvStatusEnum|null */ - public function getStatus(): ?\OpenAPI\Client\Model\TfvStatusEnum + public function getStatus(): ?\Bandwidth\Model\TfvStatusEnum { return $this->container['status']; } @@ -418,11 +418,11 @@ public function getStatus(): ?\OpenAPI\Client\Model\TfvStatusEnum /** * Sets status * - * @param \OpenAPI\Client\Model\TfvStatusEnum|null $status status + * @param \Bandwidth\Model\TfvStatusEnum|null $status status * * @return $this */ - public function setStatus(?\OpenAPI\Client\Model\TfvStatusEnum $status): static + public function setStatus(?\Bandwidth\Model\TfvStatusEnum $status): static { if (is_null($status)) { throw new InvalidArgumentException('non-nullable status cannot be null'); @@ -523,7 +523,7 @@ public function setDenialStatusCode(?int $denial_status_code): static /** * Gets additional_denial_reasons * - * @return \OpenAPI\Client\Model\AdditionalDenialReason[]|null + * @return \Bandwidth\Model\AdditionalDenialReason[]|null */ public function getAdditionalDenialReasons(): ?array { @@ -533,7 +533,7 @@ public function getAdditionalDenialReasons(): ?array /** * Sets additional_denial_reasons * - * @param \OpenAPI\Client\Model\AdditionalDenialReason[]|null $additional_denial_reasons An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. + * @param \Bandwidth\Model\AdditionalDenialReason[]|null $additional_denial_reasons An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. * * @return $this */ @@ -638,9 +638,9 @@ public function setModifiedDateTime(?\DateTime $modified_date_time): static /** * Gets submission * - * @return \OpenAPI\Client\Model\TfvSubmissionInfo|null + * @return \Bandwidth\Model\TfvSubmissionInfo|null */ - public function getSubmission(): ?\OpenAPI\Client\Model\TfvSubmissionInfo + public function getSubmission(): ?\Bandwidth\Model\TfvSubmissionInfo { return $this->container['submission']; } @@ -648,11 +648,11 @@ public function getSubmission(): ?\OpenAPI\Client\Model\TfvSubmissionInfo /** * Sets submission * - * @param \OpenAPI\Client\Model\TfvSubmissionInfo|null $submission submission + * @param \Bandwidth\Model\TfvSubmissionInfo|null $submission submission * * @return $this */ - public function setSubmission(?\OpenAPI\Client\Model\TfvSubmissionInfo $submission): static + public function setSubmission(?\Bandwidth\Model\TfvSubmissionInfo $submission): static { if (is_null($submission)) { throw new InvalidArgumentException('non-nullable submission cannot be null'); diff --git a/src/Model/TfvStatusEnum.php b/src/Model/TfvStatusEnum.php index d307f98e..a6900f6b 100644 --- a/src/Model/TfvStatusEnum.php +++ b/src/Model/TfvStatusEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * TfvStatusEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/TfvSubmissionInfo.php b/src/Model/TfvSubmissionInfo.php index 51a2ddbb..96e2ff07 100644 --- a/src/Model/TfvSubmissionInfo.php +++ b/src/Model/TfvSubmissionInfo.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * TfvSubmissionInfo Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,22 +59,22 @@ class TfvSubmissionInfo implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'business_address' => '\OpenAPI\Client\Model\Address', - 'business_contact' => '\OpenAPI\Client\Model\Contact', + 'business_address' => '\Bandwidth\Model\Address', + 'business_contact' => '\Bandwidth\Model\Contact', 'message_volume' => 'int', 'use_case' => 'string', 'use_case_summary' => 'string', 'production_message_content' => 'string', - 'opt_in_workflow' => '\OpenAPI\Client\Model\OptInWorkflow', + 'opt_in_workflow' => '\Bandwidth\Model\OptInWorkflow', 'additional_information' => 'string', 'isv_reseller' => 'string', 'privacy_policy_url' => 'string', 'terms_and_conditions_url' => 'string', 'business_dba' => 'string', 'business_registration_number' => 'string', - 'business_registration_type' => '\OpenAPI\Client\Model\BusinessRegistrationTypeEnum', + 'business_registration_type' => '\Bandwidth\Model\BusinessRegistrationTypeEnum', 'business_registration_issuing_country' => 'string', - 'business_entity_type' => '\OpenAPI\Client\Model\BusinessEntityTypeEnum' + 'business_entity_type' => '\Bandwidth\Model\BusinessEntityTypeEnum' ]; /** @@ -436,9 +436,9 @@ public function valid(): bool /** * Gets business_address * - * @return \OpenAPI\Client\Model\Address|null + * @return \Bandwidth\Model\Address|null */ - public function getBusinessAddress(): ?\OpenAPI\Client\Model\Address + public function getBusinessAddress(): ?\Bandwidth\Model\Address { return $this->container['business_address']; } @@ -446,11 +446,11 @@ public function getBusinessAddress(): ?\OpenAPI\Client\Model\Address /** * Sets business_address * - * @param \OpenAPI\Client\Model\Address|null $business_address business_address + * @param \Bandwidth\Model\Address|null $business_address business_address * * @return $this */ - public function setBusinessAddress(?\OpenAPI\Client\Model\Address $business_address): static + public function setBusinessAddress(?\Bandwidth\Model\Address $business_address): static { if (is_null($business_address)) { throw new InvalidArgumentException('non-nullable business_address cannot be null'); @@ -463,9 +463,9 @@ public function setBusinessAddress(?\OpenAPI\Client\Model\Address $business_addr /** * Gets business_contact * - * @return \OpenAPI\Client\Model\Contact|null + * @return \Bandwidth\Model\Contact|null */ - public function getBusinessContact(): ?\OpenAPI\Client\Model\Contact + public function getBusinessContact(): ?\Bandwidth\Model\Contact { return $this->container['business_contact']; } @@ -473,11 +473,11 @@ public function getBusinessContact(): ?\OpenAPI\Client\Model\Contact /** * Sets business_contact * - * @param \OpenAPI\Client\Model\Contact|null $business_contact business_contact + * @param \Bandwidth\Model\Contact|null $business_contact business_contact * * @return $this */ - public function setBusinessContact(?\OpenAPI\Client\Model\Contact $business_contact): static + public function setBusinessContact(?\Bandwidth\Model\Contact $business_contact): static { if (is_null($business_contact)) { throw new InvalidArgumentException('non-nullable business_contact cannot be null'); @@ -627,9 +627,9 @@ public function setProductionMessageContent(?string $production_message_content) /** * Gets opt_in_workflow * - * @return \OpenAPI\Client\Model\OptInWorkflow|null + * @return \Bandwidth\Model\OptInWorkflow|null */ - public function getOptInWorkflow(): ?\OpenAPI\Client\Model\OptInWorkflow + public function getOptInWorkflow(): ?\Bandwidth\Model\OptInWorkflow { return $this->container['opt_in_workflow']; } @@ -637,11 +637,11 @@ public function getOptInWorkflow(): ?\OpenAPI\Client\Model\OptInWorkflow /** * Sets opt_in_workflow * - * @param \OpenAPI\Client\Model\OptInWorkflow|null $opt_in_workflow opt_in_workflow + * @param \Bandwidth\Model\OptInWorkflow|null $opt_in_workflow opt_in_workflow * * @return $this */ - public function setOptInWorkflow(?\OpenAPI\Client\Model\OptInWorkflow $opt_in_workflow): static + public function setOptInWorkflow(?\Bandwidth\Model\OptInWorkflow $opt_in_workflow): static { if (is_null($opt_in_workflow)) { throw new InvalidArgumentException('non-nullable opt_in_workflow cannot be null'); @@ -867,9 +867,9 @@ public function setBusinessRegistrationNumber(?string $business_registration_num /** * Gets business_registration_type * - * @return \OpenAPI\Client\Model\BusinessRegistrationTypeEnum|null + * @return \Bandwidth\Model\BusinessRegistrationTypeEnum|null */ - public function getBusinessRegistrationType(): ?\OpenAPI\Client\Model\BusinessRegistrationTypeEnum + public function getBusinessRegistrationType(): ?\Bandwidth\Model\BusinessRegistrationTypeEnum { return $this->container['business_registration_type']; } @@ -877,11 +877,11 @@ public function getBusinessRegistrationType(): ?\OpenAPI\Client\Model\BusinessRe /** * Sets business_registration_type * - * @param \OpenAPI\Client\Model\BusinessRegistrationTypeEnum|null $business_registration_type business_registration_type + * @param \Bandwidth\Model\BusinessRegistrationTypeEnum|null $business_registration_type business_registration_type * * @return $this */ - public function setBusinessRegistrationType(?\OpenAPI\Client\Model\BusinessRegistrationTypeEnum $business_registration_type): static + public function setBusinessRegistrationType(?\Bandwidth\Model\BusinessRegistrationTypeEnum $business_registration_type): static { if (is_null($business_registration_type)) { array_push($this->openAPINullablesSetToNull, 'business_registration_type'); @@ -935,9 +935,9 @@ public function setBusinessRegistrationIssuingCountry(?string $business_registra /** * Gets business_entity_type * - * @return \OpenAPI\Client\Model\BusinessEntityTypeEnum|null + * @return \Bandwidth\Model\BusinessEntityTypeEnum|null */ - public function getBusinessEntityType(): ?\OpenAPI\Client\Model\BusinessEntityTypeEnum + public function getBusinessEntityType(): ?\Bandwidth\Model\BusinessEntityTypeEnum { return $this->container['business_entity_type']; } @@ -945,11 +945,11 @@ public function getBusinessEntityType(): ?\OpenAPI\Client\Model\BusinessEntityTy /** * Sets business_entity_type * - * @param \OpenAPI\Client\Model\BusinessEntityTypeEnum|null $business_entity_type business_entity_type + * @param \Bandwidth\Model\BusinessEntityTypeEnum|null $business_entity_type business_entity_type * * @return $this */ - public function setBusinessEntityType(?\OpenAPI\Client\Model\BusinessEntityTypeEnum $business_entity_type): static + public function setBusinessEntityType(?\Bandwidth\Model\BusinessEntityTypeEnum $business_entity_type): static { if (is_null($business_entity_type)) { throw new InvalidArgumentException('non-nullable business_entity_type cannot be null'); diff --git a/src/Model/TfvSubmissionWrapper.php b/src/Model/TfvSubmissionWrapper.php index 842e6083..12c34830 100644 --- a/src/Model/TfvSubmissionWrapper.php +++ b/src/Model/TfvSubmissionWrapper.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * TfvSubmissionWrapper Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,7 +59,7 @@ class TfvSubmissionWrapper implements ModelInterface, ArrayAccess, JsonSerializa * @var array */ protected static array $openAPITypes = [ - 'submission' => '\OpenAPI\Client\Model\VerificationUpdateRequest' + 'submission' => '\Bandwidth\Model\VerificationUpdateRequest' ]; /** @@ -267,9 +267,9 @@ public function valid(): bool /** * Gets submission * - * @return \OpenAPI\Client\Model\VerificationUpdateRequest|null + * @return \Bandwidth\Model\VerificationUpdateRequest|null */ - public function getSubmission(): ?\OpenAPI\Client\Model\VerificationUpdateRequest + public function getSubmission(): ?\Bandwidth\Model\VerificationUpdateRequest { return $this->container['submission']; } @@ -277,11 +277,11 @@ public function getSubmission(): ?\OpenAPI\Client\Model\VerificationUpdateReques /** * Sets submission * - * @param \OpenAPI\Client\Model\VerificationUpdateRequest|null $submission submission + * @param \Bandwidth\Model\VerificationUpdateRequest|null $submission submission * * @return $this */ - public function setSubmission(?\OpenAPI\Client\Model\VerificationUpdateRequest $submission): static + public function setSubmission(?\Bandwidth\Model\VerificationUpdateRequest $submission): static { if (is_null($submission)) { throw new InvalidArgumentException('non-nullable submission cannot be null'); diff --git a/src/Model/ThumbnailAlignmentEnum.php b/src/Model/ThumbnailAlignmentEnum.php index edbf42d0..89619cf5 100644 --- a/src/Model/ThumbnailAlignmentEnum.php +++ b/src/Model/ThumbnailAlignmentEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,13 +26,13 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * ThumbnailAlignmentEnum Class Doc Comment * * @description The alignment of the thumbnail image in the card. Required when orientation is HORIZONTAL. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/TranscribeRecording.php b/src/Model/TranscribeRecording.php index 3a7a352a..10660238 100644 --- a/src/Model/TranscribeRecording.php +++ b/src/Model/TranscribeRecording.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * TranscribeRecording Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -60,7 +60,7 @@ class TranscribeRecording implements ModelInterface, ArrayAccess, JsonSerializab */ protected static array $openAPITypes = [ 'callback_url' => 'string', - 'callback_method' => '\OpenAPI\Client\Model\CallbackMethodEnum', + 'callback_method' => '\Bandwidth\Model\CallbackMethodEnum', 'username' => 'string', 'password' => 'string', 'tag' => 'string', @@ -352,9 +352,9 @@ public function setCallbackUrl(?string $callback_url): static /** * Gets callback_method * - * @return \OpenAPI\Client\Model\CallbackMethodEnum|null + * @return \Bandwidth\Model\CallbackMethodEnum|null */ - public function getCallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum + public function getCallbackMethod(): ?\Bandwidth\Model\CallbackMethodEnum { return $this->container['callback_method']; } @@ -362,11 +362,11 @@ public function getCallbackMethod(): ?\OpenAPI\Client\Model\CallbackMethodEnum /** * Sets callback_method * - * @param \OpenAPI\Client\Model\CallbackMethodEnum|null $callback_method callback_method + * @param \Bandwidth\Model\CallbackMethodEnum|null $callback_method callback_method * * @return $this */ - public function setCallbackMethod(?\OpenAPI\Client\Model\CallbackMethodEnum $callback_method): static + public function setCallbackMethod(?\Bandwidth\Model\CallbackMethodEnum $callback_method): static { if (is_null($callback_method)) { array_push($this->openAPINullablesSetToNull, 'callback_method'); diff --git a/src/Model/Transcription.php b/src/Model/Transcription.php index d66b03cd..074b4e94 100644 --- a/src/Model/Transcription.php +++ b/src/Model/Transcription.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * Transcription Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/TranscriptionAvailableCallback.php b/src/Model/TranscriptionAvailableCallback.php index be3db547..de3fd8c1 100644 --- a/src/Model/TranscriptionAvailableCallback.php +++ b/src/Model/TranscriptionAvailableCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * TranscriptionAvailableCallback Class Doc Comment * * @description The Transcription Available event is sent when the recording transcription is available to be downloaded. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,7 +66,7 @@ class TranscriptionAvailableCallback implements ModelInterface, ArrayAccess, Jso 'application_id' => 'string', 'from' => 'string', 'to' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_id' => 'string', 'call_url' => 'string', 'media_url' => 'string', @@ -76,9 +76,9 @@ class TranscriptionAvailableCallback implements ModelInterface, ArrayAccess, Jso 'start_time' => '\DateTime', 'end_time' => '\DateTime', 'duration' => 'string', - 'file_format' => '\OpenAPI\Client\Model\FileFormatEnum', + 'file_format' => '\Bandwidth\Model\FileFormatEnum', 'tag' => 'string', - 'transcription' => '\OpenAPI\Client\Model\Transcription', + 'transcription' => '\Bandwidth\Model\Transcription', 'transfer_caller_id' => 'string', 'transfer_to' => 'string' ]; @@ -570,9 +570,9 @@ public function setTo(?string $to): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -580,11 +580,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); @@ -854,9 +854,9 @@ public function setDuration(?string $duration): static /** * Gets file_format * - * @return \OpenAPI\Client\Model\FileFormatEnum|null + * @return \Bandwidth\Model\FileFormatEnum|null */ - public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum + public function getFileFormat(): ?\Bandwidth\Model\FileFormatEnum { return $this->container['file_format']; } @@ -864,11 +864,11 @@ public function getFileFormat(): ?\OpenAPI\Client\Model\FileFormatEnum /** * Sets file_format * - * @param \OpenAPI\Client\Model\FileFormatEnum|null $file_format file_format + * @param \Bandwidth\Model\FileFormatEnum|null $file_format file_format * * @return $this */ - public function setFileFormat(?\OpenAPI\Client\Model\FileFormatEnum $file_format): static + public function setFileFormat(?\Bandwidth\Model\FileFormatEnum $file_format): static { if (is_null($file_format)) { throw new InvalidArgumentException('non-nullable file_format cannot be null'); @@ -915,9 +915,9 @@ public function setTag(?string $tag): static /** * Gets transcription * - * @return \OpenAPI\Client\Model\Transcription|null + * @return \Bandwidth\Model\Transcription|null */ - public function getTranscription(): ?\OpenAPI\Client\Model\Transcription + public function getTranscription(): ?\Bandwidth\Model\Transcription { return $this->container['transcription']; } @@ -925,11 +925,11 @@ public function getTranscription(): ?\OpenAPI\Client\Model\Transcription /** * Sets transcription * - * @param \OpenAPI\Client\Model\Transcription|null $transcription transcription + * @param \Bandwidth\Model\Transcription|null $transcription transcription * * @return $this */ - public function setTranscription(?\OpenAPI\Client\Model\Transcription $transcription): static + public function setTranscription(?\Bandwidth\Model\Transcription $transcription): static { if (is_null($transcription)) { throw new InvalidArgumentException('non-nullable transcription cannot be null'); diff --git a/src/Model/TransferAnswerCallback.php b/src/Model/TransferAnswerCallback.php index 88554b8d..9248b898 100644 --- a/src/Model/TransferAnswerCallback.php +++ b/src/Model/TransferAnswerCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * TransferAnswerCallback Class Doc Comment * * @description When processing a <Transfer> verb, this event is sent when a called party (B-leg) answers. The event is sent to the endpoint specified in the transferAnswerUrl attribute of the <PhoneNumber> tag that answered. BXML returned by this callback will be executed for the called party only. After all BXML has been executed, the called party will be bridged to the original call. Most BXML verbs are allowed in response to a transferAnswer event, but some are not allowed. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,7 +66,7 @@ class TransferAnswerCallback implements ModelInterface, ArrayAccess, JsonSeriali 'application_id' => 'string', 'from' => 'string', 'to' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_id' => 'string', 'call_url' => 'string', 'enqueued_time' => '\DateTime', @@ -528,9 +528,9 @@ public function setTo(?string $to): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -538,11 +538,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); diff --git a/src/Model/TransferCompleteCallback.php b/src/Model/TransferCompleteCallback.php index 1808970e..15598c5c 100644 --- a/src/Model/TransferCompleteCallback.php +++ b/src/Model/TransferCompleteCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * TransferCompleteCallback Class Doc Comment * * @description This event is sent to the transferCompleteUrl of the A-leg's <Transfer> verb when the transferred call (B-leg) completes. In a simultaneous ringing scenario, only one B-leg succeeds and this event corresponds to that successful leg. If none of the calls were answered, the transferComplete event corresponds to one of the legs. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,7 +66,7 @@ class TransferCompleteCallback implements ModelInterface, ArrayAccess, JsonSeria 'application_id' => 'string', 'from' => 'string', 'to' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_id' => 'string', 'call_url' => 'string', 'enqueued_time' => '\DateTime', @@ -549,9 +549,9 @@ public function setTo(?string $to): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -559,11 +559,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); diff --git a/src/Model/TransferDisconnectCallback.php b/src/Model/TransferDisconnectCallback.php index 22292e31..4d56405d 100644 --- a/src/Model/TransferDisconnectCallback.php +++ b/src/Model/TransferDisconnectCallback.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * TransferDisconnectCallback Class Doc Comment * * @description This event is sent to the transferDisconnectUrl of each <PhoneNumber> tag when its respective call leg ends for any reason. The event is sent in the normal case, when the transferred leg is answered and later hung up, but is also sent if the new leg was never answered in the first place, if it was rejected, and if the original call leg hung up before the transferred leg. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -66,7 +66,7 @@ class TransferDisconnectCallback implements ModelInterface, ArrayAccess, JsonSer 'application_id' => 'string', 'from' => 'string', 'to' => 'string', - 'direction' => '\OpenAPI\Client\Model\CallDirectionEnum', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', 'call_id' => 'string', 'call_url' => 'string', 'parent_call_id' => 'string', @@ -563,9 +563,9 @@ public function setTo(?string $to): static /** * Gets direction * - * @return \OpenAPI\Client\Model\CallDirectionEnum|null + * @return \Bandwidth\Model\CallDirectionEnum|null */ - public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum { return $this->container['direction']; } @@ -573,11 +573,11 @@ public function getDirection(): ?\OpenAPI\Client\Model\CallDirectionEnum /** * Sets direction * - * @param \OpenAPI\Client\Model\CallDirectionEnum|null $direction direction + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction * * @return $this */ - public function setDirection(?\OpenAPI\Client\Model\CallDirectionEnum $direction): static + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static { if (is_null($direction)) { throw new InvalidArgumentException('non-nullable direction cannot be null'); diff --git a/src/Model/UpdateCall.php b/src/Model/UpdateCall.php index a2ebc440..6022bc95 100644 --- a/src/Model/UpdateCall.php +++ b/src/Model/UpdateCall.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * UpdateCall Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,13 +59,13 @@ class UpdateCall implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'state' => '\OpenAPI\Client\Model\CallStateEnum', + 'state' => '\Bandwidth\Model\CallStateEnum', 'redirect_url' => 'string', - 'redirect_method' => '\OpenAPI\Client\Model\RedirectMethodEnum', + 'redirect_method' => '\Bandwidth\Model\RedirectMethodEnum', 'username' => 'string', 'password' => 'string', 'redirect_fallback_url' => 'string', - 'redirect_fallback_method' => '\OpenAPI\Client\Model\RedirectMethodEnum', + 'redirect_fallback_method' => '\Bandwidth\Model\RedirectMethodEnum', 'fallback_username' => 'string', 'fallback_password' => 'string', 'tag' => 'string' @@ -350,9 +350,9 @@ public function valid(): bool /** * Gets state * - * @return \OpenAPI\Client\Model\CallStateEnum|null + * @return \Bandwidth\Model\CallStateEnum|null */ - public function getState(): ?\OpenAPI\Client\Model\CallStateEnum + public function getState(): ?\Bandwidth\Model\CallStateEnum { return $this->container['state']; } @@ -360,11 +360,11 @@ public function getState(): ?\OpenAPI\Client\Model\CallStateEnum /** * Sets state * - * @param \OpenAPI\Client\Model\CallStateEnum|null $state state + * @param \Bandwidth\Model\CallStateEnum|null $state state * * @return $this */ - public function setState(?\OpenAPI\Client\Model\CallStateEnum $state): static + public function setState(?\Bandwidth\Model\CallStateEnum $state): static { if (is_null($state)) { array_push($this->openAPINullablesSetToNull, 'state'); @@ -418,9 +418,9 @@ public function setRedirectUrl(?string $redirect_url): static /** * Gets redirect_method * - * @return \OpenAPI\Client\Model\RedirectMethodEnum|null + * @return \Bandwidth\Model\RedirectMethodEnum|null */ - public function getRedirectMethod(): ?\OpenAPI\Client\Model\RedirectMethodEnum + public function getRedirectMethod(): ?\Bandwidth\Model\RedirectMethodEnum { return $this->container['redirect_method']; } @@ -428,11 +428,11 @@ public function getRedirectMethod(): ?\OpenAPI\Client\Model\RedirectMethodEnum /** * Sets redirect_method * - * @param \OpenAPI\Client\Model\RedirectMethodEnum|null $redirect_method redirect_method + * @param \Bandwidth\Model\RedirectMethodEnum|null $redirect_method redirect_method * * @return $this */ - public function setRedirectMethod(?\OpenAPI\Client\Model\RedirectMethodEnum $redirect_method): static + public function setRedirectMethod(?\Bandwidth\Model\RedirectMethodEnum $redirect_method): static { if (is_null($redirect_method)) { array_push($this->openAPINullablesSetToNull, 'redirect_method'); @@ -562,9 +562,9 @@ public function setRedirectFallbackUrl(?string $redirect_fallback_url): static /** * Gets redirect_fallback_method * - * @return \OpenAPI\Client\Model\RedirectMethodEnum|null + * @return \Bandwidth\Model\RedirectMethodEnum|null */ - public function getRedirectFallbackMethod(): ?\OpenAPI\Client\Model\RedirectMethodEnum + public function getRedirectFallbackMethod(): ?\Bandwidth\Model\RedirectMethodEnum { return $this->container['redirect_fallback_method']; } @@ -572,11 +572,11 @@ public function getRedirectFallbackMethod(): ?\OpenAPI\Client\Model\RedirectMeth /** * Sets redirect_fallback_method * - * @param \OpenAPI\Client\Model\RedirectMethodEnum|null $redirect_fallback_method redirect_fallback_method + * @param \Bandwidth\Model\RedirectMethodEnum|null $redirect_fallback_method redirect_fallback_method * * @return $this */ - public function setRedirectFallbackMethod(?\OpenAPI\Client\Model\RedirectMethodEnum $redirect_fallback_method): static + public function setRedirectFallbackMethod(?\Bandwidth\Model\RedirectMethodEnum $redirect_fallback_method): static { if (is_null($redirect_fallback_method)) { array_push($this->openAPINullablesSetToNull, 'redirect_fallback_method'); diff --git a/src/Model/UpdateCallRecording.php b/src/Model/UpdateCallRecording.php index 48309c5a..d8aee3b8 100644 --- a/src/Model/UpdateCallRecording.php +++ b/src/Model/UpdateCallRecording.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * UpdateCallRecording Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,7 +59,7 @@ class UpdateCallRecording implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ - 'state' => '\OpenAPI\Client\Model\RecordingStateEnum' + 'state' => '\Bandwidth\Model\RecordingStateEnum' ]; /** @@ -270,9 +270,9 @@ public function valid(): bool /** * Gets state * - * @return \OpenAPI\Client\Model\RecordingStateEnum + * @return \Bandwidth\Model\RecordingStateEnum */ - public function getState(): \OpenAPI\Client\Model\RecordingStateEnum + public function getState(): \Bandwidth\Model\RecordingStateEnum { return $this->container['state']; } @@ -280,11 +280,11 @@ public function getState(): \OpenAPI\Client\Model\RecordingStateEnum /** * Sets state * - * @param \OpenAPI\Client\Model\RecordingStateEnum $state state + * @param \Bandwidth\Model\RecordingStateEnum $state state * * @return $this */ - public function setState(\OpenAPI\Client\Model\RecordingStateEnum $state): static + public function setState(\Bandwidth\Model\RecordingStateEnum $state): static { if (is_null($state)) { throw new InvalidArgumentException('non-nullable state cannot be null'); diff --git a/src/Model/UpdateConference.php b/src/Model/UpdateConference.php index 83da938c..240de462 100644 --- a/src/Model/UpdateConference.php +++ b/src/Model/UpdateConference.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * UpdateConference Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,13 +59,13 @@ class UpdateConference implements ModelInterface, ArrayAccess, JsonSerializable * @var array */ protected static array $openAPITypes = [ - 'status' => '\OpenAPI\Client\Model\ConferenceStateEnum', + 'status' => '\Bandwidth\Model\ConferenceStateEnum', 'redirect_url' => 'string', - 'redirect_method' => '\OpenAPI\Client\Model\RedirectMethodEnum', + 'redirect_method' => '\Bandwidth\Model\RedirectMethodEnum', 'username' => 'string', 'password' => 'string', 'redirect_fallback_url' => 'string', - 'redirect_fallback_method' => '\OpenAPI\Client\Model\RedirectMethodEnum', + 'redirect_fallback_method' => '\Bandwidth\Model\RedirectMethodEnum', 'fallback_username' => 'string', 'fallback_password' => 'string' ]; @@ -339,9 +339,9 @@ public function valid(): bool /** * Gets status * - * @return \OpenAPI\Client\Model\ConferenceStateEnum|null + * @return \Bandwidth\Model\ConferenceStateEnum|null */ - public function getStatus(): ?\OpenAPI\Client\Model\ConferenceStateEnum + public function getStatus(): ?\Bandwidth\Model\ConferenceStateEnum { return $this->container['status']; } @@ -349,11 +349,11 @@ public function getStatus(): ?\OpenAPI\Client\Model\ConferenceStateEnum /** * Sets status * - * @param \OpenAPI\Client\Model\ConferenceStateEnum|null $status status + * @param \Bandwidth\Model\ConferenceStateEnum|null $status status * * @return $this */ - public function setStatus(?\OpenAPI\Client\Model\ConferenceStateEnum $status): static + public function setStatus(?\Bandwidth\Model\ConferenceStateEnum $status): static { if (is_null($status)) { array_push($this->openAPINullablesSetToNull, 'status'); @@ -407,9 +407,9 @@ public function setRedirectUrl(?string $redirect_url): static /** * Gets redirect_method * - * @return \OpenAPI\Client\Model\RedirectMethodEnum|null + * @return \Bandwidth\Model\RedirectMethodEnum|null */ - public function getRedirectMethod(): ?\OpenAPI\Client\Model\RedirectMethodEnum + public function getRedirectMethod(): ?\Bandwidth\Model\RedirectMethodEnum { return $this->container['redirect_method']; } @@ -417,11 +417,11 @@ public function getRedirectMethod(): ?\OpenAPI\Client\Model\RedirectMethodEnum /** * Sets redirect_method * - * @param \OpenAPI\Client\Model\RedirectMethodEnum|null $redirect_method redirect_method + * @param \Bandwidth\Model\RedirectMethodEnum|null $redirect_method redirect_method * * @return $this */ - public function setRedirectMethod(?\OpenAPI\Client\Model\RedirectMethodEnum $redirect_method): static + public function setRedirectMethod(?\Bandwidth\Model\RedirectMethodEnum $redirect_method): static { if (is_null($redirect_method)) { array_push($this->openAPINullablesSetToNull, 'redirect_method'); @@ -551,9 +551,9 @@ public function setRedirectFallbackUrl(?string $redirect_fallback_url): static /** * Gets redirect_fallback_method * - * @return \OpenAPI\Client\Model\RedirectMethodEnum|null + * @return \Bandwidth\Model\RedirectMethodEnum|null */ - public function getRedirectFallbackMethod(): ?\OpenAPI\Client\Model\RedirectMethodEnum + public function getRedirectFallbackMethod(): ?\Bandwidth\Model\RedirectMethodEnum { return $this->container['redirect_fallback_method']; } @@ -561,11 +561,11 @@ public function getRedirectFallbackMethod(): ?\OpenAPI\Client\Model\RedirectMeth /** * Sets redirect_fallback_method * - * @param \OpenAPI\Client\Model\RedirectMethodEnum|null $redirect_fallback_method redirect_fallback_method + * @param \Bandwidth\Model\RedirectMethodEnum|null $redirect_fallback_method redirect_fallback_method * * @return $this */ - public function setRedirectFallbackMethod(?\OpenAPI\Client\Model\RedirectMethodEnum $redirect_fallback_method): static + public function setRedirectFallbackMethod(?\Bandwidth\Model\RedirectMethodEnum $redirect_fallback_method): static { if (is_null($redirect_fallback_method)) { array_push($this->openAPINullablesSetToNull, 'redirect_fallback_method'); diff --git a/src/Model/UpdateConferenceMember.php b/src/Model/UpdateConferenceMember.php index a0a8c8c0..a6352117 100644 --- a/src/Model/UpdateConferenceMember.php +++ b/src/Model/UpdateConferenceMember.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * UpdateConferenceMember Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/VerificationDenialWebhook.php b/src/Model/VerificationDenialWebhook.php index c3f43b89..869313f0 100644 --- a/src/Model/VerificationDenialWebhook.php +++ b/src/Model/VerificationDenialWebhook.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * VerificationDenialWebhook Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -60,7 +60,7 @@ class VerificationDenialWebhook implements ModelInterface, ArrayAccess, JsonSeri */ protected static array $openAPITypes = [ 'account_id' => 'string', - 'additional_denial_reasons' => '\OpenAPI\Client\Model\AdditionalDenialReason[]', + 'additional_denial_reasons' => '\Bandwidth\Model\AdditionalDenialReason[]', 'decline_reason_description' => 'string', 'denial_status_code' => 'int', 'internal_ticket_number' => 'string', @@ -369,7 +369,7 @@ public function setAccountId(?string $account_id): static /** * Gets additional_denial_reasons * - * @return \OpenAPI\Client\Model\AdditionalDenialReason[]|null + * @return \Bandwidth\Model\AdditionalDenialReason[]|null */ public function getAdditionalDenialReasons(): ?array { @@ -379,7 +379,7 @@ public function getAdditionalDenialReasons(): ?array /** * Sets additional_denial_reasons * - * @param \OpenAPI\Client\Model\AdditionalDenialReason[]|null $additional_denial_reasons An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. + * @param \Bandwidth\Model\AdditionalDenialReason[]|null $additional_denial_reasons An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. * * @return $this */ diff --git a/src/Model/VerificationRequest.php b/src/Model/VerificationRequest.php index 9c1972b8..e6fb7573 100644 --- a/src/Model/VerificationRequest.php +++ b/src/Model/VerificationRequest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * VerificationRequest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,23 +59,23 @@ class VerificationRequest implements ModelInterface, ArrayAccess, JsonSerializab * @var array */ protected static array $openAPITypes = [ - 'business_address' => '\OpenAPI\Client\Model\Address', - 'business_contact' => '\OpenAPI\Client\Model\Contact', + 'business_address' => '\Bandwidth\Model\Address', + 'business_contact' => '\Bandwidth\Model\Contact', 'message_volume' => 'int', 'phone_numbers' => 'string[]', 'use_case' => 'string', 'use_case_summary' => 'string', 'production_message_content' => 'string', - 'opt_in_workflow' => '\OpenAPI\Client\Model\OptInWorkflow', + 'opt_in_workflow' => '\Bandwidth\Model\OptInWorkflow', 'additional_information' => 'string', 'isv_reseller' => 'string', 'privacy_policy_url' => 'string', 'terms_and_conditions_url' => 'string', 'business_dba' => 'string', 'business_registration_number' => 'string', - 'business_registration_type' => '\OpenAPI\Client\Model\BusinessRegistrationTypeEnum', + 'business_registration_type' => '\Bandwidth\Model\BusinessRegistrationTypeEnum', 'business_registration_issuing_country' => 'string', - 'business_entity_type' => '\OpenAPI\Client\Model\BusinessEntityTypeEnum', + 'business_entity_type' => '\Bandwidth\Model\BusinessEntityTypeEnum', 'help_message_response' => 'string', 'age_gated_content' => 'bool', 'cv_token' => 'string' @@ -511,9 +511,9 @@ public function valid(): bool /** * Gets business_address * - * @return \OpenAPI\Client\Model\Address + * @return \Bandwidth\Model\Address */ - public function getBusinessAddress(): \OpenAPI\Client\Model\Address + public function getBusinessAddress(): \Bandwidth\Model\Address { return $this->container['business_address']; } @@ -521,11 +521,11 @@ public function getBusinessAddress(): \OpenAPI\Client\Model\Address /** * Sets business_address * - * @param \OpenAPI\Client\Model\Address $business_address business_address + * @param \Bandwidth\Model\Address $business_address business_address * * @return $this */ - public function setBusinessAddress(\OpenAPI\Client\Model\Address $business_address): static + public function setBusinessAddress(\Bandwidth\Model\Address $business_address): static { if (is_null($business_address)) { throw new InvalidArgumentException('non-nullable business_address cannot be null'); @@ -538,9 +538,9 @@ public function setBusinessAddress(\OpenAPI\Client\Model\Address $business_addre /** * Gets business_contact * - * @return \OpenAPI\Client\Model\Contact + * @return \Bandwidth\Model\Contact */ - public function getBusinessContact(): \OpenAPI\Client\Model\Contact + public function getBusinessContact(): \Bandwidth\Model\Contact { return $this->container['business_contact']; } @@ -548,11 +548,11 @@ public function getBusinessContact(): \OpenAPI\Client\Model\Contact /** * Sets business_contact * - * @param \OpenAPI\Client\Model\Contact $business_contact business_contact + * @param \Bandwidth\Model\Contact $business_contact business_contact * * @return $this */ - public function setBusinessContact(\OpenAPI\Client\Model\Contact $business_contact): static + public function setBusinessContact(\Bandwidth\Model\Contact $business_contact): static { if (is_null($business_contact)) { throw new InvalidArgumentException('non-nullable business_contact cannot be null'); @@ -736,9 +736,9 @@ public function setProductionMessageContent(string $production_message_content): /** * Gets opt_in_workflow * - * @return \OpenAPI\Client\Model\OptInWorkflow + * @return \Bandwidth\Model\OptInWorkflow */ - public function getOptInWorkflow(): \OpenAPI\Client\Model\OptInWorkflow + public function getOptInWorkflow(): \Bandwidth\Model\OptInWorkflow { return $this->container['opt_in_workflow']; } @@ -746,11 +746,11 @@ public function getOptInWorkflow(): \OpenAPI\Client\Model\OptInWorkflow /** * Sets opt_in_workflow * - * @param \OpenAPI\Client\Model\OptInWorkflow $opt_in_workflow opt_in_workflow + * @param \Bandwidth\Model\OptInWorkflow $opt_in_workflow opt_in_workflow * * @return $this */ - public function setOptInWorkflow(\OpenAPI\Client\Model\OptInWorkflow $opt_in_workflow): static + public function setOptInWorkflow(\Bandwidth\Model\OptInWorkflow $opt_in_workflow): static { if (is_null($opt_in_workflow)) { throw new InvalidArgumentException('non-nullable opt_in_workflow cannot be null'); @@ -976,9 +976,9 @@ public function setBusinessRegistrationNumber(?string $business_registration_num /** * Gets business_registration_type * - * @return \OpenAPI\Client\Model\BusinessRegistrationTypeEnum|null + * @return \Bandwidth\Model\BusinessRegistrationTypeEnum|null */ - public function getBusinessRegistrationType(): ?\OpenAPI\Client\Model\BusinessRegistrationTypeEnum + public function getBusinessRegistrationType(): ?\Bandwidth\Model\BusinessRegistrationTypeEnum { return $this->container['business_registration_type']; } @@ -986,11 +986,11 @@ public function getBusinessRegistrationType(): ?\OpenAPI\Client\Model\BusinessRe /** * Sets business_registration_type * - * @param \OpenAPI\Client\Model\BusinessRegistrationTypeEnum|null $business_registration_type business_registration_type + * @param \Bandwidth\Model\BusinessRegistrationTypeEnum|null $business_registration_type business_registration_type * * @return $this */ - public function setBusinessRegistrationType(?\OpenAPI\Client\Model\BusinessRegistrationTypeEnum $business_registration_type): static + public function setBusinessRegistrationType(?\Bandwidth\Model\BusinessRegistrationTypeEnum $business_registration_type): static { if (is_null($business_registration_type)) { array_push($this->openAPINullablesSetToNull, 'business_registration_type'); @@ -1044,9 +1044,9 @@ public function setBusinessRegistrationIssuingCountry(?string $business_registra /** * Gets business_entity_type * - * @return \OpenAPI\Client\Model\BusinessEntityTypeEnum + * @return \Bandwidth\Model\BusinessEntityTypeEnum */ - public function getBusinessEntityType(): \OpenAPI\Client\Model\BusinessEntityTypeEnum + public function getBusinessEntityType(): \Bandwidth\Model\BusinessEntityTypeEnum { return $this->container['business_entity_type']; } @@ -1054,11 +1054,11 @@ public function getBusinessEntityType(): \OpenAPI\Client\Model\BusinessEntityTyp /** * Sets business_entity_type * - * @param \OpenAPI\Client\Model\BusinessEntityTypeEnum $business_entity_type business_entity_type + * @param \Bandwidth\Model\BusinessEntityTypeEnum $business_entity_type business_entity_type * * @return $this */ - public function setBusinessEntityType(\OpenAPI\Client\Model\BusinessEntityTypeEnum $business_entity_type): static + public function setBusinessEntityType(\Bandwidth\Model\BusinessEntityTypeEnum $business_entity_type): static { if (is_null($business_entity_type)) { throw new InvalidArgumentException('non-nullable business_entity_type cannot be null'); diff --git a/src/Model/VerificationUpdateRequest.php b/src/Model/VerificationUpdateRequest.php index a8db65c3..6af507d5 100644 --- a/src/Model/VerificationUpdateRequest.php +++ b/src/Model/VerificationUpdateRequest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * VerificationUpdateRequest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,21 +59,21 @@ class VerificationUpdateRequest implements ModelInterface, ArrayAccess, JsonSeri * @var array */ protected static array $openAPITypes = [ - 'business_address' => '\OpenAPI\Client\Model\Address', - 'business_contact' => '\OpenAPI\Client\Model\Contact', + 'business_address' => '\Bandwidth\Model\Address', + 'business_contact' => '\Bandwidth\Model\Contact', 'message_volume' => 'int', 'use_case' => 'string', 'use_case_summary' => 'string', 'production_message_content' => 'string', - 'opt_in_workflow' => '\OpenAPI\Client\Model\OptInWorkflow', + 'opt_in_workflow' => '\Bandwidth\Model\OptInWorkflow', 'additional_information' => 'string', 'isv_reseller' => 'string', 'privacy_policy_url' => 'string', 'terms_and_conditions_url' => 'string', 'business_dba' => 'string', 'business_registration_number' => 'string', - 'business_registration_type' => '\OpenAPI\Client\Model\BusinessRegistrationTypeEnum', - 'business_entity_type' => '\OpenAPI\Client\Model\BusinessEntityTypeEnum', + 'business_registration_type' => '\Bandwidth\Model\BusinessRegistrationTypeEnum', + 'business_entity_type' => '\Bandwidth\Model\BusinessEntityTypeEnum', 'business_registration_issuing_country' => 'string', 'help_message_response' => 'string', 'age_gated_content' => 'bool', @@ -490,9 +490,9 @@ public function valid(): bool /** * Gets business_address * - * @return \OpenAPI\Client\Model\Address + * @return \Bandwidth\Model\Address */ - public function getBusinessAddress(): \OpenAPI\Client\Model\Address + public function getBusinessAddress(): \Bandwidth\Model\Address { return $this->container['business_address']; } @@ -500,11 +500,11 @@ public function getBusinessAddress(): \OpenAPI\Client\Model\Address /** * Sets business_address * - * @param \OpenAPI\Client\Model\Address $business_address business_address + * @param \Bandwidth\Model\Address $business_address business_address * * @return $this */ - public function setBusinessAddress(\OpenAPI\Client\Model\Address $business_address): static + public function setBusinessAddress(\Bandwidth\Model\Address $business_address): static { if (is_null($business_address)) { throw new InvalidArgumentException('non-nullable business_address cannot be null'); @@ -517,9 +517,9 @@ public function setBusinessAddress(\OpenAPI\Client\Model\Address $business_addre /** * Gets business_contact * - * @return \OpenAPI\Client\Model\Contact + * @return \Bandwidth\Model\Contact */ - public function getBusinessContact(): \OpenAPI\Client\Model\Contact + public function getBusinessContact(): \Bandwidth\Model\Contact { return $this->container['business_contact']; } @@ -527,11 +527,11 @@ public function getBusinessContact(): \OpenAPI\Client\Model\Contact /** * Sets business_contact * - * @param \OpenAPI\Client\Model\Contact $business_contact business_contact + * @param \Bandwidth\Model\Contact $business_contact business_contact * * @return $this */ - public function setBusinessContact(\OpenAPI\Client\Model\Contact $business_contact): static + public function setBusinessContact(\Bandwidth\Model\Contact $business_contact): static { if (is_null($business_contact)) { throw new InvalidArgumentException('non-nullable business_contact cannot be null'); @@ -681,9 +681,9 @@ public function setProductionMessageContent(string $production_message_content): /** * Gets opt_in_workflow * - * @return \OpenAPI\Client\Model\OptInWorkflow + * @return \Bandwidth\Model\OptInWorkflow */ - public function getOptInWorkflow(): \OpenAPI\Client\Model\OptInWorkflow + public function getOptInWorkflow(): \Bandwidth\Model\OptInWorkflow { return $this->container['opt_in_workflow']; } @@ -691,11 +691,11 @@ public function getOptInWorkflow(): \OpenAPI\Client\Model\OptInWorkflow /** * Sets opt_in_workflow * - * @param \OpenAPI\Client\Model\OptInWorkflow $opt_in_workflow opt_in_workflow + * @param \Bandwidth\Model\OptInWorkflow $opt_in_workflow opt_in_workflow * * @return $this */ - public function setOptInWorkflow(\OpenAPI\Client\Model\OptInWorkflow $opt_in_workflow): static + public function setOptInWorkflow(\Bandwidth\Model\OptInWorkflow $opt_in_workflow): static { if (is_null($opt_in_workflow)) { throw new InvalidArgumentException('non-nullable opt_in_workflow cannot be null'); @@ -921,9 +921,9 @@ public function setBusinessRegistrationNumber(?string $business_registration_num /** * Gets business_registration_type * - * @return \OpenAPI\Client\Model\BusinessRegistrationTypeEnum|null + * @return \Bandwidth\Model\BusinessRegistrationTypeEnum|null */ - public function getBusinessRegistrationType(): ?\OpenAPI\Client\Model\BusinessRegistrationTypeEnum + public function getBusinessRegistrationType(): ?\Bandwidth\Model\BusinessRegistrationTypeEnum { return $this->container['business_registration_type']; } @@ -931,11 +931,11 @@ public function getBusinessRegistrationType(): ?\OpenAPI\Client\Model\BusinessRe /** * Sets business_registration_type * - * @param \OpenAPI\Client\Model\BusinessRegistrationTypeEnum|null $business_registration_type business_registration_type + * @param \Bandwidth\Model\BusinessRegistrationTypeEnum|null $business_registration_type business_registration_type * * @return $this */ - public function setBusinessRegistrationType(?\OpenAPI\Client\Model\BusinessRegistrationTypeEnum $business_registration_type): static + public function setBusinessRegistrationType(?\Bandwidth\Model\BusinessRegistrationTypeEnum $business_registration_type): static { if (is_null($business_registration_type)) { array_push($this->openAPINullablesSetToNull, 'business_registration_type'); @@ -955,9 +955,9 @@ public function setBusinessRegistrationType(?\OpenAPI\Client\Model\BusinessRegis /** * Gets business_entity_type * - * @return \OpenAPI\Client\Model\BusinessEntityTypeEnum|null + * @return \Bandwidth\Model\BusinessEntityTypeEnum|null */ - public function getBusinessEntityType(): ?\OpenAPI\Client\Model\BusinessEntityTypeEnum + public function getBusinessEntityType(): ?\Bandwidth\Model\BusinessEntityTypeEnum { return $this->container['business_entity_type']; } @@ -965,11 +965,11 @@ public function getBusinessEntityType(): ?\OpenAPI\Client\Model\BusinessEntityTy /** * Sets business_entity_type * - * @param \OpenAPI\Client\Model\BusinessEntityTypeEnum|null $business_entity_type business_entity_type + * @param \Bandwidth\Model\BusinessEntityTypeEnum|null $business_entity_type business_entity_type * * @return $this */ - public function setBusinessEntityType(?\OpenAPI\Client\Model\BusinessEntityTypeEnum $business_entity_type): static + public function setBusinessEntityType(?\Bandwidth\Model\BusinessEntityTypeEnum $business_entity_type): static { if (is_null($business_entity_type)) { throw new InvalidArgumentException('non-nullable business_entity_type cannot be null'); diff --git a/src/Model/VerificationWebhook.php b/src/Model/VerificationWebhook.php index 7c44ca43..0e5a548c 100644 --- a/src/Model/VerificationWebhook.php +++ b/src/Model/VerificationWebhook.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * VerificationWebhook Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,7 +61,7 @@ class VerificationWebhook implements ModelInterface, ArrayAccess, JsonSerializab protected static array $openAPITypes = [ 'account_id' => 'string', 'phone_number' => 'string', - 'status' => '\OpenAPI\Client\Model\TfvCallbackStatusEnum', + 'status' => '\Bandwidth\Model\TfvCallbackStatusEnum', 'internal_ticket_number' => 'string' ]; @@ -364,9 +364,9 @@ public function setPhoneNumber(?string $phone_number): static /** * Gets status * - * @return \OpenAPI\Client\Model\TfvCallbackStatusEnum|null + * @return \Bandwidth\Model\TfvCallbackStatusEnum|null */ - public function getStatus(): ?\OpenAPI\Client\Model\TfvCallbackStatusEnum + public function getStatus(): ?\Bandwidth\Model\TfvCallbackStatusEnum { return $this->container['status']; } @@ -374,11 +374,11 @@ public function getStatus(): ?\OpenAPI\Client\Model\TfvCallbackStatusEnum /** * Sets status * - * @param \OpenAPI\Client\Model\TfvCallbackStatusEnum|null $status status + * @param \Bandwidth\Model\TfvCallbackStatusEnum|null $status status * * @return $this */ - public function setStatus(?\OpenAPI\Client\Model\TfvCallbackStatusEnum $status): static + public function setStatus(?\Bandwidth\Model\TfvCallbackStatusEnum $status): static { if (is_null($status)) { throw new InvalidArgumentException('non-nullable status cannot be null'); diff --git a/src/Model/VerifyCodeRequest.php b/src/Model/VerifyCodeRequest.php index 850c2f98..28d99390 100644 --- a/src/Model/VerifyCodeRequest.php +++ b/src/Model/VerifyCodeRequest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * VerifyCodeRequest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/VerifyCodeResponse.php b/src/Model/VerifyCodeResponse.php index 78bb6a03..bc314948 100644 --- a/src/Model/VerifyCodeResponse.php +++ b/src/Model/VerifyCodeResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * VerifyCodeResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/VoiceApiError.php b/src/Model/VoiceApiError.php index ff9d65b5..e111b05e 100644 --- a/src/Model/VoiceApiError.php +++ b/src/Model/VoiceApiError.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * VoiceApiError Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/VoiceCodeResponse.php b/src/Model/VoiceCodeResponse.php index bc1d78b5..c46b1b69 100644 --- a/src/Model/VoiceCodeResponse.php +++ b/src/Model/VoiceCodeResponse.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * VoiceCodeResponse Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/WebhookSubscription.php b/src/Model/WebhookSubscription.php index 7cd40551..621763ad 100644 --- a/src/Model/WebhookSubscription.php +++ b/src/Model/WebhookSubscription.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * WebhookSubscription Class Doc Comment * * @description Information about a webhook that Bandwidth should send upon the completion of event customer has subscribed to. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -63,8 +63,8 @@ class WebhookSubscription implements ModelInterface, ArrayAccess, JsonSerializab 'id' => 'string', 'account_id' => 'string', 'callback_url' => 'string', - 'type' => '\OpenAPI\Client\Model\WebhookSubscriptionTypeEnum', - 'basic_authentication' => '\OpenAPI\Client\Model\WebhookSubscriptionBasicAuthentication', + 'type' => '\Bandwidth\Model\WebhookSubscriptionTypeEnum', + 'basic_authentication' => '\Bandwidth\Model\WebhookSubscriptionBasicAuthentication', 'created_date' => '\DateTime', 'modified_date' => '\DateTime' ]; @@ -423,9 +423,9 @@ public function setCallbackUrl(?string $callback_url): static /** * Gets type * - * @return \OpenAPI\Client\Model\WebhookSubscriptionTypeEnum|null + * @return \Bandwidth\Model\WebhookSubscriptionTypeEnum|null */ - public function getType(): ?\OpenAPI\Client\Model\WebhookSubscriptionTypeEnum + public function getType(): ?\Bandwidth\Model\WebhookSubscriptionTypeEnum { return $this->container['type']; } @@ -433,11 +433,11 @@ public function getType(): ?\OpenAPI\Client\Model\WebhookSubscriptionTypeEnum /** * Sets type * - * @param \OpenAPI\Client\Model\WebhookSubscriptionTypeEnum|null $type type + * @param \Bandwidth\Model\WebhookSubscriptionTypeEnum|null $type type * * @return $this */ - public function setType(?\OpenAPI\Client\Model\WebhookSubscriptionTypeEnum $type): static + public function setType(?\Bandwidth\Model\WebhookSubscriptionTypeEnum $type): static { if (is_null($type)) { throw new InvalidArgumentException('non-nullable type cannot be null'); @@ -450,9 +450,9 @@ public function setType(?\OpenAPI\Client\Model\WebhookSubscriptionTypeEnum $type /** * Gets basic_authentication * - * @return \OpenAPI\Client\Model\WebhookSubscriptionBasicAuthentication|null + * @return \Bandwidth\Model\WebhookSubscriptionBasicAuthentication|null */ - public function getBasicAuthentication(): ?\OpenAPI\Client\Model\WebhookSubscriptionBasicAuthentication + public function getBasicAuthentication(): ?\Bandwidth\Model\WebhookSubscriptionBasicAuthentication { return $this->container['basic_authentication']; } @@ -460,11 +460,11 @@ public function getBasicAuthentication(): ?\OpenAPI\Client\Model\WebhookSubscrip /** * Sets basic_authentication * - * @param \OpenAPI\Client\Model\WebhookSubscriptionBasicAuthentication|null $basic_authentication basic_authentication + * @param \Bandwidth\Model\WebhookSubscriptionBasicAuthentication|null $basic_authentication basic_authentication * * @return $this */ - public function setBasicAuthentication(?\OpenAPI\Client\Model\WebhookSubscriptionBasicAuthentication $basic_authentication): static + public function setBasicAuthentication(?\Bandwidth\Model\WebhookSubscriptionBasicAuthentication $basic_authentication): static { if (is_null($basic_authentication)) { throw new InvalidArgumentException('non-nullable basic_authentication cannot be null'); diff --git a/src/Model/WebhookSubscriptionBasicAuthentication.php b/src/Model/WebhookSubscriptionBasicAuthentication.php index 4dcb62b4..497bc291 100644 --- a/src/Model/WebhookSubscriptionBasicAuthentication.php +++ b/src/Model/WebhookSubscriptionBasicAuthentication.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * WebhookSubscriptionBasicAuthentication Class Doc Comment * * @description Basic authentication credentials are not required, but if present, both username and password must be provided. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess diff --git a/src/Model/WebhookSubscriptionError.php b/src/Model/WebhookSubscriptionError.php index 03cffbf3..9ffc39a5 100644 --- a/src/Model/WebhookSubscriptionError.php +++ b/src/Model/WebhookSubscriptionError.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * WebhookSubscriptionError Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -61,7 +61,7 @@ class WebhookSubscriptionError implements ModelInterface, ArrayAccess, JsonSeria protected static array $openAPITypes = [ 'code' => 'int', 'description' => 'string', - 'telephone_numbers' => '\OpenAPI\Client\Model\TelephoneNumber[]' + 'telephone_numbers' => '\Bandwidth\Model\TelephoneNumber[]' ]; /** @@ -335,7 +335,7 @@ public function setDescription(?string $description): static /** * Gets telephone_numbers * - * @return \OpenAPI\Client\Model\TelephoneNumber[]|null + * @return \Bandwidth\Model\TelephoneNumber[]|null */ public function getTelephoneNumbers(): ?array { @@ -345,7 +345,7 @@ public function getTelephoneNumbers(): ?array /** * Sets telephone_numbers * - * @param \OpenAPI\Client\Model\TelephoneNumber[]|null $telephone_numbers telephone_numbers + * @param \Bandwidth\Model\TelephoneNumber[]|null $telephone_numbers telephone_numbers * * @return $this */ diff --git a/src/Model/WebhookSubscriptionRequestSchema.php b/src/Model/WebhookSubscriptionRequestSchema.php index 124b7fde..61f50965 100644 --- a/src/Model/WebhookSubscriptionRequestSchema.php +++ b/src/Model/WebhookSubscriptionRequestSchema.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * WebhookSubscriptionRequestSchema Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -59,7 +59,7 @@ class WebhookSubscriptionRequestSchema implements ModelInterface, ArrayAccess, J * @var array */ protected static array $openAPITypes = [ - 'basic_authentication' => '\OpenAPI\Client\Model\TfvBasicAuthentication', + 'basic_authentication' => '\Bandwidth\Model\TfvBasicAuthentication', 'callback_url' => 'string', 'shared_secret_key' => 'string' ]; @@ -308,9 +308,9 @@ public function valid(): bool /** * Gets basic_authentication * - * @return \OpenAPI\Client\Model\TfvBasicAuthentication|null + * @return \Bandwidth\Model\TfvBasicAuthentication|null */ - public function getBasicAuthentication(): ?\OpenAPI\Client\Model\TfvBasicAuthentication + public function getBasicAuthentication(): ?\Bandwidth\Model\TfvBasicAuthentication { return $this->container['basic_authentication']; } @@ -318,11 +318,11 @@ public function getBasicAuthentication(): ?\OpenAPI\Client\Model\TfvBasicAuthent /** * Sets basic_authentication * - * @param \OpenAPI\Client\Model\TfvBasicAuthentication|null $basic_authentication basic_authentication + * @param \Bandwidth\Model\TfvBasicAuthentication|null $basic_authentication basic_authentication * * @return $this */ - public function setBasicAuthentication(?\OpenAPI\Client\Model\TfvBasicAuthentication $basic_authentication): static + public function setBasicAuthentication(?\Bandwidth\Model\TfvBasicAuthentication $basic_authentication): static { if (is_null($basic_authentication)) { throw new InvalidArgumentException('non-nullable basic_authentication cannot be null'); diff --git a/src/Model/WebhookSubscriptionTypeEnum.php b/src/Model/WebhookSubscriptionTypeEnum.php index bd4496be..e8039806 100644 --- a/src/Model/WebhookSubscriptionTypeEnum.php +++ b/src/Model/WebhookSubscriptionTypeEnum.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,12 +26,12 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; /** * WebhookSubscriptionTypeEnum Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/src/Model/WebhookSubscriptionsListBody.php b/src/Model/WebhookSubscriptionsListBody.php index 3821cfdd..39d50b2f 100644 --- a/src/Model/WebhookSubscriptionsListBody.php +++ b/src/Model/WebhookSubscriptionsListBody.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,19 +26,19 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client\Model; +namespace Bandwidth\Model; use ArrayAccess; use JsonSerializable; use InvalidArgumentException; use ReturnTypeWillChange; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\ObjectSerializer; /** * WebhookSubscriptionsListBody Class Doc Comment * * @description A list of all webhook subscriptions registered for this account ID for this particular feature (unpaginated). - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech * @implements ArrayAccess @@ -60,9 +60,9 @@ class WebhookSubscriptionsListBody implements ModelInterface, ArrayAccess, JsonS * @var array */ protected static array $openAPITypes = [ - 'links' => '\OpenAPI\Client\Model\LinksObject', - 'errors' => '\OpenAPI\Client\Model\WebhookSubscriptionError[]', - 'data' => '\OpenAPI\Client\Model\WebhookSubscription[]' + 'links' => '\Bandwidth\Model\LinksObject', + 'errors' => '\Bandwidth\Model\WebhookSubscriptionError[]', + 'data' => '\Bandwidth\Model\WebhookSubscription[]' ]; /** @@ -285,9 +285,9 @@ public function valid(): bool /** * Gets links * - * @return \OpenAPI\Client\Model\LinksObject|null + * @return \Bandwidth\Model\LinksObject|null */ - public function getLinks(): ?\OpenAPI\Client\Model\LinksObject + public function getLinks(): ?\Bandwidth\Model\LinksObject { return $this->container['links']; } @@ -295,11 +295,11 @@ public function getLinks(): ?\OpenAPI\Client\Model\LinksObject /** * Sets links * - * @param \OpenAPI\Client\Model\LinksObject|null $links links + * @param \Bandwidth\Model\LinksObject|null $links links * * @return $this */ - public function setLinks(?\OpenAPI\Client\Model\LinksObject $links): static + public function setLinks(?\Bandwidth\Model\LinksObject $links): static { if (is_null($links)) { throw new InvalidArgumentException('non-nullable links cannot be null'); @@ -312,7 +312,7 @@ public function setLinks(?\OpenAPI\Client\Model\LinksObject $links): static /** * Gets errors * - * @return \OpenAPI\Client\Model\WebhookSubscriptionError[]|null + * @return \Bandwidth\Model\WebhookSubscriptionError[]|null */ public function getErrors(): ?array { @@ -322,7 +322,7 @@ public function getErrors(): ?array /** * Sets errors * - * @param \OpenAPI\Client\Model\WebhookSubscriptionError[]|null $errors errors + * @param \Bandwidth\Model\WebhookSubscriptionError[]|null $errors errors * * @return $this */ @@ -339,7 +339,7 @@ public function setErrors(?array $errors): static /** * Gets data * - * @return \OpenAPI\Client\Model\WebhookSubscription[] + * @return \Bandwidth\Model\WebhookSubscription[] */ public function getData(): array { @@ -349,7 +349,7 @@ public function getData(): array /** * Sets data * - * @param \OpenAPI\Client\Model\WebhookSubscription[] $data data + * @param \Bandwidth\Model\WebhookSubscription[] $data data * * @return $this */ diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 33a8beae..a24d3872 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,18 +26,18 @@ * Do not edit the class manually. */ -namespace OpenAPI\Client; +namespace Bandwidth; use BackedEnum; use DateTimeInterface; use DateTime; use GuzzleHttp\Psr7\Utils; -use OpenAPI\Client\Model\ModelInterface; +use Bandwidth\Model\ModelInterface; /** * ObjectSerializer Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -508,7 +508,7 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade // If a discriminator is defined and points to a valid subclass, use it. $discriminator = $class::DISCRIMINATOR; if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) { - $subclass = '\OpenAPI\Client\Model\\' . $data->{$discriminator}; + $subclass = '\Bandwidth\Model\\' . $data->{$discriminator}; if (is_subclass_of($subclass, $class)) { $class = $subclass; } From c74aadcc74daed850b2dae7ae31aa04dc108d524 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 7 Jul 2026 16:27:46 -0400 Subject: [PATCH 03/53] update package name --- README.md | 4 ++-- openapi-config.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 48dd5de1..12c92d95 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Bandwidth +# Bandwidth SDK Bandwidth's Communication APIs @@ -36,7 +36,7 @@ Download the files and include `autoload.php`: ```php Date: Tue, 7 Jul 2026 16:47:46 -0400 Subject: [PATCH 04/53] fix tests --- .openapi-generator/FILES | 210 ++++++++++++++++++ README.md | 4 +- tests/Api/CallsApiTest.php | 12 +- tests/Api/ConferencesApiTest.php | 12 +- tests/Api/EndpointsApiTest.php | 12 +- tests/Api/MFAApiTest.php | 12 +- tests/Api/MediaApiTest.php | 12 +- tests/Api/MultiChannelApiTest.php | 12 +- tests/Api/PhoneNumberLookupApiTest.php | 12 +- tests/Api/RecordingsApiTest.php | 12 +- tests/Api/StatisticsApiTest.php | 12 +- tests/Api/TollFreeVerificationApiTest.php | 12 +- tests/Api/TranscriptionsApiTest.php | 12 +- tests/Model/AccountStatisticsTest.php | 6 +- tests/Model/AdditionalDenialReasonTest.php | 6 +- tests/Model/AddressTest.php | 6 +- tests/Model/AnswerCallbackTest.php | 6 +- tests/Model/AsyncLookupRequestTest.php | 6 +- tests/Model/BlockedWebhookTest.php | 6 +- tests/Model/BridgeCompleteCallbackTest.php | 6 +- .../BridgeTargetCompleteCallbackTest.php | 6 +- tests/Model/BrtcErrorResponseTest.php | 6 +- tests/Model/BrtcErrorSourceTest.php | 6 +- tests/Model/BrtcErrorTest.php | 6 +- tests/Model/BrtcLinkTest.php | 6 +- tests/Model/BusinessEntityTypeEnumTest.php | 6 +- .../BusinessRegistrationTypeEnumTest.php | 6 +- tests/Model/CallDirectionEnumTest.php | 6 +- tests/Model/CallRecordingMetadataTest.php | 6 +- tests/Model/CallStateEnumTest.php | 6 +- tests/Model/CallStateTest.php | 6 +- ...lTranscriptionDetectedLanguageEnumTest.php | 6 +- tests/Model/CallTranscriptionMetadataTest.php | 6 +- tests/Model/CallTranscriptionResponseTest.php | 6 +- tests/Model/CallTranscriptionTest.php | 6 +- .../Model/CallTranscriptionTrackEnumTest.php | 6 +- tests/Model/CallbackMethodEnumTest.php | 6 +- tests/Model/CallbackTest.php | 6 +- tests/Model/CardWidthEnumTest.php | 6 +- tests/Model/CodeRequestTest.php | 6 +- tests/Model/CompletedLookupStatusEnumTest.php | 6 +- .../Model/ConferenceCompletedCallbackTest.php | 6 +- tests/Model/ConferenceCreatedCallbackTest.php | 6 +- .../ConferenceMemberExitCallbackTest.php | 6 +- .../ConferenceMemberJoinCallbackTest.php | 6 +- tests/Model/ConferenceMemberTest.php | 6 +- ...nferenceRecordingAvailableCallbackTest.php | 6 +- .../Model/ConferenceRecordingMetadataTest.php | 6 +- .../Model/ConferenceRedirectCallbackTest.php | 6 +- tests/Model/ConferenceStateEnumTest.php | 6 +- tests/Model/ConferenceTest.php | 6 +- tests/Model/ContactTest.php | 6 +- .../CreateAsyncBulkLookupResponseDataTest.php | 6 +- .../CreateAsyncBulkLookupResponseTest.php | 6 +- tests/Model/CreateCallResponseTest.php | 6 +- tests/Model/CreateCallTest.php | 6 +- tests/Model/CreateEndpointRequestBaseTest.php | 6 +- .../Model/CreateEndpointResponseDataTest.php | 6 +- tests/Model/CreateEndpointResponseTest.php | 6 +- tests/Model/CreateMessageRequestErrorTest.php | 6 +- .../CreateMultiChannelMessageResponseTest.php | 6 +- .../CreateSyncLookupResponseDataTest.php | 6 +- tests/Model/CreateSyncLookupResponseTest.php | 6 +- .../CreateWebRtcConnectionRequestTest.php | 6 +- tests/Model/DeactivationEventEnumTest.php | 6 +- tests/Model/DeviceStatusEnumTest.php | 6 +- tests/Model/DeviceTest.php | 6 +- tests/Model/DisconnectCallbackTest.php | 6 +- tests/Model/DiversionTest.php | 6 +- tests/Model/DtmfCallbackTest.php | 6 +- tests/Model/EndpointDirectionEnumTest.php | 6 +- tests/Model/EndpointEventTest.php | 6 +- tests/Model/EndpointEventTypeEnumTest.php | 6 +- tests/Model/EndpointResponseTest.php | 6 +- tests/Model/EndpointStatusEnumTest.php | 6 +- tests/Model/EndpointTest.php | 6 +- tests/Model/EndpointTypeEnumTest.php | 6 +- tests/Model/EndpointsTest.php | 6 +- tests/Model/ErrorObjectTest.php | 6 +- tests/Model/ErrorSourceTest.php | 6 +- tests/Model/FailureWebhookTest.php | 6 +- tests/Model/FieldErrorTest.php | 6 +- tests/Model/FileFormatEnumTest.php | 6 +- tests/Model/GatherCallbackTest.php | 6 +- .../GetAsyncBulkLookupResponseDataTest.php | 6 +- .../Model/GetAsyncBulkLookupResponseTest.php | 6 +- .../Model/InProgressLookupStatusEnumTest.php | 6 +- tests/Model/InboundCallbackMessageTest.php | 6 +- tests/Model/InboundCallbackTest.php | 6 +- tests/Model/InboundCallbackTypeEnumTest.php | 6 +- tests/Model/InitiateCallbackTest.php | 6 +- .../LatestMessageDeliveryStatusEnumTest.php | 6 +- tests/Model/LineTypeEnumTest.php | 6 +- tests/Model/LinkSchemaTest.php | 6 +- tests/Model/LinkTest.php | 6 +- tests/Model/LinksObjectTest.php | 6 +- tests/Model/ListEndpointsResponseTest.php | 6 +- tests/Model/ListMessageDirectionEnumTest.php | 6 +- tests/Model/ListMessageItemTest.php | 6 +- tests/Model/LookupErrorResponseTest.php | 6 +- tests/Model/LookupErrorSchemaMetaTest.php | 6 +- tests/Model/LookupErrorSchemaTest.php | 6 +- tests/Model/LookupResultTest.php | 6 +- .../MachineDetectionCompleteCallbackTest.php | 6 +- .../MachineDetectionConfigurationTest.php | 6 +- tests/Model/MachineDetectionModeEnumTest.php | 6 +- tests/Model/MachineDetectionResultTest.php | 6 +- tests/Model/MediaTest.php | 6 +- tests/Model/MessageDirectionEnumTest.php | 6 +- tests/Model/MessageRequestTest.php | 6 +- tests/Model/MessageStatusEnumTest.php | 6 +- tests/Model/MessageTest.php | 6 +- tests/Model/MessageTypeEnumTest.php | 6 +- tests/Model/MessagesListTest.php | 6 +- tests/Model/MessagingCodeResponseTest.php | 6 +- tests/Model/MessagingRequestErrorTest.php | 6 +- tests/Model/MfaForbiddenRequestErrorTest.php | 6 +- tests/Model/MfaRequestErrorTest.php | 6 +- .../Model/MfaUnauthorizedRequestErrorTest.php | 6 +- tests/Model/MmsMessageContentFileTest.php | 6 +- tests/Model/MmsMessageContentTest.php | 6 +- .../MultiChannelActionCalendarEventTest.php | 6 +- tests/Model/MultiChannelActionTest.php | 6 +- .../MultiChannelChannelListMMSObjectTest.php | 6 +- ...hannelChannelListMMSResponseObjectTest.php | 6 +- .../MultiChannelChannelListObjectBaseTest.php | 6 +- ...MultiChannelChannelListOwnerObjectTest.php | 6 +- ...elChannelListRBMObjectAllOfContentTest.php | 6 +- .../MultiChannelChannelListRBMObjectTest.php | 6 +- ...hannelChannelListRBMResponseObjectTest.php | 6 +- ...ltiChannelChannelListRequestObjectTest.php | 6 +- ...tiChannelChannelListResponseObjectTest.php | 6 +- .../MultiChannelChannelListSMSObjectTest.php | 6 +- ...hannelChannelListSMSResponseObjectTest.php | 6 +- tests/Model/MultiChannelErrorTest.php | 6 +- .../MultiChannelMessageChannelEnumTest.php | 6 +- .../Model/MultiChannelMessageContentTest.php | 6 +- .../Model/MultiChannelMessageRequestTest.php | 6 +- .../MultiChannelMessageResponseDataTest.php | 6 +- tests/Model/OptInWorkflowTest.php | 6 +- tests/Model/PageInfoTest.php | 6 +- tests/Model/PageTest.php | 6 +- tests/Model/PriorityEnumTest.php | 6 +- tests/Model/ProductTypeEnumTest.php | 6 +- tests/Model/RbmActionBaseTest.php | 6 +- tests/Model/RbmActionDialTest.php | 6 +- tests/Model/RbmActionOpenUrlTest.php | 6 +- tests/Model/RbmActionTypeEnumTest.php | 6 +- tests/Model/RbmActionViewLocationTest.php | 6 +- tests/Model/RbmCardContentMediaTest.php | 6 +- tests/Model/RbmCardContentTest.php | 6 +- tests/Model/RbmLocationResponseTest.php | 6 +- tests/Model/RbmMediaHeightEnumTest.php | 6 +- tests/Model/RbmMessageCarouselCardTest.php | 6 +- tests/Model/RbmMessageContentFileTest.php | 6 +- tests/Model/RbmMessageContentRichCardTest.php | 6 +- tests/Model/RbmMessageContentTextTest.php | 6 +- tests/Model/RbmMessageMediaTest.php | 6 +- tests/Model/RbmOpenUrlEnumTest.php | 6 +- tests/Model/RbmStandaloneCardTest.php | 6 +- tests/Model/RbmSuggestionResponseTest.php | 6 +- tests/Model/RbmWebViewEnumTest.php | 6 +- .../Model/RecordingAvailableCallbackTest.php | 6 +- tests/Model/RecordingCompleteCallbackTest.php | 6 +- tests/Model/RecordingStateEnumTest.php | 6 +- .../Model/RecordingTranscriptionClipTest.php | 6 +- .../RecordingTranscriptionMetadataTest.php | 6 +- tests/Model/RecordingTranscriptionsTest.php | 6 +- tests/Model/RedirectCallbackTest.php | 6 +- tests/Model/RedirectMethodEnumTest.php | 6 +- tests/Model/SipConnectionMetadataTest.php | 6 +- tests/Model/SipCredentialsTest.php | 6 +- tests/Model/SmsMessageContentTest.php | 6 +- .../StandaloneCardOrientationEnumTest.php | 6 +- tests/Model/StatusCallbackMessageTest.php | 6 +- tests/Model/StatusCallbackTest.php | 6 +- tests/Model/StatusCallbackTypeEnumTest.php | 6 +- tests/Model/StirShakenTest.php | 6 +- tests/Model/SyncLookupRequestTest.php | 6 +- tests/Model/TelephoneNumberTest.php | 6 +- tests/Model/TfvBasicAuthenticationTest.php | 6 +- tests/Model/TfvCallbackStatusEnumTest.php | 6 +- tests/Model/TfvErrorTest.php | 6 +- tests/Model/TfvStatusEnumTest.php | 6 +- tests/Model/TfvStatusTest.php | 6 +- tests/Model/TfvSubmissionInfoTest.php | 6 +- tests/Model/TfvSubmissionWrapperTest.php | 6 +- tests/Model/ThumbnailAlignmentEnumTest.php | 6 +- tests/Model/TranscribeRecordingTest.php | 6 +- .../TranscriptionAvailableCallbackTest.php | 6 +- tests/Model/TranscriptionTest.php | 6 +- tests/Model/TransferAnswerCallbackTest.php | 6 +- tests/Model/TransferCompleteCallbackTest.php | 6 +- .../Model/TransferDisconnectCallbackTest.php | 6 +- tests/Model/UpdateCallRecordingTest.php | 6 +- tests/Model/UpdateCallTest.php | 6 +- tests/Model/UpdateConferenceMemberTest.php | 6 +- tests/Model/UpdateConferenceTest.php | 6 +- tests/Model/VerificationDenialWebhookTest.php | 6 +- tests/Model/VerificationRequestTest.php | 6 +- tests/Model/VerificationUpdateRequestTest.php | 6 +- tests/Model/VerificationWebhookTest.php | 6 +- tests/Model/VerifyCodeRequestTest.php | 6 +- tests/Model/VerifyCodeResponseTest.php | 6 +- tests/Model/VoiceApiErrorTest.php | 6 +- tests/Model/VoiceCodeResponseTest.php | 6 +- ...ookSubscriptionBasicAuthenticationTest.php | 6 +- tests/Model/WebhookSubscriptionErrorTest.php | 6 +- .../WebhookSubscriptionRequestSchemaTest.php | 6 +- tests/Model/WebhookSubscriptionTest.php | 6 +- .../Model/WebhookSubscriptionTypeEnumTest.php | 6 +- .../WebhookSubscriptionsListBodyTest.php | 6 +- 212 files changed, 875 insertions(+), 665 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index e72f388f..45eefd50 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -434,3 +434,213 @@ src/Model/WebhookSubscriptionRequestSchema.php src/Model/WebhookSubscriptionTypeEnum.php src/Model/WebhookSubscriptionsListBody.php src/ObjectSerializer.php +tests/Api/CallsApiTest.php +tests/Api/ConferencesApiTest.php +tests/Api/EndpointsApiTest.php +tests/Api/MFAApiTest.php +tests/Api/MediaApiTest.php +tests/Api/MultiChannelApiTest.php +tests/Api/PhoneNumberLookupApiTest.php +tests/Api/RecordingsApiTest.php +tests/Api/StatisticsApiTest.php +tests/Api/TollFreeVerificationApiTest.php +tests/Api/TranscriptionsApiTest.php +tests/Model/AccountStatisticsTest.php +tests/Model/AdditionalDenialReasonTest.php +tests/Model/AddressTest.php +tests/Model/AnswerCallbackTest.php +tests/Model/AsyncLookupRequestTest.php +tests/Model/BlockedWebhookTest.php +tests/Model/BridgeCompleteCallbackTest.php +tests/Model/BridgeTargetCompleteCallbackTest.php +tests/Model/BrtcErrorResponseTest.php +tests/Model/BrtcErrorSourceTest.php +tests/Model/BrtcErrorTest.php +tests/Model/BrtcLinkTest.php +tests/Model/BusinessEntityTypeEnumTest.php +tests/Model/BusinessRegistrationTypeEnumTest.php +tests/Model/CallDirectionEnumTest.php +tests/Model/CallRecordingMetadataTest.php +tests/Model/CallStateEnumTest.php +tests/Model/CallStateTest.php +tests/Model/CallTranscriptionDetectedLanguageEnumTest.php +tests/Model/CallTranscriptionMetadataTest.php +tests/Model/CallTranscriptionResponseTest.php +tests/Model/CallTranscriptionTest.php +tests/Model/CallTranscriptionTrackEnumTest.php +tests/Model/CallbackMethodEnumTest.php +tests/Model/CallbackTest.php +tests/Model/CardWidthEnumTest.php +tests/Model/CodeRequestTest.php +tests/Model/CompletedLookupStatusEnumTest.php +tests/Model/ConferenceCompletedCallbackTest.php +tests/Model/ConferenceCreatedCallbackTest.php +tests/Model/ConferenceMemberExitCallbackTest.php +tests/Model/ConferenceMemberJoinCallbackTest.php +tests/Model/ConferenceMemberTest.php +tests/Model/ConferenceRecordingAvailableCallbackTest.php +tests/Model/ConferenceRecordingMetadataTest.php +tests/Model/ConferenceRedirectCallbackTest.php +tests/Model/ConferenceStateEnumTest.php +tests/Model/ConferenceTest.php +tests/Model/ContactTest.php +tests/Model/CreateAsyncBulkLookupResponseDataTest.php +tests/Model/CreateAsyncBulkLookupResponseTest.php +tests/Model/CreateCallResponseTest.php +tests/Model/CreateCallTest.php +tests/Model/CreateEndpointRequestBaseTest.php +tests/Model/CreateEndpointResponseDataTest.php +tests/Model/CreateEndpointResponseTest.php +tests/Model/CreateMessageRequestErrorTest.php +tests/Model/CreateMultiChannelMessageResponseTest.php +tests/Model/CreateSyncLookupResponseDataTest.php +tests/Model/CreateSyncLookupResponseTest.php +tests/Model/CreateWebRtcConnectionRequestTest.php +tests/Model/DeactivationEventEnumTest.php +tests/Model/DeviceStatusEnumTest.php +tests/Model/DeviceTest.php +tests/Model/DisconnectCallbackTest.php +tests/Model/DiversionTest.php +tests/Model/DtmfCallbackTest.php +tests/Model/EndpointDirectionEnumTest.php +tests/Model/EndpointEventTest.php +tests/Model/EndpointEventTypeEnumTest.php +tests/Model/EndpointResponseTest.php +tests/Model/EndpointStatusEnumTest.php +tests/Model/EndpointTest.php +tests/Model/EndpointTypeEnumTest.php +tests/Model/EndpointsTest.php +tests/Model/ErrorObjectTest.php +tests/Model/ErrorSourceTest.php +tests/Model/FailureWebhookTest.php +tests/Model/FieldErrorTest.php +tests/Model/FileFormatEnumTest.php +tests/Model/GatherCallbackTest.php +tests/Model/GetAsyncBulkLookupResponseDataTest.php +tests/Model/GetAsyncBulkLookupResponseTest.php +tests/Model/InProgressLookupStatusEnumTest.php +tests/Model/InboundCallbackMessageTest.php +tests/Model/InboundCallbackTest.php +tests/Model/InboundCallbackTypeEnumTest.php +tests/Model/InitiateCallbackTest.php +tests/Model/LatestMessageDeliveryStatusEnumTest.php +tests/Model/LineTypeEnumTest.php +tests/Model/LinkSchemaTest.php +tests/Model/LinkTest.php +tests/Model/LinksObjectTest.php +tests/Model/ListEndpointsResponseTest.php +tests/Model/ListMessageDirectionEnumTest.php +tests/Model/ListMessageItemTest.php +tests/Model/LookupErrorResponseTest.php +tests/Model/LookupErrorSchemaMetaTest.php +tests/Model/LookupErrorSchemaTest.php +tests/Model/LookupResultTest.php +tests/Model/MachineDetectionCompleteCallbackTest.php +tests/Model/MachineDetectionConfigurationTest.php +tests/Model/MachineDetectionModeEnumTest.php +tests/Model/MachineDetectionResultTest.php +tests/Model/MediaTest.php +tests/Model/MessageDirectionEnumTest.php +tests/Model/MessageRequestTest.php +tests/Model/MessageStatusEnumTest.php +tests/Model/MessageTest.php +tests/Model/MessageTypeEnumTest.php +tests/Model/MessagesListTest.php +tests/Model/MessagingCodeResponseTest.php +tests/Model/MessagingRequestErrorTest.php +tests/Model/MfaForbiddenRequestErrorTest.php +tests/Model/MfaRequestErrorTest.php +tests/Model/MfaUnauthorizedRequestErrorTest.php +tests/Model/MmsMessageContentFileTest.php +tests/Model/MmsMessageContentTest.php +tests/Model/MultiChannelActionCalendarEventTest.php +tests/Model/MultiChannelActionTest.php +tests/Model/MultiChannelChannelListMMSObjectTest.php +tests/Model/MultiChannelChannelListMMSResponseObjectTest.php +tests/Model/MultiChannelChannelListObjectBaseTest.php +tests/Model/MultiChannelChannelListOwnerObjectTest.php +tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php +tests/Model/MultiChannelChannelListRBMObjectTest.php +tests/Model/MultiChannelChannelListRBMResponseObjectTest.php +tests/Model/MultiChannelChannelListRequestObjectTest.php +tests/Model/MultiChannelChannelListResponseObjectTest.php +tests/Model/MultiChannelChannelListSMSObjectTest.php +tests/Model/MultiChannelChannelListSMSResponseObjectTest.php +tests/Model/MultiChannelErrorTest.php +tests/Model/MultiChannelMessageChannelEnumTest.php +tests/Model/MultiChannelMessageContentTest.php +tests/Model/MultiChannelMessageRequestTest.php +tests/Model/MultiChannelMessageResponseDataTest.php +tests/Model/OptInWorkflowTest.php +tests/Model/PageInfoTest.php +tests/Model/PageTest.php +tests/Model/PriorityEnumTest.php +tests/Model/ProductTypeEnumTest.php +tests/Model/RbmActionBaseTest.php +tests/Model/RbmActionDialTest.php +tests/Model/RbmActionOpenUrlTest.php +tests/Model/RbmActionTypeEnumTest.php +tests/Model/RbmActionViewLocationTest.php +tests/Model/RbmCardContentMediaTest.php +tests/Model/RbmCardContentTest.php +tests/Model/RbmLocationResponseTest.php +tests/Model/RbmMediaHeightEnumTest.php +tests/Model/RbmMessageCarouselCardTest.php +tests/Model/RbmMessageContentFileTest.php +tests/Model/RbmMessageContentRichCardTest.php +tests/Model/RbmMessageContentTextTest.php +tests/Model/RbmMessageMediaTest.php +tests/Model/RbmOpenUrlEnumTest.php +tests/Model/RbmStandaloneCardTest.php +tests/Model/RbmSuggestionResponseTest.php +tests/Model/RbmWebViewEnumTest.php +tests/Model/RecordingAvailableCallbackTest.php +tests/Model/RecordingCompleteCallbackTest.php +tests/Model/RecordingStateEnumTest.php +tests/Model/RecordingTranscriptionClipTest.php +tests/Model/RecordingTranscriptionMetadataTest.php +tests/Model/RecordingTranscriptionsTest.php +tests/Model/RedirectCallbackTest.php +tests/Model/RedirectMethodEnumTest.php +tests/Model/SipConnectionMetadataTest.php +tests/Model/SipCredentialsTest.php +tests/Model/SmsMessageContentTest.php +tests/Model/StandaloneCardOrientationEnumTest.php +tests/Model/StatusCallbackMessageTest.php +tests/Model/StatusCallbackTest.php +tests/Model/StatusCallbackTypeEnumTest.php +tests/Model/StirShakenTest.php +tests/Model/SyncLookupRequestTest.php +tests/Model/TelephoneNumberTest.php +tests/Model/TfvBasicAuthenticationTest.php +tests/Model/TfvCallbackStatusEnumTest.php +tests/Model/TfvErrorTest.php +tests/Model/TfvStatusEnumTest.php +tests/Model/TfvStatusTest.php +tests/Model/TfvSubmissionInfoTest.php +tests/Model/TfvSubmissionWrapperTest.php +tests/Model/ThumbnailAlignmentEnumTest.php +tests/Model/TranscribeRecordingTest.php +tests/Model/TranscriptionAvailableCallbackTest.php +tests/Model/TranscriptionTest.php +tests/Model/TransferAnswerCallbackTest.php +tests/Model/TransferCompleteCallbackTest.php +tests/Model/TransferDisconnectCallbackTest.php +tests/Model/UpdateCallRecordingTest.php +tests/Model/UpdateCallTest.php +tests/Model/UpdateConferenceMemberTest.php +tests/Model/UpdateConferenceTest.php +tests/Model/VerificationDenialWebhookTest.php +tests/Model/VerificationRequestTest.php +tests/Model/VerificationUpdateRequestTest.php +tests/Model/VerificationWebhookTest.php +tests/Model/VerifyCodeRequestTest.php +tests/Model/VerifyCodeResponseTest.php +tests/Model/VoiceApiErrorTest.php +tests/Model/VoiceCodeResponseTest.php +tests/Model/WebhookSubscriptionBasicAuthenticationTest.php +tests/Model/WebhookSubscriptionErrorTest.php +tests/Model/WebhookSubscriptionRequestSchemaTest.php +tests/Model/WebhookSubscriptionTest.php +tests/Model/WebhookSubscriptionTypeEnumTest.php +tests/Model/WebhookSubscriptionsListBodyTest.php diff --git a/README.md b/README.md index 12c92d95..9d11fbfb 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,11 @@ To install the bindings via [Composer](https://getcomposer.org/), add the follow "repositories": [ { "type": "vcs", - "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" + "url": "https://github.com/bandwidth/php-sdk.git" } ], "require": { - "GIT_USER_ID/GIT_REPO_ID": "*@dev" + "bandwidth/php-sdk": "*@dev" } } ``` diff --git a/tests/Api/CallsApiTest.php b/tests/Api/CallsApiTest.php index 06476c26..ec4ea1af 100644 --- a/tests/Api/CallsApiTest.php +++ b/tests/Api/CallsApiTest.php @@ -3,7 +3,7 @@ * CallsApiTest * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,17 +25,17 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace Bandwidth\Test\Api; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\Configuration; +use Bandwidth\ApiException; +use Bandwidth\ObjectSerializer; use PHPUnit\Framework\TestCase; /** * CallsApiTest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Api/ConferencesApiTest.php b/tests/Api/ConferencesApiTest.php index b150ea07..70d500e6 100644 --- a/tests/Api/ConferencesApiTest.php +++ b/tests/Api/ConferencesApiTest.php @@ -3,7 +3,7 @@ * ConferencesApiTest * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,17 +25,17 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace Bandwidth\Test\Api; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\Configuration; +use Bandwidth\ApiException; +use Bandwidth\ObjectSerializer; use PHPUnit\Framework\TestCase; /** * ConferencesApiTest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Api/EndpointsApiTest.php b/tests/Api/EndpointsApiTest.php index 54511425..777c372b 100644 --- a/tests/Api/EndpointsApiTest.php +++ b/tests/Api/EndpointsApiTest.php @@ -3,7 +3,7 @@ * EndpointsApiTest * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,17 +25,17 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace Bandwidth\Test\Api; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\Configuration; +use Bandwidth\ApiException; +use Bandwidth\ObjectSerializer; use PHPUnit\Framework\TestCase; /** * EndpointsApiTest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Api/MFAApiTest.php b/tests/Api/MFAApiTest.php index afd90c0b..b1903dbb 100644 --- a/tests/Api/MFAApiTest.php +++ b/tests/Api/MFAApiTest.php @@ -3,7 +3,7 @@ * MFAApiTest * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,17 +25,17 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace Bandwidth\Test\Api; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\Configuration; +use Bandwidth\ApiException; +use Bandwidth\ObjectSerializer; use PHPUnit\Framework\TestCase; /** * MFAApiTest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Api/MediaApiTest.php b/tests/Api/MediaApiTest.php index 4f0c24d4..e1fc9787 100644 --- a/tests/Api/MediaApiTest.php +++ b/tests/Api/MediaApiTest.php @@ -3,7 +3,7 @@ * MediaApiTest * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,17 +25,17 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace Bandwidth\Test\Api; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\Configuration; +use Bandwidth\ApiException; +use Bandwidth\ObjectSerializer; use PHPUnit\Framework\TestCase; /** * MediaApiTest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Api/MultiChannelApiTest.php b/tests/Api/MultiChannelApiTest.php index 42b82570..9597d705 100644 --- a/tests/Api/MultiChannelApiTest.php +++ b/tests/Api/MultiChannelApiTest.php @@ -3,7 +3,7 @@ * MultiChannelApiTest * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,17 +25,17 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace Bandwidth\Test\Api; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\Configuration; +use Bandwidth\ApiException; +use Bandwidth\ObjectSerializer; use PHPUnit\Framework\TestCase; /** * MultiChannelApiTest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Api/PhoneNumberLookupApiTest.php b/tests/Api/PhoneNumberLookupApiTest.php index be79b729..d5334995 100644 --- a/tests/Api/PhoneNumberLookupApiTest.php +++ b/tests/Api/PhoneNumberLookupApiTest.php @@ -3,7 +3,7 @@ * PhoneNumberLookupApiTest * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,17 +25,17 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace Bandwidth\Test\Api; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\Configuration; +use Bandwidth\ApiException; +use Bandwidth\ObjectSerializer; use PHPUnit\Framework\TestCase; /** * PhoneNumberLookupApiTest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Api/RecordingsApiTest.php b/tests/Api/RecordingsApiTest.php index f8042999..edc6370a 100644 --- a/tests/Api/RecordingsApiTest.php +++ b/tests/Api/RecordingsApiTest.php @@ -3,7 +3,7 @@ * RecordingsApiTest * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,17 +25,17 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace Bandwidth\Test\Api; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\Configuration; +use Bandwidth\ApiException; +use Bandwidth\ObjectSerializer; use PHPUnit\Framework\TestCase; /** * RecordingsApiTest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Api/StatisticsApiTest.php b/tests/Api/StatisticsApiTest.php index bd80fc3c..c06f47fa 100644 --- a/tests/Api/StatisticsApiTest.php +++ b/tests/Api/StatisticsApiTest.php @@ -3,7 +3,7 @@ * StatisticsApiTest * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,17 +25,17 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace Bandwidth\Test\Api; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\Configuration; +use Bandwidth\ApiException; +use Bandwidth\ObjectSerializer; use PHPUnit\Framework\TestCase; /** * StatisticsApiTest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Api/TollFreeVerificationApiTest.php b/tests/Api/TollFreeVerificationApiTest.php index b45312ff..78d3d58f 100644 --- a/tests/Api/TollFreeVerificationApiTest.php +++ b/tests/Api/TollFreeVerificationApiTest.php @@ -3,7 +3,7 @@ * TollFreeVerificationApiTest * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,17 +25,17 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace Bandwidth\Test\Api; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\Configuration; +use Bandwidth\ApiException; +use Bandwidth\ObjectSerializer; use PHPUnit\Framework\TestCase; /** * TollFreeVerificationApiTest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Api/TranscriptionsApiTest.php b/tests/Api/TranscriptionsApiTest.php index 7a9b0e19..5ec8822a 100644 --- a/tests/Api/TranscriptionsApiTest.php +++ b/tests/Api/TranscriptionsApiTest.php @@ -3,7 +3,7 @@ * TranscriptionsApiTest * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,17 +25,17 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace Bandwidth\Test\Api; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\ObjectSerializer; +use Bandwidth\Configuration; +use Bandwidth\ApiException; +use Bandwidth\ObjectSerializer; use PHPUnit\Framework\TestCase; /** * TranscriptionsApiTest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/AccountStatisticsTest.php b/tests/Model/AccountStatisticsTest.php index 88eeb7b4..b04cdbf9 100644 --- a/tests/Model/AccountStatisticsTest.php +++ b/tests/Model/AccountStatisticsTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * AccountStatisticsTest Class Doc Comment * * @description AccountStatistics - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/AdditionalDenialReasonTest.php b/tests/Model/AdditionalDenialReasonTest.php index e1cf0479..aed0c6b7 100644 --- a/tests/Model/AdditionalDenialReasonTest.php +++ b/tests/Model/AdditionalDenialReasonTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * AdditionalDenialReasonTest Class Doc Comment * * @description AdditionalDenialReason - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/AddressTest.php b/tests/Model/AddressTest.php index 9cddffce..6d052bda 100644 --- a/tests/Model/AddressTest.php +++ b/tests/Model/AddressTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * AddressTest Class Doc Comment * * @description Address - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/AnswerCallbackTest.php b/tests/Model/AnswerCallbackTest.php index 77fc42d2..838058da 100644 --- a/tests/Model/AnswerCallbackTest.php +++ b/tests/Model/AnswerCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * AnswerCallbackTest Class Doc Comment * * @description The Answer event is sent to the answerUrl specified in the createCall request when an outbound call is answered. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/AsyncLookupRequestTest.php b/tests/Model/AsyncLookupRequestTest.php index be79338f..ef8d5dbd 100644 --- a/tests/Model/AsyncLookupRequestTest.php +++ b/tests/Model/AsyncLookupRequestTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * AsyncLookupRequestTest Class Doc Comment * * @description AsyncLookupRequest - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/BlockedWebhookTest.php b/tests/Model/BlockedWebhookTest.php index 73c0db15..7fe8ba7b 100644 --- a/tests/Model/BlockedWebhookTest.php +++ b/tests/Model/BlockedWebhookTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * BlockedWebhookTest Class Doc Comment * * @description BlockedWebhook - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/BridgeCompleteCallbackTest.php b/tests/Model/BridgeCompleteCallbackTest.php index 2d5d4aaa..6b671421 100644 --- a/tests/Model/BridgeCompleteCallbackTest.php +++ b/tests/Model/BridgeCompleteCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * BridgeCompleteCallbackTest Class Doc Comment * * @description If the target call leaves the <Bridge>, then this callback is sent to the bridgeCompleteUrl, and the BXML returned in it is executed on the call. If this webhook is sent, the Bridge Target Complete webhook is NOT sent. This callback is also sent if any problem occurs that prevents the calls to be bridged. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/BridgeTargetCompleteCallbackTest.php b/tests/Model/BridgeTargetCompleteCallbackTest.php index 40e55596..56ac2bce 100644 --- a/tests/Model/BridgeTargetCompleteCallbackTest.php +++ b/tests/Model/BridgeTargetCompleteCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * BridgeTargetCompleteCallbackTest Class Doc Comment * * @description If the originating call leaves the <Bridge>, then this callback is sent to the bridgeTargetCompleteUrl, and the BXML returned in it is executed on the target call. If this webhook is sent, the Bridge Complete webhook is NOT sent. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/BrtcErrorResponseTest.php b/tests/Model/BrtcErrorResponseTest.php index 215e5388..54c27e82 100644 --- a/tests/Model/BrtcErrorResponseTest.php +++ b/tests/Model/BrtcErrorResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * BrtcErrorResponseTest Class Doc Comment * * @description BrtcErrorResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/BrtcErrorSourceTest.php b/tests/Model/BrtcErrorSourceTest.php index ffb83dbd..62b8967d 100644 --- a/tests/Model/BrtcErrorSourceTest.php +++ b/tests/Model/BrtcErrorSourceTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * BrtcErrorSourceTest Class Doc Comment * * @description BrtcErrorSource - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/BrtcErrorTest.php b/tests/Model/BrtcErrorTest.php index 8a2d9f59..2d6b5277 100644 --- a/tests/Model/BrtcErrorTest.php +++ b/tests/Model/BrtcErrorTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * BrtcErrorTest Class Doc Comment * * @description BrtcError - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/BrtcLinkTest.php b/tests/Model/BrtcLinkTest.php index 5c218658..3ee4cdcb 100644 --- a/tests/Model/BrtcLinkTest.php +++ b/tests/Model/BrtcLinkTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * BrtcLinkTest Class Doc Comment * * @description BrtcLink - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/BusinessEntityTypeEnumTest.php b/tests/Model/BusinessEntityTypeEnumTest.php index 01c93809..c0334d04 100644 --- a/tests/Model/BusinessEntityTypeEnumTest.php +++ b/tests/Model/BusinessEntityTypeEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * BusinessEntityTypeEnumTest Class Doc Comment * * @description The type of registered business. **Note: As of October 19th, 2026 submissions using a value other than `SOLE_PROPRIETOR` must provide a value for `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Submissions using `SOLE_PROPRIETOR` must _omit_ `businessRegistrationNumber`, `businessRegistrationType`, and `businessRegistrationIssuingCountry`. Failure to adhere to these constraints will result in a 400 Bad Request rejection.** - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/BusinessRegistrationTypeEnumTest.php b/tests/Model/BusinessRegistrationTypeEnumTest.php index 04faf5dd..2179618b 100644 --- a/tests/Model/BusinessRegistrationTypeEnumTest.php +++ b/tests/Model/BusinessRegistrationTypeEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * BusinessRegistrationTypeEnumTest Class Doc Comment * * @description The type of business registration number. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CallDirectionEnumTest.php b/tests/Model/CallDirectionEnumTest.php index dc8b0146..94b0a794 100644 --- a/tests/Model/CallDirectionEnumTest.php +++ b/tests/Model/CallDirectionEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CallDirectionEnumTest Class Doc Comment * * @description The direction of the call. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CallRecordingMetadataTest.php b/tests/Model/CallRecordingMetadataTest.php index 9caf2cf0..8584509e 100644 --- a/tests/Model/CallRecordingMetadataTest.php +++ b/tests/Model/CallRecordingMetadataTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CallRecordingMetadataTest Class Doc Comment * * @description CallRecordingMetadata - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CallStateEnumTest.php b/tests/Model/CallStateEnumTest.php index 77c9cbc5..228e5741 100644 --- a/tests/Model/CallStateEnumTest.php +++ b/tests/Model/CallStateEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CallStateEnumTest Class Doc Comment * * @description The call state. Possible values:<br>`active` to redirect the call (default)<br>`completed` to hang up the call if it is answered, cancel it if it is an unanswered outbound call, or reject it if it an unanswered inbound call - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CallStateTest.php b/tests/Model/CallStateTest.php index 98153a87..88c2eae7 100644 --- a/tests/Model/CallStateTest.php +++ b/tests/Model/CallStateTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CallStateTest Class Doc Comment * * @description CallState - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CallTranscriptionDetectedLanguageEnumTest.php b/tests/Model/CallTranscriptionDetectedLanguageEnumTest.php index 73fae4a8..dfaa7b8b 100644 --- a/tests/Model/CallTranscriptionDetectedLanguageEnumTest.php +++ b/tests/Model/CallTranscriptionDetectedLanguageEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CallTranscriptionDetectedLanguageEnumTest Class Doc Comment * * @description The detected language for this transcription. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CallTranscriptionMetadataTest.php b/tests/Model/CallTranscriptionMetadataTest.php index 0d2d65ad..5523bf9e 100644 --- a/tests/Model/CallTranscriptionMetadataTest.php +++ b/tests/Model/CallTranscriptionMetadataTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CallTranscriptionMetadataTest Class Doc Comment * * @description CallTranscriptionMetadata - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CallTranscriptionResponseTest.php b/tests/Model/CallTranscriptionResponseTest.php index 1aff77f4..9f961ec2 100644 --- a/tests/Model/CallTranscriptionResponseTest.php +++ b/tests/Model/CallTranscriptionResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CallTranscriptionResponseTest Class Doc Comment * * @description CallTranscriptionResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CallTranscriptionTest.php b/tests/Model/CallTranscriptionTest.php index 075cb682..4819ca59 100644 --- a/tests/Model/CallTranscriptionTest.php +++ b/tests/Model/CallTranscriptionTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CallTranscriptionTest Class Doc Comment * * @description CallTranscription - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CallTranscriptionTrackEnumTest.php b/tests/Model/CallTranscriptionTrackEnumTest.php index 88f63ec2..e477a5ef 100644 --- a/tests/Model/CallTranscriptionTrackEnumTest.php +++ b/tests/Model/CallTranscriptionTrackEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CallTranscriptionTrackEnumTest Class Doc Comment * * @description Which `track` this transcription is derived from. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CallbackMethodEnumTest.php b/tests/Model/CallbackMethodEnumTest.php index b8416271..7ec7a075 100644 --- a/tests/Model/CallbackMethodEnumTest.php +++ b/tests/Model/CallbackMethodEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CallbackMethodEnumTest Class Doc Comment * * @description The HTTP method to use to deliver the callback. GET or POST. Default value is POST. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CallbackTest.php b/tests/Model/CallbackTest.php index 4021d8ef..917b849c 100644 --- a/tests/Model/CallbackTest.php +++ b/tests/Model/CallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CallbackTest Class Doc Comment * * @description Callbacks are divided into two types based on direction of the related message: - `statusCallback` indicates status of an outbound MT SMS, MMS, or RBM message. - `inboundCallback` indicates an inbound MO message or a multichannel message client's response to a suggestion or location request. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CardWidthEnumTest.php b/tests/Model/CardWidthEnumTest.php index d7e6f4a5..38a9cb5e 100644 --- a/tests/Model/CardWidthEnumTest.php +++ b/tests/Model/CardWidthEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CardWidthEnumTest Class Doc Comment * * @description CardWidthEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CodeRequestTest.php b/tests/Model/CodeRequestTest.php index 1f136979..a49f3747 100644 --- a/tests/Model/CodeRequestTest.php +++ b/tests/Model/CodeRequestTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CodeRequestTest Class Doc Comment * * @description CodeRequest - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CompletedLookupStatusEnumTest.php b/tests/Model/CompletedLookupStatusEnumTest.php index c413dcef..e27c6df1 100644 --- a/tests/Model/CompletedLookupStatusEnumTest.php +++ b/tests/Model/CompletedLookupStatusEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CompletedLookupStatusEnumTest Class Doc Comment * * @description CompletedLookupStatusEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ConferenceCompletedCallbackTest.php b/tests/Model/ConferenceCompletedCallbackTest.php index 97394712..3602df2a 100644 --- a/tests/Model/ConferenceCompletedCallbackTest.php +++ b/tests/Model/ConferenceCompletedCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ConferenceCompletedCallbackTest Class Doc Comment * * @description The Conference Completed event is fired when the last member leaves the conference. The response to this event may not contain BXML. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ConferenceCreatedCallbackTest.php b/tests/Model/ConferenceCreatedCallbackTest.php index 40970132..f7ad90f0 100644 --- a/tests/Model/ConferenceCreatedCallbackTest.php +++ b/tests/Model/ConferenceCreatedCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ConferenceCreatedCallbackTest Class Doc Comment * * @description The Conference Created event is fired whenever a new conference that specified a callbackUrl is created. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ConferenceMemberExitCallbackTest.php b/tests/Model/ConferenceMemberExitCallbackTest.php index 724a4f4e..0c1a5443 100644 --- a/tests/Model/ConferenceMemberExitCallbackTest.php +++ b/tests/Model/ConferenceMemberExitCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ConferenceMemberExitCallbackTest Class Doc Comment * * @description The Conference Member Exit event is fired whenever a caller exits a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ConferenceMemberJoinCallbackTest.php b/tests/Model/ConferenceMemberJoinCallbackTest.php index 58204df1..93f77ea7 100644 --- a/tests/Model/ConferenceMemberJoinCallbackTest.php +++ b/tests/Model/ConferenceMemberJoinCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ConferenceMemberJoinCallbackTest Class Doc Comment * * @description The Conference Member Join event is fired whenever a caller joins a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ConferenceMemberTest.php b/tests/Model/ConferenceMemberTest.php index ab9bd069..2727b0d1 100644 --- a/tests/Model/ConferenceMemberTest.php +++ b/tests/Model/ConferenceMemberTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ConferenceMemberTest Class Doc Comment * * @description ConferenceMember - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ConferenceRecordingAvailableCallbackTest.php b/tests/Model/ConferenceRecordingAvailableCallbackTest.php index 49793014..fed72831 100644 --- a/tests/Model/ConferenceRecordingAvailableCallbackTest.php +++ b/tests/Model/ConferenceRecordingAvailableCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ConferenceRecordingAvailableCallbackTest Class Doc Comment * * @description The Conference Recording Available event is sent after a conference recording has been processed. It indicates that the recording is available for download. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ConferenceRecordingMetadataTest.php b/tests/Model/ConferenceRecordingMetadataTest.php index 15f86332..4a1884ae 100644 --- a/tests/Model/ConferenceRecordingMetadataTest.php +++ b/tests/Model/ConferenceRecordingMetadataTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ConferenceRecordingMetadataTest Class Doc Comment * * @description ConferenceRecordingMetadata - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ConferenceRedirectCallbackTest.php b/tests/Model/ConferenceRedirectCallbackTest.php index cd6c6e89..b4f076a1 100644 --- a/tests/Model/ConferenceRedirectCallbackTest.php +++ b/tests/Model/ConferenceRedirectCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ConferenceRedirectCallbackTest Class Doc Comment * * @description The Conference Redirect event is fired whenever an existing conference is modified via a POST request made to the /conferences/{conferenceId} endpoint. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ConferenceStateEnumTest.php b/tests/Model/ConferenceStateEnumTest.php index 83e6ff3f..a23c1207 100644 --- a/tests/Model/ConferenceStateEnumTest.php +++ b/tests/Model/ConferenceStateEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ConferenceStateEnumTest Class Doc Comment * * @description Setting the conference state to `completed` ends the conference and ejects all members. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ConferenceTest.php b/tests/Model/ConferenceTest.php index 9821f0f6..451fe610 100644 --- a/tests/Model/ConferenceTest.php +++ b/tests/Model/ConferenceTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ConferenceTest Class Doc Comment * * @description Conference - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ContactTest.php b/tests/Model/ContactTest.php index 8355f3d7..f37ab474 100644 --- a/tests/Model/ContactTest.php +++ b/tests/Model/ContactTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ContactTest Class Doc Comment * * @description Contact - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CreateAsyncBulkLookupResponseDataTest.php b/tests/Model/CreateAsyncBulkLookupResponseDataTest.php index a8d041e6..e252d943 100644 --- a/tests/Model/CreateAsyncBulkLookupResponseDataTest.php +++ b/tests/Model/CreateAsyncBulkLookupResponseDataTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CreateAsyncBulkLookupResponseDataTest Class Doc Comment * * @description The phone number lookup response data - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CreateAsyncBulkLookupResponseTest.php b/tests/Model/CreateAsyncBulkLookupResponseTest.php index 09d8c500..cbf51714 100644 --- a/tests/Model/CreateAsyncBulkLookupResponseTest.php +++ b/tests/Model/CreateAsyncBulkLookupResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CreateAsyncBulkLookupResponseTest Class Doc Comment * * @description CreateAsyncBulkLookupResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CreateCallResponseTest.php b/tests/Model/CreateCallResponseTest.php index 3f70b191..dae3329f 100644 --- a/tests/Model/CreateCallResponseTest.php +++ b/tests/Model/CreateCallResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CreateCallResponseTest Class Doc Comment * * @description CreateCallResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CreateCallTest.php b/tests/Model/CreateCallTest.php index d1363308..6b39b2f6 100644 --- a/tests/Model/CreateCallTest.php +++ b/tests/Model/CreateCallTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CreateCallTest Class Doc Comment * * @description CreateCall - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CreateEndpointRequestBaseTest.php b/tests/Model/CreateEndpointRequestBaseTest.php index 793c003a..b17b1229 100644 --- a/tests/Model/CreateEndpointRequestBaseTest.php +++ b/tests/Model/CreateEndpointRequestBaseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CreateEndpointRequestBaseTest Class Doc Comment * * @description CreateEndpointRequestBase - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CreateEndpointResponseDataTest.php b/tests/Model/CreateEndpointResponseDataTest.php index 09c4e184..9f1d4e26 100644 --- a/tests/Model/CreateEndpointResponseDataTest.php +++ b/tests/Model/CreateEndpointResponseDataTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CreateEndpointResponseDataTest Class Doc Comment * * @description CreateEndpointResponseData - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CreateEndpointResponseTest.php b/tests/Model/CreateEndpointResponseTest.php index ffd4bd29..a2e9d521 100644 --- a/tests/Model/CreateEndpointResponseTest.php +++ b/tests/Model/CreateEndpointResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CreateEndpointResponseTest Class Doc Comment * * @description CreateEndpointResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CreateMessageRequestErrorTest.php b/tests/Model/CreateMessageRequestErrorTest.php index a8070ccc..62cc5257 100644 --- a/tests/Model/CreateMessageRequestErrorTest.php +++ b/tests/Model/CreateMessageRequestErrorTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CreateMessageRequestErrorTest Class Doc Comment * * @description CreateMessageRequestError - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CreateMultiChannelMessageResponseTest.php b/tests/Model/CreateMultiChannelMessageResponseTest.php index ad8ec944..e1b02756 100644 --- a/tests/Model/CreateMultiChannelMessageResponseTest.php +++ b/tests/Model/CreateMultiChannelMessageResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CreateMultiChannelMessageResponseTest Class Doc Comment * * @description CreateMultiChannelMessageResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CreateSyncLookupResponseDataTest.php b/tests/Model/CreateSyncLookupResponseDataTest.php index 126a1bd4..213d2107 100644 --- a/tests/Model/CreateSyncLookupResponseDataTest.php +++ b/tests/Model/CreateSyncLookupResponseDataTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CreateSyncLookupResponseDataTest Class Doc Comment * * @description The phone number lookup response data - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CreateSyncLookupResponseTest.php b/tests/Model/CreateSyncLookupResponseTest.php index 7fbf16b7..cbcc2fba 100644 --- a/tests/Model/CreateSyncLookupResponseTest.php +++ b/tests/Model/CreateSyncLookupResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CreateSyncLookupResponseTest Class Doc Comment * * @description CreateSyncLookupResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/CreateWebRtcConnectionRequestTest.php b/tests/Model/CreateWebRtcConnectionRequestTest.php index f2a93818..4b34da8f 100644 --- a/tests/Model/CreateWebRtcConnectionRequestTest.php +++ b/tests/Model/CreateWebRtcConnectionRequestTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * CreateWebRtcConnectionRequestTest Class Doc Comment * * @description CreateWebRtcConnectionRequest - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/DeactivationEventEnumTest.php b/tests/Model/DeactivationEventEnumTest.php index 53c6d41b..1897aa65 100644 --- a/tests/Model/DeactivationEventEnumTest.php +++ b/tests/Model/DeactivationEventEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * DeactivationEventEnumTest Class Doc Comment * * @description [DNI-Only](#section/DNI-Only). `DEACTIVATED` if the carrier reported a deactivation event for this phone number. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/DeviceStatusEnumTest.php b/tests/Model/DeviceStatusEnumTest.php index 87a27e4c..64b22349 100644 --- a/tests/Model/DeviceStatusEnumTest.php +++ b/tests/Model/DeviceStatusEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * DeviceStatusEnumTest Class Doc Comment * * @description DeviceStatusEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/DeviceTest.php b/tests/Model/DeviceTest.php index 09f40b7e..b2255bce 100644 --- a/tests/Model/DeviceTest.php +++ b/tests/Model/DeviceTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * DeviceTest Class Doc Comment * * @description Device - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/DisconnectCallbackTest.php b/tests/Model/DisconnectCallbackTest.php index 1a2f11be..35713162 100644 --- a/tests/Model/DisconnectCallbackTest.php +++ b/tests/Model/DisconnectCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * DisconnectCallbackTest Class Doc Comment * * @description The Disconnect event is fired when a call ends, for any reason. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/DiversionTest.php b/tests/Model/DiversionTest.php index 73249139..87de6655 100644 --- a/tests/Model/DiversionTest.php +++ b/tests/Model/DiversionTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * DiversionTest Class Doc Comment * * @description Diversion - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/DtmfCallbackTest.php b/tests/Model/DtmfCallbackTest.php index 1f1f8cf6..c187e45d 100644 --- a/tests/Model/DtmfCallbackTest.php +++ b/tests/Model/DtmfCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * DtmfCallbackTest Class Doc Comment * * @description The DTMF event is sent for every digit detected after a <StartGather> verb is executed. You may not respond to this event with BXML. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/EndpointDirectionEnumTest.php b/tests/Model/EndpointDirectionEnumTest.php index 70c15d2a..0457f2ad 100644 --- a/tests/Model/EndpointDirectionEnumTest.php +++ b/tests/Model/EndpointDirectionEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * EndpointDirectionEnumTest Class Doc Comment * * @description EndpointDirectionEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/EndpointEventTest.php b/tests/Model/EndpointEventTest.php index f2733b14..3cc7e0cf 100644 --- a/tests/Model/EndpointEventTest.php +++ b/tests/Model/EndpointEventTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * EndpointEventTest Class Doc Comment * * @description An event that occurred on an endpoint. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/EndpointEventTypeEnumTest.php b/tests/Model/EndpointEventTypeEnumTest.php index 9738250e..f04f7417 100644 --- a/tests/Model/EndpointEventTypeEnumTest.php +++ b/tests/Model/EndpointEventTypeEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * EndpointEventTypeEnumTest Class Doc Comment * * @description EndpointEventTypeEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/EndpointResponseTest.php b/tests/Model/EndpointResponseTest.php index ad3ad2a2..00ba5795 100644 --- a/tests/Model/EndpointResponseTest.php +++ b/tests/Model/EndpointResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * EndpointResponseTest Class Doc Comment * * @description EndpointResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/EndpointStatusEnumTest.php b/tests/Model/EndpointStatusEnumTest.php index fd2746ac..c0be392f 100644 --- a/tests/Model/EndpointStatusEnumTest.php +++ b/tests/Model/EndpointStatusEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * EndpointStatusEnumTest Class Doc Comment * * @description EndpointStatusEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/EndpointTest.php b/tests/Model/EndpointTest.php index a7107bfa..3e72c25b 100644 --- a/tests/Model/EndpointTest.php +++ b/tests/Model/EndpointTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * EndpointTest Class Doc Comment * * @description Endpoint - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/EndpointTypeEnumTest.php b/tests/Model/EndpointTypeEnumTest.php index dee802cb..e79cc740 100644 --- a/tests/Model/EndpointTypeEnumTest.php +++ b/tests/Model/EndpointTypeEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * EndpointTypeEnumTest Class Doc Comment * * @description EndpointTypeEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/EndpointsTest.php b/tests/Model/EndpointsTest.php index 93c7be7a..e61fbeef 100644 --- a/tests/Model/EndpointsTest.php +++ b/tests/Model/EndpointsTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * EndpointsTest Class Doc Comment * * @description Endpoints - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ErrorObjectTest.php b/tests/Model/ErrorObjectTest.php index 2b135b6c..1e3b5f3d 100644 --- a/tests/Model/ErrorObjectTest.php +++ b/tests/Model/ErrorObjectTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ErrorObjectTest Class Doc Comment * * @description ErrorObject - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ErrorSourceTest.php b/tests/Model/ErrorSourceTest.php index 07dfde42..cc64336d 100644 --- a/tests/Model/ErrorSourceTest.php +++ b/tests/Model/ErrorSourceTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ErrorSourceTest Class Doc Comment * * @description Specifies relevant sources of the error, if any. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/FailureWebhookTest.php b/tests/Model/FailureWebhookTest.php index 74a2ff6b..23fed9e6 100644 --- a/tests/Model/FailureWebhookTest.php +++ b/tests/Model/FailureWebhookTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * FailureWebhookTest Class Doc Comment * * @description FailureWebhook - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/FieldErrorTest.php b/tests/Model/FieldErrorTest.php index c66d3561..affeedec 100644 --- a/tests/Model/FieldErrorTest.php +++ b/tests/Model/FieldErrorTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * FieldErrorTest Class Doc Comment * * @description FieldError - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/FileFormatEnumTest.php b/tests/Model/FileFormatEnumTest.php index a7aea734..6b100e02 100644 --- a/tests/Model/FileFormatEnumTest.php +++ b/tests/Model/FileFormatEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * FileFormatEnumTest Class Doc Comment * * @description The format that the recording is stored in. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/GatherCallbackTest.php b/tests/Model/GatherCallbackTest.php index 575abb01..51f87627 100644 --- a/tests/Model/GatherCallbackTest.php +++ b/tests/Model/GatherCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * GatherCallbackTest Class Doc Comment * * @description The gather event is sent after a <Gather> verb is executed. Its purpose is to report the gathered digits to the calling application. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/GetAsyncBulkLookupResponseDataTest.php b/tests/Model/GetAsyncBulkLookupResponseDataTest.php index 759f31e4..9345fff7 100644 --- a/tests/Model/GetAsyncBulkLookupResponseDataTest.php +++ b/tests/Model/GetAsyncBulkLookupResponseDataTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * GetAsyncBulkLookupResponseDataTest Class Doc Comment * * @description The phone number lookup response data - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/GetAsyncBulkLookupResponseTest.php b/tests/Model/GetAsyncBulkLookupResponseTest.php index ddc1ee81..bbd6da68 100644 --- a/tests/Model/GetAsyncBulkLookupResponseTest.php +++ b/tests/Model/GetAsyncBulkLookupResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * GetAsyncBulkLookupResponseTest Class Doc Comment * * @description GetAsyncBulkLookupResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/InProgressLookupStatusEnumTest.php b/tests/Model/InProgressLookupStatusEnumTest.php index 83dddb01..0a148d40 100644 --- a/tests/Model/InProgressLookupStatusEnumTest.php +++ b/tests/Model/InProgressLookupStatusEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * InProgressLookupStatusEnumTest Class Doc Comment * * @description InProgressLookupStatusEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/InboundCallbackMessageTest.php b/tests/Model/InboundCallbackMessageTest.php index 1a7b7fa1..429052d2 100644 --- a/tests/Model/InboundCallbackMessageTest.php +++ b/tests/Model/InboundCallbackMessageTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * InboundCallbackMessageTest Class Doc Comment * * @description InboundCallbackMessage - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/InboundCallbackTest.php b/tests/Model/InboundCallbackTest.php index 69e489ac..947f2dd8 100644 --- a/tests/Model/InboundCallbackTest.php +++ b/tests/Model/InboundCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * InboundCallbackTest Class Doc Comment * * @description Represents an inbound callback. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/InboundCallbackTypeEnumTest.php b/tests/Model/InboundCallbackTypeEnumTest.php index f4dc3f99..bff2e988 100644 --- a/tests/Model/InboundCallbackTypeEnumTest.php +++ b/tests/Model/InboundCallbackTypeEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * InboundCallbackTypeEnumTest Class Doc Comment * * @description The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user's client to a Bandwidth number. - `requested-location-response` indicates a response to a location request sent by the Bandwidth user's client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/InitiateCallbackTest.php b/tests/Model/InitiateCallbackTest.php index accc02f5..848e7578 100644 --- a/tests/Model/InitiateCallbackTest.php +++ b/tests/Model/InitiateCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * InitiateCallbackTest Class Doc Comment * * @description The Initiate event is fired when an inbound call is received for a Telephone Number on your Account. It is sent to the URL specified in the application associated with the location (sip-peer) that the called telephone number belongs to. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/LatestMessageDeliveryStatusEnumTest.php b/tests/Model/LatestMessageDeliveryStatusEnumTest.php index bb8add07..945eb746 100644 --- a/tests/Model/LatestMessageDeliveryStatusEnumTest.php +++ b/tests/Model/LatestMessageDeliveryStatusEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * LatestMessageDeliveryStatusEnumTest Class Doc Comment * * @description [DNI-Only](#section/DNI-Only). The current delivery status of the phone number. - ACTIVE: A message was successfully sent to the number (delivery code 0). - DEACTIVATED: A message was not delivered to a number (delivery code 720) - UNKNOWN: Bandwidth cannot find an delivery status entry for the number. - NOT_ENABLED: The phone number is not enabled for messaging, so there is no delivery status information. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/LineTypeEnumTest.php b/tests/Model/LineTypeEnumTest.php index a0ee8c59..a79b58f5 100644 --- a/tests/Model/LineTypeEnumTest.php +++ b/tests/Model/LineTypeEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * LineTypeEnumTest Class Doc Comment * * @description LineTypeEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/LinkSchemaTest.php b/tests/Model/LinkSchemaTest.php index dfbff2c7..c2a85d9d 100644 --- a/tests/Model/LinkSchemaTest.php +++ b/tests/Model/LinkSchemaTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * LinkSchemaTest Class Doc Comment * * @description LinkSchema - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/LinkTest.php b/tests/Model/LinkTest.php index cf18ecde..f1ea866c 100644 --- a/tests/Model/LinkTest.php +++ b/tests/Model/LinkTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * LinkTest Class Doc Comment * * @description Link - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/LinksObjectTest.php b/tests/Model/LinksObjectTest.php index 9865d637..cd5f2db3 100644 --- a/tests/Model/LinksObjectTest.php +++ b/tests/Model/LinksObjectTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * LinksObjectTest Class Doc Comment * * @description LinksObject - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ListEndpointsResponseTest.php b/tests/Model/ListEndpointsResponseTest.php index 5d911d07..29e99d34 100644 --- a/tests/Model/ListEndpointsResponseTest.php +++ b/tests/Model/ListEndpointsResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ListEndpointsResponseTest Class Doc Comment * * @description ListEndpointsResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ListMessageDirectionEnumTest.php b/tests/Model/ListMessageDirectionEnumTest.php index 7cbaac8c..86a69809 100644 --- a/tests/Model/ListMessageDirectionEnumTest.php +++ b/tests/Model/ListMessageDirectionEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ListMessageDirectionEnumTest Class Doc Comment * * @description The direction of the message. One of INBOUND OUTBOUND. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ListMessageItemTest.php b/tests/Model/ListMessageItemTest.php index c41cdb9f..f8e15dae 100644 --- a/tests/Model/ListMessageItemTest.php +++ b/tests/Model/ListMessageItemTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ListMessageItemTest Class Doc Comment * * @description ListMessageItem - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/LookupErrorResponseTest.php b/tests/Model/LookupErrorResponseTest.php index 59882325..0af606c9 100644 --- a/tests/Model/LookupErrorResponseTest.php +++ b/tests/Model/LookupErrorResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * LookupErrorResponseTest Class Doc Comment * * @description LookupErrorResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/LookupErrorSchemaMetaTest.php b/tests/Model/LookupErrorSchemaMetaTest.php index 32f77db8..880d5695 100644 --- a/tests/Model/LookupErrorSchemaMetaTest.php +++ b/tests/Model/LookupErrorSchemaMetaTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * LookupErrorSchemaMetaTest Class Doc Comment * * @description LookupErrorSchemaMeta - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/LookupErrorSchemaTest.php b/tests/Model/LookupErrorSchemaTest.php index 7c6b6015..41ec6389 100644 --- a/tests/Model/LookupErrorSchemaTest.php +++ b/tests/Model/LookupErrorSchemaTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * LookupErrorSchemaTest Class Doc Comment * * @description LookupErrorSchema - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/LookupResultTest.php b/tests/Model/LookupResultTest.php index 29debaa8..b1bc31bd 100644 --- a/tests/Model/LookupResultTest.php +++ b/tests/Model/LookupResultTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * LookupResultTest Class Doc Comment * * @description Carrier information results for the specified telephone number. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MachineDetectionCompleteCallbackTest.php b/tests/Model/MachineDetectionCompleteCallbackTest.php index 86a5ca5b..aaa2a2c3 100644 --- a/tests/Model/MachineDetectionCompleteCallbackTest.php +++ b/tests/Model/MachineDetectionCompleteCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MachineDetectionCompleteCallbackTest Class Doc Comment * * @description This event is sent to the url informed when requesting a machine detection operation. It contains the machine detection operation result, which can be: human, answering-machine, silence, timeout, error. This event is not sent when sync answering machine detection mode is chosen. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MachineDetectionConfigurationTest.php b/tests/Model/MachineDetectionConfigurationTest.php index f6913840..8789ba70 100644 --- a/tests/Model/MachineDetectionConfigurationTest.php +++ b/tests/Model/MachineDetectionConfigurationTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MachineDetectionConfigurationTest Class Doc Comment * * @description The machine detection request used to perform <a href='/docs/voice/guides/machineDetection'>machine detection</a> on the call. Currently, there is an issue where decimal values are not getting processed correctly. Please use whole number values. We are working to resolve this issue. Please contact Bandwidth Support if you need more information. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MachineDetectionModeEnumTest.php b/tests/Model/MachineDetectionModeEnumTest.php index 0c5d7832..5135c7d6 100644 --- a/tests/Model/MachineDetectionModeEnumTest.php +++ b/tests/Model/MachineDetectionModeEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MachineDetectionModeEnumTest Class Doc Comment * * @description The machine detection mode. If set to 'async', the detection result will be sent in a 'machineDetectionComplete' callback. If set to 'sync', the 'answer' callback will wait for the machine detection to complete and will include its result. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MachineDetectionResultTest.php b/tests/Model/MachineDetectionResultTest.php index 6fc6b376..ddbd4469 100644 --- a/tests/Model/MachineDetectionResultTest.php +++ b/tests/Model/MachineDetectionResultTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MachineDetectionResultTest Class Doc Comment * * @description (optional) if machine detection was requested in sync mode, the result will be specified here. Possible values are the same as the async counterpart: Machine Detection Complete - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MediaTest.php b/tests/Model/MediaTest.php index 8d2981bd..3f9d0baa 100644 --- a/tests/Model/MediaTest.php +++ b/tests/Model/MediaTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MediaTest Class Doc Comment * * @description Media - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MessageDirectionEnumTest.php b/tests/Model/MessageDirectionEnumTest.php index 29428f58..cf8281ca 100644 --- a/tests/Model/MessageDirectionEnumTest.php +++ b/tests/Model/MessageDirectionEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MessageDirectionEnumTest Class Doc Comment * * @description The direction of the message. One of in out. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MessageRequestTest.php b/tests/Model/MessageRequestTest.php index 4506a399..79916ddb 100644 --- a/tests/Model/MessageRequestTest.php +++ b/tests/Model/MessageRequestTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MessageRequestTest Class Doc Comment * * @description MessageRequest - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MessageStatusEnumTest.php b/tests/Model/MessageStatusEnumTest.php index dbf199ac..e788ac57 100644 --- a/tests/Model/MessageStatusEnumTest.php +++ b/tests/Model/MessageStatusEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MessageStatusEnumTest Class Doc Comment * * @description The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MessageTest.php b/tests/Model/MessageTest.php index eace8bea..33fdb9c4 100644 --- a/tests/Model/MessageTest.php +++ b/tests/Model/MessageTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MessageTest Class Doc Comment * * @description Message - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MessageTypeEnumTest.php b/tests/Model/MessageTypeEnumTest.php index 781e7bf1..c3fc7ceb 100644 --- a/tests/Model/MessageTypeEnumTest.php +++ b/tests/Model/MessageTypeEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MessageTypeEnumTest Class Doc Comment * * @description The type of message. Either SMS or MMS. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MessagesListTest.php b/tests/Model/MessagesListTest.php index b8e3331d..1425d611 100644 --- a/tests/Model/MessagesListTest.php +++ b/tests/Model/MessagesListTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MessagesListTest Class Doc Comment * * @description MessagesList - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MessagingCodeResponseTest.php b/tests/Model/MessagingCodeResponseTest.php index 14ac856b..1d4e2e1a 100644 --- a/tests/Model/MessagingCodeResponseTest.php +++ b/tests/Model/MessagingCodeResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MessagingCodeResponseTest Class Doc Comment * * @description MessagingCodeResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MessagingRequestErrorTest.php b/tests/Model/MessagingRequestErrorTest.php index f605d523..1f335bbb 100644 --- a/tests/Model/MessagingRequestErrorTest.php +++ b/tests/Model/MessagingRequestErrorTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MessagingRequestErrorTest Class Doc Comment * * @description MessagingRequestError - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MfaForbiddenRequestErrorTest.php b/tests/Model/MfaForbiddenRequestErrorTest.php index de2ef1c4..6c05c9a1 100644 --- a/tests/Model/MfaForbiddenRequestErrorTest.php +++ b/tests/Model/MfaForbiddenRequestErrorTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MfaForbiddenRequestErrorTest Class Doc Comment * * @description MfaForbiddenRequestError - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MfaRequestErrorTest.php b/tests/Model/MfaRequestErrorTest.php index 18261f68..1cc2f19b 100644 --- a/tests/Model/MfaRequestErrorTest.php +++ b/tests/Model/MfaRequestErrorTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MfaRequestErrorTest Class Doc Comment * * @description MfaRequestError - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MfaUnauthorizedRequestErrorTest.php b/tests/Model/MfaUnauthorizedRequestErrorTest.php index 37d89a9e..2adb9e01 100644 --- a/tests/Model/MfaUnauthorizedRequestErrorTest.php +++ b/tests/Model/MfaUnauthorizedRequestErrorTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MfaUnauthorizedRequestErrorTest Class Doc Comment * * @description MfaUnauthorizedRequestError - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MmsMessageContentFileTest.php b/tests/Model/MmsMessageContentFileTest.php index 0a6ccf51..68cd9b6d 100644 --- a/tests/Model/MmsMessageContentFileTest.php +++ b/tests/Model/MmsMessageContentFileTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MmsMessageContentFileTest Class Doc Comment * * @description MmsMessageContentFile - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MmsMessageContentTest.php b/tests/Model/MmsMessageContentTest.php index 5042b42b..7a26e447 100644 --- a/tests/Model/MmsMessageContentTest.php +++ b/tests/Model/MmsMessageContentTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MmsMessageContentTest Class Doc Comment * * @description MmsMessageContent - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelActionCalendarEventTest.php b/tests/Model/MultiChannelActionCalendarEventTest.php index 47793011..fda5137f 100644 --- a/tests/Model/MultiChannelActionCalendarEventTest.php +++ b/tests/Model/MultiChannelActionCalendarEventTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelActionCalendarEventTest Class Doc Comment * * @description MultiChannelActionCalendarEvent - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelActionTest.php b/tests/Model/MultiChannelActionTest.php index afb46c27..205de2d4 100644 --- a/tests/Model/MultiChannelActionTest.php +++ b/tests/Model/MultiChannelActionTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelActionTest Class Doc Comment * * @description MultiChannelAction - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelChannelListMMSObjectTest.php b/tests/Model/MultiChannelChannelListMMSObjectTest.php index da0926cc..b339cb88 100644 --- a/tests/Model/MultiChannelChannelListMMSObjectTest.php +++ b/tests/Model/MultiChannelChannelListMMSObjectTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelChannelListMMSObjectTest Class Doc Comment * * @description MultiChannelChannelListMMSObject - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelChannelListMMSResponseObjectTest.php b/tests/Model/MultiChannelChannelListMMSResponseObjectTest.php index f0a792d2..2f240ae0 100644 --- a/tests/Model/MultiChannelChannelListMMSResponseObjectTest.php +++ b/tests/Model/MultiChannelChannelListMMSResponseObjectTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelChannelListMMSResponseObjectTest Class Doc Comment * * @description MultiChannelChannelListMMSResponseObject - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelChannelListObjectBaseTest.php b/tests/Model/MultiChannelChannelListObjectBaseTest.php index 1de9e5b2..57904e84 100644 --- a/tests/Model/MultiChannelChannelListObjectBaseTest.php +++ b/tests/Model/MultiChannelChannelListObjectBaseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelChannelListObjectBaseTest Class Doc Comment * * @description MultiChannelChannelListObjectBase - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelChannelListOwnerObjectTest.php b/tests/Model/MultiChannelChannelListOwnerObjectTest.php index 0e7b21b9..ad5f363f 100644 --- a/tests/Model/MultiChannelChannelListOwnerObjectTest.php +++ b/tests/Model/MultiChannelChannelListOwnerObjectTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelChannelListOwnerObjectTest Class Doc Comment * * @description MultiChannelChannelListOwnerObject - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php b/tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php index 8f429fc0..3b558d50 100644 --- a/tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php +++ b/tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelChannelListRBMObjectAllOfContentTest Class Doc Comment * * @description The content of the message. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelChannelListRBMObjectTest.php b/tests/Model/MultiChannelChannelListRBMObjectTest.php index 0fa11c07..bc5b824a 100644 --- a/tests/Model/MultiChannelChannelListRBMObjectTest.php +++ b/tests/Model/MultiChannelChannelListRBMObjectTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelChannelListRBMObjectTest Class Doc Comment * * @description MultiChannelChannelListRBMObject - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelChannelListRBMResponseObjectTest.php b/tests/Model/MultiChannelChannelListRBMResponseObjectTest.php index 96ba5626..bcd7d944 100644 --- a/tests/Model/MultiChannelChannelListRBMResponseObjectTest.php +++ b/tests/Model/MultiChannelChannelListRBMResponseObjectTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelChannelListRBMResponseObjectTest Class Doc Comment * * @description MultiChannelChannelListRBMResponseObject - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelChannelListRequestObjectTest.php b/tests/Model/MultiChannelChannelListRequestObjectTest.php index 385d633b..f845c08d 100644 --- a/tests/Model/MultiChannelChannelListRequestObjectTest.php +++ b/tests/Model/MultiChannelChannelListRequestObjectTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelChannelListRequestObjectTest Class Doc Comment * * @description MultiChannelChannelListRequestObject - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelChannelListResponseObjectTest.php b/tests/Model/MultiChannelChannelListResponseObjectTest.php index 05115dcb..80b6bf4b 100644 --- a/tests/Model/MultiChannelChannelListResponseObjectTest.php +++ b/tests/Model/MultiChannelChannelListResponseObjectTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelChannelListResponseObjectTest Class Doc Comment * * @description MultiChannelChannelListResponseObject - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelChannelListSMSObjectTest.php b/tests/Model/MultiChannelChannelListSMSObjectTest.php index c17ae7a7..8138fc68 100644 --- a/tests/Model/MultiChannelChannelListSMSObjectTest.php +++ b/tests/Model/MultiChannelChannelListSMSObjectTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelChannelListSMSObjectTest Class Doc Comment * * @description MultiChannelChannelListSMSObject - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelChannelListSMSResponseObjectTest.php b/tests/Model/MultiChannelChannelListSMSResponseObjectTest.php index 486aa25b..12618126 100644 --- a/tests/Model/MultiChannelChannelListSMSResponseObjectTest.php +++ b/tests/Model/MultiChannelChannelListSMSResponseObjectTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelChannelListSMSResponseObjectTest Class Doc Comment * * @description MultiChannelChannelListSMSResponseObject - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelErrorTest.php b/tests/Model/MultiChannelErrorTest.php index 46881679..f96c56ed 100644 --- a/tests/Model/MultiChannelErrorTest.php +++ b/tests/Model/MultiChannelErrorTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelErrorTest Class Doc Comment * * @description MultiChannelError - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelMessageChannelEnumTest.php b/tests/Model/MultiChannelMessageChannelEnumTest.php index 2466ecd6..cbc9ddb5 100644 --- a/tests/Model/MultiChannelMessageChannelEnumTest.php +++ b/tests/Model/MultiChannelMessageChannelEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelMessageChannelEnumTest Class Doc Comment * * @description The channel of the multi-channel message. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelMessageContentTest.php b/tests/Model/MultiChannelMessageContentTest.php index f3b91442..07d954b0 100644 --- a/tests/Model/MultiChannelMessageContentTest.php +++ b/tests/Model/MultiChannelMessageContentTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelMessageContentTest Class Doc Comment * * @description The structure of the content field of a multichannel message. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelMessageRequestTest.php b/tests/Model/MultiChannelMessageRequestTest.php index 5bd3196f..e9b5a4e6 100644 --- a/tests/Model/MultiChannelMessageRequestTest.php +++ b/tests/Model/MultiChannelMessageRequestTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelMessageRequestTest Class Doc Comment * * @description Multi-Channel Message Request - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/MultiChannelMessageResponseDataTest.php b/tests/Model/MultiChannelMessageResponseDataTest.php index 124f4448..ecb26360 100644 --- a/tests/Model/MultiChannelMessageResponseDataTest.php +++ b/tests/Model/MultiChannelMessageResponseDataTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * MultiChannelMessageResponseDataTest Class Doc Comment * * @description The data returned in a multichannel message response. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/OptInWorkflowTest.php b/tests/Model/OptInWorkflowTest.php index 8a878e30..55188bb5 100644 --- a/tests/Model/OptInWorkflowTest.php +++ b/tests/Model/OptInWorkflowTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * OptInWorkflowTest Class Doc Comment * * @description OptInWorkflow - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/PageInfoTest.php b/tests/Model/PageInfoTest.php index 6335f98e..b696c01f 100644 --- a/tests/Model/PageInfoTest.php +++ b/tests/Model/PageInfoTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * PageInfoTest Class Doc Comment * * @description PageInfo - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/PageTest.php b/tests/Model/PageTest.php index 55d5ccb8..4448c00f 100644 --- a/tests/Model/PageTest.php +++ b/tests/Model/PageTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * PageTest Class Doc Comment * * @description Page - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/PriorityEnumTest.php b/tests/Model/PriorityEnumTest.php index f70bb123..a467d100 100644 --- a/tests/Model/PriorityEnumTest.php +++ b/tests/Model/PriorityEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * PriorityEnumTest Class Doc Comment * * @description Specifies the message's sending priority with respect to other messages in your account. For best results and optimal throughput, reserve the 'high' priority setting for critical messages only. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ProductTypeEnumTest.php b/tests/Model/ProductTypeEnumTest.php index 06723e6d..eb71819e 100644 --- a/tests/Model/ProductTypeEnumTest.php +++ b/tests/Model/ProductTypeEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ProductTypeEnumTest Class Doc Comment * * @description The type of product associated with the message. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmActionBaseTest.php b/tests/Model/RbmActionBaseTest.php index e5c94e97..e1ed064b 100644 --- a/tests/Model/RbmActionBaseTest.php +++ b/tests/Model/RbmActionBaseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmActionBaseTest Class Doc Comment * * @description RbmActionBase - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmActionDialTest.php b/tests/Model/RbmActionDialTest.php index 62b5536a..5689c488 100644 --- a/tests/Model/RbmActionDialTest.php +++ b/tests/Model/RbmActionDialTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmActionDialTest Class Doc Comment * * @description RbmActionDial - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmActionOpenUrlTest.php b/tests/Model/RbmActionOpenUrlTest.php index f93ce8b2..0ff05b0a 100644 --- a/tests/Model/RbmActionOpenUrlTest.php +++ b/tests/Model/RbmActionOpenUrlTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmActionOpenUrlTest Class Doc Comment * * @description RbmActionOpenUrl - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmActionTypeEnumTest.php b/tests/Model/RbmActionTypeEnumTest.php index 0786ecdc..90b0ce0e 100644 --- a/tests/Model/RbmActionTypeEnumTest.php +++ b/tests/Model/RbmActionTypeEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmActionTypeEnumTest Class Doc Comment * * @description RbmActionTypeEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmActionViewLocationTest.php b/tests/Model/RbmActionViewLocationTest.php index db1fec35..73270877 100644 --- a/tests/Model/RbmActionViewLocationTest.php +++ b/tests/Model/RbmActionViewLocationTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmActionViewLocationTest Class Doc Comment * * @description RbmActionViewLocation - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmCardContentMediaTest.php b/tests/Model/RbmCardContentMediaTest.php index f3239785..a63ed160 100644 --- a/tests/Model/RbmCardContentMediaTest.php +++ b/tests/Model/RbmCardContentMediaTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmCardContentMediaTest Class Doc Comment * * @description RbmCardContentMedia - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmCardContentTest.php b/tests/Model/RbmCardContentTest.php index f47f87b9..b0cac050 100644 --- a/tests/Model/RbmCardContentTest.php +++ b/tests/Model/RbmCardContentTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmCardContentTest Class Doc Comment * * @description Must contain at least one of title, description, or media to be valid. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmLocationResponseTest.php b/tests/Model/RbmLocationResponseTest.php index 82419d20..c4ffef2c 100644 --- a/tests/Model/RbmLocationResponseTest.php +++ b/tests/Model/RbmLocationResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmLocationResponseTest Class Doc Comment * * @description RbmLocationResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmMediaHeightEnumTest.php b/tests/Model/RbmMediaHeightEnumTest.php index 59ea5e1a..9bf58450 100644 --- a/tests/Model/RbmMediaHeightEnumTest.php +++ b/tests/Model/RbmMediaHeightEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmMediaHeightEnumTest Class Doc Comment * * @description The height of the media. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmMessageCarouselCardTest.php b/tests/Model/RbmMessageCarouselCardTest.php index d6174ffc..f851f62b 100644 --- a/tests/Model/RbmMessageCarouselCardTest.php +++ b/tests/Model/RbmMessageCarouselCardTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmMessageCarouselCardTest Class Doc Comment * * @description RbmMessageCarouselCard - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmMessageContentFileTest.php b/tests/Model/RbmMessageContentFileTest.php index ada7cbd9..a442302f 100644 --- a/tests/Model/RbmMessageContentFileTest.php +++ b/tests/Model/RbmMessageContentFileTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmMessageContentFileTest Class Doc Comment * * @description RbmMessageContentFile - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmMessageContentRichCardTest.php b/tests/Model/RbmMessageContentRichCardTest.php index 7ca58fc5..954130f3 100644 --- a/tests/Model/RbmMessageContentRichCardTest.php +++ b/tests/Model/RbmMessageContentRichCardTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmMessageContentRichCardTest Class Doc Comment * * @description RbmMessageContentRichCard - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmMessageContentTextTest.php b/tests/Model/RbmMessageContentTextTest.php index 9be20e85..d8e67700 100644 --- a/tests/Model/RbmMessageContentTextTest.php +++ b/tests/Model/RbmMessageContentTextTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmMessageContentTextTest Class Doc Comment * * @description RbmMessageContentText - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmMessageMediaTest.php b/tests/Model/RbmMessageMediaTest.php index 55cad17c..edf932f4 100644 --- a/tests/Model/RbmMessageMediaTest.php +++ b/tests/Model/RbmMessageMediaTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmMessageMediaTest Class Doc Comment * * @description RbmMessageMedia - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmOpenUrlEnumTest.php b/tests/Model/RbmOpenUrlEnumTest.php index 59e7e81c..87a257ec 100644 --- a/tests/Model/RbmOpenUrlEnumTest.php +++ b/tests/Model/RbmOpenUrlEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmOpenUrlEnumTest Class Doc Comment * * @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. - `WEBVIEW` Opens the URL in an in-app WebView. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmStandaloneCardTest.php b/tests/Model/RbmStandaloneCardTest.php index 821530d1..834f5c4d 100644 --- a/tests/Model/RbmStandaloneCardTest.php +++ b/tests/Model/RbmStandaloneCardTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmStandaloneCardTest Class Doc Comment * * @description RbmStandaloneCard - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmSuggestionResponseTest.php b/tests/Model/RbmSuggestionResponseTest.php index b38873d4..ead3e6ca 100644 --- a/tests/Model/RbmSuggestionResponseTest.php +++ b/tests/Model/RbmSuggestionResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmSuggestionResponseTest Class Doc Comment * * @description RbmSuggestionResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RbmWebViewEnumTest.php b/tests/Model/RbmWebViewEnumTest.php index 44fb15b8..01a25125 100644 --- a/tests/Model/RbmWebViewEnumTest.php +++ b/tests/Model/RbmWebViewEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RbmWebViewEnumTest Class Doc Comment * * @description Defines the layout of the WebView on a mobile device. It must be defined when application is set to `WEBVIEW` and must not be set when application is set to `BROWSER`. - `FULL` WebView takes the full screen. - `HALF` WebView takes half of the screen. - `TALL` WebView takes three-quarters of the screen. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RecordingAvailableCallbackTest.php b/tests/Model/RecordingAvailableCallbackTest.php index 439e4652..4048b36f 100644 --- a/tests/Model/RecordingAvailableCallbackTest.php +++ b/tests/Model/RecordingAvailableCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RecordingAvailableCallbackTest Class Doc Comment * * @description The Recording Available event is sent after a recording has been processed. It indicates that the recording is available for download. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RecordingCompleteCallbackTest.php b/tests/Model/RecordingCompleteCallbackTest.php index c9f9394d..f11855a3 100644 --- a/tests/Model/RecordingCompleteCallbackTest.php +++ b/tests/Model/RecordingCompleteCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RecordingCompleteCallbackTest Class Doc Comment * * @description The Record Complete event is sent after a <Record> verb has executed if the call is still active. The BXML returned by this callback is executed next. When the recording is available for download, a Recording Available event will be sent. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RecordingStateEnumTest.php b/tests/Model/RecordingStateEnumTest.php index b230c544..c6a0aee5 100644 --- a/tests/Model/RecordingStateEnumTest.php +++ b/tests/Model/RecordingStateEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RecordingStateEnumTest Class Doc Comment * * @description The recording state. Possible values: `paused` to pause an active recording `recording` to resume a paused recording - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RecordingTranscriptionClipTest.php b/tests/Model/RecordingTranscriptionClipTest.php index f79dac20..5cb3132b 100644 --- a/tests/Model/RecordingTranscriptionClipTest.php +++ b/tests/Model/RecordingTranscriptionClipTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RecordingTranscriptionClipTest Class Doc Comment * * @description RecordingTranscriptionClip - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RecordingTranscriptionMetadataTest.php b/tests/Model/RecordingTranscriptionMetadataTest.php index 2fc00ae0..ca10e033 100644 --- a/tests/Model/RecordingTranscriptionMetadataTest.php +++ b/tests/Model/RecordingTranscriptionMetadataTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RecordingTranscriptionMetadataTest Class Doc Comment * * @description If the recording was transcribed, metadata about the transcription - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RecordingTranscriptionsTest.php b/tests/Model/RecordingTranscriptionsTest.php index 17119fe6..1d176161 100644 --- a/tests/Model/RecordingTranscriptionsTest.php +++ b/tests/Model/RecordingTranscriptionsTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RecordingTranscriptionsTest Class Doc Comment * * @description RecordingTranscriptions - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RedirectCallbackTest.php b/tests/Model/RedirectCallbackTest.php index 1c828c2d..2b73fc38 100644 --- a/tests/Model/RedirectCallbackTest.php +++ b/tests/Model/RedirectCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RedirectCallbackTest Class Doc Comment * * @description The Redirect event is fired when a <Redirect> verb is executed. Its purpose is to get the next set of verbs from the calling application. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/RedirectMethodEnumTest.php b/tests/Model/RedirectMethodEnumTest.php index 4fc65092..1c953f81 100644 --- a/tests/Model/RedirectMethodEnumTest.php +++ b/tests/Model/RedirectMethodEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * RedirectMethodEnumTest Class Doc Comment * * @description The HTTP method to use for the request to `redirectUrl`. GET or POST. Default value is POST.<br><br>Not allowed if `state` is `completed`. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/SipConnectionMetadataTest.php b/tests/Model/SipConnectionMetadataTest.php index b241b818..b453e3fd 100644 --- a/tests/Model/SipConnectionMetadataTest.php +++ b/tests/Model/SipConnectionMetadataTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * SipConnectionMetadataTest Class Doc Comment * * @description SipConnectionMetadata - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/SipCredentialsTest.php b/tests/Model/SipCredentialsTest.php index 367981cc..76e7fa8b 100644 --- a/tests/Model/SipCredentialsTest.php +++ b/tests/Model/SipCredentialsTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * SipCredentialsTest Class Doc Comment * * @description SipCredentials - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/SmsMessageContentTest.php b/tests/Model/SmsMessageContentTest.php index 37da6a83..9870181f 100644 --- a/tests/Model/SmsMessageContentTest.php +++ b/tests/Model/SmsMessageContentTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * SmsMessageContentTest Class Doc Comment * * @description SmsMessageContent - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/StandaloneCardOrientationEnumTest.php b/tests/Model/StandaloneCardOrientationEnumTest.php index 066a5c73..541a78b0 100644 --- a/tests/Model/StandaloneCardOrientationEnumTest.php +++ b/tests/Model/StandaloneCardOrientationEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * StandaloneCardOrientationEnumTest Class Doc Comment * * @description StandaloneCardOrientationEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/StatusCallbackMessageTest.php b/tests/Model/StatusCallbackMessageTest.php index 96b2adc9..60c9e648 100644 --- a/tests/Model/StatusCallbackMessageTest.php +++ b/tests/Model/StatusCallbackMessageTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * StatusCallbackMessageTest Class Doc Comment * * @description Message payload schema within a callback - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/StatusCallbackTest.php b/tests/Model/StatusCallbackTest.php index cc7bf3ef..b3aee9eb 100644 --- a/tests/Model/StatusCallbackTest.php +++ b/tests/Model/StatusCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * StatusCallbackTest Class Doc Comment * * @description Represents a status callback for an outbound MT SMS or MMS or RBM message. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/StatusCallbackTypeEnumTest.php b/tests/Model/StatusCallbackTypeEnumTest.php index b0fb5af5..0249bc48 100644 --- a/tests/Model/StatusCallbackTypeEnumTest.php +++ b/tests/Model/StatusCallbackTypeEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * StatusCallbackTypeEnumTest Class Doc Comment * * @description The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/StirShakenTest.php b/tests/Model/StirShakenTest.php index 0903612f..b8f45c43 100644 --- a/tests/Model/StirShakenTest.php +++ b/tests/Model/StirShakenTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * StirShakenTest Class Doc Comment * * @description StirShaken - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/SyncLookupRequestTest.php b/tests/Model/SyncLookupRequestTest.php index 1e3a4208..6400e04b 100644 --- a/tests/Model/SyncLookupRequestTest.php +++ b/tests/Model/SyncLookupRequestTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * SyncLookupRequestTest Class Doc Comment * * @description SyncLookupRequest - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TelephoneNumberTest.php b/tests/Model/TelephoneNumberTest.php index dfc790b1..fcc8beb9 100644 --- a/tests/Model/TelephoneNumberTest.php +++ b/tests/Model/TelephoneNumberTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TelephoneNumberTest Class Doc Comment * * @description TelephoneNumber - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TfvBasicAuthenticationTest.php b/tests/Model/TfvBasicAuthenticationTest.php index 0310980e..eb0537a1 100644 --- a/tests/Model/TfvBasicAuthenticationTest.php +++ b/tests/Model/TfvBasicAuthenticationTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TfvBasicAuthenticationTest Class Doc Comment * * @description TfvBasicAuthentication - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TfvCallbackStatusEnumTest.php b/tests/Model/TfvCallbackStatusEnumTest.php index 1c1c5ccf..040b762d 100644 --- a/tests/Model/TfvCallbackStatusEnumTest.php +++ b/tests/Model/TfvCallbackStatusEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TfvCallbackStatusEnumTest Class Doc Comment * * @description TfvCallbackStatusEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TfvErrorTest.php b/tests/Model/TfvErrorTest.php index 07ec2eab..94963334 100644 --- a/tests/Model/TfvErrorTest.php +++ b/tests/Model/TfvErrorTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TfvErrorTest Class Doc Comment * * @description A generic error object. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TfvStatusEnumTest.php b/tests/Model/TfvStatusEnumTest.php index c58d5ea9..9048d56a 100644 --- a/tests/Model/TfvStatusEnumTest.php +++ b/tests/Model/TfvStatusEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TfvStatusEnumTest Class Doc Comment * * @description TfvStatusEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TfvStatusTest.php b/tests/Model/TfvStatusTest.php index 29046c94..1e8c856b 100644 --- a/tests/Model/TfvStatusTest.php +++ b/tests/Model/TfvStatusTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TfvStatusTest Class Doc Comment * * @description TfvStatus - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TfvSubmissionInfoTest.php b/tests/Model/TfvSubmissionInfoTest.php index 1c92d027..15e4860d 100644 --- a/tests/Model/TfvSubmissionInfoTest.php +++ b/tests/Model/TfvSubmissionInfoTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TfvSubmissionInfoTest Class Doc Comment * * @description TfvSubmissionInfo - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TfvSubmissionWrapperTest.php b/tests/Model/TfvSubmissionWrapperTest.php index 0486f5c5..51c79760 100644 --- a/tests/Model/TfvSubmissionWrapperTest.php +++ b/tests/Model/TfvSubmissionWrapperTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TfvSubmissionWrapperTest Class Doc Comment * * @description TfvSubmissionWrapper - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/ThumbnailAlignmentEnumTest.php b/tests/Model/ThumbnailAlignmentEnumTest.php index c54189dc..62b2cc67 100644 --- a/tests/Model/ThumbnailAlignmentEnumTest.php +++ b/tests/Model/ThumbnailAlignmentEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * ThumbnailAlignmentEnumTest Class Doc Comment * * @description The alignment of the thumbnail image in the card. Required when orientation is HORIZONTAL. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TranscribeRecordingTest.php b/tests/Model/TranscribeRecordingTest.php index 33780ede..797fd0d2 100644 --- a/tests/Model/TranscribeRecordingTest.php +++ b/tests/Model/TranscribeRecordingTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TranscribeRecordingTest Class Doc Comment * * @description TranscribeRecording - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TranscriptionAvailableCallbackTest.php b/tests/Model/TranscriptionAvailableCallbackTest.php index 4d3f4716..012ede44 100644 --- a/tests/Model/TranscriptionAvailableCallbackTest.php +++ b/tests/Model/TranscriptionAvailableCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TranscriptionAvailableCallbackTest Class Doc Comment * * @description The Transcription Available event is sent when the recording transcription is available to be downloaded. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TranscriptionTest.php b/tests/Model/TranscriptionTest.php index c235bf14..d3e89eeb 100644 --- a/tests/Model/TranscriptionTest.php +++ b/tests/Model/TranscriptionTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TranscriptionTest Class Doc Comment * * @description Transcription - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TransferAnswerCallbackTest.php b/tests/Model/TransferAnswerCallbackTest.php index 4fb22b4e..feafdb54 100644 --- a/tests/Model/TransferAnswerCallbackTest.php +++ b/tests/Model/TransferAnswerCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TransferAnswerCallbackTest Class Doc Comment * * @description When processing a <Transfer> verb, this event is sent when a called party (B-leg) answers. The event is sent to the endpoint specified in the transferAnswerUrl attribute of the <PhoneNumber> tag that answered. BXML returned by this callback will be executed for the called party only. After all BXML has been executed, the called party will be bridged to the original call. Most BXML verbs are allowed in response to a transferAnswer event, but some are not allowed. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TransferCompleteCallbackTest.php b/tests/Model/TransferCompleteCallbackTest.php index ad781588..447c3fbb 100644 --- a/tests/Model/TransferCompleteCallbackTest.php +++ b/tests/Model/TransferCompleteCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TransferCompleteCallbackTest Class Doc Comment * * @description This event is sent to the transferCompleteUrl of the A-leg's <Transfer> verb when the transferred call (B-leg) completes. In a simultaneous ringing scenario, only one B-leg succeeds and this event corresponds to that successful leg. If none of the calls were answered, the transferComplete event corresponds to one of the legs. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/TransferDisconnectCallbackTest.php b/tests/Model/TransferDisconnectCallbackTest.php index 8bd82f56..2ff7291f 100644 --- a/tests/Model/TransferDisconnectCallbackTest.php +++ b/tests/Model/TransferDisconnectCallbackTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * TransferDisconnectCallbackTest Class Doc Comment * * @description This event is sent to the transferDisconnectUrl of each <PhoneNumber> tag when its respective call leg ends for any reason. The event is sent in the normal case, when the transferred leg is answered and later hung up, but is also sent if the new leg was never answered in the first place, if it was rejected, and if the original call leg hung up before the transferred leg. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/UpdateCallRecordingTest.php b/tests/Model/UpdateCallRecordingTest.php index 87d4ddb0..7da1f1bd 100644 --- a/tests/Model/UpdateCallRecordingTest.php +++ b/tests/Model/UpdateCallRecordingTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * UpdateCallRecordingTest Class Doc Comment * * @description UpdateCallRecording - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/UpdateCallTest.php b/tests/Model/UpdateCallTest.php index daabe31e..bca0854d 100644 --- a/tests/Model/UpdateCallTest.php +++ b/tests/Model/UpdateCallTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * UpdateCallTest Class Doc Comment * * @description UpdateCall - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/UpdateConferenceMemberTest.php b/tests/Model/UpdateConferenceMemberTest.php index 3c140741..24de27f0 100644 --- a/tests/Model/UpdateConferenceMemberTest.php +++ b/tests/Model/UpdateConferenceMemberTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * UpdateConferenceMemberTest Class Doc Comment * * @description UpdateConferenceMember - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/UpdateConferenceTest.php b/tests/Model/UpdateConferenceTest.php index 0259068f..fa7a01ed 100644 --- a/tests/Model/UpdateConferenceTest.php +++ b/tests/Model/UpdateConferenceTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * UpdateConferenceTest Class Doc Comment * * @description UpdateConference - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/VerificationDenialWebhookTest.php b/tests/Model/VerificationDenialWebhookTest.php index b083f81e..a949e9d9 100644 --- a/tests/Model/VerificationDenialWebhookTest.php +++ b/tests/Model/VerificationDenialWebhookTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * VerificationDenialWebhookTest Class Doc Comment * * @description VerificationDenialWebhook - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/VerificationRequestTest.php b/tests/Model/VerificationRequestTest.php index 082c6d8f..a7288c2d 100644 --- a/tests/Model/VerificationRequestTest.php +++ b/tests/Model/VerificationRequestTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * VerificationRequestTest Class Doc Comment * * @description VerificationRequest - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/VerificationUpdateRequestTest.php b/tests/Model/VerificationUpdateRequestTest.php index c0f4e781..7356cedc 100644 --- a/tests/Model/VerificationUpdateRequestTest.php +++ b/tests/Model/VerificationUpdateRequestTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * VerificationUpdateRequestTest Class Doc Comment * * @description VerificationUpdateRequest - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/VerificationWebhookTest.php b/tests/Model/VerificationWebhookTest.php index 482f0401..7187dcbb 100644 --- a/tests/Model/VerificationWebhookTest.php +++ b/tests/Model/VerificationWebhookTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * VerificationWebhookTest Class Doc Comment * * @description VerificationWebhook - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/VerifyCodeRequestTest.php b/tests/Model/VerifyCodeRequestTest.php index e0ce8065..7bafb9f5 100644 --- a/tests/Model/VerifyCodeRequestTest.php +++ b/tests/Model/VerifyCodeRequestTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * VerifyCodeRequestTest Class Doc Comment * * @description VerifyCodeRequest - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/VerifyCodeResponseTest.php b/tests/Model/VerifyCodeResponseTest.php index 92891ad2..7ccc957c 100644 --- a/tests/Model/VerifyCodeResponseTest.php +++ b/tests/Model/VerifyCodeResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * VerifyCodeResponseTest Class Doc Comment * * @description VerifyCodeResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/VoiceApiErrorTest.php b/tests/Model/VoiceApiErrorTest.php index 0101a29e..06c2cd94 100644 --- a/tests/Model/VoiceApiErrorTest.php +++ b/tests/Model/VoiceApiErrorTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * VoiceApiErrorTest Class Doc Comment * * @description VoiceApiError - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/VoiceCodeResponseTest.php b/tests/Model/VoiceCodeResponseTest.php index 62ea1f98..518ad312 100644 --- a/tests/Model/VoiceCodeResponseTest.php +++ b/tests/Model/VoiceCodeResponseTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * VoiceCodeResponseTest Class Doc Comment * * @description VoiceCodeResponse - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/WebhookSubscriptionBasicAuthenticationTest.php b/tests/Model/WebhookSubscriptionBasicAuthenticationTest.php index 660497a3..e0fb2fad 100644 --- a/tests/Model/WebhookSubscriptionBasicAuthenticationTest.php +++ b/tests/Model/WebhookSubscriptionBasicAuthenticationTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * WebhookSubscriptionBasicAuthenticationTest Class Doc Comment * * @description Basic authentication credentials are not required, but if present, both username and password must be provided. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/WebhookSubscriptionErrorTest.php b/tests/Model/WebhookSubscriptionErrorTest.php index d414146e..d67c6184 100644 --- a/tests/Model/WebhookSubscriptionErrorTest.php +++ b/tests/Model/WebhookSubscriptionErrorTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * WebhookSubscriptionErrorTest Class Doc Comment * * @description WebhookSubscriptionError - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/WebhookSubscriptionRequestSchemaTest.php b/tests/Model/WebhookSubscriptionRequestSchemaTest.php index 02061f7a..fb9463ce 100644 --- a/tests/Model/WebhookSubscriptionRequestSchemaTest.php +++ b/tests/Model/WebhookSubscriptionRequestSchemaTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * WebhookSubscriptionRequestSchemaTest Class Doc Comment * * @description WebhookSubscriptionRequestSchema - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/WebhookSubscriptionTest.php b/tests/Model/WebhookSubscriptionTest.php index e97a9607..2416d343 100644 --- a/tests/Model/WebhookSubscriptionTest.php +++ b/tests/Model/WebhookSubscriptionTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * WebhookSubscriptionTest Class Doc Comment * * @description Information about a webhook that Bandwidth should send upon the completion of event customer has subscribed to. - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/WebhookSubscriptionTypeEnumTest.php b/tests/Model/WebhookSubscriptionTypeEnumTest.php index 3a95eca7..d17c00b0 100644 --- a/tests/Model/WebhookSubscriptionTypeEnumTest.php +++ b/tests/Model/WebhookSubscriptionTypeEnumTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * WebhookSubscriptionTypeEnumTest Class Doc Comment * * @description WebhookSubscriptionTypeEnum - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ diff --git a/tests/Model/WebhookSubscriptionsListBodyTest.php b/tests/Model/WebhookSubscriptionsListBodyTest.php index 0b8ce067..1b44684e 100644 --- a/tests/Model/WebhookSubscriptionsListBodyTest.php +++ b/tests/Model/WebhookSubscriptionsListBodyTest.php @@ -4,7 +4,7 @@ * * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace OpenAPI\Client\Test\Model; +namespace Bandwidth\Test\Model; use PHPUnit\Framework\TestCase; @@ -34,7 +34,7 @@ * WebhookSubscriptionsListBodyTest Class Doc Comment * * @description A list of all webhook subscriptions registered for this account ID for this particular feature (unpaginated). - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ From 58ba195b54dce502bef2e64765f8f2cf9fca91f8 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 7 Jul 2026 17:23:29 -0400 Subject: [PATCH 05/53] messages smoke test --- tests/Api/MessagesApiTest.php | 106 ++++++++++++++++++++++++---------- 1 file changed, 75 insertions(+), 31 deletions(-) diff --git a/tests/Api/MessagesApiTest.php b/tests/Api/MessagesApiTest.php index fd3de59e..511a4623 100644 --- a/tests/Api/MessagesApiTest.php +++ b/tests/Api/MessagesApiTest.php @@ -3,7 +3,7 @@ * MessagesApiTest * PHP version 8.1 * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ @@ -25,49 +25,50 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace Bandwidth\Test\Api; + +use Bandwidth\Configuration; +use Bandwidth\ApiException; +use Bandwidth\ObjectSerializer; +use Bandwidth\Api\MessagesApi; +use Bandwidth\Model\PriorityEnum; +use Bandwidth\Model\MessageRequest; +use Bandwidth\Model\Message; +use Bandwidth\Model\ListMessageDirectionEnum; +use Bandwidth\Model\MessagesList; +use Bandwidth\Model\ListMessageItem; -use OpenAPI\Client\Configuration; -use OpenAPI\Client\ApiException; -use OpenAPI\Client\ObjectSerializer; use PHPUnit\Framework\TestCase; /** * MessagesApiTest Class Doc Comment * - * @package OpenAPI\Client + * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech */ class MessagesApiTest extends TestCase { + private static MessagesApi $apiInstance; + private static string $account_id; + private static string $bw_number; /** * Setup before running any test cases */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + $config = Configuration::getDefaultConfiguration() + ->setUsername(getenv("BW_USERNAME")) + ->setPassword(getenv("BW_PASSWORD")); + + self::$apiInstance = new MessagesApi( + null, + $config + ); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$bw_number = getenv("BW_NUMBER"); } /** @@ -78,8 +79,37 @@ public static function tearDownAfterClass(): void */ public function testCreateMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $application_id = getenv("BW_MESSAGING_APPLICATION_ID"); + $to_number = getenv("USER_NUMBER"); + $from_number = self::$bw_number; + $text = 'python integration'; + $media = ['https://cdn2.thecatapi.com/images/MTY3ODIyMQ.jpg']; + $tag = 'python integration tag'; + $priority = PriorityEnum::_DEFAULT; + + # Message Request + $messageRequest = new MessageRequest( + array( + 'application_id' => $application_id, + 'to' => [$to_number], + 'from' => $from_number, + 'text' => $text, + 'media' => $media, + 'tag' => $tag, + 'priority' => $priority, + ) + ); + + [$data, $status_code] = self::$apiInstance->createMessageWithHttpInfo(self::$account_id, $messageRequest); + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(Message::class, $data); + $this->assertEquals(29, strlen($data->getId())); + $this->assertEquals($from_number, $data->getOwner()); + $this->assertEquals([$to_number], $data->getTo()); + $this->assertEquals($from_number, $data->getFrom()); + $this->assertEquals($text, $data->getText()); + $this->assertEquals($tag, $data->getTag()); + $this->assertEquals($priority, $data->getPriority()); } /** @@ -90,7 +120,21 @@ public function testCreateMessage() */ public function testListMessages() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $list_message_direction = ListMessageDirectionEnum::OUTBOUND; + $calling_number_country_a3 = 'USA'; + + [$data, $status_code] = self::$apiInstance->listMessagesWithHttpInfo( + account_id: self::$account_id, + message_direction: $list_message_direction, + calling_number_country_a3: $calling_number_country_a3 + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(MessagesList::class, $data); + $this->assertInstanceOf(ListMessageItem::class, $data->getMessages()[0]); + $this->assertEquals(self::$account_id, $data->getMessages()[0]->getAccountId()); + $this->assertEquals(29, strlen($data->getMessages()[0]->getMessageId())); + $this->assertEquals($list_message_direction, $data->getMessages()[0]->getMessageDirection()); + $this->assertEquals($calling_number_country_a3, $data->getMessages()[0]->getCallingNumberCountryA3()); } } From 87cae875d91037734691d0bab8b8940a81fe6cf3 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 8 Jul 2026 16:12:06 -0400 Subject: [PATCH 06/53] gh info --- composer.json | 2 +- git_push.sh | 4 ++-- openapi-config.yml | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 4e0a6c97..8291a2d4 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "bandwidth/sdk", + "name": "bandwidth/php-sdk", "description": "Bandwidth's Communication APIs", "keywords": [ "openapitools", diff --git a/git_push.sh b/git_push.sh index f53a75d4..b15db011 100644 --- a/git_push.sh +++ b/git_push.sh @@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then fi if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" + git_user_id="bandwidth" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" + git_repo_id="php-sdk" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi diff --git a/openapi-config.yml b/openapi-config.yml index 503b7354..2950f86f 100644 --- a/openapi-config.yml +++ b/openapi-config.yml @@ -1,3 +1,5 @@ packageName: Bandwidth SDK composerPackageName: bandwidth/sdk invokerPackage: Bandwidth +gitUserId: bandwidth +gitRepoId: php-sdk From d2bcd6bcef3eade71afbaaab1e7624405203bba5 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 8 Jul 2026 16:31:43 -0400 Subject: [PATCH 07/53] messages cleanup --- tests/Api/MessagesApiTest.php | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/tests/Api/MessagesApiTest.php b/tests/Api/MessagesApiTest.php index 511a4623..4aecc087 100644 --- a/tests/Api/MessagesApiTest.php +++ b/tests/Api/MessagesApiTest.php @@ -28,8 +28,6 @@ namespace Bandwidth\Test\Api; use Bandwidth\Configuration; -use Bandwidth\ApiException; -use Bandwidth\ObjectSerializer; use Bandwidth\Api\MessagesApi; use Bandwidth\Model\PriorityEnum; use Bandwidth\Model\MessageRequest; @@ -61,12 +59,9 @@ public static function setUpBeforeClass(): void $config = Configuration::getDefaultConfiguration() ->setUsername(getenv("BW_USERNAME")) ->setPassword(getenv("BW_PASSWORD")); - - self::$apiInstance = new MessagesApi( - null, - $config - ); - + + self::$apiInstance = new MessagesApi(config: $config); + self::$account_id = getenv("BW_ACCOUNT_ID"); self::$bw_number = getenv("BW_NUMBER"); } @@ -88,17 +83,15 @@ public function testCreateMessage() $priority = PriorityEnum::_DEFAULT; # Message Request - $messageRequest = new MessageRequest( - array( - 'application_id' => $application_id, - 'to' => [$to_number], - 'from' => $from_number, - 'text' => $text, - 'media' => $media, - 'tag' => $tag, - 'priority' => $priority, - ) - ); + $messageRequest = new MessageRequest([ + 'application_id' => $application_id, + 'to' => [$to_number], + 'from' => $from_number, + 'text' => $text, + 'media' => $media, + 'tag' => $tag, + 'priority' => $priority, + ]); [$data, $status_code] = self::$apiInstance->createMessageWithHttpInfo(self::$account_id, $messageRequest); $this->assertEquals(202, $status_code); From 948eb1e4d9ec38edfb95b160a2cc44e32b709787 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 8 Jul 2026 16:47:54 -0400 Subject: [PATCH 08/53] media smoke tests --- tests/Api/MediaApiTest.php | 106 +++++++++++++++++++++++++------------ 1 file changed, 73 insertions(+), 33 deletions(-) diff --git a/tests/Api/MediaApiTest.php b/tests/Api/MediaApiTest.php index e1fc9787..8198214e 100644 --- a/tests/Api/MediaApiTest.php +++ b/tests/Api/MediaApiTest.php @@ -27,9 +27,12 @@ namespace Bandwidth\Test\Api; -use Bandwidth\Configuration; +use SplFileObject; use Bandwidth\ApiException; -use Bandwidth\ObjectSerializer; +use Bandwidth\Configuration; +use Bandwidth\Api\MediaApi; +use Bandwidth\Model\Media; + use PHPUnit\Framework\TestCase; /** @@ -41,45 +44,67 @@ */ class MediaApiTest extends TestCase { + private static MediaApi $apiInstance; + private static string $account_id; + private static string $media_name; + private static string $media_data; + private static SplFileObject $media_file; /** * Setup before running any test cases */ public static function setUpBeforeClass(): void { - } + $config = Configuration::getDefaultConfiguration() + ->setUsername(getenv("BW_USERNAME")) + ->setPassword(getenv("BW_PASSWORD")); - /** - * Setup before running each test case - */ - public function setUp(): void - { - } + self::$apiInstance = new MediaApi(config: $config); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$media_name = "php_binary_media" . uniqid() . ".txt"; + self::$media_data = "123456"; + + $path = tempnam(sys_get_temp_dir(), 'bw_media_'); + file_put_contents($path, self::$media_data); + self::$media_file = new SplFileObject($path, 'rb'); } /** - * Clean up after running all test cases + * Test case for uploadMedia + * + * Upload Media. + * */ - public static function tearDownAfterClass(): void + public function testUploadMedia() { + [, $status_code] = self::$apiInstance->uploadMediaWithHttpInfo( + self::$account_id, + self::$media_name, + self::$media_file, + contentType: 'text/plain' + ); + + $this->assertEquals(204, $status_code); } /** - * Test case for deleteMedia + * Test case for listMedia * - * Delete Media. + * List Media. * */ - public function testDeleteMedia() + public function testListMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$data, $status_code] = self::$apiInstance->listMediaWithHttpInfo( + self::$account_id + ); + + $this->assertEquals(200, $status_code); + $this->assertIsArray($data); + $this->assertInstanceOf(Media::class, $data[0]); + $this->assertIsString($data[0]->getContent()); + $this->assertGreaterThan(0, $data[0]->getContentLength()); } /** @@ -90,31 +115,46 @@ public function testDeleteMedia() */ public function testGetMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$data, $status_code] = self::$apiInstance->getMediaWithHttpInfo( + self::$account_id, + self::$media_name + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(SplFileObject::class, $data); + $this->assertEquals(self::$media_data, file_get_contents($data->getRealPath())); } /** - * Test case for listMedia + * Test case for deleteMedia * - * List Media. + * Delete Media. * */ - public function testListMedia() + public function testDeleteMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [, $status_code] = self::$apiInstance->deleteMediaWithHttpInfo( + account_id: self::$account_id, + media_id: self::$media_name + ); + + $this->assertEquals(204, $status_code); } /** - * Test case for uploadMedia + * Test case HTTP 404 * - * Upload Media. + * Get Media 404 * */ - public function testUploadMedia() + public function testGetMedia404() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->expectException(ApiException::class); + $this->expectExceptionCode(404); + + self::$apiInstance->getMediaWithHttpInfo( + account_id: self::$account_id, + media_id: 'non_existent_media' + ); } } From 5eaf088af6ddb3144a162795c5a748964a2c6bf9 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 15 Jul 2026 15:17:31 -0400 Subject: [PATCH 09/53] use snapshot to fix anyOf --- .openapi-generator/FILES | 211 +---- .openapi-generator/VERSION | 2 +- README.md | 2 +- docs/Model/Callback.md | 19 +- docs/Model/MultiChannelAction.md | 28 +- ...ChannelChannelListRBMObjectAllOfContent.md | 18 +- .../MultiChannelChannelListRequestObject.md | 18 +- .../MultiChannelChannelListResponseObject.md | 19 +- docs/Model/RbmMessageContentRichCard.md | 17 +- src/APIException.php | 2 +- src/Api/CallsApi.php | 98 +- src/Api/ConferencesApi.php | 224 +---- src/Api/EndpointsApi.php | 117 +-- src/Api/MFAApi.php | 30 +- src/Api/MediaApi.php | 108 +-- src/Api/MessagesApi.php | 71 +- src/Api/MultiChannelApi.php | 18 +- src/Api/PhoneNumberLookupApi.php | 53 +- src/Api/RecordingsApi.php | 277 +----- src/Api/StatisticsApi.php | 36 +- src/Api/TollFreeVerificationApi.php | 188 +--- src/Api/TranscriptionsApi.php | 100 +- src/Configuration.php | 2 +- src/FormDataProcessor.php | 2 +- src/HeaderSelector.php | 2 +- src/Model/AccountStatistics.php | 2 +- src/Model/AdditionalDenialReason.php | 2 +- src/Model/Address.php | 2 +- src/Model/AnswerCallback.php | 2 +- src/Model/AsyncLookupRequest.php | 3 +- src/Model/BlockedWebhook.php | 2 +- src/Model/BridgeCompleteCallback.php | 2 +- src/Model/BridgeTargetCompleteCallback.php | 2 +- src/Model/BrtcError.php | 2 +- src/Model/BrtcErrorResponse.php | 2 +- src/Model/BrtcErrorSource.php | 2 +- src/Model/BrtcLink.php | 2 +- src/Model/BusinessEntityTypeEnum.php | 2 +- src/Model/BusinessRegistrationTypeEnum.php | 2 +- src/Model/CallDirectionEnum.php | 2 +- src/Model/CallRecordingMetadata.php | 2 +- src/Model/CallState.php | 2 +- src/Model/CallStateEnum.php | 2 +- src/Model/CallTranscription.php | 3 +- .../CallTranscriptionDetectedLanguageEnum.php | 2 +- src/Model/CallTranscriptionMetadata.php | 2 +- src/Model/CallTranscriptionResponse.php | 2 +- src/Model/CallTranscriptionTrackEnum.php | 2 +- src/Model/Callback.php | 607 +----------- src/Model/CallbackMethodEnum.php | 2 +- src/Model/CardWidthEnum.php | 2 +- src/Model/CodeRequest.php | 3 +- src/Model/CompletedLookupStatusEnum.php | 2 +- src/Model/ComposedInterface.php | 66 ++ src/Model/Conference.php | 2 +- src/Model/ConferenceCompletedCallback.php | 2 +- src/Model/ConferenceCreatedCallback.php | 2 +- src/Model/ConferenceMember.php | 2 +- src/Model/ConferenceMemberExitCallback.php | 2 +- src/Model/ConferenceMemberJoinCallback.php | 2 +- .../ConferenceRecordingAvailableCallback.php | 2 +- src/Model/ConferenceRecordingMetadata.php | 2 +- src/Model/ConferenceRedirectCallback.php | 2 +- src/Model/ConferenceStateEnum.php | 2 +- src/Model/Contact.php | 2 +- src/Model/CreateAsyncBulkLookupResponse.php | 2 +- .../CreateAsyncBulkLookupResponseData.php | 2 +- src/Model/CreateCall.php | 5 +- src/Model/CreateCallResponse.php | 2 +- src/Model/CreateEndpointRequestBase.php | 2 +- src/Model/CreateEndpointResponse.php | 2 +- src/Model/CreateEndpointResponseData.php | 2 +- src/Model/CreateMessageRequestError.php | 2 +- .../CreateMultiChannelMessageResponse.php | 2 +- src/Model/CreateSyncLookupResponse.php | 2 +- src/Model/CreateSyncLookupResponseData.php | 2 +- src/Model/CreateWebRtcConnectionRequest.php | 2 +- src/Model/DeactivationEventEnum.php | 2 +- src/Model/Device.php | 2 +- src/Model/DeviceStatusEnum.php | 2 +- src/Model/DisconnectCallback.php | 2 +- src/Model/Diversion.php | 2 +- src/Model/DtmfCallback.php | 2 +- src/Model/Endpoint.php | 2 +- src/Model/EndpointDirectionEnum.php | 2 +- src/Model/EndpointEvent.php | 2 +- src/Model/EndpointEventTypeEnum.php | 2 +- src/Model/EndpointResponse.php | 2 +- src/Model/EndpointStatusEnum.php | 2 +- src/Model/EndpointTypeEnum.php | 2 +- src/Model/Endpoints.php | 2 +- src/Model/ErrorObject.php | 2 +- src/Model/ErrorSource.php | 2 +- src/Model/FailureWebhook.php | 2 +- src/Model/FieldError.php | 2 +- src/Model/FileFormatEnum.php | 2 +- src/Model/GatherCallback.php | 2 +- src/Model/GetAsyncBulkLookupResponse.php | 2 +- src/Model/GetAsyncBulkLookupResponseData.php | 2 +- src/Model/InProgressLookupStatusEnum.php | 2 +- src/Model/InboundCallback.php | 2 +- src/Model/InboundCallbackMessage.php | 3 +- src/Model/InboundCallbackTypeEnum.php | 2 +- src/Model/InitiateCallback.php | 2 +- src/Model/LatestMessageDeliveryStatusEnum.php | 2 +- src/Model/LineTypeEnum.php | 2 +- src/Model/Link.php | 2 +- src/Model/LinkSchema.php | 2 +- src/Model/LinksObject.php | 2 +- src/Model/ListEndpointsResponse.php | 2 +- src/Model/ListMessageDirectionEnum.php | 2 +- src/Model/ListMessageItem.php | 2 +- src/Model/LookupErrorResponse.php | 2 +- src/Model/LookupErrorSchema.php | 2 +- src/Model/LookupErrorSchemaMeta.php | 2 +- src/Model/LookupResult.php | 2 +- .../MachineDetectionCompleteCallback.php | 2 +- src/Model/MachineDetectionConfiguration.php | 2 +- src/Model/MachineDetectionModeEnum.php | 2 +- src/Model/MachineDetectionResult.php | 2 +- src/Model/Media.php | 2 +- src/Model/Message.php | 4 +- src/Model/MessageDirectionEnum.php | 2 +- src/Model/MessageRequest.php | 3 +- src/Model/MessageStatusEnum.php | 2 +- src/Model/MessageTypeEnum.php | 2 +- src/Model/MessagesList.php | 2 +- src/Model/MessagingCodeResponse.php | 2 +- src/Model/MessagingRequestError.php | 2 +- src/Model/MfaForbiddenRequestError.php | 2 +- src/Model/MfaRequestError.php | 2 +- src/Model/MfaUnauthorizedRequestError.php | 2 +- src/Model/MmsMessageContent.php | 2 +- src/Model/MmsMessageContentFile.php | 2 +- src/Model/ModelInterface.php | 2 +- src/Model/MultiChannelAction.php | 871 +----------------- src/Model/MultiChannelActionCalendarEvent.php | 9 +- .../MultiChannelChannelListMMSObject.php | 2 +- ...ltiChannelChannelListMMSResponseObject.php | 2 +- .../MultiChannelChannelListObjectBase.php | 2 +- .../MultiChannelChannelListOwnerObject.php | 2 +- .../MultiChannelChannelListRBMObject.php | 10 +- ...hannelChannelListRBMObjectAllOfContent.php | 622 +------------ ...ltiChannelChannelListRBMResponseObject.php | 10 +- .../MultiChannelChannelListRequestObject.php | 457 +-------- .../MultiChannelChannelListResponseObject.php | 494 +--------- .../MultiChannelChannelListSMSObject.php | 2 +- ...ltiChannelChannelListSMSResponseObject.php | 2 +- src/Model/MultiChannelError.php | 2 +- src/Model/MultiChannelMessageChannelEnum.php | 2 +- src/Model/MultiChannelMessageContent.php | 2 +- src/Model/MultiChannelMessageRequest.php | 7 +- src/Model/MultiChannelMessageResponseData.php | 8 +- src/Model/OptInWorkflow.php | 2 +- src/Model/Page.php | 6 +- src/Model/PageInfo.php | 2 +- src/Model/PriorityEnum.php | 2 +- src/Model/ProductTypeEnum.php | 2 +- src/Model/RbmActionBase.php | 9 +- src/Model/RbmActionDial.php | 9 +- src/Model/RbmActionOpenUrl.php | 9 +- src/Model/RbmActionTypeEnum.php | 2 +- src/Model/RbmActionViewLocation.php | 9 +- src/Model/RbmCardContent.php | 7 +- src/Model/RbmCardContentMedia.php | 2 +- src/Model/RbmLocationResponse.php | 2 +- src/Model/RbmMediaHeightEnum.php | 2 +- src/Model/RbmMessageCarouselCard.php | 8 +- src/Model/RbmMessageContentFile.php | 2 +- src/Model/RbmMessageContentRichCard.php | 539 +---------- src/Model/RbmMessageContentText.php | 7 +- src/Model/RbmMessageMedia.php | 7 +- src/Model/RbmOpenUrlEnum.php | 2 +- src/Model/RbmStandaloneCard.php | 7 +- src/Model/RbmSuggestionResponse.php | 9 +- src/Model/RbmWebViewEnum.php | 2 +- src/Model/RecordingAvailableCallback.php | 2 +- src/Model/RecordingCompleteCallback.php | 2 +- src/Model/RecordingStateEnum.php | 2 +- src/Model/RecordingTranscriptionClip.php | 3 +- src/Model/RecordingTranscriptionMetadata.php | 2 +- src/Model/RecordingTranscriptions.php | 2 +- src/Model/RedirectCallback.php | 2 +- src/Model/RedirectMethodEnum.php | 2 +- src/Model/SipConnectionMetadata.php | 2 +- src/Model/SipCredentials.php | 2 +- src/Model/SmsMessageContent.php | 2 +- src/Model/StandaloneCardOrientationEnum.php | 2 +- src/Model/StatusCallback.php | 2 +- src/Model/StatusCallbackMessage.php | 3 +- src/Model/StatusCallbackTypeEnum.php | 2 +- src/Model/StirShaken.php | 2 +- src/Model/SyncLookupRequest.php | 3 +- src/Model/TelephoneNumber.php | 2 +- src/Model/TfvBasicAuthentication.php | 2 +- src/Model/TfvCallbackStatusEnum.php | 2 +- src/Model/TfvError.php | 2 +- src/Model/TfvStatus.php | 2 +- src/Model/TfvStatusEnum.php | 2 +- src/Model/TfvSubmissionInfo.php | 3 +- src/Model/TfvSubmissionWrapper.php | 2 +- src/Model/ThumbnailAlignmentEnum.php | 2 +- src/Model/TranscribeRecording.php | 3 +- src/Model/Transcription.php | 2 +- src/Model/TranscriptionAvailableCallback.php | 2 +- src/Model/TransferAnswerCallback.php | 2 +- src/Model/TransferCompleteCallback.php | 2 +- src/Model/TransferDisconnectCallback.php | 2 +- src/Model/UpdateCall.php | 2 +- src/Model/UpdateCallRecording.php | 2 +- src/Model/UpdateConference.php | 2 +- src/Model/UpdateConferenceMember.php | 2 +- src/Model/VerificationDenialWebhook.php | 2 +- src/Model/VerificationRequest.php | 4 +- src/Model/VerificationUpdateRequest.php | 3 +- src/Model/VerificationWebhook.php | 2 +- src/Model/VerifyCodeRequest.php | 3 +- src/Model/VerifyCodeResponse.php | 2 +- src/Model/VoiceApiError.php | 2 +- src/Model/VoiceCodeResponse.php | 2 +- src/Model/WebhookSubscription.php | 2 +- ...WebhookSubscriptionBasicAuthentication.php | 2 +- src/Model/WebhookSubscriptionError.php | 2 +- .../WebhookSubscriptionRequestSchema.php | 2 +- src/Model/WebhookSubscriptionTypeEnum.php | 2 +- src/Model/WebhookSubscriptionsListBody.php | 2 +- src/ObjectSerializer.php | 58 +- 227 files changed, 627 insertions(+), 5255 deletions(-) create mode 100644 src/Model/ComposedInterface.php diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 45eefd50..0c887d99 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -261,6 +261,7 @@ src/Model/CallbackMethodEnum.php src/Model/CardWidthEnum.php src/Model/CodeRequest.php src/Model/CompletedLookupStatusEnum.php +src/Model/ComposedInterface.php src/Model/Conference.php src/Model/ConferenceCompletedCallback.php src/Model/ConferenceCreatedCallback.php @@ -434,213 +435,3 @@ src/Model/WebhookSubscriptionRequestSchema.php src/Model/WebhookSubscriptionTypeEnum.php src/Model/WebhookSubscriptionsListBody.php src/ObjectSerializer.php -tests/Api/CallsApiTest.php -tests/Api/ConferencesApiTest.php -tests/Api/EndpointsApiTest.php -tests/Api/MFAApiTest.php -tests/Api/MediaApiTest.php -tests/Api/MultiChannelApiTest.php -tests/Api/PhoneNumberLookupApiTest.php -tests/Api/RecordingsApiTest.php -tests/Api/StatisticsApiTest.php -tests/Api/TollFreeVerificationApiTest.php -tests/Api/TranscriptionsApiTest.php -tests/Model/AccountStatisticsTest.php -tests/Model/AdditionalDenialReasonTest.php -tests/Model/AddressTest.php -tests/Model/AnswerCallbackTest.php -tests/Model/AsyncLookupRequestTest.php -tests/Model/BlockedWebhookTest.php -tests/Model/BridgeCompleteCallbackTest.php -tests/Model/BridgeTargetCompleteCallbackTest.php -tests/Model/BrtcErrorResponseTest.php -tests/Model/BrtcErrorSourceTest.php -tests/Model/BrtcErrorTest.php -tests/Model/BrtcLinkTest.php -tests/Model/BusinessEntityTypeEnumTest.php -tests/Model/BusinessRegistrationTypeEnumTest.php -tests/Model/CallDirectionEnumTest.php -tests/Model/CallRecordingMetadataTest.php -tests/Model/CallStateEnumTest.php -tests/Model/CallStateTest.php -tests/Model/CallTranscriptionDetectedLanguageEnumTest.php -tests/Model/CallTranscriptionMetadataTest.php -tests/Model/CallTranscriptionResponseTest.php -tests/Model/CallTranscriptionTest.php -tests/Model/CallTranscriptionTrackEnumTest.php -tests/Model/CallbackMethodEnumTest.php -tests/Model/CallbackTest.php -tests/Model/CardWidthEnumTest.php -tests/Model/CodeRequestTest.php -tests/Model/CompletedLookupStatusEnumTest.php -tests/Model/ConferenceCompletedCallbackTest.php -tests/Model/ConferenceCreatedCallbackTest.php -tests/Model/ConferenceMemberExitCallbackTest.php -tests/Model/ConferenceMemberJoinCallbackTest.php -tests/Model/ConferenceMemberTest.php -tests/Model/ConferenceRecordingAvailableCallbackTest.php -tests/Model/ConferenceRecordingMetadataTest.php -tests/Model/ConferenceRedirectCallbackTest.php -tests/Model/ConferenceStateEnumTest.php -tests/Model/ConferenceTest.php -tests/Model/ContactTest.php -tests/Model/CreateAsyncBulkLookupResponseDataTest.php -tests/Model/CreateAsyncBulkLookupResponseTest.php -tests/Model/CreateCallResponseTest.php -tests/Model/CreateCallTest.php -tests/Model/CreateEndpointRequestBaseTest.php -tests/Model/CreateEndpointResponseDataTest.php -tests/Model/CreateEndpointResponseTest.php -tests/Model/CreateMessageRequestErrorTest.php -tests/Model/CreateMultiChannelMessageResponseTest.php -tests/Model/CreateSyncLookupResponseDataTest.php -tests/Model/CreateSyncLookupResponseTest.php -tests/Model/CreateWebRtcConnectionRequestTest.php -tests/Model/DeactivationEventEnumTest.php -tests/Model/DeviceStatusEnumTest.php -tests/Model/DeviceTest.php -tests/Model/DisconnectCallbackTest.php -tests/Model/DiversionTest.php -tests/Model/DtmfCallbackTest.php -tests/Model/EndpointDirectionEnumTest.php -tests/Model/EndpointEventTest.php -tests/Model/EndpointEventTypeEnumTest.php -tests/Model/EndpointResponseTest.php -tests/Model/EndpointStatusEnumTest.php -tests/Model/EndpointTest.php -tests/Model/EndpointTypeEnumTest.php -tests/Model/EndpointsTest.php -tests/Model/ErrorObjectTest.php -tests/Model/ErrorSourceTest.php -tests/Model/FailureWebhookTest.php -tests/Model/FieldErrorTest.php -tests/Model/FileFormatEnumTest.php -tests/Model/GatherCallbackTest.php -tests/Model/GetAsyncBulkLookupResponseDataTest.php -tests/Model/GetAsyncBulkLookupResponseTest.php -tests/Model/InProgressLookupStatusEnumTest.php -tests/Model/InboundCallbackMessageTest.php -tests/Model/InboundCallbackTest.php -tests/Model/InboundCallbackTypeEnumTest.php -tests/Model/InitiateCallbackTest.php -tests/Model/LatestMessageDeliveryStatusEnumTest.php -tests/Model/LineTypeEnumTest.php -tests/Model/LinkSchemaTest.php -tests/Model/LinkTest.php -tests/Model/LinksObjectTest.php -tests/Model/ListEndpointsResponseTest.php -tests/Model/ListMessageDirectionEnumTest.php -tests/Model/ListMessageItemTest.php -tests/Model/LookupErrorResponseTest.php -tests/Model/LookupErrorSchemaMetaTest.php -tests/Model/LookupErrorSchemaTest.php -tests/Model/LookupResultTest.php -tests/Model/MachineDetectionCompleteCallbackTest.php -tests/Model/MachineDetectionConfigurationTest.php -tests/Model/MachineDetectionModeEnumTest.php -tests/Model/MachineDetectionResultTest.php -tests/Model/MediaTest.php -tests/Model/MessageDirectionEnumTest.php -tests/Model/MessageRequestTest.php -tests/Model/MessageStatusEnumTest.php -tests/Model/MessageTest.php -tests/Model/MessageTypeEnumTest.php -tests/Model/MessagesListTest.php -tests/Model/MessagingCodeResponseTest.php -tests/Model/MessagingRequestErrorTest.php -tests/Model/MfaForbiddenRequestErrorTest.php -tests/Model/MfaRequestErrorTest.php -tests/Model/MfaUnauthorizedRequestErrorTest.php -tests/Model/MmsMessageContentFileTest.php -tests/Model/MmsMessageContentTest.php -tests/Model/MultiChannelActionCalendarEventTest.php -tests/Model/MultiChannelActionTest.php -tests/Model/MultiChannelChannelListMMSObjectTest.php -tests/Model/MultiChannelChannelListMMSResponseObjectTest.php -tests/Model/MultiChannelChannelListObjectBaseTest.php -tests/Model/MultiChannelChannelListOwnerObjectTest.php -tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php -tests/Model/MultiChannelChannelListRBMObjectTest.php -tests/Model/MultiChannelChannelListRBMResponseObjectTest.php -tests/Model/MultiChannelChannelListRequestObjectTest.php -tests/Model/MultiChannelChannelListResponseObjectTest.php -tests/Model/MultiChannelChannelListSMSObjectTest.php -tests/Model/MultiChannelChannelListSMSResponseObjectTest.php -tests/Model/MultiChannelErrorTest.php -tests/Model/MultiChannelMessageChannelEnumTest.php -tests/Model/MultiChannelMessageContentTest.php -tests/Model/MultiChannelMessageRequestTest.php -tests/Model/MultiChannelMessageResponseDataTest.php -tests/Model/OptInWorkflowTest.php -tests/Model/PageInfoTest.php -tests/Model/PageTest.php -tests/Model/PriorityEnumTest.php -tests/Model/ProductTypeEnumTest.php -tests/Model/RbmActionBaseTest.php -tests/Model/RbmActionDialTest.php -tests/Model/RbmActionOpenUrlTest.php -tests/Model/RbmActionTypeEnumTest.php -tests/Model/RbmActionViewLocationTest.php -tests/Model/RbmCardContentMediaTest.php -tests/Model/RbmCardContentTest.php -tests/Model/RbmLocationResponseTest.php -tests/Model/RbmMediaHeightEnumTest.php -tests/Model/RbmMessageCarouselCardTest.php -tests/Model/RbmMessageContentFileTest.php -tests/Model/RbmMessageContentRichCardTest.php -tests/Model/RbmMessageContentTextTest.php -tests/Model/RbmMessageMediaTest.php -tests/Model/RbmOpenUrlEnumTest.php -tests/Model/RbmStandaloneCardTest.php -tests/Model/RbmSuggestionResponseTest.php -tests/Model/RbmWebViewEnumTest.php -tests/Model/RecordingAvailableCallbackTest.php -tests/Model/RecordingCompleteCallbackTest.php -tests/Model/RecordingStateEnumTest.php -tests/Model/RecordingTranscriptionClipTest.php -tests/Model/RecordingTranscriptionMetadataTest.php -tests/Model/RecordingTranscriptionsTest.php -tests/Model/RedirectCallbackTest.php -tests/Model/RedirectMethodEnumTest.php -tests/Model/SipConnectionMetadataTest.php -tests/Model/SipCredentialsTest.php -tests/Model/SmsMessageContentTest.php -tests/Model/StandaloneCardOrientationEnumTest.php -tests/Model/StatusCallbackMessageTest.php -tests/Model/StatusCallbackTest.php -tests/Model/StatusCallbackTypeEnumTest.php -tests/Model/StirShakenTest.php -tests/Model/SyncLookupRequestTest.php -tests/Model/TelephoneNumberTest.php -tests/Model/TfvBasicAuthenticationTest.php -tests/Model/TfvCallbackStatusEnumTest.php -tests/Model/TfvErrorTest.php -tests/Model/TfvStatusEnumTest.php -tests/Model/TfvStatusTest.php -tests/Model/TfvSubmissionInfoTest.php -tests/Model/TfvSubmissionWrapperTest.php -tests/Model/ThumbnailAlignmentEnumTest.php -tests/Model/TranscribeRecordingTest.php -tests/Model/TranscriptionAvailableCallbackTest.php -tests/Model/TranscriptionTest.php -tests/Model/TransferAnswerCallbackTest.php -tests/Model/TransferCompleteCallbackTest.php -tests/Model/TransferDisconnectCallbackTest.php -tests/Model/UpdateCallRecordingTest.php -tests/Model/UpdateCallTest.php -tests/Model/UpdateConferenceMemberTest.php -tests/Model/UpdateConferenceTest.php -tests/Model/VerificationDenialWebhookTest.php -tests/Model/VerificationRequestTest.php -tests/Model/VerificationUpdateRequestTest.php -tests/Model/VerificationWebhookTest.php -tests/Model/VerifyCodeRequestTest.php -tests/Model/VerifyCodeResponseTest.php -tests/Model/VoiceApiErrorTest.php -tests/Model/VoiceCodeResponseTest.php -tests/Model/WebhookSubscriptionBasicAuthenticationTest.php -tests/Model/WebhookSubscriptionErrorTest.php -tests/Model/WebhookSubscriptionRequestSchemaTest.php -tests/Model/WebhookSubscriptionTest.php -tests/Model/WebhookSubscriptionTypeEnumTest.php -tests/Model/WebhookSubscriptionsListBodyTest.php diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 14d6b5dc..186c33c9 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.23.0 +7.24.0-SNAPSHOT diff --git a/README.md b/README.md index 9d11fbfb..5cc040d4 100644 --- a/README.md +++ b/README.md @@ -372,5 +372,5 @@ letstalk@bandwidth.com This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `1.0.0` - - Generator version: `7.23.0` + - Generator version: `7.24.0-SNAPSHOT` - Build package: `org.openapitools.codegen.languages.PhpNextgenClientCodegen` diff --git a/docs/Model/Callback.md b/docs/Model/Callback.md index 88dc7cf2..27e47830 100644 --- a/docs/Model/Callback.md +++ b/docs/Model/Callback.md @@ -1,16 +1,13 @@ # Callback -## Properties +This model is a `oneOf` wrapper: a value is exactly one of the member types listed below. +It is never instantiated directly — use one of the concrete types. -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**time** | **\DateTime** | | -**event_time** | **\DateTime** | Represents the time at which the message was read, for `message-read` callbacks. | [optional] -**type** | [**\Bandwidth\Model\InboundCallbackTypeEnum**](InboundCallbackTypeEnum.md) | | -**to** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | -**description** | **string** | A detailed description of the event described by the callback. | -**message** | [**\Bandwidth\Model\InboundCallbackMessage**](InboundCallbackMessage.md) | | -**error_code** | **int** | Optional error code, applicable only when type is `message-failed`. | [optional] -**carrier_name** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [optional] +## oneOf + +- [**\Bandwidth\Model\StatusCallback**](StatusCallback.md) +- [**\Bandwidth\Model\InboundCallback**](InboundCallback.md) + +The concrete type is selected by the `type` discriminator property. [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelAction.md b/docs/Model/MultiChannelAction.md index e255ffea..41741b25 100644 --- a/docs/Model/MultiChannelAction.md +++ b/docs/Model/MultiChannelAction.md @@ -1,22 +1,16 @@ # MultiChannelAction -## Properties +This model is an `anyOf` wrapper: a value is at least one of the member types listed below. +It is never instantiated directly — use one of the concrete types. -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**type** | [**\Bandwidth\Model\RbmActionTypeEnum**](RbmActionTypeEnum.md) | | -**text** | **string** | Displayed text for user to click | -**postback_data** | **string** | Base64 payload the customer receives when the reply is clicked. | -**phone_number** | **string** | The phone number to dial. Must be E164 format. | -**latitude** | **float** | The latitude of the location. Must be in range [-90.000000, 90.000000]. | -**longitude** | **float** | The longitude of the location. Must be in range [-180.000000, 180.000000]. | -**label** | **string** | The label of the location. | [optional] -**title** | **string** | The title of the event. | -**start_time** | **\DateTime** | The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | -**end_time** | **\DateTime** | The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. | -**description** | **string** | The description of the event. | [optional] -**url** | **string** | The URL to open in browser. Must use http:// or https:// scheme. | -**application** | [**\Bandwidth\Model\RbmOpenUrlEnum**](RbmOpenUrlEnum.md) | | [optional] -**webview_view_mode** | [**\Bandwidth\Model\RbmWebViewEnum**](RbmWebViewEnum.md) | | [optional] +## anyOf + +- [**\Bandwidth\Model\RbmActionBase**](RbmActionBase.md) +- [**\Bandwidth\Model\RbmActionDial**](RbmActionDial.md) +- [**\Bandwidth\Model\RbmActionViewLocation**](RbmActionViewLocation.md) +- [**\Bandwidth\Model\MultiChannelActionCalendarEvent**](MultiChannelActionCalendarEvent.md) +- [**\Bandwidth\Model\RbmActionOpenUrl**](RbmActionOpenUrl.md) + +The concrete type is selected by the `type` discriminator property. [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md b/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md index 91860be4..17cc7776 100644 --- a/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md +++ b/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md @@ -1,16 +1,12 @@ # MultiChannelChannelListRBMObjectAllOfContent -## Properties +This model is a `oneOf` wrapper: a value is exactly one of the member types listed below. +It is never instantiated directly — use one of the concrete types. -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**text** | **string** | The text associated with the message. Must be 3270 characters or less | -**suggestions** | [**\Bandwidth\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] -**media** | [**\Bandwidth\Model\RbmMessageContentFile[]**](RbmMessageContentFile.md) | | -**orientation** | [**\Bandwidth\Model\StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | -**thumbnail_image_alignment** | [**\Bandwidth\Model\ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [optional] -**card_content** | [**\Bandwidth\Model\RbmCardContent**](RbmCardContent.md) | | -**card_width** | [**\Bandwidth\Model\CardWidthEnum**](CardWidthEnum.md) | | -**card_contents** | [**\Bandwidth\Model\RbmCardContent[]**](RbmCardContent.md) | | +## oneOf + +- [**\Bandwidth\Model\RbmMessageContentText**](RbmMessageContentText.md) +- [**\Bandwidth\Model\RbmMessageMedia**](RbmMessageMedia.md) +- [**\Bandwidth\Model\RbmMessageContentRichCard**](RbmMessageContentRichCard.md) [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListRequestObject.md b/docs/Model/MultiChannelChannelListRequestObject.md index e167c7ac..bbd1af35 100644 --- a/docs/Model/MultiChannelChannelListRequestObject.md +++ b/docs/Model/MultiChannelChannelListRequestObject.md @@ -1,12 +1,14 @@ # MultiChannelChannelListRequestObject -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | -**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | -**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | -**content** | [**\Bandwidth\Model\MmsMessageContent**](MmsMessageContent.md) | | +This model is an `anyOf` wrapper: a value is at least one of the member types listed below. +It is never instantiated directly — use one of the concrete types. + +## anyOf + +- [**\Bandwidth\Model\MultiChannelChannelListRBMObject**](MultiChannelChannelListRBMObject.md) +- [**\Bandwidth\Model\MultiChannelChannelListSMSObject**](MultiChannelChannelListSMSObject.md) +- [**\Bandwidth\Model\MultiChannelChannelListMMSObject**](MultiChannelChannelListMMSObject.md) + +The concrete type is selected by the `channel` discriminator property. [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MultiChannelChannelListResponseObject.md b/docs/Model/MultiChannelChannelListResponseObject.md index 219bc83d..aa651d56 100644 --- a/docs/Model/MultiChannelChannelListResponseObject.md +++ b/docs/Model/MultiChannelChannelListResponseObject.md @@ -1,13 +1,14 @@ # MultiChannelChannelListResponseObject -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**from** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | -**application_id** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth App. | -**channel** | [**\Bandwidth\Model\MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | -**content** | [**\Bandwidth\Model\MmsMessageContent**](MmsMessageContent.md) | | -**owner** | **string** | The Bandwidth senderId associated with the message. Identical to 'from'. | +This model is an `anyOf` wrapper: a value is at least one of the member types listed below. +It is never instantiated directly — use one of the concrete types. + +## anyOf + +- [**\Bandwidth\Model\MultiChannelChannelListRBMResponseObject**](MultiChannelChannelListRBMResponseObject.md) +- [**\Bandwidth\Model\MultiChannelChannelListSMSResponseObject**](MultiChannelChannelListSMSResponseObject.md) +- [**\Bandwidth\Model\MultiChannelChannelListMMSResponseObject**](MultiChannelChannelListMMSResponseObject.md) + +The concrete type is selected by the `channel` discriminator property. [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RbmMessageContentRichCard.md b/docs/Model/RbmMessageContentRichCard.md index b8f4d14b..56fb0d3b 100644 --- a/docs/Model/RbmMessageContentRichCard.md +++ b/docs/Model/RbmMessageContentRichCard.md @@ -1,14 +1,11 @@ # RbmMessageContentRichCard -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**orientation** | [**\Bandwidth\Model\StandaloneCardOrientationEnum**](StandaloneCardOrientationEnum.md) | | -**thumbnail_image_alignment** | [**\Bandwidth\Model\ThumbnailAlignmentEnum**](ThumbnailAlignmentEnum.md) | | [optional] -**card_content** | [**\Bandwidth\Model\RbmCardContent**](RbmCardContent.md) | | -**suggestions** | [**\Bandwidth\Model\MultiChannelAction[]**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] -**card_width** | [**\Bandwidth\Model\CardWidthEnum**](CardWidthEnum.md) | | -**card_contents** | [**\Bandwidth\Model\RbmCardContent[]**](RbmCardContent.md) | | +This model is a `oneOf` wrapper: a value is exactly one of the member types listed below. +It is never instantiated directly — use one of the concrete types. + +## oneOf + +- [**\Bandwidth\Model\RbmStandaloneCard**](RbmStandaloneCard.md) +- [**\Bandwidth\Model\RbmMessageCarouselCard**](RbmMessageCarouselCard.md) [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/src/APIException.php b/src/APIException.php index 029bbfd9..ca4becb8 100644 --- a/src/APIException.php +++ b/src/APIException.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Api/CallsApi.php b/src/Api/CallsApi.php index 01488aca..6a0c5aa8 100644 --- a/src/Api/CallsApi.php +++ b/src/Api/CallsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -41,7 +40,6 @@ use Bandwidth\ApiException; use Bandwidth\Configuration; use Bandwidth\HeaderSelector; -use Bandwidth\FormDataProcessor; use Bandwidth\ObjectSerializer; /** @@ -73,7 +71,7 @@ class CallsApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'createCall' => [ 'application/json', @@ -186,7 +184,7 @@ public function createCall( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\CreateCallResponse|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\CreateCallResponse|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function createCallWithHttpInfo( string $account_id, @@ -276,7 +274,6 @@ public function createCallWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -499,14 +496,12 @@ public function createCallRequest( string $contentType = self::contentTypes['createCall'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling createCall' ); } - // verify the required parameter 'create_call' is set if ($create_call === null || (is_array($create_call) && count($create_call) === 0)) { throw new InvalidArgumentException( @@ -514,7 +509,6 @@ public function createCallRequest( ); } - $resourcePath = '/accounts/{accountId}/calls'; $formParams = []; $queryParams = []; @@ -561,7 +555,7 @@ public function createCallRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -676,7 +670,7 @@ public function getCallState( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\CallState|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\CallState|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getCallStateWithHttpInfo( string $account_id, @@ -766,7 +760,6 @@ public function getCallStateWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -989,14 +982,12 @@ public function getCallStateRequest( string $contentType = self::contentTypes['getCallState'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling getCallState' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( @@ -1004,9 +995,7 @@ public function getCallStateRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1038,30 +1027,6 @@ public function getCallStateRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1185,7 +1150,7 @@ public function listCalls( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\CallState[]|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\CallState[]|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function listCallsWithHttpInfo( string $account_id, @@ -1281,7 +1246,6 @@ public function listCallsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1540,30 +1504,20 @@ public function listCallsRequest( string $contentType = self::contentTypes['listCalls'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling listCalls' ); } - - - - - - if ($page_size !== null && $page_size > 10000) { throw new InvalidArgumentException('invalid value for "$page_size" when calling CallsApi.listCalls, must be smaller than or equal to 10000.'); } if ($page_size !== null && $page_size < 1) { throw new InvalidArgumentException('invalid value for "$page_size" when calling CallsApi.listCalls, must be bigger than or equal to 1.'); } - - $resourcePath = '/accounts/{accountId}/calls'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1650,30 +1604,6 @@ public function listCallsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1782,7 +1712,7 @@ public function updateCall( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function updateCallWithHttpInfo( string $account_id, @@ -2015,21 +1945,18 @@ public function updateCallRequest( string $contentType = self::contentTypes['updateCall'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling updateCall' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $call_id when calling updateCall' ); } - // verify the required parameter 'update_call' is set if ($update_call === null || (is_array($update_call) && count($update_call) === 0)) { throw new InvalidArgumentException( @@ -2037,7 +1964,6 @@ public function updateCallRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}'; $formParams = []; $queryParams = []; @@ -2092,7 +2018,7 @@ public function updateCallRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -2210,7 +2136,7 @@ public function updateCallBxml( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function updateCallBxmlWithHttpInfo( string $account_id, @@ -2443,21 +2369,18 @@ public function updateCallBxmlRequest( string $contentType = self::contentTypes['updateCallBxml'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling updateCallBxml' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $call_id when calling updateCallBxml' ); } - // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new InvalidArgumentException( @@ -2465,7 +2388,6 @@ public function updateCallBxmlRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}/bxml'; $formParams = []; $queryParams = []; @@ -2520,7 +2442,7 @@ public function updateCallBxmlRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/src/Api/ConferencesApi.php b/src/Api/ConferencesApi.php index df29fbdb..a4dff350 100644 --- a/src/Api/ConferencesApi.php +++ b/src/Api/ConferencesApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -41,7 +40,6 @@ use Bandwidth\ApiException; use Bandwidth\Configuration; use Bandwidth\HeaderSelector; -use Bandwidth\FormDataProcessor; use Bandwidth\ObjectSerializer; /** @@ -73,7 +71,7 @@ class ConferencesApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'downloadConferenceRecording' => [ 'application/json', @@ -201,7 +199,7 @@ public function downloadConferenceRecording( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SplFileObject|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \SplFileObject|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function downloadConferenceRecordingWithHttpInfo( string $account_id, @@ -292,7 +290,6 @@ public function downloadConferenceRecordingWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -521,21 +518,18 @@ public function downloadConferenceRecordingRequest( string $contentType = self::contentTypes['downloadConferenceRecording'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling downloadConferenceRecording' ); } - // verify the required parameter 'conference_id' is set if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $conference_id when calling downloadConferenceRecording' ); } - // verify the required parameter 'recording_id' is set if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { throw new InvalidArgumentException( @@ -543,9 +537,7 @@ public function downloadConferenceRecordingRequest( ); } - $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -585,30 +577,6 @@ public function downloadConferenceRecordingRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -714,7 +682,7 @@ public function getConference( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\Conference|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\Conference|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getConferenceWithHttpInfo( string $account_id, @@ -804,7 +772,6 @@ public function getConferenceWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1027,14 +994,12 @@ public function getConferenceRequest( string $contentType = self::contentTypes['getConference'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling getConference' ); } - // verify the required parameter 'conference_id' is set if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { throw new InvalidArgumentException( @@ -1042,9 +1007,7 @@ public function getConferenceRequest( ); } - $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1076,30 +1039,6 @@ public function getConferenceRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1208,7 +1147,7 @@ public function getConferenceMember( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\ConferenceMember|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\ConferenceMember|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getConferenceMemberWithHttpInfo( string $account_id, @@ -1299,7 +1238,6 @@ public function getConferenceMemberWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1528,21 +1466,18 @@ public function getConferenceMemberRequest( string $contentType = self::contentTypes['getConferenceMember'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling getConferenceMember' ); } - // verify the required parameter 'conference_id' is set if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $conference_id when calling getConferenceMember' ); } - // verify the required parameter 'member_id' is set if ($member_id === null || (is_array($member_id) && count($member_id) === 0)) { throw new InvalidArgumentException( @@ -1550,9 +1485,7 @@ public function getConferenceMemberRequest( ); } - $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}/members/{memberId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1592,30 +1525,6 @@ public function getConferenceMemberRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1724,7 +1633,7 @@ public function getConferenceRecording( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\ConferenceRecordingMetadata|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\ConferenceRecordingMetadata|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getConferenceRecordingWithHttpInfo( string $account_id, @@ -1815,7 +1724,6 @@ public function getConferenceRecordingWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2044,21 +1952,18 @@ public function getConferenceRecordingRequest( string $contentType = self::contentTypes['getConferenceRecording'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling getConferenceRecording' ); } - // verify the required parameter 'conference_id' is set if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $conference_id when calling getConferenceRecording' ); } - // verify the required parameter 'recording_id' is set if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { throw new InvalidArgumentException( @@ -2066,9 +1971,7 @@ public function getConferenceRecordingRequest( ); } - $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2108,30 +2011,6 @@ public function getConferenceRecordingRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -2237,7 +2116,7 @@ public function listConferenceRecordings( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\ConferenceRecordingMetadata[]|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\ConferenceRecordingMetadata[]|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function listConferenceRecordingsWithHttpInfo( string $account_id, @@ -2327,7 +2206,6 @@ public function listConferenceRecordingsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2550,14 +2428,12 @@ public function listConferenceRecordingsRequest( string $contentType = self::contentTypes['listConferenceRecordings'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling listConferenceRecordings' ); } - // verify the required parameter 'conference_id' is set if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { throw new InvalidArgumentException( @@ -2565,9 +2441,7 @@ public function listConferenceRecordingsRequest( ); } - $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}/recordings'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2599,30 +2473,6 @@ public function listConferenceRecordingsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -2740,7 +2590,7 @@ public function listConferences( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\Conference[]|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\Conference[]|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function listConferencesWithHttpInfo( string $account_id, @@ -2834,7 +2684,6 @@ public function listConferencesWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3081,28 +2930,20 @@ public function listConferencesRequest( string $contentType = self::contentTypes['listConferences'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling listConferences' ); } - - - - if ($page_size !== null && $page_size > 1000) { throw new InvalidArgumentException('invalid value for "$page_size" when calling ConferencesApi.listConferences, must be smaller than or equal to 1000.'); } if ($page_size !== null && $page_size < 1) { throw new InvalidArgumentException('invalid value for "$page_size" when calling ConferencesApi.listConferences, must be bigger than or equal to 1.'); } - - $resourcePath = '/accounts/{accountId}/conferences'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -3171,30 +3012,6 @@ public function listConferencesRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -3303,7 +3120,7 @@ public function updateConference( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function updateConferenceWithHttpInfo( string $account_id, @@ -3528,21 +3345,18 @@ public function updateConferenceRequest( string $contentType = self::contentTypes['updateConference'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling updateConference' ); } - // verify the required parameter 'conference_id' is set if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $conference_id when calling updateConference' ); } - // verify the required parameter 'update_conference' is set if ($update_conference === null || (is_array($update_conference) && count($update_conference) === 0)) { throw new InvalidArgumentException( @@ -3550,7 +3364,6 @@ public function updateConferenceRequest( ); } - $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}'; $formParams = []; $queryParams = []; @@ -3605,7 +3418,7 @@ public function updateConferenceRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -3723,7 +3536,7 @@ public function updateConferenceBxml( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function updateConferenceBxmlWithHttpInfo( string $account_id, @@ -3948,21 +3761,18 @@ public function updateConferenceBxmlRequest( string $contentType = self::contentTypes['updateConferenceBxml'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling updateConferenceBxml' ); } - // verify the required parameter 'conference_id' is set if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $conference_id when calling updateConferenceBxml' ); } - // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new InvalidArgumentException( @@ -3970,7 +3780,6 @@ public function updateConferenceBxmlRequest( ); } - $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}/bxml'; $formParams = []; $queryParams = []; @@ -4025,7 +3834,7 @@ public function updateConferenceBxmlRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -4146,7 +3955,7 @@ public function updateConferenceMember( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function updateConferenceMemberWithHttpInfo( string $account_id, @@ -4378,28 +4187,24 @@ public function updateConferenceMemberRequest( string $contentType = self::contentTypes['updateConferenceMember'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling updateConferenceMember' ); } - // verify the required parameter 'conference_id' is set if ($conference_id === null || (is_array($conference_id) && count($conference_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $conference_id when calling updateConferenceMember' ); } - // verify the required parameter 'member_id' is set if ($member_id === null || (is_array($member_id) && count($member_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $member_id when calling updateConferenceMember' ); } - // verify the required parameter 'update_conference_member' is set if ($update_conference_member === null || (is_array($update_conference_member) && count($update_conference_member) === 0)) { throw new InvalidArgumentException( @@ -4407,7 +4212,6 @@ public function updateConferenceMemberRequest( ); } - $resourcePath = '/accounts/{accountId}/conferences/{conferenceId}/members/{memberId}'; $formParams = []; $queryParams = []; @@ -4470,7 +4274,7 @@ public function updateConferenceMemberRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/src/Api/EndpointsApi.php b/src/Api/EndpointsApi.php index ad58349b..504640ff 100644 --- a/src/Api/EndpointsApi.php +++ b/src/Api/EndpointsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -41,7 +40,6 @@ use Bandwidth\ApiException; use Bandwidth\Configuration; use Bandwidth\HeaderSelector; -use Bandwidth\FormDataProcessor; use Bandwidth\ObjectSerializer; /** @@ -73,7 +71,7 @@ class EndpointsApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'createEndpoint' => [ 'application/json', @@ -186,7 +184,7 @@ public function createEndpoint( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\CreateEndpointResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\CreateEndpointResponse|\Bandwidth\Model\BrtcErrorResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function createEndpointWithHttpInfo( string $account_id, @@ -276,7 +274,6 @@ public function createEndpointWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -499,14 +496,12 @@ public function createEndpointRequest( string $contentType = self::contentTypes['createEndpoint'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling createEndpoint' ); } - // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new InvalidArgumentException( @@ -514,7 +509,6 @@ public function createEndpointRequest( ); } - $resourcePath = '/accounts/{accountId}/endpoints'; $formParams = []; $queryParams = []; @@ -561,7 +555,7 @@ public function createEndpointRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -676,7 +670,7 @@ public function deleteEndpoint( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function deleteEndpointWithHttpInfo( string $account_id, @@ -894,14 +888,12 @@ public function deleteEndpointRequest( string $contentType = self::contentTypes['deleteEndpoint'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling deleteEndpoint' ); } - // verify the required parameter 'endpoint_id' is set if ($endpoint_id === null || (is_array($endpoint_id) && count($endpoint_id) === 0)) { throw new InvalidArgumentException( @@ -909,9 +901,7 @@ public function deleteEndpointRequest( ); } - $resourcePath = '/accounts/{accountId}/endpoints/{endpointId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -943,30 +933,6 @@ public function deleteEndpointRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1072,7 +1038,7 @@ public function getEndpoint( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\EndpointResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\EndpointResponse|\Bandwidth\Model\BrtcErrorResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getEndpointWithHttpInfo( string $account_id, @@ -1162,7 +1128,6 @@ public function getEndpointWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1385,14 +1350,12 @@ public function getEndpointRequest( string $contentType = self::contentTypes['getEndpoint'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling getEndpoint' ); } - // verify the required parameter 'endpoint_id' is set if ($endpoint_id === null || (is_array($endpoint_id) && count($endpoint_id) === 0)) { throw new InvalidArgumentException( @@ -1400,9 +1363,7 @@ public function getEndpointRequest( ); } - $resourcePath = '/accounts/{accountId}/endpoints/{endpointId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1434,30 +1395,6 @@ public function getEndpointRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1572,7 +1509,7 @@ public function listEndpoints( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\ListEndpointsResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse|\Bandwidth\Model\BrtcErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\ListEndpointsResponse|\Bandwidth\Model\BrtcErrorResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function listEndpointsWithHttpInfo( string $account_id, @@ -1665,7 +1602,6 @@ public function listEndpointsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1906,27 +1842,20 @@ public function listEndpointsRequest( string $contentType = self::contentTypes['listEndpoints'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling listEndpoints' ); } - - - - if ($limit !== null && $limit > 1000) { throw new InvalidArgumentException('invalid value for "$limit" when calling EndpointsApi.listEndpoints, must be smaller than or equal to 1000.'); } if ($limit !== null && $limit < 1) { throw new InvalidArgumentException('invalid value for "$limit" when calling EndpointsApi.listEndpoints, must be bigger than or equal to 1.'); } - $resourcePath = '/accounts/{accountId}/endpoints'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1986,30 +1915,6 @@ public function listEndpointsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -2118,7 +2023,7 @@ public function updateEndpointBxml( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function updateEndpointBxmlWithHttpInfo( string $account_id, @@ -2343,21 +2248,18 @@ public function updateEndpointBxmlRequest( string $contentType = self::contentTypes['updateEndpointBxml'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling updateEndpointBxml' ); } - // verify the required parameter 'endpoint_id' is set if ($endpoint_id === null || (is_array($endpoint_id) && count($endpoint_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $endpoint_id when calling updateEndpointBxml' ); } - // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new InvalidArgumentException( @@ -2365,7 +2267,6 @@ public function updateEndpointBxmlRequest( ); } - $resourcePath = '/accounts/{accountId}/endpoints/{endpointId}/bxml'; $formParams = []; $queryParams = []; @@ -2420,7 +2321,7 @@ public function updateEndpointBxmlRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/src/Api/MFAApi.php b/src/Api/MFAApi.php index 3c5ef3ef..6fad0b5d 100644 --- a/src/Api/MFAApi.php +++ b/src/Api/MFAApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -41,7 +40,6 @@ use Bandwidth\ApiException; use Bandwidth\Configuration; use Bandwidth\HeaderSelector; -use Bandwidth\FormDataProcessor; use Bandwidth\ObjectSerializer; /** @@ -73,7 +71,7 @@ class MFAApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'generateMessagingCode' => [ 'application/json', @@ -180,7 +178,7 @@ public function generateMessagingCode( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\MessagingCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError|\Bandwidth\Model\MfaRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\MessagingCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function generateMessagingCodeWithHttpInfo( string $account_id, @@ -246,7 +244,6 @@ public function generateMessagingCodeWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -437,14 +434,12 @@ public function generateMessagingCodeRequest( string $contentType = self::contentTypes['generateMessagingCode'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling generateMessagingCode' ); } - // verify the required parameter 'code_request' is set if ($code_request === null || (is_array($code_request) && count($code_request) === 0)) { throw new InvalidArgumentException( @@ -452,7 +447,6 @@ public function generateMessagingCodeRequest( ); } - $resourcePath = '/accounts/{accountId}/code/messaging'; $formParams = []; $queryParams = []; @@ -499,7 +493,7 @@ public function generateMessagingCodeRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -614,7 +608,7 @@ public function generateVoiceCode( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\VoiceCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError|\Bandwidth\Model\MfaRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\VoiceCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function generateVoiceCodeWithHttpInfo( string $account_id, @@ -680,7 +674,6 @@ public function generateVoiceCodeWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -871,14 +864,12 @@ public function generateVoiceCodeRequest( string $contentType = self::contentTypes['generateVoiceCode'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling generateVoiceCode' ); } - // verify the required parameter 'code_request' is set if ($code_request === null || (is_array($code_request) && count($code_request) === 0)) { throw new InvalidArgumentException( @@ -886,7 +877,6 @@ public function generateVoiceCodeRequest( ); } - $resourcePath = '/accounts/{accountId}/code/voice'; $formParams = []; $queryParams = []; @@ -933,7 +923,7 @@ public function generateVoiceCodeRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1048,7 +1038,7 @@ public function verifyCode( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\VerifyCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\VerifyCodeResponse|\Bandwidth\Model\MfaRequestError|\Bandwidth\Model\MfaUnauthorizedRequestError|\Bandwidth\Model\MfaForbiddenRequestError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function verifyCodeWithHttpInfo( string $account_id, @@ -1120,7 +1110,6 @@ public function verifyCodeWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1319,14 +1308,12 @@ public function verifyCodeRequest( string $contentType = self::contentTypes['verifyCode'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling verifyCode' ); } - // verify the required parameter 'verify_code_request' is set if ($verify_code_request === null || (is_array($verify_code_request) && count($verify_code_request) === 0)) { throw new InvalidArgumentException( @@ -1334,7 +1321,6 @@ public function verifyCodeRequest( ); } - $resourcePath = '/accounts/{accountId}/code/verify'; $formParams = []; $queryParams = []; @@ -1381,7 +1367,7 @@ public function verifyCodeRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/src/Api/MediaApi.php b/src/Api/MediaApi.php index c35847a1..88f25f6c 100644 --- a/src/Api/MediaApi.php +++ b/src/Api/MediaApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -41,7 +40,6 @@ use Bandwidth\ApiException; use Bandwidth\Configuration; use Bandwidth\HeaderSelector; -use Bandwidth\FormDataProcessor; use Bandwidth\ObjectSerializer; /** @@ -73,7 +71,7 @@ class MediaApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'deleteMedia' => [ 'application/json', @@ -230,7 +228,7 @@ public function deleteMedia( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function deleteMediaWithHttpInfo( string $account_id, @@ -448,14 +446,12 @@ public function deleteMediaRequest( string $contentType = self::contentTypes['deleteMedia'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling deleteMedia' ); } - // verify the required parameter 'media_id' is set if ($media_id === null || (is_array($media_id) && count($media_id) === 0)) { throw new InvalidArgumentException( @@ -463,9 +459,7 @@ public function deleteMediaRequest( ); } - $resourcePath = '/users/{accountId}/media/{mediaId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -497,30 +491,6 @@ public function deleteMediaRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -626,7 +596,7 @@ public function getMedia( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SplFileObject|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \SplFileObject|\Bandwidth\Model\MessagingRequestError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getMediaWithHttpInfo( string $account_id, @@ -716,7 +686,6 @@ public function getMediaWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -939,14 +908,12 @@ public function getMediaRequest( string $contentType = self::contentTypes['getMedia'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling getMedia' ); } - // verify the required parameter 'media_id' is set if ($media_id === null || (is_array($media_id) && count($media_id) === 0)) { throw new InvalidArgumentException( @@ -954,9 +921,7 @@ public function getMediaRequest( ); } - $resourcePath = '/users/{accountId}/media/{mediaId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -988,30 +953,6 @@ public function getMediaRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1117,7 +1058,7 @@ public function listMedia( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\Media[]|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\Media[]|\Bandwidth\Model\MessagingRequestError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function listMediaWithHttpInfo( string $account_id, @@ -1207,7 +1148,6 @@ public function listMediaWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1430,7 +1370,6 @@ public function listMediaRequest( string $contentType = self::contentTypes['listMedia'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( @@ -1438,10 +1377,7 @@ public function listMediaRequest( ); } - - $resourcePath = '/users/{accountId}/media'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1469,30 +1405,6 @@ public function listMediaRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1607,7 +1519,7 @@ public function uploadMedia( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function uploadMediaWithHttpInfo( string $account_id, @@ -1846,21 +1758,18 @@ public function uploadMediaRequest( string $contentType = self::contentTypes['uploadMedia'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling uploadMedia' ); } - // verify the required parameter 'media_id' is set if ($media_id === null || (is_array($media_id) && count($media_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $media_id when calling uploadMedia' ); } - // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new InvalidArgumentException( @@ -1868,9 +1777,6 @@ public function uploadMediaRequest( ); } - - - $resourcePath = '/users/{accountId}/media/{mediaId}'; $formParams = []; $queryParams = []; @@ -1933,7 +1839,7 @@ public function uploadMediaRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/src/Api/MessagesApi.php b/src/Api/MessagesApi.php index 2b24ca24..5f9e18d0 100644 --- a/src/Api/MessagesApi.php +++ b/src/Api/MessagesApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -41,7 +40,6 @@ use Bandwidth\ApiException; use Bandwidth\Configuration; use Bandwidth\HeaderSelector; -use Bandwidth\FormDataProcessor; use Bandwidth\ObjectSerializer; /** @@ -73,7 +71,7 @@ class MessagesApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'createMessage' => [ 'application/json', @@ -177,7 +175,7 @@ public function createMessage( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\Message|\Bandwidth\Model\CreateMessageRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\Message|\Bandwidth\Model\CreateMessageRequestError|\Bandwidth\Model\MessagingRequestError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function createMessageWithHttpInfo( string $account_id, @@ -273,7 +271,6 @@ public function createMessageWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -504,14 +501,12 @@ public function createMessageRequest( string $contentType = self::contentTypes['createMessage'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling createMessage' ); } - // verify the required parameter 'message_request' is set if ($message_request === null || (is_array($message_request) && count($message_request) === 0)) { throw new InvalidArgumentException( @@ -519,7 +514,6 @@ public function createMessageRequest( ); } - $resourcePath = '/users/{accountId}/messages'; $formParams = []; $queryParams = []; @@ -566,7 +560,7 @@ public function createMessageRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -759,7 +753,7 @@ public function listMessages( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\MessagesList|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError|\Bandwidth\Model\MessagingRequestError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\MessagesList|\Bandwidth\Model\MessagingRequestError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function listMessagesWithHttpInfo( string $account_id, @@ -875,7 +869,6 @@ public function listMessagesWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1254,7 +1247,6 @@ public function listMessagesRequest( string $contentType = self::contentTypes['listMessages'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( @@ -1262,36 +1254,7 @@ public function listMessagesRequest( ); } - - - - - - - - - - - - - - - - - - - - - - - - - - - - $resourcePath = '/users/{accountId}/messages'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1558,30 +1521,6 @@ public function listMessagesRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { diff --git a/src/Api/MultiChannelApi.php b/src/Api/MultiChannelApi.php index 894e1830..11d2df91 100644 --- a/src/Api/MultiChannelApi.php +++ b/src/Api/MultiChannelApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -41,7 +40,6 @@ use Bandwidth\ApiException; use Bandwidth\Configuration; use Bandwidth\HeaderSelector; -use Bandwidth\FormDataProcessor; use Bandwidth\ObjectSerializer; /** @@ -73,7 +71,7 @@ class MultiChannelApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'createMultiChannelMessage' => [ 'application/json', @@ -143,7 +141,7 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return \Bandwidth\Model\CreateMultiChannelMessageResponse|\Bandwidth\Model\MultiChannelError|null + * @return \Bandwidth\Model\CreateMultiChannelMessageResponse|\Bandwidth\Model\MultiChannelError */ public function createMultiChannelMessage( string $account_id, @@ -151,7 +149,7 @@ public function createMultiChannelMessage( ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['createMultiChannelMessage'][0] - ): \Bandwidth\Model\CreateMultiChannelMessageResponse|\Bandwidth\Model\MultiChannelError|null + ): \Bandwidth\Model\CreateMultiChannelMessageResponse|\Bandwidth\Model\MultiChannelError { list($response) = $this->createMultiChannelMessageWithHttpInfo($account_id, $multi_channel_message_request, $hostIndex, $variables, $contentType); return $response; @@ -174,7 +172,7 @@ public function createMultiChannelMessage( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\CreateMultiChannelMessageResponse|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError|\Bandwidth\Model\MultiChannelError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\CreateMultiChannelMessageResponse|\Bandwidth\Model\MultiChannelError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function createMultiChannelMessageWithHttpInfo( string $account_id, @@ -264,7 +262,6 @@ public function createMultiChannelMessageWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -487,14 +484,12 @@ public function createMultiChannelMessageRequest( string $contentType = self::contentTypes['createMultiChannelMessage'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling createMultiChannelMessage' ); } - // verify the required parameter 'multi_channel_message_request' is set if ($multi_channel_message_request === null || (is_array($multi_channel_message_request) && count($multi_channel_message_request) === 0)) { throw new InvalidArgumentException( @@ -502,7 +497,6 @@ public function createMultiChannelMessageRequest( ); } - $resourcePath = '/users/{accountId}/messages/multiChannel'; $formParams = []; $queryParams = []; @@ -549,7 +543,7 @@ public function createMultiChannelMessageRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/src/Api/PhoneNumberLookupApi.php b/src/Api/PhoneNumberLookupApi.php index 700a2d63..da2578e4 100644 --- a/src/Api/PhoneNumberLookupApi.php +++ b/src/Api/PhoneNumberLookupApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -41,7 +40,6 @@ use Bandwidth\ApiException; use Bandwidth\Configuration; use Bandwidth\HeaderSelector; -use Bandwidth\FormDataProcessor; use Bandwidth\ObjectSerializer; /** @@ -73,7 +71,7 @@ class PhoneNumberLookupApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'createAsyncBulkLookup' => [ 'application/json', @@ -180,7 +178,7 @@ public function createAsyncBulkLookup( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\CreateAsyncBulkLookupResponse|\Bandwidth\Model\LookupErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\CreateAsyncBulkLookupResponse|\Bandwidth\Model\LookupErrorResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function createAsyncBulkLookupWithHttpInfo( string $account_id, @@ -228,7 +226,6 @@ public function createAsyncBulkLookupWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -395,14 +392,12 @@ public function createAsyncBulkLookupRequest( string $contentType = self::contentTypes['createAsyncBulkLookup'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling createAsyncBulkLookup' ); } - // verify the required parameter 'async_lookup_request' is set if ($async_lookup_request === null || (is_array($async_lookup_request) && count($async_lookup_request) === 0)) { throw new InvalidArgumentException( @@ -410,7 +405,6 @@ public function createAsyncBulkLookupRequest( ); } - $resourcePath = '/accounts/{accountId}/phoneNumberLookup/bulk'; $formParams = []; $queryParams = []; @@ -457,7 +451,7 @@ public function createAsyncBulkLookupRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -572,7 +566,7 @@ public function createSyncLookup( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\CreateSyncLookupResponse|\Bandwidth\Model\LookupErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\CreateSyncLookupResponse|\Bandwidth\Model\LookupErrorResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function createSyncLookupWithHttpInfo( string $account_id, @@ -620,7 +614,6 @@ public function createSyncLookupWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -787,14 +780,12 @@ public function createSyncLookupRequest( string $contentType = self::contentTypes['createSyncLookup'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling createSyncLookup' ); } - // verify the required parameter 'sync_lookup_request' is set if ($sync_lookup_request === null || (is_array($sync_lookup_request) && count($sync_lookup_request) === 0)) { throw new InvalidArgumentException( @@ -802,7 +793,6 @@ public function createSyncLookupRequest( ); } - $resourcePath = '/accounts/{accountId}/phoneNumberLookup'; $formParams = []; $queryParams = []; @@ -849,7 +839,7 @@ public function createSyncLookupRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -964,7 +954,7 @@ public function getAsyncBulkLookup( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\GetAsyncBulkLookupResponse|\Bandwidth\Model\LookupErrorResponse, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\GetAsyncBulkLookupResponse|\Bandwidth\Model\LookupErrorResponse, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getAsyncBulkLookupWithHttpInfo( string $account_id, @@ -1012,7 +1002,6 @@ public function getAsyncBulkLookupWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1179,14 +1168,12 @@ public function getAsyncBulkLookupRequest( string $contentType = self::contentTypes['getAsyncBulkLookup'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling getAsyncBulkLookup' ); } - // verify the required parameter 'request_id' is set if ($request_id === null || (is_array($request_id) && count($request_id) === 0)) { throw new InvalidArgumentException( @@ -1194,9 +1181,7 @@ public function getAsyncBulkLookupRequest( ); } - $resourcePath = '/accounts/{accountId}/phoneNumberLookup/bulk/{requestId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1228,30 +1213,6 @@ public function getAsyncBulkLookupRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { diff --git a/src/Api/RecordingsApi.php b/src/Api/RecordingsApi.php index b5b4fc6e..e7266f11 100644 --- a/src/Api/RecordingsApi.php +++ b/src/Api/RecordingsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -41,7 +40,6 @@ use Bandwidth\ApiException; use Bandwidth\Configuration; use Bandwidth\HeaderSelector; -use Bandwidth\FormDataProcessor; use Bandwidth\ObjectSerializer; /** @@ -73,7 +71,7 @@ class RecordingsApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'deleteRecording' => [ 'application/json', @@ -204,7 +202,7 @@ public function deleteRecording( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function deleteRecordingWithHttpInfo( string $account_id, @@ -429,21 +427,18 @@ public function deleteRecordingRequest( string $contentType = self::contentTypes['deleteRecording'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling deleteRecording' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $call_id when calling deleteRecording' ); } - // verify the required parameter 'recording_id' is set if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { throw new InvalidArgumentException( @@ -451,9 +446,7 @@ public function deleteRecordingRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -493,30 +486,6 @@ public function deleteRecordingRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -625,7 +594,7 @@ public function deleteRecordingMedia( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function deleteRecordingMediaWithHttpInfo( string $account_id, @@ -850,21 +819,18 @@ public function deleteRecordingMediaRequest( string $contentType = self::contentTypes['deleteRecordingMedia'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling deleteRecordingMedia' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $call_id when calling deleteRecordingMedia' ); } - // verify the required parameter 'recording_id' is set if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { throw new InvalidArgumentException( @@ -872,9 +838,7 @@ public function deleteRecordingMediaRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -914,30 +878,6 @@ public function deleteRecordingMediaRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1046,7 +986,7 @@ public function deleteRecordingTranscription( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function deleteRecordingTranscriptionWithHttpInfo( string $account_id, @@ -1271,21 +1211,18 @@ public function deleteRecordingTranscriptionRequest( string $contentType = self::contentTypes['deleteRecordingTranscription'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling deleteRecordingTranscription' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $call_id when calling deleteRecordingTranscription' ); } - // verify the required parameter 'recording_id' is set if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { throw new InvalidArgumentException( @@ -1293,9 +1230,7 @@ public function deleteRecordingTranscriptionRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1335,30 +1270,6 @@ public function deleteRecordingTranscriptionRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1467,7 +1378,7 @@ public function downloadCallRecording( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \SplFileObject|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \SplFileObject|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function downloadCallRecordingWithHttpInfo( string $account_id, @@ -1558,7 +1469,6 @@ public function downloadCallRecordingWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1787,21 +1697,18 @@ public function downloadCallRecordingRequest( string $contentType = self::contentTypes['downloadCallRecording'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling downloadCallRecording' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $call_id when calling downloadCallRecording' ); } - // verify the required parameter 'recording_id' is set if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { throw new InvalidArgumentException( @@ -1809,9 +1716,7 @@ public function downloadCallRecordingRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1851,30 +1756,6 @@ public function downloadCallRecordingRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1983,7 +1864,7 @@ public function getCallRecording( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\CallRecordingMetadata|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\CallRecordingMetadata|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getCallRecordingWithHttpInfo( string $account_id, @@ -2074,7 +1955,6 @@ public function getCallRecordingWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2303,21 +2183,18 @@ public function getCallRecordingRequest( string $contentType = self::contentTypes['getCallRecording'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling getCallRecording' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $call_id when calling getCallRecording' ); } - // verify the required parameter 'recording_id' is set if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { throw new InvalidArgumentException( @@ -2325,9 +2202,7 @@ public function getCallRecordingRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2367,30 +2242,6 @@ public function getCallRecordingRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -2499,7 +2350,7 @@ public function getRecordingTranscription( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\RecordingTranscriptions|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\RecordingTranscriptions|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getRecordingTranscriptionWithHttpInfo( string $account_id, @@ -2590,7 +2441,6 @@ public function getRecordingTranscriptionWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2819,21 +2669,18 @@ public function getRecordingTranscriptionRequest( string $contentType = self::contentTypes['getRecordingTranscription'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling getRecordingTranscription' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $call_id when calling getRecordingTranscription' ); } - // verify the required parameter 'recording_id' is set if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { throw new InvalidArgumentException( @@ -2841,9 +2688,7 @@ public function getRecordingTranscriptionRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2883,30 +2728,6 @@ public function getRecordingTranscriptionRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -3021,7 +2842,7 @@ public function listAccountCallRecordings( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\CallRecordingMetadata[]|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\CallRecordingMetadata[]|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function listAccountCallRecordingsWithHttpInfo( string $account_id, @@ -3114,7 +2935,6 @@ public function listAccountCallRecordingsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3355,7 +3175,6 @@ public function listAccountCallRecordingsRequest( string $contentType = self::contentTypes['listAccountCallRecordings'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( @@ -3363,13 +3182,7 @@ public function listAccountCallRecordingsRequest( ); } - - - - - $resourcePath = '/accounts/{accountId}/recordings'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -3429,30 +3242,6 @@ public function listAccountCallRecordingsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -3558,7 +3347,7 @@ public function listCallRecordings( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\CallRecordingMetadata[]|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\CallRecordingMetadata[]|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function listCallRecordingsWithHttpInfo( string $account_id, @@ -3648,7 +3437,6 @@ public function listCallRecordingsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3871,14 +3659,12 @@ public function listCallRecordingsRequest( string $contentType = self::contentTypes['listCallRecordings'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling listCallRecordings' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( @@ -3886,9 +3672,7 @@ public function listCallRecordingsRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -3920,30 +3704,6 @@ public function listCallRecordingsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -4055,7 +3815,7 @@ public function transcribeCallRecording( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function transcribeCallRecordingWithHttpInfo( string $account_id, @@ -4287,28 +4047,24 @@ public function transcribeCallRecordingRequest( string $contentType = self::contentTypes['transcribeCallRecording'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling transcribeCallRecording' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $call_id when calling transcribeCallRecording' ); } - // verify the required parameter 'recording_id' is set if ($recording_id === null || (is_array($recording_id) && count($recording_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $recording_id when calling transcribeCallRecording' ); } - // verify the required parameter 'transcribe_recording' is set if ($transcribe_recording === null || (is_array($transcribe_recording) && count($transcribe_recording) === 0)) { throw new InvalidArgumentException( @@ -4316,7 +4072,6 @@ public function transcribeCallRecordingRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription'; $formParams = []; $queryParams = []; @@ -4379,7 +4134,7 @@ public function transcribeCallRecordingRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -4497,7 +4252,7 @@ public function updateCallRecordingState( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function updateCallRecordingStateWithHttpInfo( string $account_id, @@ -4722,21 +4477,18 @@ public function updateCallRecordingStateRequest( string $contentType = self::contentTypes['updateCallRecordingState'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling updateCallRecordingState' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $call_id when calling updateCallRecordingState' ); } - // verify the required parameter 'update_call_recording' is set if ($update_call_recording === null || (is_array($update_call_recording) && count($update_call_recording) === 0)) { throw new InvalidArgumentException( @@ -4744,7 +4496,6 @@ public function updateCallRecordingStateRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}/recording'; $formParams = []; $queryParams = []; @@ -4799,7 +4550,7 @@ public function updateCallRecordingStateRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/src/Api/StatisticsApi.php b/src/Api/StatisticsApi.php index a9037c9c..6b74bdca 100644 --- a/src/Api/StatisticsApi.php +++ b/src/Api/StatisticsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -41,7 +40,6 @@ use Bandwidth\ApiException; use Bandwidth\Configuration; use Bandwidth\HeaderSelector; -use Bandwidth\FormDataProcessor; use Bandwidth\ObjectSerializer; /** @@ -73,7 +71,7 @@ class StatisticsApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'getStatistics' => [ 'application/json', @@ -171,7 +169,7 @@ public function getStatistics( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\AccountStatistics|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\AccountStatistics|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getStatisticsWithHttpInfo( string $account_id, @@ -260,7 +258,6 @@ public function getStatisticsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -477,7 +474,6 @@ public function getStatisticsRequest( string $contentType = self::contentTypes['getStatistics'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( @@ -485,9 +481,7 @@ public function getStatisticsRequest( ); } - $resourcePath = '/accounts/{accountId}/statistics'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -511,30 +505,6 @@ public function getStatisticsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { diff --git a/src/Api/TollFreeVerificationApi.php b/src/Api/TollFreeVerificationApi.php index 44b62c0c..fae80426 100644 --- a/src/Api/TollFreeVerificationApi.php +++ b/src/Api/TollFreeVerificationApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -41,7 +40,6 @@ use Bandwidth\ApiException; use Bandwidth\Configuration; use Bandwidth\HeaderSelector; -use Bandwidth\FormDataProcessor; use Bandwidth\ObjectSerializer; /** @@ -73,7 +71,7 @@ class TollFreeVerificationApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'createWebhookSubscription' => [ 'application/json', @@ -198,7 +196,7 @@ public function createWebhookSubscription( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\WebhookSubscription|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\WebhookSubscription|\Bandwidth\Model\TfvError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function createWebhookSubscriptionWithHttpInfo( string $account_id, @@ -288,7 +286,6 @@ public function createWebhookSubscriptionWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -511,14 +508,12 @@ public function createWebhookSubscriptionRequest( string $contentType = self::contentTypes['createWebhookSubscription'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling createWebhookSubscription' ); } - // verify the required parameter 'webhook_subscription_request_schema' is set if ($webhook_subscription_request_schema === null || (is_array($webhook_subscription_request_schema) && count($webhook_subscription_request_schema) === 0)) { throw new InvalidArgumentException( @@ -526,7 +521,6 @@ public function createWebhookSubscriptionRequest( ); } - $resourcePath = '/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions'; $formParams = []; $queryParams = []; @@ -573,7 +567,7 @@ public function createWebhookSubscriptionRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -688,7 +682,7 @@ public function deleteVerificationRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function deleteVerificationRequestWithHttpInfo( string $account_id, @@ -906,14 +900,12 @@ public function deleteVerificationRequestRequest( string $contentType = self::contentTypes['deleteVerificationRequest'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling deleteVerificationRequest' ); } - // verify the required parameter 'phone_number' is set if ($phone_number === null || (is_array($phone_number) && count($phone_number) === 0)) { throw new InvalidArgumentException( @@ -929,10 +921,8 @@ public function deleteVerificationRequestRequest( if (!preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", $phone_number)) { throw new InvalidArgumentException("invalid value for \"phone_number\" when calling TollFreeVerificationApi.deleteVerificationRequest, must conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."); } - $resourcePath = '/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -964,30 +954,6 @@ public function deleteVerificationRequestRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1093,7 +1059,7 @@ public function deleteWebhookSubscription( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function deleteWebhookSubscriptionWithHttpInfo( string $account_id, @@ -1311,14 +1277,12 @@ public function deleteWebhookSubscriptionRequest( string $contentType = self::contentTypes['deleteWebhookSubscription'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling deleteWebhookSubscription' ); } - // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( @@ -1326,9 +1290,7 @@ public function deleteWebhookSubscriptionRequest( ); } - $resourcePath = '/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1360,30 +1322,6 @@ public function deleteWebhookSubscriptionRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1489,7 +1427,7 @@ public function getTollFreeVerificationStatus( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\TfvStatus|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\TfvStatus|\Bandwidth\Model\TfvError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getTollFreeVerificationStatusWithHttpInfo( string $account_id, @@ -1579,7 +1517,6 @@ public function getTollFreeVerificationStatusWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1802,14 +1739,12 @@ public function getTollFreeVerificationStatusRequest( string $contentType = self::contentTypes['getTollFreeVerificationStatus'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling getTollFreeVerificationStatus' ); } - // verify the required parameter 'phone_number' is set if ($phone_number === null || (is_array($phone_number) && count($phone_number) === 0)) { throw new InvalidArgumentException( @@ -1825,10 +1760,8 @@ public function getTollFreeVerificationStatusRequest( if (!preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", $phone_number)) { throw new InvalidArgumentException("invalid value for \"phone_number\" when calling TollFreeVerificationApi.getTollFreeVerificationStatus, must conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."); } - $resourcePath = '/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1860,30 +1793,6 @@ public function getTollFreeVerificationStatusRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1983,7 +1892,7 @@ public function listTollFreeUseCases( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of string[]|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: string[]|\Bandwidth\Model\TfvError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function listTollFreeUseCasesWithHttpInfo( ?int $hostIndex = null, @@ -2071,7 +1980,6 @@ public function listTollFreeUseCasesWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2283,9 +2191,7 @@ public function listTollFreeUseCasesRequest( ): Request { - $resourcePath = '/tollFreeVerification/useCases'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2301,30 +2207,6 @@ public function listTollFreeUseCasesRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -2427,7 +2309,7 @@ public function listWebhookSubscriptions( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\WebhookSubscriptionsListBody|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\WebhookSubscriptionsListBody|\Bandwidth\Model\TfvError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function listWebhookSubscriptionsWithHttpInfo( string $account_id, @@ -2510,7 +2392,6 @@ public function listWebhookSubscriptionsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2719,7 +2600,6 @@ public function listWebhookSubscriptionsRequest( string $contentType = self::contentTypes['listWebhookSubscriptions'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( @@ -2727,9 +2607,7 @@ public function listWebhookSubscriptionsRequest( ); } - $resourcePath = '/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2753,30 +2631,6 @@ public function listWebhookSubscriptionsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -2882,7 +2736,7 @@ public function requestTollFreeVerification( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function requestTollFreeVerificationWithHttpInfo( string $account_id, @@ -3092,14 +2946,12 @@ public function requestTollFreeVerificationRequest( string $contentType = self::contentTypes['requestTollFreeVerification'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling requestTollFreeVerification' ); } - // verify the required parameter 'verification_request' is set if ($verification_request === null || (is_array($verification_request) && count($verification_request) === 0)) { throw new InvalidArgumentException( @@ -3107,7 +2959,6 @@ public function requestTollFreeVerificationRequest( ); } - $resourcePath = '/accounts/{accountId}/tollFreeVerification'; $formParams = []; $queryParams = []; @@ -3154,7 +3005,7 @@ public function requestTollFreeVerificationRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -3272,7 +3123,7 @@ public function updateTollFreeVerificationRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function updateTollFreeVerificationRequestWithHttpInfo( string $account_id, @@ -3489,14 +3340,12 @@ public function updateTollFreeVerificationRequestRequest( string $contentType = self::contentTypes['updateTollFreeVerificationRequest'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling updateTollFreeVerificationRequest' ); } - // verify the required parameter 'phone_number' is set if ($phone_number === null || (is_array($phone_number) && count($phone_number) === 0)) { throw new InvalidArgumentException( @@ -3512,7 +3361,6 @@ public function updateTollFreeVerificationRequestRequest( if (!preg_match("/^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/", $phone_number)) { throw new InvalidArgumentException("invalid value for \"phone_number\" when calling TollFreeVerificationApi.updateTollFreeVerificationRequest, must conform to the pattern /^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$/."); } - // verify the required parameter 'tfv_submission_wrapper' is set if ($tfv_submission_wrapper === null || (is_array($tfv_submission_wrapper) && count($tfv_submission_wrapper) === 0)) { throw new InvalidArgumentException( @@ -3520,7 +3368,6 @@ public function updateTollFreeVerificationRequestRequest( ); } - $resourcePath = '/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification'; $formParams = []; $queryParams = []; @@ -3575,7 +3422,7 @@ public function updateTollFreeVerificationRequestRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -3693,7 +3540,7 @@ public function updateWebhookSubscription( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\WebhookSubscription|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError|\Bandwidth\Model\TfvError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\WebhookSubscription|\Bandwidth\Model\TfvError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function updateWebhookSubscriptionWithHttpInfo( string $account_id, @@ -3784,7 +3631,6 @@ public function updateWebhookSubscriptionWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -4013,21 +3859,18 @@ public function updateWebhookSubscriptionRequest( string $contentType = self::contentTypes['updateWebhookSubscription'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling updateWebhookSubscription' ); } - // verify the required parameter 'id' is set if ($id === null || (is_array($id) && count($id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $id when calling updateWebhookSubscription' ); } - // verify the required parameter 'webhook_subscription_request_schema' is set if ($webhook_subscription_request_schema === null || (is_array($webhook_subscription_request_schema) && count($webhook_subscription_request_schema) === 0)) { throw new InvalidArgumentException( @@ -4035,7 +3878,6 @@ public function updateWebhookSubscriptionRequest( ); } - $resourcePath = '/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}'; $formParams = []; $queryParams = []; @@ -4090,7 +3932,7 @@ public function updateWebhookSubscriptionRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/src/Api/TranscriptionsApi.php b/src/Api/TranscriptionsApi.php index 680e266d..f5ce77c1 100644 --- a/src/Api/TranscriptionsApi.php +++ b/src/Api/TranscriptionsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -41,7 +40,6 @@ use Bandwidth\ApiException; use Bandwidth\Configuration; use Bandwidth\HeaderSelector; -use Bandwidth\FormDataProcessor; use Bandwidth\ObjectSerializer; /** @@ -73,7 +71,7 @@ class TranscriptionsApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'deleteRealTimeTranscription' => [ 'application/json', @@ -183,7 +181,7 @@ public function deleteRealTimeTranscription( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array{0: null, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function deleteRealTimeTranscriptionWithHttpInfo( string $account_id, @@ -408,21 +406,18 @@ public function deleteRealTimeTranscriptionRequest( string $contentType = self::contentTypes['deleteRealTimeTranscription'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling deleteRealTimeTranscription' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $call_id when calling deleteRealTimeTranscription' ); } - // verify the required parameter 'transcription_id' is set if ($transcription_id === null || (is_array($transcription_id) && count($transcription_id) === 0)) { throw new InvalidArgumentException( @@ -430,9 +425,7 @@ public function deleteRealTimeTranscriptionRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -472,30 +465,6 @@ public function deleteRealTimeTranscriptionRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -604,7 +573,7 @@ public function getRealTimeTranscription( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\CallTranscriptionResponse|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\CallTranscriptionResponse|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function getRealTimeTranscriptionWithHttpInfo( string $account_id, @@ -695,7 +664,6 @@ public function getRealTimeTranscriptionWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -924,21 +892,18 @@ public function getRealTimeTranscriptionRequest( string $contentType = self::contentTypes['getRealTimeTranscription'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling getRealTimeTranscription' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $call_id when calling getRealTimeTranscription' ); } - // verify the required parameter 'transcription_id' is set if ($transcription_id === null || (is_array($transcription_id) && count($transcription_id) === 0)) { throw new InvalidArgumentException( @@ -946,9 +911,7 @@ public function getRealTimeTranscriptionRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -988,30 +951,6 @@ public function getRealTimeTranscriptionRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -1117,7 +1056,7 @@ public function listRealTimeTranscriptions( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return array of \Bandwidth\Model\CallTranscriptionMetadata[]|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError|\Bandwidth\Model\VoiceApiError, HTTP status code, HTTP response headers (array of strings) + * @return array{0: \Bandwidth\Model\CallTranscriptionMetadata[]|\Bandwidth\Model\VoiceApiError, 1: int, 2: array} [response data, HTTP status code, HTTP response headers] */ public function listRealTimeTranscriptionsWithHttpInfo( string $account_id, @@ -1207,7 +1146,6 @@ public function listRealTimeTranscriptionsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1430,14 +1368,12 @@ public function listRealTimeTranscriptionsRequest( string $contentType = self::contentTypes['listRealTimeTranscriptions'][0] ): Request { - // verify the required parameter 'account_id' is set if ($account_id === null || (is_array($account_id) && count($account_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $account_id when calling listRealTimeTranscriptions' ); } - // verify the required parameter 'call_id' is set if ($call_id === null || (is_array($call_id) && count($call_id) === 0)) { throw new InvalidArgumentException( @@ -1445,9 +1381,7 @@ public function listRealTimeTranscriptionsRequest( ); } - $resourcePath = '/accounts/{accountId}/calls/{callId}/transcriptions'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1479,30 +1413,6 @@ public function listRealTimeTranscriptionsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { diff --git a/src/Configuration.php b/src/Configuration.php index 81418c14..eb7ed080 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/FormDataProcessor.php b/src/FormDataProcessor.php index 11339da6..01446fc2 100644 --- a/src/FormDataProcessor.php +++ b/src/FormDataProcessor.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php index ec7f74c6..90c4050d 100644 --- a/src/HeaderSelector.php +++ b/src/HeaderSelector.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/AccountStatistics.php b/src/Model/AccountStatistics.php index 3ccb9616..a58cf675 100644 --- a/src/Model/AccountStatistics.php +++ b/src/Model/AccountStatistics.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/AdditionalDenialReason.php b/src/Model/AdditionalDenialReason.php index e61d06a1..b341389e 100644 --- a/src/Model/AdditionalDenialReason.php +++ b/src/Model/AdditionalDenialReason.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/Address.php b/src/Model/Address.php index fba90a85..bf126edc 100644 --- a/src/Model/Address.php +++ b/src/Model/Address.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/AnswerCallback.php b/src/Model/AnswerCallback.php index 68fad616..cdb46fe0 100644 --- a/src/Model/AnswerCallback.php +++ b/src/Model/AnswerCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/AsyncLookupRequest.php b/src/Model/AsyncLookupRequest.php index 62065a52..ded939b3 100644 --- a/src/Model/AsyncLookupRequest.php +++ b/src/Model/AsyncLookupRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -290,7 +290,6 @@ public function setPhoneNumbers(array $phone_numbers): static throw new InvalidArgumentException('non-nullable phone_numbers cannot be null'); } - $this->container['phone_numbers'] = $phone_numbers; return $this; diff --git a/src/Model/BlockedWebhook.php b/src/Model/BlockedWebhook.php index 9c5b7f2e..ff6f81ed 100644 --- a/src/Model/BlockedWebhook.php +++ b/src/Model/BlockedWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/BridgeCompleteCallback.php b/src/Model/BridgeCompleteCallback.php index 8d55f6be..1c4ba911 100644 --- a/src/Model/BridgeCompleteCallback.php +++ b/src/Model/BridgeCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/BridgeTargetCompleteCallback.php b/src/Model/BridgeTargetCompleteCallback.php index 2fda7902..739c534f 100644 --- a/src/Model/BridgeTargetCompleteCallback.php +++ b/src/Model/BridgeTargetCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/BrtcError.php b/src/Model/BrtcError.php index c7cda10a..84a07ee9 100644 --- a/src/Model/BrtcError.php +++ b/src/Model/BrtcError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/BrtcErrorResponse.php b/src/Model/BrtcErrorResponse.php index 4190f041..59ea1155 100644 --- a/src/Model/BrtcErrorResponse.php +++ b/src/Model/BrtcErrorResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/BrtcErrorSource.php b/src/Model/BrtcErrorSource.php index 674b275d..85b576bb 100644 --- a/src/Model/BrtcErrorSource.php +++ b/src/Model/BrtcErrorSource.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/BrtcLink.php b/src/Model/BrtcLink.php index 786e57b3..beac9a7f 100644 --- a/src/Model/BrtcLink.php +++ b/src/Model/BrtcLink.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/BusinessEntityTypeEnum.php b/src/Model/BusinessEntityTypeEnum.php index c3aa86a6..ee0c4f6f 100644 --- a/src/Model/BusinessEntityTypeEnum.php +++ b/src/Model/BusinessEntityTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/BusinessRegistrationTypeEnum.php b/src/Model/BusinessRegistrationTypeEnum.php index d7ef2bca..f0db3f0a 100644 --- a/src/Model/BusinessRegistrationTypeEnum.php +++ b/src/Model/BusinessRegistrationTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CallDirectionEnum.php b/src/Model/CallDirectionEnum.php index 17fcbc47..739530ff 100644 --- a/src/Model/CallDirectionEnum.php +++ b/src/Model/CallDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CallRecordingMetadata.php b/src/Model/CallRecordingMetadata.php index cd1ca0c0..de4b5193 100644 --- a/src/Model/CallRecordingMetadata.php +++ b/src/Model/CallRecordingMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CallState.php b/src/Model/CallState.php index 644b2155..93812297 100644 --- a/src/Model/CallState.php +++ b/src/Model/CallState.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CallStateEnum.php b/src/Model/CallStateEnum.php index a54228b2..5f4a2c53 100644 --- a/src/Model/CallStateEnum.php +++ b/src/Model/CallStateEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CallTranscription.php b/src/Model/CallTranscription.php index 8dfa0188..c5d6159a 100644 --- a/src/Model/CallTranscription.php +++ b/src/Model/CallTranscription.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -396,7 +396,6 @@ public function setConfidence(?float $confidence): static if (is_null($confidence)) { throw new InvalidArgumentException('non-nullable confidence cannot be null'); } - if (($confidence > 1)) { throw new InvalidArgumentException('invalid value for $confidence when calling CallTranscription., must be smaller than or equal to 1.'); } diff --git a/src/Model/CallTranscriptionDetectedLanguageEnum.php b/src/Model/CallTranscriptionDetectedLanguageEnum.php index 56dfcc4f..3527c4f5 100644 --- a/src/Model/CallTranscriptionDetectedLanguageEnum.php +++ b/src/Model/CallTranscriptionDetectedLanguageEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CallTranscriptionMetadata.php b/src/Model/CallTranscriptionMetadata.php index 729e626e..70788988 100644 --- a/src/Model/CallTranscriptionMetadata.php +++ b/src/Model/CallTranscriptionMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CallTranscriptionResponse.php b/src/Model/CallTranscriptionResponse.php index 796d33eb..3c53fe2f 100644 --- a/src/Model/CallTranscriptionResponse.php +++ b/src/Model/CallTranscriptionResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CallTranscriptionTrackEnum.php b/src/Model/CallTranscriptionTrackEnum.php index 3531596a..92433c91 100644 --- a/src/Model/CallTranscriptionTrackEnum.php +++ b/src/Model/CallTranscriptionTrackEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/Callback.php b/src/Model/Callback.php index d6e2f0a4..fab94fa3 100644 --- a/src/Model/Callback.php +++ b/src/Model/Callback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -28,12 +28,6 @@ namespace Bandwidth\Model; -use ArrayAccess; -use JsonSerializable; -use InvalidArgumentException; -use ReturnTypeWillChange; -use Bandwidth\ObjectSerializer; - /** * Callback Class Doc Comment * @@ -41,608 +35,57 @@ * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements ArrayAccess */ -class Callback implements ModelInterface, ArrayAccess, JsonSerializable +class Callback implements ComposedInterface { - public const DISCRIMINATOR = 'type'; - /** * The original name of the model. * * @var string */ - protected static string $openAPIModelName = 'callback'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPITypes = [ - 'time' => '\DateTime', - 'event_time' => '\DateTime', - 'type' => '\Bandwidth\Model\InboundCallbackTypeEnum', - 'to' => 'string', - 'description' => 'string', - 'message' => '\Bandwidth\Model\InboundCallbackMessage', - 'error_code' => 'int', - 'carrier_name' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPIFormats = [ - 'time' => 'date-time', - 'event_time' => 'date-time', - 'type' => null, - 'to' => null, - 'description' => null, - 'message' => null, - 'error_code' => null, - 'carrier_name' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ - protected static array $openAPINullables = [ - 'time' => false, - 'event_time' => false, - 'type' => false, - 'to' => false, - 'description' => false, - 'message' => false, - 'error_code' => false, - 'carrier_name' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ - protected array $openAPINullablesSetToNull = []; - - /** - * {@inheritdoc} - */ - public static function openAPITypes(): array - { - return self::$openAPITypes; - } - - /** - * {@inheritdoc} - */ - public static function openAPIFormats(): array - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return array - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param array $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * {@inheritdoc} - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * {@inheritdoc} - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var array - */ - protected static array $attributeMap = [ - 'time' => 'time', - 'event_time' => 'eventTime', - 'type' => 'type', - 'to' => 'to', - 'description' => 'description', - 'message' => 'message', - 'error_code' => 'errorCode', - 'carrier_name' => 'carrierName' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var array - */ - protected static array $setters = [ - 'time' => 'setTime', - 'event_time' => 'setEventTime', - 'type' => 'setType', - 'to' => 'setTo', - 'description' => 'setDescription', - 'message' => 'setMessage', - 'error_code' => 'setErrorCode', - 'carrier_name' => 'setCarrierName' - ]; + public const MODEL_NAME = 'callback'; /** - * Array of attributes to getter functions (for serialization of requests) + * The discriminator property name, or null when the schema has no discriminator. * - * @var array + * @var string|null */ - protected static array $getters = [ - 'time' => 'getTime', - 'event_time' => 'getEventTime', - 'type' => 'getType', - 'to' => 'getTo', - 'description' => 'getDescription', - 'message' => 'getMessage', - 'error_code' => 'getErrorCode', - 'carrier_name' => 'getCarrierName' - ]; - - /** - * {@inheritdoc} - */ - public static function attributeMap(): array - { - return self::$attributeMap; - } - - /** - * {@inheritdoc} - */ - public static function setters(): array - { - return self::$setters; - } + public const DISCRIMINATOR = 'type'; /** * {@inheritdoc} */ - public static function getters(): array + public static function getComposedTypes(): array { - return self::$getters; + return [ + '\Bandwidth\Model\StatusCallback', + '\Bandwidth\Model\InboundCallback' + ]; } /** * {@inheritdoc} */ - public function getModelName(): string - { - return self::$openAPIModelName; - } - - public const TYPE_MESSAGE_DELIVERED = 'message-delivered'; - public const TYPE_MESSAGE_FAILED = 'message-failed'; - public const TYPE_MESSAGE_READ = 'message-read'; - public const TYPE_MESSAGE_RECEIVED = 'message-received'; - public const TYPE_MESSAGE_SENDING = 'message-sending'; - public const TYPE_MESSAGE_SENT = 'message-sent'; - public const TYPE_REQUESTED_LOCATION_RESPONSE = 'requested-location-response'; - public const TYPE_SUGGESTION_RESPONSE = 'suggestion-response'; - - /** - * Associative array for storing property values - * - * @var array - */ - protected array $container = []; - - /** - * Constructor - * - * @param array $data Associated array of property values initializing the model - */ - public function __construct(?array $data = null) + public static function getComposedDiscriminator(): ?string { - // Initialize discriminator property with the model name. - $this->container['type'] = static::$openAPIModelName; - - $this->setIfExists('time', $data ?? [], null); - $this->setIfExists('event_time', $data ?? [], null); - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('to', $data ?? [], null); - $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('message', $data ?? [], null); - $this->setIfExists('error_code', $data ?? [], null); - $this->setIfExists('carrier_name', $data ?? [], null); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + return self::DISCRIMINATOR; } /** * {@inheritdoc} */ - public function listInvalidProperties(): array - { - $invalidProperties = []; - - if ($this->container['time'] === null) { - $invalidProperties[] = "'time' can't be null"; - } - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ($this->container['to'] === null) { - $invalidProperties[] = "'to' can't be null"; - } - if ($this->container['description'] === null) { - $invalidProperties[] = "'description' can't be null"; - } - if ($this->container['message'] === null) { - $invalidProperties[] = "'message' can't be null"; - } - return $invalidProperties; - } - - /** - * {@inheritdoc} - */ - public function valid(): bool - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets time - * - * @return \DateTime - */ - public function getTime(): \DateTime - { - return $this->container['time']; - } - - /** - * Sets time - * - * @param \DateTime $time time - * - * @return $this - */ - public function setTime(\DateTime $time): static - { - if (is_null($time)) { - throw new InvalidArgumentException('non-nullable time cannot be null'); - } - $this->container['time'] = $time; - - return $this; - } - - /** - * Gets event_time - * - * @return \DateTime|null - */ - public function getEventTime(): ?\DateTime - { - return $this->container['event_time']; - } - - /** - * Sets event_time - * - * @param \DateTime|null $event_time Represents the time at which the message was read, for `message-read` callbacks. - * - * @return $this - */ - public function setEventTime(?\DateTime $event_time): static - { - if (is_null($event_time)) { - throw new InvalidArgumentException('non-nullable event_time cannot be null'); - } - $this->container['event_time'] = $event_time; - - return $this; - } - - /** - * Gets type - * - * @return \Bandwidth\Model\InboundCallbackTypeEnum - */ - public function getType(): \Bandwidth\Model\InboundCallbackTypeEnum - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Bandwidth\Model\InboundCallbackTypeEnum $type type - * - * @return $this - */ - public function setType(\Bandwidth\Model\InboundCallbackTypeEnum $type): static - { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets to - * - * @return string - */ - public function getTo(): string - { - return $this->container['to']; - } - - /** - * Sets to - * - * @param string $to The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. - * - * @return $this - */ - public function setTo(string $to): static - { - if (is_null($to)) { - throw new InvalidArgumentException('non-nullable to cannot be null'); - } - $this->container['to'] = $to; - - return $this; - } - - /** - * Gets description - * - * @return string - */ - public function getDescription(): string - { - return $this->container['description']; - } - - /** - * Sets description - * - * @param string $description A detailed description of the event described by the callback. - * - * @return $this - */ - public function setDescription(string $description): static - { - if (is_null($description)) { - throw new InvalidArgumentException('non-nullable description cannot be null'); - } - $this->container['description'] = $description; - - return $this; - } - - /** - * Gets message - * - * @return \Bandwidth\Model\InboundCallbackMessage - */ - public function getMessage(): \Bandwidth\Model\InboundCallbackMessage - { - return $this->container['message']; - } - - /** - * Sets message - * - * @param \Bandwidth\Model\InboundCallbackMessage $message message - * - * @return $this - */ - public function setMessage(\Bandwidth\Model\InboundCallbackMessage $message): static - { - if (is_null($message)) { - throw new InvalidArgumentException('non-nullable message cannot be null'); - } - $this->container['message'] = $message; - - return $this; - } - - /** - * Gets error_code - * - * @return int|null - */ - public function getErrorCode(): ?int - { - return $this->container['error_code']; - } - - /** - * Sets error_code - * - * @param int|null $error_code Optional error code, applicable only when type is `message-failed`. - * - * @return $this - */ - public function setErrorCode(?int $error_code): static - { - if (is_null($error_code)) { - throw new InvalidArgumentException('non-nullable error_code cannot be null'); - } - $this->container['error_code'] = $error_code; - - return $this; - } - - /** - * Gets carrier_name - * - * @return string|null - */ - public function getCarrierName(): ?string - { - return $this->container['carrier_name']; - } - - /** - * Sets carrier_name - * - * @param string|null $carrier_name The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. - * - * @return $this - */ - public function setCarrierName(?string $carrier_name): static - { - if (is_null($carrier_name)) { - throw new InvalidArgumentException('non-nullable carrier_name cannot be null'); - } - $this->container['carrier_name'] = $carrier_name; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param int|string $offset Offset - * - * @return boolean - */ - public function offsetExists(mixed $offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param int|string $offset Offset - * - * @return mixed|null - */ - #[ReturnTypeWillChange] - public function offsetGet(mixed $offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|string|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param int|string $offset Offset - * - * @return void - */ - public function offsetUnset(mixed $offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[ReturnTypeWillChange] - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue(): string - { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + public static function getComposedDiscriminatorMappings(): array + { + return [ + 'message-delivered' => '\Bandwidth\Model\StatusCallback', + 'message-failed' => '\Bandwidth\Model\StatusCallback', + 'message-read' => '\Bandwidth\Model\StatusCallback', + 'message-received' => '\Bandwidth\Model\InboundCallback', + 'message-sending' => '\Bandwidth\Model\StatusCallback', + 'message-sent' => '\Bandwidth\Model\StatusCallback', + 'requested-location-response' => '\Bandwidth\Model\InboundCallback', + 'suggestion-response' => '\Bandwidth\Model\InboundCallback' + ]; } } diff --git a/src/Model/CallbackMethodEnum.php b/src/Model/CallbackMethodEnum.php index 002aabb2..893c3d7e 100644 --- a/src/Model/CallbackMethodEnum.php +++ b/src/Model/CallbackMethodEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CardWidthEnum.php b/src/Model/CardWidthEnum.php index cfcd4892..51ec8020 100644 --- a/src/Model/CardWidthEnum.php +++ b/src/Model/CardWidthEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CodeRequest.php b/src/Model/CodeRequest.php index 7397a8e3..7e6bae08 100644 --- a/src/Model/CodeRequest.php +++ b/src/Model/CodeRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -527,7 +527,6 @@ public function setDigits(int $digits): static if (is_null($digits)) { throw new InvalidArgumentException('non-nullable digits cannot be null'); } - if (($digits > 8)) { throw new InvalidArgumentException('invalid value for $digits when calling CodeRequest., must be smaller than or equal to 8.'); } diff --git a/src/Model/CompletedLookupStatusEnum.php b/src/Model/CompletedLookupStatusEnum.php index ce103be2..a2c3e69a 100644 --- a/src/Model/CompletedLookupStatusEnum.php +++ b/src/Model/CompletedLookupStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ComposedInterface.php b/src/Model/ComposedInterface.php new file mode 100644 index 00000000..8e09a9a1 --- /dev/null +++ b/src/Model/ComposedInterface.php @@ -0,0 +1,66 @@ + + */ + public static function getComposedDiscriminatorMappings(): array; +} diff --git a/src/Model/Conference.php b/src/Model/Conference.php index 86269965..4374069e 100644 --- a/src/Model/Conference.php +++ b/src/Model/Conference.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceCompletedCallback.php b/src/Model/ConferenceCompletedCallback.php index 2ddcf41c..fa665d47 100644 --- a/src/Model/ConferenceCompletedCallback.php +++ b/src/Model/ConferenceCompletedCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceCreatedCallback.php b/src/Model/ConferenceCreatedCallback.php index 4a989ac9..281540da 100644 --- a/src/Model/ConferenceCreatedCallback.php +++ b/src/Model/ConferenceCreatedCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceMember.php b/src/Model/ConferenceMember.php index d319074a..ac4d47b0 100644 --- a/src/Model/ConferenceMember.php +++ b/src/Model/ConferenceMember.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceMemberExitCallback.php b/src/Model/ConferenceMemberExitCallback.php index 28752004..3b814262 100644 --- a/src/Model/ConferenceMemberExitCallback.php +++ b/src/Model/ConferenceMemberExitCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceMemberJoinCallback.php b/src/Model/ConferenceMemberJoinCallback.php index 4ee6963c..24b54ccc 100644 --- a/src/Model/ConferenceMemberJoinCallback.php +++ b/src/Model/ConferenceMemberJoinCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceRecordingAvailableCallback.php b/src/Model/ConferenceRecordingAvailableCallback.php index 604aa82c..5744e313 100644 --- a/src/Model/ConferenceRecordingAvailableCallback.php +++ b/src/Model/ConferenceRecordingAvailableCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceRecordingMetadata.php b/src/Model/ConferenceRecordingMetadata.php index d2036ea2..b0e82945 100644 --- a/src/Model/ConferenceRecordingMetadata.php +++ b/src/Model/ConferenceRecordingMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceRedirectCallback.php b/src/Model/ConferenceRedirectCallback.php index 8fe3332e..d52753a3 100644 --- a/src/Model/ConferenceRedirectCallback.php +++ b/src/Model/ConferenceRedirectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceStateEnum.php b/src/Model/ConferenceStateEnum.php index 8329ea3b..62df2ed5 100644 --- a/src/Model/ConferenceStateEnum.php +++ b/src/Model/ConferenceStateEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 93b85107..12a42dc3 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CreateAsyncBulkLookupResponse.php b/src/Model/CreateAsyncBulkLookupResponse.php index abf00bde..7117ef84 100644 --- a/src/Model/CreateAsyncBulkLookupResponse.php +++ b/src/Model/CreateAsyncBulkLookupResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CreateAsyncBulkLookupResponseData.php b/src/Model/CreateAsyncBulkLookupResponseData.php index d822a52d..8f2f0369 100644 --- a/src/Model/CreateAsyncBulkLookupResponseData.php +++ b/src/Model/CreateAsyncBulkLookupResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CreateCall.php b/src/Model/CreateCall.php index 55987f29..586fb220 100644 --- a/src/Model/CreateCall.php +++ b/src/Model/CreateCall.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -1053,7 +1053,6 @@ public function setCallTimeout(?float $call_timeout): static $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($call_timeout) && ($call_timeout > 300)) { throw new InvalidArgumentException('invalid value for $call_timeout when calling CreateCall., must be smaller than or equal to 300.'); } @@ -1095,7 +1094,6 @@ public function setCallbackTimeout(?float $callback_timeout): static $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($callback_timeout) && ($callback_timeout > 25)) { throw new InvalidArgumentException('invalid value for $callback_timeout when calling CreateCall., must be smaller than or equal to 25.'); } @@ -1164,7 +1162,6 @@ public function setPriority(?int $priority): static $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($priority) && ($priority > 5)) { throw new InvalidArgumentException('invalid value for $priority when calling CreateCall., must be smaller than or equal to 5.'); } diff --git a/src/Model/CreateCallResponse.php b/src/Model/CreateCallResponse.php index f7b5a313..f9a98b70 100644 --- a/src/Model/CreateCallResponse.php +++ b/src/Model/CreateCallResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CreateEndpointRequestBase.php b/src/Model/CreateEndpointRequestBase.php index 515bbc59..9fb84021 100644 --- a/src/Model/CreateEndpointRequestBase.php +++ b/src/Model/CreateEndpointRequestBase.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CreateEndpointResponse.php b/src/Model/CreateEndpointResponse.php index 7c8b1ab3..86608e39 100644 --- a/src/Model/CreateEndpointResponse.php +++ b/src/Model/CreateEndpointResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CreateEndpointResponseData.php b/src/Model/CreateEndpointResponseData.php index 5c71df81..7e05b047 100644 --- a/src/Model/CreateEndpointResponseData.php +++ b/src/Model/CreateEndpointResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CreateMessageRequestError.php b/src/Model/CreateMessageRequestError.php index 4dd47a7a..aef9555a 100644 --- a/src/Model/CreateMessageRequestError.php +++ b/src/Model/CreateMessageRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CreateMultiChannelMessageResponse.php b/src/Model/CreateMultiChannelMessageResponse.php index f743d031..e9d1ad04 100644 --- a/src/Model/CreateMultiChannelMessageResponse.php +++ b/src/Model/CreateMultiChannelMessageResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CreateSyncLookupResponse.php b/src/Model/CreateSyncLookupResponse.php index bf74e7f4..740d9dd1 100644 --- a/src/Model/CreateSyncLookupResponse.php +++ b/src/Model/CreateSyncLookupResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CreateSyncLookupResponseData.php b/src/Model/CreateSyncLookupResponseData.php index bca6421f..aa509e3d 100644 --- a/src/Model/CreateSyncLookupResponseData.php +++ b/src/Model/CreateSyncLookupResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/CreateWebRtcConnectionRequest.php b/src/Model/CreateWebRtcConnectionRequest.php index 913f0c97..a8d0d8d9 100644 --- a/src/Model/CreateWebRtcConnectionRequest.php +++ b/src/Model/CreateWebRtcConnectionRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/DeactivationEventEnum.php b/src/Model/DeactivationEventEnum.php index a571b843..870aca23 100644 --- a/src/Model/DeactivationEventEnum.php +++ b/src/Model/DeactivationEventEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/Device.php b/src/Model/Device.php index 17985aae..07230748 100644 --- a/src/Model/Device.php +++ b/src/Model/Device.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/DeviceStatusEnum.php b/src/Model/DeviceStatusEnum.php index a1e719d2..04a0b214 100644 --- a/src/Model/DeviceStatusEnum.php +++ b/src/Model/DeviceStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/DisconnectCallback.php b/src/Model/DisconnectCallback.php index c795608c..6ff9de6e 100644 --- a/src/Model/DisconnectCallback.php +++ b/src/Model/DisconnectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/Diversion.php b/src/Model/Diversion.php index 40be62a2..08022474 100644 --- a/src/Model/Diversion.php +++ b/src/Model/Diversion.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/DtmfCallback.php b/src/Model/DtmfCallback.php index d93d33b9..81f62353 100644 --- a/src/Model/DtmfCallback.php +++ b/src/Model/DtmfCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/Endpoint.php b/src/Model/Endpoint.php index 9679c6cb..d2fffa6a 100644 --- a/src/Model/Endpoint.php +++ b/src/Model/Endpoint.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/EndpointDirectionEnum.php b/src/Model/EndpointDirectionEnum.php index cf36d523..c29d0f61 100644 --- a/src/Model/EndpointDirectionEnum.php +++ b/src/Model/EndpointDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/EndpointEvent.php b/src/Model/EndpointEvent.php index d7ef3945..eb297b93 100644 --- a/src/Model/EndpointEvent.php +++ b/src/Model/EndpointEvent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/EndpointEventTypeEnum.php b/src/Model/EndpointEventTypeEnum.php index 16dddd5c..18b4d449 100644 --- a/src/Model/EndpointEventTypeEnum.php +++ b/src/Model/EndpointEventTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/EndpointResponse.php b/src/Model/EndpointResponse.php index 66f57ad0..228ddca5 100644 --- a/src/Model/EndpointResponse.php +++ b/src/Model/EndpointResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/EndpointStatusEnum.php b/src/Model/EndpointStatusEnum.php index c60c20fb..ee13793e 100644 --- a/src/Model/EndpointStatusEnum.php +++ b/src/Model/EndpointStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/EndpointTypeEnum.php b/src/Model/EndpointTypeEnum.php index 191db9c2..355f269d 100644 --- a/src/Model/EndpointTypeEnum.php +++ b/src/Model/EndpointTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/Endpoints.php b/src/Model/Endpoints.php index 75a5333a..4d866dcc 100644 --- a/src/Model/Endpoints.php +++ b/src/Model/Endpoints.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ErrorObject.php b/src/Model/ErrorObject.php index 5a13b623..a1f97c0d 100644 --- a/src/Model/ErrorObject.php +++ b/src/Model/ErrorObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ErrorSource.php b/src/Model/ErrorSource.php index 49327fc4..5e85c988 100644 --- a/src/Model/ErrorSource.php +++ b/src/Model/ErrorSource.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/FailureWebhook.php b/src/Model/FailureWebhook.php index e03ece1e..a3f6bcbf 100644 --- a/src/Model/FailureWebhook.php +++ b/src/Model/FailureWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/FieldError.php b/src/Model/FieldError.php index d18b2ebb..29237bfd 100644 --- a/src/Model/FieldError.php +++ b/src/Model/FieldError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/FileFormatEnum.php b/src/Model/FileFormatEnum.php index efd29074..5d937e76 100644 --- a/src/Model/FileFormatEnum.php +++ b/src/Model/FileFormatEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/GatherCallback.php b/src/Model/GatherCallback.php index 85bb6012..b039dfc4 100644 --- a/src/Model/GatherCallback.php +++ b/src/Model/GatherCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/GetAsyncBulkLookupResponse.php b/src/Model/GetAsyncBulkLookupResponse.php index b9f29d7a..2be8da22 100644 --- a/src/Model/GetAsyncBulkLookupResponse.php +++ b/src/Model/GetAsyncBulkLookupResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/GetAsyncBulkLookupResponseData.php b/src/Model/GetAsyncBulkLookupResponseData.php index 754422a6..4c0915ba 100644 --- a/src/Model/GetAsyncBulkLookupResponseData.php +++ b/src/Model/GetAsyncBulkLookupResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/InProgressLookupStatusEnum.php b/src/Model/InProgressLookupStatusEnum.php index 14199e80..b8d29a58 100644 --- a/src/Model/InProgressLookupStatusEnum.php +++ b/src/Model/InProgressLookupStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/InboundCallback.php b/src/Model/InboundCallback.php index 0325fddd..95a8f33c 100644 --- a/src/Model/InboundCallback.php +++ b/src/Model/InboundCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/InboundCallbackMessage.php b/src/Model/InboundCallbackMessage.php index f85b44bd..6acbb1ae 100644 --- a/src/Model/InboundCallbackMessage.php +++ b/src/Model/InboundCallbackMessage.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -578,7 +578,6 @@ public function setTo(array $to): static throw new InvalidArgumentException('non-nullable to cannot be null'); } - $this->container['to'] = $to; return $this; diff --git a/src/Model/InboundCallbackTypeEnum.php b/src/Model/InboundCallbackTypeEnum.php index cafd9ceb..065a4f4f 100644 --- a/src/Model/InboundCallbackTypeEnum.php +++ b/src/Model/InboundCallbackTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/InitiateCallback.php b/src/Model/InitiateCallback.php index 851be3dd..80a584d4 100644 --- a/src/Model/InitiateCallback.php +++ b/src/Model/InitiateCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/LatestMessageDeliveryStatusEnum.php b/src/Model/LatestMessageDeliveryStatusEnum.php index 9c759f2e..6cc5f6b6 100644 --- a/src/Model/LatestMessageDeliveryStatusEnum.php +++ b/src/Model/LatestMessageDeliveryStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/LineTypeEnum.php b/src/Model/LineTypeEnum.php index a89ab78a..d0058494 100644 --- a/src/Model/LineTypeEnum.php +++ b/src/Model/LineTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/Link.php b/src/Model/Link.php index f2960f3f..9016c47d 100644 --- a/src/Model/Link.php +++ b/src/Model/Link.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/LinkSchema.php b/src/Model/LinkSchema.php index 55e456f4..62e91536 100644 --- a/src/Model/LinkSchema.php +++ b/src/Model/LinkSchema.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/LinksObject.php b/src/Model/LinksObject.php index f99c5c26..ed46073d 100644 --- a/src/Model/LinksObject.php +++ b/src/Model/LinksObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ListEndpointsResponse.php b/src/Model/ListEndpointsResponse.php index e7cce0b4..d672d2dd 100644 --- a/src/Model/ListEndpointsResponse.php +++ b/src/Model/ListEndpointsResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ListMessageDirectionEnum.php b/src/Model/ListMessageDirectionEnum.php index bb9f45fb..9c0a8c0f 100644 --- a/src/Model/ListMessageDirectionEnum.php +++ b/src/Model/ListMessageDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ListMessageItem.php b/src/Model/ListMessageItem.php index 770aac48..42b8f35c 100644 --- a/src/Model/ListMessageItem.php +++ b/src/Model/ListMessageItem.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/LookupErrorResponse.php b/src/Model/LookupErrorResponse.php index 7f171441..5ce79fad 100644 --- a/src/Model/LookupErrorResponse.php +++ b/src/Model/LookupErrorResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/LookupErrorSchema.php b/src/Model/LookupErrorSchema.php index adb7cd92..24b3d365 100644 --- a/src/Model/LookupErrorSchema.php +++ b/src/Model/LookupErrorSchema.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/LookupErrorSchemaMeta.php b/src/Model/LookupErrorSchemaMeta.php index 6b5ffd3c..b202fd30 100644 --- a/src/Model/LookupErrorSchemaMeta.php +++ b/src/Model/LookupErrorSchemaMeta.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/LookupResult.php b/src/Model/LookupResult.php index bca63923..21b523d7 100644 --- a/src/Model/LookupResult.php +++ b/src/Model/LookupResult.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MachineDetectionCompleteCallback.php b/src/Model/MachineDetectionCompleteCallback.php index df540491..35b8d6ec 100644 --- a/src/Model/MachineDetectionCompleteCallback.php +++ b/src/Model/MachineDetectionCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MachineDetectionConfiguration.php b/src/Model/MachineDetectionConfiguration.php index f590e5e0..8e5ed34b 100644 --- a/src/Model/MachineDetectionConfiguration.php +++ b/src/Model/MachineDetectionConfiguration.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MachineDetectionModeEnum.php b/src/Model/MachineDetectionModeEnum.php index ad65f80f..88e20219 100644 --- a/src/Model/MachineDetectionModeEnum.php +++ b/src/Model/MachineDetectionModeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MachineDetectionResult.php b/src/Model/MachineDetectionResult.php index a7ed156d..6ecac6a4 100644 --- a/src/Model/MachineDetectionResult.php +++ b/src/Model/MachineDetectionResult.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/Media.php b/src/Model/Media.php index 28a58d18..acf90943 100644 --- a/src/Model/Media.php +++ b/src/Model/Media.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/Message.php b/src/Model/Message.php index dd4e4c7f..e24e3d10 100644 --- a/src/Model/Message.php +++ b/src/Model/Message.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -533,7 +533,6 @@ public function setTo(?array $to): static throw new InvalidArgumentException('non-nullable to cannot be null'); } - $this->container['to'] = $to; return $this; @@ -589,7 +588,6 @@ public function setMedia(?array $media): static throw new InvalidArgumentException('non-nullable media cannot be null'); } - $this->container['media'] = $media; return $this; diff --git a/src/Model/MessageDirectionEnum.php b/src/Model/MessageDirectionEnum.php index 18013b8c..1c1e9978 100644 --- a/src/Model/MessageDirectionEnum.php +++ b/src/Model/MessageDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MessageRequest.php b/src/Model/MessageRequest.php index 9afe9464..c20145f5 100644 --- a/src/Model/MessageRequest.php +++ b/src/Model/MessageRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -376,7 +376,6 @@ public function setTo(array $to): static throw new InvalidArgumentException('non-nullable to cannot be null'); } - $this->container['to'] = $to; return $this; diff --git a/src/Model/MessageStatusEnum.php b/src/Model/MessageStatusEnum.php index 3cb2f232..8d4de725 100644 --- a/src/Model/MessageStatusEnum.php +++ b/src/Model/MessageStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MessageTypeEnum.php b/src/Model/MessageTypeEnum.php index 9a51804c..ed0068f2 100644 --- a/src/Model/MessageTypeEnum.php +++ b/src/Model/MessageTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MessagesList.php b/src/Model/MessagesList.php index 6fd7c2ca..158e361e 100644 --- a/src/Model/MessagesList.php +++ b/src/Model/MessagesList.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MessagingCodeResponse.php b/src/Model/MessagingCodeResponse.php index 2f51d034..1762f3e7 100644 --- a/src/Model/MessagingCodeResponse.php +++ b/src/Model/MessagingCodeResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MessagingRequestError.php b/src/Model/MessagingRequestError.php index 3caae141..1f1caf2b 100644 --- a/src/Model/MessagingRequestError.php +++ b/src/Model/MessagingRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MfaForbiddenRequestError.php b/src/Model/MfaForbiddenRequestError.php index 83fecbd4..ec36c8fa 100644 --- a/src/Model/MfaForbiddenRequestError.php +++ b/src/Model/MfaForbiddenRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MfaRequestError.php b/src/Model/MfaRequestError.php index 96525b7a..a558164f 100644 --- a/src/Model/MfaRequestError.php +++ b/src/Model/MfaRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MfaUnauthorizedRequestError.php b/src/Model/MfaUnauthorizedRequestError.php index 23df0729..45bf413c 100644 --- a/src/Model/MfaUnauthorizedRequestError.php +++ b/src/Model/MfaUnauthorizedRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MmsMessageContent.php b/src/Model/MmsMessageContent.php index d4fee67b..6a9f4bba 100644 --- a/src/Model/MmsMessageContent.php +++ b/src/Model/MmsMessageContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MmsMessageContentFile.php b/src/Model/MmsMessageContentFile.php index fb0a2778..8707c3e0 100644 --- a/src/Model/MmsMessageContentFile.php +++ b/src/Model/MmsMessageContentFile.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index 6a75f36b..9ba89d12 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelAction.php b/src/Model/MultiChannelAction.php index a9221efd..95277d67 100644 --- a/src/Model/MultiChannelAction.php +++ b/src/Model/MultiChannelAction.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -28,885 +28,64 @@ namespace Bandwidth\Model; -use ArrayAccess; -use JsonSerializable; -use InvalidArgumentException; -use ReturnTypeWillChange; -use Bandwidth\ObjectSerializer; - /** * MultiChannelAction Class Doc Comment * * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements ArrayAccess */ -class MultiChannelAction implements ModelInterface, ArrayAccess, JsonSerializable +class MultiChannelAction implements ComposedInterface { - public const DISCRIMINATOR = 'type'; - /** * The original name of the model. * * @var string */ - protected static string $openAPIModelName = 'multiChannelAction'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPITypes = [ - 'type' => '\Bandwidth\Model\RbmActionTypeEnum', - 'text' => 'string', - 'postback_data' => 'string', - 'phone_number' => 'string', - 'latitude' => 'float', - 'longitude' => 'float', - 'label' => 'string', - 'title' => 'string', - 'start_time' => '\DateTime', - 'end_time' => '\DateTime', - 'description' => 'string', - 'url' => 'string', - 'application' => '\Bandwidth\Model\RbmOpenUrlEnum', - 'webview_view_mode' => '\Bandwidth\Model\RbmWebViewEnum' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPIFormats = [ - 'type' => null, - 'text' => null, - 'postback_data' => 'byte', - 'phone_number' => null, - 'latitude' => 'double', - 'longitude' => 'double', - 'label' => null, - 'title' => null, - 'start_time' => 'date-time', - 'end_time' => 'date-time', - 'description' => null, - 'url' => 'uri', - 'application' => null, - 'webview_view_mode' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ - protected static array $openAPINullables = [ - 'type' => false, - 'text' => false, - 'postback_data' => false, - 'phone_number' => false, - 'latitude' => false, - 'longitude' => false, - 'label' => false, - 'title' => false, - 'start_time' => false, - 'end_time' => false, - 'description' => false, - 'url' => false, - 'application' => false, - 'webview_view_mode' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ - protected array $openAPINullablesSetToNull = []; - - /** - * {@inheritdoc} - */ - public static function openAPITypes(): array - { - return self::$openAPITypes; - } - - /** - * {@inheritdoc} - */ - public static function openAPIFormats(): array - { - return self::$openAPIFormats; - } + public const MODEL_NAME = 'multiChannelAction'; /** - * Array of nullable properties + * The discriminator property name, or null when the schema has no discriminator. * - * @return array + * @var string|null */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return array - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param array $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * {@inheritdoc} - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * {@inheritdoc} - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var array - */ - protected static array $attributeMap = [ - 'type' => 'type', - 'text' => 'text', - 'postback_data' => 'postbackData', - 'phone_number' => 'phoneNumber', - 'latitude' => 'latitude', - 'longitude' => 'longitude', - 'label' => 'label', - 'title' => 'title', - 'start_time' => 'startTime', - 'end_time' => 'endTime', - 'description' => 'description', - 'url' => 'url', - 'application' => 'application', - 'webview_view_mode' => 'webviewViewMode' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var array - */ - protected static array $setters = [ - 'type' => 'setType', - 'text' => 'setText', - 'postback_data' => 'setPostbackData', - 'phone_number' => 'setPhoneNumber', - 'latitude' => 'setLatitude', - 'longitude' => 'setLongitude', - 'label' => 'setLabel', - 'title' => 'setTitle', - 'start_time' => 'setStartTime', - 'end_time' => 'setEndTime', - 'description' => 'setDescription', - 'url' => 'setUrl', - 'application' => 'setApplication', - 'webview_view_mode' => 'setWebviewViewMode' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var array - */ - protected static array $getters = [ - 'type' => 'getType', - 'text' => 'getText', - 'postback_data' => 'getPostbackData', - 'phone_number' => 'getPhoneNumber', - 'latitude' => 'getLatitude', - 'longitude' => 'getLongitude', - 'label' => 'getLabel', - 'title' => 'getTitle', - 'start_time' => 'getStartTime', - 'end_time' => 'getEndTime', - 'description' => 'getDescription', - 'url' => 'getUrl', - 'application' => 'getApplication', - 'webview_view_mode' => 'getWebviewViewMode' - ]; - - /** - * {@inheritdoc} - */ - public static function attributeMap(): array - { - return self::$attributeMap; - } + public const DISCRIMINATOR = 'type'; /** * {@inheritdoc} */ - public static function setters(): array + public static function getComposedTypes(): array { - return self::$setters; + return [ + '\Bandwidth\Model\RbmActionBase', + '\Bandwidth\Model\RbmActionDial', + '\Bandwidth\Model\RbmActionViewLocation', + '\Bandwidth\Model\MultiChannelActionCalendarEvent', + '\Bandwidth\Model\RbmActionOpenUrl' + ]; } /** * {@inheritdoc} */ - public static function getters(): array + public static function getComposedDiscriminator(): ?string { - return self::$getters; + return self::DISCRIMINATOR; } /** * {@inheritdoc} */ - public function getModelName(): string - { - return self::$openAPIModelName; - } - - public const TYPE_CREATE_CALENDAR_EVENT = 'CREATE_CALENDAR_EVENT'; - public const TYPE_DIAL_PHONE = 'DIAL_PHONE'; - public const TYPE_OPEN_URL = 'OPEN_URL'; - public const TYPE_REPLY = 'REPLY'; - public const TYPE_REQUEST_LOCATION = 'REQUEST_LOCATION'; - public const TYPE_SHOW_LOCATION = 'SHOW_LOCATION'; - - /** - * Associative array for storing property values - * - * @var array - */ - protected array $container = []; - - /** - * Constructor - * - * @param array $data Associated array of property values initializing the model - */ - public function __construct(?array $data = null) - { - // Initialize discriminator property with the model name. - $this->container['type'] = static::$openAPIModelName; - - $this->setIfExists('type', $data ?? [], null); - $this->setIfExists('text', $data ?? [], null); - $this->setIfExists('postback_data', $data ?? [], null); - $this->setIfExists('phone_number', $data ?? [], null); - $this->setIfExists('latitude', $data ?? [], null); - $this->setIfExists('longitude', $data ?? [], null); - $this->setIfExists('label', $data ?? [], null); - $this->setIfExists('title', $data ?? [], null); - $this->setIfExists('start_time', $data ?? [], null); - $this->setIfExists('end_time', $data ?? [], null); - $this->setIfExists('description', $data ?? [], null); - $this->setIfExists('url', $data ?? [], null); - $this->setIfExists('application', $data ?? [], null); - $this->setIfExists('webview_view_mode', $data ?? [], null); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; - } - - /** - * {@inheritdoc} - */ - public function listInvalidProperties(): array - { - $invalidProperties = []; - - if ($this->container['type'] === null) { - $invalidProperties[] = "'type' can't be null"; - } - if ($this->container['text'] === null) { - $invalidProperties[] = "'text' can't be null"; - } - if ((mb_strlen($this->container['text']) > 25)) { - $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 25."; - } - - if ($this->container['postback_data'] === null) { - $invalidProperties[] = "'postback_data' can't be null"; - } - if ((mb_strlen($this->container['postback_data']) > 2048)) { - $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; - } - - if ($this->container['phone_number'] === null) { - $invalidProperties[] = "'phone_number' can't be null"; - } - if ($this->container['latitude'] === null) { - $invalidProperties[] = "'latitude' can't be null"; - } - if ($this->container['longitude'] === null) { - $invalidProperties[] = "'longitude' can't be null"; - } - if (!is_null($this->container['label']) && (mb_strlen($this->container['label']) > 100)) { - $invalidProperties[] = "invalid value for 'label', the character length must be smaller than or equal to 100."; - } - - if ($this->container['title'] === null) { - $invalidProperties[] = "'title' can't be null"; - } - if ((mb_strlen($this->container['title']) > 100)) { - $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 100."; - } - - if ($this->container['start_time'] === null) { - $invalidProperties[] = "'start_time' can't be null"; - } - if ($this->container['end_time'] === null) { - $invalidProperties[] = "'end_time' can't be null"; - } - if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 500)) { - $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 500."; - } - - if ($this->container['url'] === null) { - $invalidProperties[] = "'url' can't be null"; - } - if ((mb_strlen($this->container['url']) > 2048)) { - $invalidProperties[] = "invalid value for 'url', the character length must be smaller than or equal to 2048."; - } - - return $invalidProperties; - } - - /** - * {@inheritdoc} - */ - public function valid(): bool - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets type - * - * @return \Bandwidth\Model\RbmActionTypeEnum - */ - public function getType(): \Bandwidth\Model\RbmActionTypeEnum - { - return $this->container['type']; - } - - /** - * Sets type - * - * @param \Bandwidth\Model\RbmActionTypeEnum $type type - * - * @return $this - */ - public function setType(\Bandwidth\Model\RbmActionTypeEnum $type): static - { - if (is_null($type)) { - throw new InvalidArgumentException('non-nullable type cannot be null'); - } - $this->container['type'] = $type; - - return $this; - } - - /** - * Gets text - * - * @return string - */ - public function getText(): string - { - return $this->container['text']; - } - - /** - * Sets text - * - * @param string $text Displayed text for user to click - * - * @return $this - */ - public function setText(string $text): static - { - if (is_null($text)) { - throw new InvalidArgumentException('non-nullable text cannot be null'); - } - if ((mb_strlen($text) > 25)) { - throw new InvalidArgumentException('invalid length for $text when calling MultiChannelAction., must be smaller than or equal to 25.'); - } - - $this->container['text'] = $text; - - return $this; - } - - /** - * Gets postback_data - * - * @return string - */ - public function getPostbackData(): string - { - return $this->container['postback_data']; - } - - /** - * Sets postback_data - * - * @param string $postback_data Base64 payload the customer receives when the reply is clicked. - * - * @return $this - */ - public function setPostbackData(string $postback_data): static - { - if (is_null($postback_data)) { - throw new InvalidArgumentException('non-nullable postback_data cannot be null'); - } - if ((mb_strlen($postback_data) > 2048)) { - throw new InvalidArgumentException('invalid length for $postback_data when calling MultiChannelAction., must be smaller than or equal to 2048.'); - } - - $this->container['postback_data'] = $postback_data; - - return $this; - } - - /** - * Gets phone_number - * - * @return string - */ - public function getPhoneNumber(): string - { - return $this->container['phone_number']; - } - - /** - * Sets phone_number - * - * @param string $phone_number The phone number to dial. Must be E164 format. - * - * @return $this - */ - public function setPhoneNumber(string $phone_number): static - { - if (is_null($phone_number)) { - throw new InvalidArgumentException('non-nullable phone_number cannot be null'); - } - $this->container['phone_number'] = $phone_number; - - return $this; - } - - /** - * Gets latitude - * - * @return float - */ - public function getLatitude(): float - { - return $this->container['latitude']; - } - - /** - * Sets latitude - * - * @param float $latitude The latitude of the location. Must be in range [-90.000000, 90.000000]. - * - * @return $this - */ - public function setLatitude(float $latitude): static - { - if (is_null($latitude)) { - throw new InvalidArgumentException('non-nullable latitude cannot be null'); - } - $this->container['latitude'] = $latitude; - - return $this; - } - - /** - * Gets longitude - * - * @return float - */ - public function getLongitude(): float - { - return $this->container['longitude']; - } - - /** - * Sets longitude - * - * @param float $longitude The longitude of the location. Must be in range [-180.000000, 180.000000]. - * - * @return $this - */ - public function setLongitude(float $longitude): static - { - if (is_null($longitude)) { - throw new InvalidArgumentException('non-nullable longitude cannot be null'); - } - $this->container['longitude'] = $longitude; - - return $this; - } - - /** - * Gets label - * - * @return string|null - */ - public function getLabel(): ?string - { - return $this->container['label']; - } - - /** - * Sets label - * - * @param string|null $label The label of the location. - * - * @return $this - */ - public function setLabel(?string $label): static - { - if (is_null($label)) { - throw new InvalidArgumentException('non-nullable label cannot be null'); - } - if ((mb_strlen($label) > 100)) { - throw new InvalidArgumentException('invalid length for $label when calling MultiChannelAction., must be smaller than or equal to 100.'); - } - - $this->container['label'] = $label; - - return $this; - } - - /** - * Gets title - * - * @return string - */ - public function getTitle(): string - { - return $this->container['title']; - } - - /** - * Sets title - * - * @param string $title The title of the event. - * - * @return $this - */ - public function setTitle(string $title): static - { - if (is_null($title)) { - throw new InvalidArgumentException('non-nullable title cannot be null'); - } - if ((mb_strlen($title) > 100)) { - throw new InvalidArgumentException('invalid length for $title when calling MultiChannelAction., must be smaller than or equal to 100.'); - } - - $this->container['title'] = $title; - - return $this; - } - - /** - * Gets start_time - * - * @return \DateTime - */ - public function getStartTime(): \DateTime - { - return $this->container['start_time']; - } - - /** - * Sets start_time - * - * @param \DateTime $start_time The start time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. - * - * @return $this - */ - public function setStartTime(\DateTime $start_time): static - { - if (is_null($start_time)) { - throw new InvalidArgumentException('non-nullable start_time cannot be null'); - } - $this->container['start_time'] = $start_time; - - return $this; - } - - /** - * Gets end_time - * - * @return \DateTime - */ - public function getEndTime(): \DateTime - { - return $this->container['end_time']; - } - - /** - * Sets end_time - * - * @param \DateTime $end_time The end time of the event. Must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. - * - * @return $this - */ - public function setEndTime(\DateTime $end_time): static - { - if (is_null($end_time)) { - throw new InvalidArgumentException('non-nullable end_time cannot be null'); - } - $this->container['end_time'] = $end_time; - - return $this; - } - - /** - * Gets description - * - * @return string|null - */ - public function getDescription(): ?string - { - return $this->container['description']; - } - - /** - * Sets description - * - * @param string|null $description The description of the event. - * - * @return $this - */ - public function setDescription(?string $description): static - { - if (is_null($description)) { - throw new InvalidArgumentException('non-nullable description cannot be null'); - } - if ((mb_strlen($description) > 500)) { - throw new InvalidArgumentException('invalid length for $description when calling MultiChannelAction., must be smaller than or equal to 500.'); - } - - $this->container['description'] = $description; - - return $this; - } - - /** - * Gets url - * - * @return string - */ - public function getUrl(): string - { - return $this->container['url']; - } - - /** - * Sets url - * - * @param string $url The URL to open in browser. Must use http:// or https:// scheme. - * - * @return $this - */ - public function setUrl(string $url): static - { - if (is_null($url)) { - throw new InvalidArgumentException('non-nullable url cannot be null'); - } - if ((mb_strlen($url) > 2048)) { - throw new InvalidArgumentException('invalid length for $url when calling MultiChannelAction., must be smaller than or equal to 2048.'); - } - - $this->container['url'] = $url; - - return $this; - } - - /** - * Gets application - * - * @return \Bandwidth\Model\RbmOpenUrlEnum|null - */ - public function getApplication(): ?\Bandwidth\Model\RbmOpenUrlEnum - { - return $this->container['application']; - } - - /** - * Sets application - * - * @param \Bandwidth\Model\RbmOpenUrlEnum|null $application application - * - * @return $this - */ - public function setApplication(?\Bandwidth\Model\RbmOpenUrlEnum $application): static - { - if (is_null($application)) { - throw new InvalidArgumentException('non-nullable application cannot be null'); - } - $this->container['application'] = $application; - - return $this; - } - - /** - * Gets webview_view_mode - * - * @return \Bandwidth\Model\RbmWebViewEnum|null - */ - public function getWebviewViewMode(): ?\Bandwidth\Model\RbmWebViewEnum - { - return $this->container['webview_view_mode']; - } - - /** - * Sets webview_view_mode - * - * @param \Bandwidth\Model\RbmWebViewEnum|null $webview_view_mode webview_view_mode - * - * @return $this - */ - public function setWebviewViewMode(?\Bandwidth\Model\RbmWebViewEnum $webview_view_mode): static - { - if (is_null($webview_view_mode)) { - throw new InvalidArgumentException('non-nullable webview_view_mode cannot be null'); - } - $this->container['webview_view_mode'] = $webview_view_mode; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param int|string $offset Offset - * - * @return boolean - */ - public function offsetExists(mixed $offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param int|string $offset Offset - * - * @return mixed|null - */ - #[ReturnTypeWillChange] - public function offsetGet(mixed $offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|string|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param int|string $offset Offset - * - * @return void - */ - public function offsetUnset(mixed $offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[ReturnTypeWillChange] - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue(): string + public static function getComposedDiscriminatorMappings(): array { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return [ + 'CREATE_CALENDAR_EVENT' => '\Bandwidth\Model\MultiChannelActionCalendarEvent', + 'DIAL_PHONE' => '\Bandwidth\Model\RbmActionDial', + 'OPEN_URL' => '\Bandwidth\Model\RbmActionOpenUrl', + 'REPLY' => '\Bandwidth\Model\RbmActionBase', + 'REQUEST_LOCATION' => '\Bandwidth\Model\RbmActionBase', + 'SHOW_LOCATION' => '\Bandwidth\Model\RbmActionViewLocation' + ]; } } diff --git a/src/Model/MultiChannelActionCalendarEvent.php b/src/Model/MultiChannelActionCalendarEvent.php index 502981cc..48b5d551 100644 --- a/src/Model/MultiChannelActionCalendarEvent.php +++ b/src/Model/MultiChannelActionCalendarEvent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -307,10 +307,6 @@ public function listInvalidProperties(): array if ($this->container['postback_data'] === null) { $invalidProperties[] = "'postback_data' can't be null"; } - if ((mb_strlen($this->container['postback_data']) > 2048)) { - $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; - } - if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } @@ -420,9 +416,6 @@ public function setPostbackData(string $postback_data): static if (is_null($postback_data)) { throw new InvalidArgumentException('non-nullable postback_data cannot be null'); } - if ((mb_strlen($postback_data) > 2048)) { - throw new InvalidArgumentException('invalid length for $postback_data when calling MultiChannelActionCalendarEvent., must be smaller than or equal to 2048.'); - } $this->container['postback_data'] = $postback_data; diff --git a/src/Model/MultiChannelChannelListMMSObject.php b/src/Model/MultiChannelChannelListMMSObject.php index 294b600b..ffa161c5 100644 --- a/src/Model/MultiChannelChannelListMMSObject.php +++ b/src/Model/MultiChannelChannelListMMSObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelChannelListMMSResponseObject.php b/src/Model/MultiChannelChannelListMMSResponseObject.php index 031a89f0..7561c1e7 100644 --- a/src/Model/MultiChannelChannelListMMSResponseObject.php +++ b/src/Model/MultiChannelChannelListMMSResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelChannelListObjectBase.php b/src/Model/MultiChannelChannelListObjectBase.php index 2caba3e9..4d230798 100644 --- a/src/Model/MultiChannelChannelListObjectBase.php +++ b/src/Model/MultiChannelChannelListObjectBase.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelChannelListOwnerObject.php b/src/Model/MultiChannelChannelListOwnerObject.php index 7c396157..f970d05e 100644 --- a/src/Model/MultiChannelChannelListOwnerObject.php +++ b/src/Model/MultiChannelChannelListOwnerObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelChannelListRBMObject.php b/src/Model/MultiChannelChannelListRBMObject.php index 9bd9312b..f3400095 100644 --- a/src/Model/MultiChannelChannelListRBMObject.php +++ b/src/Model/MultiChannelChannelListRBMObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -381,9 +381,9 @@ public function setChannel(\Bandwidth\Model\MultiChannelMessageChannelEnum $chan /** * Gets content * - * @return \Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent + * @return \Bandwidth\Model\RbmMessageContentText|\Bandwidth\Model\RbmMessageMedia|\Bandwidth\Model\RbmStandaloneCard|\Bandwidth\Model\RbmMessageCarouselCard */ - public function getContent(): \Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent + public function getContent(): \Bandwidth\Model\RbmMessageContentText|\Bandwidth\Model\RbmMessageMedia|\Bandwidth\Model\RbmStandaloneCard|\Bandwidth\Model\RbmMessageCarouselCard { return $this->container['content']; } @@ -391,11 +391,11 @@ public function getContent(): \Bandwidth\Model\MultiChannelChannelListRBMObjectA /** * Sets content * - * @param \Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent $content content + * @param \Bandwidth\Model\RbmMessageContentText|\Bandwidth\Model\RbmMessageMedia|\Bandwidth\Model\RbmStandaloneCard|\Bandwidth\Model\RbmMessageCarouselCard $content content * * @return $this */ - public function setContent(\Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent $content): static + public function setContent(\Bandwidth\Model\RbmMessageContentText|\Bandwidth\Model\RbmMessageMedia|\Bandwidth\Model\RbmStandaloneCard|\Bandwidth\Model\RbmMessageCarouselCard $content): static { if (is_null($content)) { throw new InvalidArgumentException('non-nullable content cannot be null'); diff --git a/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php b/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php index 64a34935..6db5a02a 100644 --- a/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php +++ b/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -28,12 +28,6 @@ namespace Bandwidth\Model; -use ArrayAccess; -use JsonSerializable; -use InvalidArgumentException; -use ReturnTypeWillChange; -use Bandwidth\ObjectSerializer; - /** * MultiChannelChannelListRBMObjectAllOfContent Class Doc Comment * @@ -41,631 +35,51 @@ * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements ArrayAccess */ -class MultiChannelChannelListRBMObjectAllOfContent implements ModelInterface, ArrayAccess, JsonSerializable +class MultiChannelChannelListRBMObjectAllOfContent implements ComposedInterface { - public const DISCRIMINATOR = null; - /** * The original name of the model. * * @var string */ - protected static string $openAPIModelName = 'multiChannelChannelListRBMObject_allOf_content'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPITypes = [ - 'text' => 'string', - 'suggestions' => '\Bandwidth\Model\MultiChannelAction[]', - 'media' => '\Bandwidth\Model\RbmMessageContentFile[]', - 'orientation' => '\Bandwidth\Model\StandaloneCardOrientationEnum', - 'thumbnail_image_alignment' => '\Bandwidth\Model\ThumbnailAlignmentEnum', - 'card_content' => '\Bandwidth\Model\RbmCardContent', - 'card_width' => '\Bandwidth\Model\CardWidthEnum', - 'card_contents' => '\Bandwidth\Model\RbmCardContent[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPIFormats = [ - 'text' => null, - 'suggestions' => null, - 'media' => null, - 'orientation' => null, - 'thumbnail_image_alignment' => null, - 'card_content' => null, - 'card_width' => null, - 'card_contents' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ - protected static array $openAPINullables = [ - 'text' => false, - 'suggestions' => false, - 'media' => false, - 'orientation' => false, - 'thumbnail_image_alignment' => false, - 'card_content' => false, - 'card_width' => false, - 'card_contents' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ - protected array $openAPINullablesSetToNull = []; - - /** - * {@inheritdoc} - */ - public static function openAPITypes(): array - { - return self::$openAPITypes; - } - - /** - * {@inheritdoc} - */ - public static function openAPIFormats(): array - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return array - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param array $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * {@inheritdoc} - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * {@inheritdoc} - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var array - */ - protected static array $attributeMap = [ - 'text' => 'text', - 'suggestions' => 'suggestions', - 'media' => 'media', - 'orientation' => 'orientation', - 'thumbnail_image_alignment' => 'thumbnailImageAlignment', - 'card_content' => 'cardContent', - 'card_width' => 'cardWidth', - 'card_contents' => 'cardContents' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var array - */ - protected static array $setters = [ - 'text' => 'setText', - 'suggestions' => 'setSuggestions', - 'media' => 'setMedia', - 'orientation' => 'setOrientation', - 'thumbnail_image_alignment' => 'setThumbnailImageAlignment', - 'card_content' => 'setCardContent', - 'card_width' => 'setCardWidth', - 'card_contents' => 'setCardContents' - ]; + public const MODEL_NAME = 'multiChannelChannelListRBMObject_allOf_content'; /** - * Array of attributes to getter functions (for serialization of requests) + * The discriminator property name, or null when the schema has no discriminator. * - * @var array - */ - protected static array $getters = [ - 'text' => 'getText', - 'suggestions' => 'getSuggestions', - 'media' => 'getMedia', - 'orientation' => 'getOrientation', - 'thumbnail_image_alignment' => 'getThumbnailImageAlignment', - 'card_content' => 'getCardContent', - 'card_width' => 'getCardWidth', - 'card_contents' => 'getCardContents' - ]; - - /** - * {@inheritdoc} - */ - public static function attributeMap(): array - { - return self::$attributeMap; - } - - /** - * {@inheritdoc} - */ - public static function setters(): array - { - return self::$setters; - } - - /** - * {@inheritdoc} + * @var string|null */ - public static function getters(): array - { - return self::$getters; - } + public const DISCRIMINATOR = null; /** * {@inheritdoc} */ - public function getModelName(): string - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var array - */ - protected array $container = []; - - /** - * Constructor - * - * @param array $data Associated array of property values initializing the model - */ - public function __construct(?array $data = null) - { - $this->setIfExists('text', $data ?? [], null); - $this->setIfExists('suggestions', $data ?? [], null); - $this->setIfExists('media', $data ?? [], null); - $this->setIfExists('orientation', $data ?? [], null); - $this->setIfExists('thumbnail_image_alignment', $data ?? [], null); - $this->setIfExists('card_content', $data ?? [], null); - $this->setIfExists('card_width', $data ?? [], null); - $this->setIfExists('card_contents', $data ?? [], null); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + public static function getComposedTypes(): array { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + return [ + '\Bandwidth\Model\RbmMessageContentText', + '\Bandwidth\Model\RbmMessageMedia', + '\Bandwidth\Model\RbmMessageContentRichCard' + ]; } /** * {@inheritdoc} */ - public function listInvalidProperties(): array + public static function getComposedDiscriminator(): ?string { - $invalidProperties = []; - - if ($this->container['text'] === null) { - $invalidProperties[] = "'text' can't be null"; - } - if ((mb_strlen($this->container['text']) > 3270)) { - $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 3270."; - } - - if (!is_null($this->container['suggestions']) && (count($this->container['suggestions']) > 11)) { - $invalidProperties[] = "invalid value for 'suggestions', number of items must be less than or equal to 11."; - } - - if ($this->container['media'] === null) { - $invalidProperties[] = "'media' can't be null"; - } - if ($this->container['orientation'] === null) { - $invalidProperties[] = "'orientation' can't be null"; - } - if ($this->container['card_content'] === null) { - $invalidProperties[] = "'card_content' can't be null"; - } - if ($this->container['card_width'] === null) { - $invalidProperties[] = "'card_width' can't be null"; - } - if ($this->container['card_contents'] === null) { - $invalidProperties[] = "'card_contents' can't be null"; - } - if ((count($this->container['card_contents']) > 10)) { - $invalidProperties[] = "invalid value for 'card_contents', number of items must be less than or equal to 10."; - } - - if ((count($this->container['card_contents']) < 2)) { - $invalidProperties[] = "invalid value for 'card_contents', number of items must be greater than or equal to 2."; - } - - return $invalidProperties; + return self::DISCRIMINATOR; } /** * {@inheritdoc} */ - public function valid(): bool - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets text - * - * @return string - */ - public function getText(): string - { - return $this->container['text']; - } - - /** - * Sets text - * - * @param string $text The text associated with the message. Must be 3270 characters or less - * - * @return $this - */ - public function setText(string $text): static - { - if (is_null($text)) { - throw new InvalidArgumentException('non-nullable text cannot be null'); - } - if ((mb_strlen($text) > 3270)) { - throw new InvalidArgumentException('invalid length for $text when calling MultiChannelChannelListRBMObjectAllOfContent., must be smaller than or equal to 3270.'); - } - - $this->container['text'] = $text; - - return $this; - } - - /** - * Gets suggestions - * - * @return \Bandwidth\Model\MultiChannelAction[]|null - */ - public function getSuggestions(): ?array - { - return $this->container['suggestions']; - } - - /** - * Sets suggestions - * - * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. - * - * @return $this - */ - public function setSuggestions(?array $suggestions): static - { - if (is_null($suggestions)) { - throw new InvalidArgumentException('non-nullable suggestions cannot be null'); - } - - if ((count($suggestions) > 11)) { - throw new InvalidArgumentException('invalid value for $suggestions when calling MultiChannelChannelListRBMObjectAllOfContent., number of items must be less than or equal to 11.'); - } - $this->container['suggestions'] = $suggestions; - - return $this; - } - - /** - * Gets media - * - * @return \Bandwidth\Model\RbmMessageContentFile[] - */ - public function getMedia(): array - { - return $this->container['media']; - } - - /** - * Sets media - * - * @param \Bandwidth\Model\RbmMessageContentFile[] $media media - * - * @return $this - */ - public function setMedia(array $media): static - { - if (is_null($media)) { - throw new InvalidArgumentException('non-nullable media cannot be null'); - } - $this->container['media'] = $media; - - return $this; - } - - /** - * Gets orientation - * - * @return \Bandwidth\Model\StandaloneCardOrientationEnum - */ - public function getOrientation(): \Bandwidth\Model\StandaloneCardOrientationEnum - { - return $this->container['orientation']; - } - - /** - * Sets orientation - * - * @param \Bandwidth\Model\StandaloneCardOrientationEnum $orientation orientation - * - * @return $this - */ - public function setOrientation(\Bandwidth\Model\StandaloneCardOrientationEnum $orientation): static - { - if (is_null($orientation)) { - throw new InvalidArgumentException('non-nullable orientation cannot be null'); - } - $this->container['orientation'] = $orientation; - - return $this; - } - - /** - * Gets thumbnail_image_alignment - * - * @return \Bandwidth\Model\ThumbnailAlignmentEnum|null - */ - public function getThumbnailImageAlignment(): ?\Bandwidth\Model\ThumbnailAlignmentEnum - { - return $this->container['thumbnail_image_alignment']; - } - - /** - * Sets thumbnail_image_alignment - * - * @param \Bandwidth\Model\ThumbnailAlignmentEnum|null $thumbnail_image_alignment thumbnail_image_alignment - * - * @return $this - */ - public function setThumbnailImageAlignment(?\Bandwidth\Model\ThumbnailAlignmentEnum $thumbnail_image_alignment): static - { - if (is_null($thumbnail_image_alignment)) { - throw new InvalidArgumentException('non-nullable thumbnail_image_alignment cannot be null'); - } - $this->container['thumbnail_image_alignment'] = $thumbnail_image_alignment; - - return $this; - } - - /** - * Gets card_content - * - * @return \Bandwidth\Model\RbmCardContent - */ - public function getCardContent(): \Bandwidth\Model\RbmCardContent - { - return $this->container['card_content']; - } - - /** - * Sets card_content - * - * @param \Bandwidth\Model\RbmCardContent $card_content card_content - * - * @return $this - */ - public function setCardContent(\Bandwidth\Model\RbmCardContent $card_content): static - { - if (is_null($card_content)) { - throw new InvalidArgumentException('non-nullable card_content cannot be null'); - } - $this->container['card_content'] = $card_content; - - return $this; - } - - /** - * Gets card_width - * - * @return \Bandwidth\Model\CardWidthEnum - */ - public function getCardWidth(): \Bandwidth\Model\CardWidthEnum - { - return $this->container['card_width']; - } - - /** - * Sets card_width - * - * @param \Bandwidth\Model\CardWidthEnum $card_width card_width - * - * @return $this - */ - public function setCardWidth(\Bandwidth\Model\CardWidthEnum $card_width): static - { - if (is_null($card_width)) { - throw new InvalidArgumentException('non-nullable card_width cannot be null'); - } - $this->container['card_width'] = $card_width; - - return $this; - } - - /** - * Gets card_contents - * - * @return \Bandwidth\Model\RbmCardContent[] - */ - public function getCardContents(): array - { - return $this->container['card_contents']; - } - - /** - * Sets card_contents - * - * @param \Bandwidth\Model\RbmCardContent[] $card_contents card_contents - * - * @return $this - */ - public function setCardContents(array $card_contents): static - { - if (is_null($card_contents)) { - throw new InvalidArgumentException('non-nullable card_contents cannot be null'); - } - - if ((count($card_contents) > 10)) { - throw new InvalidArgumentException('invalid value for $card_contents when calling MultiChannelChannelListRBMObjectAllOfContent., number of items must be less than or equal to 10.'); - } - if ((count($card_contents) < 2)) { - throw new InvalidArgumentException('invalid length for $card_contents when calling MultiChannelChannelListRBMObjectAllOfContent., number of items must be greater than or equal to 2.'); - } - $this->container['card_contents'] = $card_contents; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param int|string $offset Offset - * - * @return boolean - */ - public function offsetExists(mixed $offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param int|string $offset Offset - * - * @return mixed|null - */ - #[ReturnTypeWillChange] - public function offsetGet(mixed $offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|string|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param int|string $offset Offset - * - * @return void - */ - public function offsetUnset(mixed $offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[ReturnTypeWillChange] - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue(): string + public static function getComposedDiscriminatorMappings(): array { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return [ + + ]; } } diff --git a/src/Model/MultiChannelChannelListRBMResponseObject.php b/src/Model/MultiChannelChannelListRBMResponseObject.php index f3c5ecf0..a3a7f381 100644 --- a/src/Model/MultiChannelChannelListRBMResponseObject.php +++ b/src/Model/MultiChannelChannelListRBMResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -391,9 +391,9 @@ public function setChannel(\Bandwidth\Model\MultiChannelMessageChannelEnum $chan /** * Gets content * - * @return \Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent + * @return \Bandwidth\Model\RbmMessageContentText|\Bandwidth\Model\RbmMessageMedia|\Bandwidth\Model\RbmStandaloneCard|\Bandwidth\Model\RbmMessageCarouselCard */ - public function getContent(): \Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent + public function getContent(): \Bandwidth\Model\RbmMessageContentText|\Bandwidth\Model\RbmMessageMedia|\Bandwidth\Model\RbmStandaloneCard|\Bandwidth\Model\RbmMessageCarouselCard { return $this->container['content']; } @@ -401,11 +401,11 @@ public function getContent(): \Bandwidth\Model\MultiChannelChannelListRBMObjectA /** * Sets content * - * @param \Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent $content content + * @param \Bandwidth\Model\RbmMessageContentText|\Bandwidth\Model\RbmMessageMedia|\Bandwidth\Model\RbmStandaloneCard|\Bandwidth\Model\RbmMessageCarouselCard $content content * * @return $this */ - public function setContent(\Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent $content): static + public function setContent(\Bandwidth\Model\RbmMessageContentText|\Bandwidth\Model\RbmMessageMedia|\Bandwidth\Model\RbmStandaloneCard|\Bandwidth\Model\RbmMessageCarouselCard $content): static { if (is_null($content)) { throw new InvalidArgumentException('non-nullable content cannot be null'); diff --git a/src/Model/MultiChannelChannelListRequestObject.php b/src/Model/MultiChannelChannelListRequestObject.php index 0f24829c..c2558dea 100644 --- a/src/Model/MultiChannelChannelListRequestObject.php +++ b/src/Model/MultiChannelChannelListRequestObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -28,476 +28,59 @@ namespace Bandwidth\Model; -use ArrayAccess; -use JsonSerializable; -use InvalidArgumentException; -use ReturnTypeWillChange; -use Bandwidth\ObjectSerializer; - /** * MultiChannelChannelListRequestObject Class Doc Comment * * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements ArrayAccess */ -class MultiChannelChannelListRequestObject implements ModelInterface, ArrayAccess, JsonSerializable +class MultiChannelChannelListRequestObject implements ComposedInterface { - public const DISCRIMINATOR = 'channel'; - /** * The original name of the model. * * @var string */ - protected static string $openAPIModelName = 'multiChannelChannelListRequestObject'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPITypes = [ - 'from' => 'string', - 'application_id' => 'string', - 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum', - 'content' => '\Bandwidth\Model\MmsMessageContent' - ]; + public const MODEL_NAME = 'multiChannelChannelListRequestObject'; /** - * Array of property to format mappings. Used for (de)serialization + * The discriminator property name, or null when the schema has no discriminator. * - * @var array + * @var string|null */ - protected static array $openAPIFormats = [ - 'from' => null, - 'application_id' => null, - 'channel' => null, - 'content' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ - protected static array $openAPINullables = [ - 'from' => false, - 'application_id' => false, - 'channel' => false, - 'content' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ - protected array $openAPINullablesSetToNull = []; - - /** - * {@inheritdoc} - */ - public static function openAPITypes(): array - { - return self::$openAPITypes; - } - - /** - * {@inheritdoc} - */ - public static function openAPIFormats(): array - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return array - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param array $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * {@inheritdoc} - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * {@inheritdoc} - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var array - */ - protected static array $attributeMap = [ - 'from' => 'from', - 'application_id' => 'applicationId', - 'channel' => 'channel', - 'content' => 'content' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var array - */ - protected static array $setters = [ - 'from' => 'setFrom', - 'application_id' => 'setApplicationId', - 'channel' => 'setChannel', - 'content' => 'setContent' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var array - */ - protected static array $getters = [ - 'from' => 'getFrom', - 'application_id' => 'getApplicationId', - 'channel' => 'getChannel', - 'content' => 'getContent' - ]; - - /** - * {@inheritdoc} - */ - public static function attributeMap(): array - { - return self::$attributeMap; - } - - /** - * {@inheritdoc} - */ - public static function setters(): array - { - return self::$setters; - } - - /** - * {@inheritdoc} - */ - public static function getters(): array - { - return self::$getters; - } + public const DISCRIMINATOR = 'channel'; /** * {@inheritdoc} */ - public function getModelName(): string - { - return self::$openAPIModelName; - } - - public const CHANNEL_MMS = 'MMS'; - public const CHANNEL_RBM = 'RBM'; - public const CHANNEL_SMS = 'SMS'; - - /** - * Associative array for storing property values - * - * @var array - */ - protected array $container = []; - - /** - * Constructor - * - * @param array $data Associated array of property values initializing the model - */ - public function __construct(?array $data = null) - { - // Initialize discriminator property with the model name. - $this->container['channel'] = static::$openAPIModelName; - - $this->setIfExists('from', $data ?? [], null); - $this->setIfExists('application_id', $data ?? [], null); - $this->setIfExists('channel', $data ?? [], null); - $this->setIfExists('content', $data ?? [], null); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + public static function getComposedTypes(): array { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + return [ + '\Bandwidth\Model\MultiChannelChannelListRBMObject', + '\Bandwidth\Model\MultiChannelChannelListSMSObject', + '\Bandwidth\Model\MultiChannelChannelListMMSObject' + ]; } /** * {@inheritdoc} */ - public function listInvalidProperties(): array + public static function getComposedDiscriminator(): ?string { - $invalidProperties = []; - - if ($this->container['from'] === null) { - $invalidProperties[] = "'from' can't be null"; - } - if ($this->container['application_id'] === null) { - $invalidProperties[] = "'application_id' can't be null"; - } - if ($this->container['channel'] === null) { - $invalidProperties[] = "'channel' can't be null"; - } - if ($this->container['content'] === null) { - $invalidProperties[] = "'content' can't be null"; - } - return $invalidProperties; + return self::DISCRIMINATOR; } /** * {@inheritdoc} */ - public function valid(): bool - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets from - * - * @return string - */ - public function getFrom(): string - { - return $this->container['from']; - } - - /** - * Sets from - * - * @param string $from The sender ID of the message. This could be an alphanumeric sender ID. - * - * @return $this - */ - public function setFrom(string $from): static - { - if (is_null($from)) { - throw new InvalidArgumentException('non-nullable from cannot be null'); - } - $this->container['from'] = $from; - - return $this; - } - - /** - * Gets application_id - * - * @return string - */ - public function getApplicationId(): string - { - return $this->container['application_id']; - } - - /** - * Sets application_id - * - * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. - * - * @return $this - */ - public function setApplicationId(string $application_id): static - { - if (is_null($application_id)) { - throw new InvalidArgumentException('non-nullable application_id cannot be null'); - } - $this->container['application_id'] = $application_id; - - return $this; - } - - /** - * Gets channel - * - * @return \Bandwidth\Model\MultiChannelMessageChannelEnum - */ - public function getChannel(): \Bandwidth\Model\MultiChannelMessageChannelEnum - { - return $this->container['channel']; - } - - /** - * Sets channel - * - * @param \Bandwidth\Model\MultiChannelMessageChannelEnum $channel channel - * - * @return $this - */ - public function setChannel(\Bandwidth\Model\MultiChannelMessageChannelEnum $channel): static - { - if (is_null($channel)) { - throw new InvalidArgumentException('non-nullable channel cannot be null'); - } - $this->container['channel'] = $channel; - - return $this; - } - - /** - * Gets content - * - * @return \Bandwidth\Model\MmsMessageContent - */ - public function getContent(): \Bandwidth\Model\MmsMessageContent - { - return $this->container['content']; - } - - /** - * Sets content - * - * @param \Bandwidth\Model\MmsMessageContent $content content - * - * @return $this - */ - public function setContent(\Bandwidth\Model\MmsMessageContent $content): static - { - if (is_null($content)) { - throw new InvalidArgumentException('non-nullable content cannot be null'); - } - $this->container['content'] = $content; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param int|string $offset Offset - * - * @return boolean - */ - public function offsetExists(mixed $offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param int|string $offset Offset - * - * @return mixed|null - */ - #[ReturnTypeWillChange] - public function offsetGet(mixed $offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|string|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param int|string $offset Offset - * - * @return void - */ - public function offsetUnset(mixed $offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[ReturnTypeWillChange] - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue(): string + public static function getComposedDiscriminatorMappings(): array { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return [ + 'MMS' => '\Bandwidth\Model\MultiChannelChannelListMMSObject', + 'RBM' => '\Bandwidth\Model\MultiChannelChannelListRBMObject', + 'SMS' => '\Bandwidth\Model\MultiChannelChannelListSMSObject' + ]; } } diff --git a/src/Model/MultiChannelChannelListResponseObject.php b/src/Model/MultiChannelChannelListResponseObject.php index dbead3ff..5920a678 100644 --- a/src/Model/MultiChannelChannelListResponseObject.php +++ b/src/Model/MultiChannelChannelListResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -28,513 +28,59 @@ namespace Bandwidth\Model; -use ArrayAccess; -use JsonSerializable; -use InvalidArgumentException; -use ReturnTypeWillChange; -use Bandwidth\ObjectSerializer; - /** * MultiChannelChannelListResponseObject Class Doc Comment * * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements ArrayAccess */ -class MultiChannelChannelListResponseObject implements ModelInterface, ArrayAccess, JsonSerializable +class MultiChannelChannelListResponseObject implements ComposedInterface { - public const DISCRIMINATOR = 'channel'; - /** * The original name of the model. * * @var string */ - protected static string $openAPIModelName = 'multiChannelChannelListResponseObject'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPITypes = [ - 'from' => 'string', - 'application_id' => 'string', - 'channel' => '\Bandwidth\Model\MultiChannelMessageChannelEnum', - 'content' => '\Bandwidth\Model\MmsMessageContent', - 'owner' => 'string' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPIFormats = [ - 'from' => null, - 'application_id' => null, - 'channel' => null, - 'content' => null, - 'owner' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ - protected static array $openAPINullables = [ - 'from' => false, - 'application_id' => false, - 'channel' => false, - 'content' => false, - 'owner' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ - protected array $openAPINullablesSetToNull = []; - - /** - * {@inheritdoc} - */ - public static function openAPITypes(): array - { - return self::$openAPITypes; - } - - /** - * {@inheritdoc} - */ - public static function openAPIFormats(): array - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return array - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param array $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * {@inheritdoc} - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * {@inheritdoc} - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name - * - * @var array - */ - protected static array $attributeMap = [ - 'from' => 'from', - 'application_id' => 'applicationId', - 'channel' => 'channel', - 'content' => 'content', - 'owner' => 'owner' - ]; + public const MODEL_NAME = 'multiChannelChannelListResponseObject'; /** - * Array of attributes to setter functions (for deserialization of responses) + * The discriminator property name, or null when the schema has no discriminator. * - * @var array - */ - protected static array $setters = [ - 'from' => 'setFrom', - 'application_id' => 'setApplicationId', - 'channel' => 'setChannel', - 'content' => 'setContent', - 'owner' => 'setOwner' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var array - */ - protected static array $getters = [ - 'from' => 'getFrom', - 'application_id' => 'getApplicationId', - 'channel' => 'getChannel', - 'content' => 'getContent', - 'owner' => 'getOwner' - ]; - - /** - * {@inheritdoc} - */ - public static function attributeMap(): array - { - return self::$attributeMap; - } - - /** - * {@inheritdoc} - */ - public static function setters(): array - { - return self::$setters; - } - - /** - * {@inheritdoc} + * @var string|null */ - public static function getters(): array - { - return self::$getters; - } + public const DISCRIMINATOR = 'channel'; /** * {@inheritdoc} */ - public function getModelName(): string - { - return self::$openAPIModelName; - } - - public const CHANNEL_MMS = 'MMS'; - public const CHANNEL_RBM = 'RBM'; - public const CHANNEL_SMS = 'SMS'; - - /** - * Associative array for storing property values - * - * @var array - */ - protected array $container = []; - - /** - * Constructor - * - * @param array $data Associated array of property values initializing the model - */ - public function __construct(?array $data = null) - { - // Initialize discriminator property with the model name. - $this->container['channel'] = static::$openAPIModelName; - - $this->setIfExists('from', $data ?? [], null); - $this->setIfExists('application_id', $data ?? [], null); - $this->setIfExists('channel', $data ?? [], null); - $this->setIfExists('content', $data ?? [], null); - $this->setIfExists('owner', $data ?? [], null); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + public static function getComposedTypes(): array { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + return [ + '\Bandwidth\Model\MultiChannelChannelListRBMResponseObject', + '\Bandwidth\Model\MultiChannelChannelListSMSResponseObject', + '\Bandwidth\Model\MultiChannelChannelListMMSResponseObject' + ]; } /** * {@inheritdoc} */ - public function listInvalidProperties(): array + public static function getComposedDiscriminator(): ?string { - $invalidProperties = []; - - if ($this->container['from'] === null) { - $invalidProperties[] = "'from' can't be null"; - } - if ($this->container['application_id'] === null) { - $invalidProperties[] = "'application_id' can't be null"; - } - if ($this->container['channel'] === null) { - $invalidProperties[] = "'channel' can't be null"; - } - if ($this->container['content'] === null) { - $invalidProperties[] = "'content' can't be null"; - } - if ($this->container['owner'] === null) { - $invalidProperties[] = "'owner' can't be null"; - } - return $invalidProperties; + return self::DISCRIMINATOR; } /** * {@inheritdoc} */ - public function valid(): bool - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets from - * - * @return string - */ - public function getFrom(): string - { - return $this->container['from']; - } - - /** - * Sets from - * - * @param string $from The sender ID of the message. This could be an alphanumeric sender ID. - * - * @return $this - */ - public function setFrom(string $from): static - { - if (is_null($from)) { - throw new InvalidArgumentException('non-nullable from cannot be null'); - } - $this->container['from'] = $from; - - return $this; - } - - /** - * Gets application_id - * - * @return string - */ - public function getApplicationId(): string - { - return $this->container['application_id']; - } - - /** - * Sets application_id - * - * @param string $application_id The ID of the Application your from number or senderId is associated with in the Bandwidth App. - * - * @return $this - */ - public function setApplicationId(string $application_id): static - { - if (is_null($application_id)) { - throw new InvalidArgumentException('non-nullable application_id cannot be null'); - } - $this->container['application_id'] = $application_id; - - return $this; - } - - /** - * Gets channel - * - * @return \Bandwidth\Model\MultiChannelMessageChannelEnum - */ - public function getChannel(): \Bandwidth\Model\MultiChannelMessageChannelEnum - { - return $this->container['channel']; - } - - /** - * Sets channel - * - * @param \Bandwidth\Model\MultiChannelMessageChannelEnum $channel channel - * - * @return $this - */ - public function setChannel(\Bandwidth\Model\MultiChannelMessageChannelEnum $channel): static - { - if (is_null($channel)) { - throw new InvalidArgumentException('non-nullable channel cannot be null'); - } - $this->container['channel'] = $channel; - - return $this; - } - - /** - * Gets content - * - * @return \Bandwidth\Model\MmsMessageContent - */ - public function getContent(): \Bandwidth\Model\MmsMessageContent - { - return $this->container['content']; - } - - /** - * Sets content - * - * @param \Bandwidth\Model\MmsMessageContent $content content - * - * @return $this - */ - public function setContent(\Bandwidth\Model\MmsMessageContent $content): static - { - if (is_null($content)) { - throw new InvalidArgumentException('non-nullable content cannot be null'); - } - $this->container['content'] = $content; - - return $this; - } - - /** - * Gets owner - * - * @return string - */ - public function getOwner(): string - { - return $this->container['owner']; - } - - /** - * Sets owner - * - * @param string $owner The Bandwidth senderId associated with the message. Identical to 'from'. - * - * @return $this - */ - public function setOwner(string $owner): static - { - if (is_null($owner)) { - throw new InvalidArgumentException('non-nullable owner cannot be null'); - } - $this->container['owner'] = $owner; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param int|string $offset Offset - * - * @return boolean - */ - public function offsetExists(mixed $offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param int|string $offset Offset - * - * @return mixed|null - */ - #[ReturnTypeWillChange] - public function offsetGet(mixed $offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|string|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param int|string $offset Offset - * - * @return void - */ - public function offsetUnset(mixed $offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[ReturnTypeWillChange] - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue(): string + public static function getComposedDiscriminatorMappings(): array { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return [ + 'MMS' => '\Bandwidth\Model\MultiChannelChannelListMMSResponseObject', + 'RBM' => '\Bandwidth\Model\MultiChannelChannelListRBMResponseObject', + 'SMS' => '\Bandwidth\Model\MultiChannelChannelListSMSResponseObject' + ]; } } diff --git a/src/Model/MultiChannelChannelListSMSObject.php b/src/Model/MultiChannelChannelListSMSObject.php index 408faec0..7dbbe6d2 100644 --- a/src/Model/MultiChannelChannelListSMSObject.php +++ b/src/Model/MultiChannelChannelListSMSObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelChannelListSMSResponseObject.php b/src/Model/MultiChannelChannelListSMSResponseObject.php index bae669d6..0fc2ba2e 100644 --- a/src/Model/MultiChannelChannelListSMSResponseObject.php +++ b/src/Model/MultiChannelChannelListSMSResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelError.php b/src/Model/MultiChannelError.php index 576c4e1e..52ec09d8 100644 --- a/src/Model/MultiChannelError.php +++ b/src/Model/MultiChannelError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelMessageChannelEnum.php b/src/Model/MultiChannelMessageChannelEnum.php index 7e2169d5..0e397d87 100644 --- a/src/Model/MultiChannelMessageChannelEnum.php +++ b/src/Model/MultiChannelMessageChannelEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelMessageContent.php b/src/Model/MultiChannelMessageContent.php index b3ff7ab0..9e6267da 100644 --- a/src/Model/MultiChannelMessageContent.php +++ b/src/Model/MultiChannelMessageContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelMessageRequest.php b/src/Model/MultiChannelMessageRequest.php index 22379b96..252621e0 100644 --- a/src/Model/MultiChannelMessageRequest.php +++ b/src/Model/MultiChannelMessageRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -333,7 +333,7 @@ public function setTo(string $to): static /** * Gets channel_list * - * @return \Bandwidth\Model\MultiChannelChannelListRequestObject[] + * @return (\Bandwidth\Model\MultiChannelChannelListRBMObject|\Bandwidth\Model\MultiChannelChannelListSMSObject|\Bandwidth\Model\MultiChannelChannelListMMSObject)[] */ public function getChannelList(): array { @@ -343,7 +343,7 @@ public function getChannelList(): array /** * Sets channel_list * - * @param \Bandwidth\Model\MultiChannelChannelListRequestObject[] $channel_list A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. + * @param (\Bandwidth\Model\MultiChannelChannelListRBMObject|\Bandwidth\Model\MultiChannelChannelListSMSObject|\Bandwidth\Model\MultiChannelChannelListMMSObject)[] $channel_list A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. * * @return $this */ @@ -352,7 +352,6 @@ public function setChannelList(array $channel_list): static if (is_null($channel_list)) { throw new InvalidArgumentException('non-nullable channel_list cannot be null'); } - if ((count($channel_list) > 4)) { throw new InvalidArgumentException('invalid value for $channel_list when calling MultiChannelMessageRequest., number of items must be less than or equal to 4.'); } diff --git a/src/Model/MultiChannelMessageResponseData.php b/src/Model/MultiChannelMessageResponseData.php index bece48ca..5daa29d3 100644 --- a/src/Model/MultiChannelMessageResponseData.php +++ b/src/Model/MultiChannelMessageResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -437,7 +437,6 @@ public function setTo(array $to): static throw new InvalidArgumentException('non-nullable to cannot be null'); } - $this->container['to'] = $to; return $this; @@ -446,7 +445,7 @@ public function setTo(array $to): static /** * Gets channel_list * - * @return \Bandwidth\Model\MultiChannelChannelListResponseObject[] + * @return (\Bandwidth\Model\MultiChannelChannelListRBMResponseObject|\Bandwidth\Model\MultiChannelChannelListSMSResponseObject|\Bandwidth\Model\MultiChannelChannelListMMSResponseObject)[] */ public function getChannelList(): array { @@ -456,7 +455,7 @@ public function getChannelList(): array /** * Sets channel_list * - * @param \Bandwidth\Model\MultiChannelChannelListResponseObject[] $channel_list A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. + * @param (\Bandwidth\Model\MultiChannelChannelListRBMResponseObject|\Bandwidth\Model\MultiChannelChannelListSMSResponseObject|\Bandwidth\Model\MultiChannelChannelListMMSResponseObject)[] $channel_list A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. * * @return $this */ @@ -465,7 +464,6 @@ public function setChannelList(array $channel_list): static if (is_null($channel_list)) { throw new InvalidArgumentException('non-nullable channel_list cannot be null'); } - if ((count($channel_list) > 4)) { throw new InvalidArgumentException('invalid value for $channel_list when calling MultiChannelMessageResponseData., number of items must be less than or equal to 4.'); } diff --git a/src/Model/OptInWorkflow.php b/src/Model/OptInWorkflow.php index 0b46ddc6..6d1f80fe 100644 --- a/src/Model/OptInWorkflow.php +++ b/src/Model/OptInWorkflow.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/Page.php b/src/Model/Page.php index 31592b50..c85b3683 100644 --- a/src/Model/Page.php +++ b/src/Model/Page.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -326,7 +326,6 @@ public function setPageSize(int $page_size): static if (is_null($page_size)) { throw new InvalidArgumentException('non-nullable page_size cannot be null'); } - if (($page_size < 0)) { throw new InvalidArgumentException('invalid value for $page_size when calling Page., must be bigger than or equal to 0.'); } @@ -358,7 +357,6 @@ public function setTotalElements(?int $total_elements): static if (is_null($total_elements)) { throw new InvalidArgumentException('non-nullable total_elements cannot be null'); } - if (($total_elements < 0)) { throw new InvalidArgumentException('invalid value for $total_elements when calling Page., must be bigger than or equal to 0.'); } @@ -390,7 +388,6 @@ public function setTotalPages(?int $total_pages): static if (is_null($total_pages)) { throw new InvalidArgumentException('non-nullable total_pages cannot be null'); } - if (($total_pages < 0)) { throw new InvalidArgumentException('invalid value for $total_pages when calling Page., must be bigger than or equal to 0.'); } @@ -422,7 +419,6 @@ public function setPageNumber(?int $page_number): static if (is_null($page_number)) { throw new InvalidArgumentException('non-nullable page_number cannot be null'); } - if (($page_number < 0)) { throw new InvalidArgumentException('invalid value for $page_number when calling Page., must be bigger than or equal to 0.'); } diff --git a/src/Model/PageInfo.php b/src/Model/PageInfo.php index 5d8e6a82..adbc1c5c 100644 --- a/src/Model/PageInfo.php +++ b/src/Model/PageInfo.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/PriorityEnum.php b/src/Model/PriorityEnum.php index 8d67af45..13607a07 100644 --- a/src/Model/PriorityEnum.php +++ b/src/Model/PriorityEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ProductTypeEnum.php b/src/Model/ProductTypeEnum.php index fe32e99f..79c4d47a 100644 --- a/src/Model/ProductTypeEnum.php +++ b/src/Model/ProductTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RbmActionBase.php b/src/Model/RbmActionBase.php index 69713879..eb9a4aa8 100644 --- a/src/Model/RbmActionBase.php +++ b/src/Model/RbmActionBase.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -279,10 +279,6 @@ public function listInvalidProperties(): array if ($this->container['postback_data'] === null) { $invalidProperties[] = "'postback_data' can't be null"; } - if ((mb_strlen($this->container['postback_data']) > 2048)) { - $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; - } - return $invalidProperties; } @@ -375,9 +371,6 @@ public function setPostbackData(string $postback_data): static if (is_null($postback_data)) { throw new InvalidArgumentException('non-nullable postback_data cannot be null'); } - if ((mb_strlen($postback_data) > 2048)) { - throw new InvalidArgumentException('invalid length for $postback_data when calling RbmActionBase., must be smaller than or equal to 2048.'); - } $this->container['postback_data'] = $postback_data; diff --git a/src/Model/RbmActionDial.php b/src/Model/RbmActionDial.php index 4139d7e5..0894efcb 100644 --- a/src/Model/RbmActionDial.php +++ b/src/Model/RbmActionDial.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -286,10 +286,6 @@ public function listInvalidProperties(): array if ($this->container['postback_data'] === null) { $invalidProperties[] = "'postback_data' can't be null"; } - if ((mb_strlen($this->container['postback_data']) > 2048)) { - $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; - } - if ($this->container['phone_number'] === null) { $invalidProperties[] = "'phone_number' can't be null"; } @@ -385,9 +381,6 @@ public function setPostbackData(string $postback_data): static if (is_null($postback_data)) { throw new InvalidArgumentException('non-nullable postback_data cannot be null'); } - if ((mb_strlen($postback_data) > 2048)) { - throw new InvalidArgumentException('invalid length for $postback_data when calling RbmActionDial., must be smaller than or equal to 2048.'); - } $this->container['postback_data'] = $postback_data; diff --git a/src/Model/RbmActionOpenUrl.php b/src/Model/RbmActionOpenUrl.php index a1e29523..028095d1 100644 --- a/src/Model/RbmActionOpenUrl.php +++ b/src/Model/RbmActionOpenUrl.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -300,10 +300,6 @@ public function listInvalidProperties(): array if ($this->container['postback_data'] === null) { $invalidProperties[] = "'postback_data' can't be null"; } - if ((mb_strlen($this->container['postback_data']) > 2048)) { - $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; - } - if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } @@ -403,9 +399,6 @@ public function setPostbackData(string $postback_data): static if (is_null($postback_data)) { throw new InvalidArgumentException('non-nullable postback_data cannot be null'); } - if ((mb_strlen($postback_data) > 2048)) { - throw new InvalidArgumentException('invalid length for $postback_data when calling RbmActionOpenUrl., must be smaller than or equal to 2048.'); - } $this->container['postback_data'] = $postback_data; diff --git a/src/Model/RbmActionTypeEnum.php b/src/Model/RbmActionTypeEnum.php index e804b570..8a61be63 100644 --- a/src/Model/RbmActionTypeEnum.php +++ b/src/Model/RbmActionTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RbmActionViewLocation.php b/src/Model/RbmActionViewLocation.php index 665739f3..e958b2bf 100644 --- a/src/Model/RbmActionViewLocation.php +++ b/src/Model/RbmActionViewLocation.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -300,10 +300,6 @@ public function listInvalidProperties(): array if ($this->container['postback_data'] === null) { $invalidProperties[] = "'postback_data' can't be null"; } - if ((mb_strlen($this->container['postback_data']) > 2048)) { - $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; - } - if ($this->container['latitude'] === null) { $invalidProperties[] = "'latitude' can't be null"; } @@ -406,9 +402,6 @@ public function setPostbackData(string $postback_data): static if (is_null($postback_data)) { throw new InvalidArgumentException('non-nullable postback_data cannot be null'); } - if ((mb_strlen($postback_data) > 2048)) { - throw new InvalidArgumentException('invalid length for $postback_data when calling RbmActionViewLocation., must be smaller than or equal to 2048.'); - } $this->container['postback_data'] = $postback_data; diff --git a/src/Model/RbmCardContent.php b/src/Model/RbmCardContent.php index 15e577f7..7892e15b 100644 --- a/src/Model/RbmCardContent.php +++ b/src/Model/RbmCardContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -390,7 +390,7 @@ public function setMedia(?\Bandwidth\Model\RbmCardContentMedia $media): static /** * Gets suggestions * - * @return \Bandwidth\Model\MultiChannelAction[]|null + * @return (\Bandwidth\Model\RbmActionBase|\Bandwidth\Model\RbmActionDial|\Bandwidth\Model\RbmActionViewLocation|\Bandwidth\Model\MultiChannelActionCalendarEvent|\Bandwidth\Model\RbmActionOpenUrl)[]|null */ public function getSuggestions(): ?array { @@ -400,7 +400,7 @@ public function getSuggestions(): ?array /** * Sets suggestions * - * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient that will be displayed on the rich card. + * @param (\Bandwidth\Model\RbmActionBase|\Bandwidth\Model\RbmActionDial|\Bandwidth\Model\RbmActionViewLocation|\Bandwidth\Model\MultiChannelActionCalendarEvent|\Bandwidth\Model\RbmActionOpenUrl)[]|null $suggestions An array of suggested actions for the recipient that will be displayed on the rich card. * * @return $this */ @@ -409,7 +409,6 @@ public function setSuggestions(?array $suggestions): static if (is_null($suggestions)) { throw new InvalidArgumentException('non-nullable suggestions cannot be null'); } - if ((count($suggestions) > 4)) { throw new InvalidArgumentException('invalid value for $suggestions when calling RbmCardContent., number of items must be less than or equal to 4.'); } diff --git a/src/Model/RbmCardContentMedia.php b/src/Model/RbmCardContentMedia.php index 9a017c99..3231dfb2 100644 --- a/src/Model/RbmCardContentMedia.php +++ b/src/Model/RbmCardContentMedia.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RbmLocationResponse.php b/src/Model/RbmLocationResponse.php index e668dbdb..e6b622df 100644 --- a/src/Model/RbmLocationResponse.php +++ b/src/Model/RbmLocationResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RbmMediaHeightEnum.php b/src/Model/RbmMediaHeightEnum.php index 2bb905df..3dbc4704 100644 --- a/src/Model/RbmMediaHeightEnum.php +++ b/src/Model/RbmMediaHeightEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RbmMessageCarouselCard.php b/src/Model/RbmMessageCarouselCard.php index 454a33ab..d95202a2 100644 --- a/src/Model/RbmMessageCarouselCard.php +++ b/src/Model/RbmMessageCarouselCard.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -345,7 +345,6 @@ public function setCardContents(array $card_contents): static if (is_null($card_contents)) { throw new InvalidArgumentException('non-nullable card_contents cannot be null'); } - if ((count($card_contents) > 10)) { throw new InvalidArgumentException('invalid value for $card_contents when calling RbmMessageCarouselCard., number of items must be less than or equal to 10.'); } @@ -360,7 +359,7 @@ public function setCardContents(array $card_contents): static /** * Gets suggestions * - * @return \Bandwidth\Model\MultiChannelAction[]|null + * @return (\Bandwidth\Model\RbmActionBase|\Bandwidth\Model\RbmActionDial|\Bandwidth\Model\RbmActionViewLocation|\Bandwidth\Model\MultiChannelActionCalendarEvent|\Bandwidth\Model\RbmActionOpenUrl)[]|null */ public function getSuggestions(): ?array { @@ -370,7 +369,7 @@ public function getSuggestions(): ?array /** * Sets suggestions * - * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * @param (\Bandwidth\Model\RbmActionBase|\Bandwidth\Model\RbmActionDial|\Bandwidth\Model\RbmActionViewLocation|\Bandwidth\Model\MultiChannelActionCalendarEvent|\Bandwidth\Model\RbmActionOpenUrl)[]|null $suggestions An array of suggested actions for the recipient. * * @return $this */ @@ -379,7 +378,6 @@ public function setSuggestions(?array $suggestions): static if (is_null($suggestions)) { throw new InvalidArgumentException('non-nullable suggestions cannot be null'); } - if ((count($suggestions) > 11)) { throw new InvalidArgumentException('invalid value for $suggestions when calling RbmMessageCarouselCard., number of items must be less than or equal to 11.'); } diff --git a/src/Model/RbmMessageContentFile.php b/src/Model/RbmMessageContentFile.php index 744f3eca..797df284 100644 --- a/src/Model/RbmMessageContentFile.php +++ b/src/Model/RbmMessageContentFile.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RbmMessageContentRichCard.php b/src/Model/RbmMessageContentRichCard.php index 1f6c41bc..16fb6214 100644 --- a/src/Model/RbmMessageContentRichCard.php +++ b/src/Model/RbmMessageContentRichCard.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -28,561 +28,56 @@ namespace Bandwidth\Model; -use ArrayAccess; -use JsonSerializable; -use InvalidArgumentException; -use ReturnTypeWillChange; -use Bandwidth\ObjectSerializer; - /** * RbmMessageContentRichCard Class Doc Comment * * @package Bandwidth * @author OpenAPI Generator team * @link https://openapi-generator.tech - * @implements ArrayAccess */ -class RbmMessageContentRichCard implements ModelInterface, ArrayAccess, JsonSerializable +class RbmMessageContentRichCard implements ComposedInterface { - public const DISCRIMINATOR = null; - /** * The original name of the model. * * @var string */ - protected static string $openAPIModelName = 'rbmMessageContentRichCard'; - - /** - * Array of property to type mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPITypes = [ - 'orientation' => '\Bandwidth\Model\StandaloneCardOrientationEnum', - 'thumbnail_image_alignment' => '\Bandwidth\Model\ThumbnailAlignmentEnum', - 'card_content' => '\Bandwidth\Model\RbmCardContent', - 'suggestions' => '\Bandwidth\Model\MultiChannelAction[]', - 'card_width' => '\Bandwidth\Model\CardWidthEnum', - 'card_contents' => '\Bandwidth\Model\RbmCardContent[]' - ]; - - /** - * Array of property to format mappings. Used for (de)serialization - * - * @var array - */ - protected static array $openAPIFormats = [ - 'orientation' => null, - 'thumbnail_image_alignment' => null, - 'card_content' => null, - 'suggestions' => null, - 'card_width' => null, - 'card_contents' => null - ]; - - /** - * Array of nullable properties. Used for (de)serialization - * - * @var array - */ - protected static array $openAPINullables = [ - 'orientation' => false, - 'thumbnail_image_alignment' => false, - 'card_content' => false, - 'suggestions' => false, - 'card_width' => false, - 'card_contents' => false - ]; - - /** - * If a nullable field gets set to null, insert it here - * - * @var array - */ - protected array $openAPINullablesSetToNull = []; - - /** - * {@inheritdoc} - */ - public static function openAPITypes(): array - { - return self::$openAPITypes; - } - - /** - * {@inheritdoc} - */ - public static function openAPIFormats(): array - { - return self::$openAPIFormats; - } - - /** - * Array of nullable properties - * - * @return array - */ - protected static function openAPINullables(): array - { - return self::$openAPINullables; - } - - /** - * Array of nullable field names deliberately set to null - * - * @return array - */ - private function getOpenAPINullablesSetToNull(): array - { - return $this->openAPINullablesSetToNull; - } - - /** - * Setter - Array of nullable field names deliberately set to null - * - * @param array $openAPINullablesSetToNull - */ - private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void - { - $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; - } - - /** - * {@inheritdoc} - */ - public static function isNullable(string $property): bool - { - return self::openAPINullables()[$property] ?? false; - } - - /** - * {@inheritdoc} - */ - public function isNullableSetToNull(string $property): bool - { - return in_array($property, $this->getOpenAPINullablesSetToNull(), true); - } + public const MODEL_NAME = 'rbmMessageContentRichCard'; /** - * Array of attributes where the key is the local name, - * and the value is the original name + * The discriminator property name, or null when the schema has no discriminator. * - * @var array + * @var string|null */ - protected static array $attributeMap = [ - 'orientation' => 'orientation', - 'thumbnail_image_alignment' => 'thumbnailImageAlignment', - 'card_content' => 'cardContent', - 'suggestions' => 'suggestions', - 'card_width' => 'cardWidth', - 'card_contents' => 'cardContents' - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses) - * - * @var array - */ - protected static array $setters = [ - 'orientation' => 'setOrientation', - 'thumbnail_image_alignment' => 'setThumbnailImageAlignment', - 'card_content' => 'setCardContent', - 'suggestions' => 'setSuggestions', - 'card_width' => 'setCardWidth', - 'card_contents' => 'setCardContents' - ]; - - /** - * Array of attributes to getter functions (for serialization of requests) - * - * @var array - */ - protected static array $getters = [ - 'orientation' => 'getOrientation', - 'thumbnail_image_alignment' => 'getThumbnailImageAlignment', - 'card_content' => 'getCardContent', - 'suggestions' => 'getSuggestions', - 'card_width' => 'getCardWidth', - 'card_contents' => 'getCardContents' - ]; - - /** - * {@inheritdoc} - */ - public static function attributeMap(): array - { - return self::$attributeMap; - } - - /** - * {@inheritdoc} - */ - public static function setters(): array - { - return self::$setters; - } - - /** - * {@inheritdoc} - */ - public static function getters(): array - { - return self::$getters; - } + public const DISCRIMINATOR = null; /** * {@inheritdoc} */ - public function getModelName(): string - { - return self::$openAPIModelName; - } - - - /** - * Associative array for storing property values - * - * @var array - */ - protected array $container = []; - - /** - * Constructor - * - * @param array $data Associated array of property values initializing the model - */ - public function __construct(?array $data = null) + public static function getComposedTypes(): array { - $this->setIfExists('orientation', $data ?? [], null); - $this->setIfExists('thumbnail_image_alignment', $data ?? [], null); - $this->setIfExists('card_content', $data ?? [], null); - $this->setIfExists('suggestions', $data ?? [], null); - $this->setIfExists('card_width', $data ?? [], null); - $this->setIfExists('card_contents', $data ?? [], null); - } - - /** - * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName - * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the - * $this->openAPINullablesSetToNull array - * - * @param string $variableName - * @param array $fields - * @param mixed $defaultValue - */ - private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void - { - if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { - $this->openAPINullablesSetToNull[] = $variableName; - } - - $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + return [ + '\Bandwidth\Model\RbmStandaloneCard', + '\Bandwidth\Model\RbmMessageCarouselCard' + ]; } /** * {@inheritdoc} */ - public function listInvalidProperties(): array + public static function getComposedDiscriminator(): ?string { - $invalidProperties = []; - - if ($this->container['orientation'] === null) { - $invalidProperties[] = "'orientation' can't be null"; - } - if ($this->container['card_content'] === null) { - $invalidProperties[] = "'card_content' can't be null"; - } - if (!is_null($this->container['suggestions']) && (count($this->container['suggestions']) > 11)) { - $invalidProperties[] = "invalid value for 'suggestions', number of items must be less than or equal to 11."; - } - - if ($this->container['card_width'] === null) { - $invalidProperties[] = "'card_width' can't be null"; - } - if ($this->container['card_contents'] === null) { - $invalidProperties[] = "'card_contents' can't be null"; - } - if ((count($this->container['card_contents']) > 10)) { - $invalidProperties[] = "invalid value for 'card_contents', number of items must be less than or equal to 10."; - } - - if ((count($this->container['card_contents']) < 2)) { - $invalidProperties[] = "invalid value for 'card_contents', number of items must be greater than or equal to 2."; - } - - return $invalidProperties; + return self::DISCRIMINATOR; } /** * {@inheritdoc} */ - public function valid(): bool - { - return count($this->listInvalidProperties()) === 0; - } - - - /** - * Gets orientation - * - * @return \Bandwidth\Model\StandaloneCardOrientationEnum - */ - public function getOrientation(): \Bandwidth\Model\StandaloneCardOrientationEnum - { - return $this->container['orientation']; - } - - /** - * Sets orientation - * - * @param \Bandwidth\Model\StandaloneCardOrientationEnum $orientation orientation - * - * @return $this - */ - public function setOrientation(\Bandwidth\Model\StandaloneCardOrientationEnum $orientation): static - { - if (is_null($orientation)) { - throw new InvalidArgumentException('non-nullable orientation cannot be null'); - } - $this->container['orientation'] = $orientation; - - return $this; - } - - /** - * Gets thumbnail_image_alignment - * - * @return \Bandwidth\Model\ThumbnailAlignmentEnum|null - */ - public function getThumbnailImageAlignment(): ?\Bandwidth\Model\ThumbnailAlignmentEnum - { - return $this->container['thumbnail_image_alignment']; - } - - /** - * Sets thumbnail_image_alignment - * - * @param \Bandwidth\Model\ThumbnailAlignmentEnum|null $thumbnail_image_alignment thumbnail_image_alignment - * - * @return $this - */ - public function setThumbnailImageAlignment(?\Bandwidth\Model\ThumbnailAlignmentEnum $thumbnail_image_alignment): static - { - if (is_null($thumbnail_image_alignment)) { - throw new InvalidArgumentException('non-nullable thumbnail_image_alignment cannot be null'); - } - $this->container['thumbnail_image_alignment'] = $thumbnail_image_alignment; - - return $this; - } - - /** - * Gets card_content - * - * @return \Bandwidth\Model\RbmCardContent - */ - public function getCardContent(): \Bandwidth\Model\RbmCardContent - { - return $this->container['card_content']; - } - - /** - * Sets card_content - * - * @param \Bandwidth\Model\RbmCardContent $card_content card_content - * - * @return $this - */ - public function setCardContent(\Bandwidth\Model\RbmCardContent $card_content): static - { - if (is_null($card_content)) { - throw new InvalidArgumentException('non-nullable card_content cannot be null'); - } - $this->container['card_content'] = $card_content; - - return $this; - } - - /** - * Gets suggestions - * - * @return \Bandwidth\Model\MultiChannelAction[]|null - */ - public function getSuggestions(): ?array - { - return $this->container['suggestions']; - } - - /** - * Sets suggestions - * - * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. - * - * @return $this - */ - public function setSuggestions(?array $suggestions): static - { - if (is_null($suggestions)) { - throw new InvalidArgumentException('non-nullable suggestions cannot be null'); - } - - if ((count($suggestions) > 11)) { - throw new InvalidArgumentException('invalid value for $suggestions when calling RbmMessageContentRichCard., number of items must be less than or equal to 11.'); - } - $this->container['suggestions'] = $suggestions; - - return $this; - } - - /** - * Gets card_width - * - * @return \Bandwidth\Model\CardWidthEnum - */ - public function getCardWidth(): \Bandwidth\Model\CardWidthEnum - { - return $this->container['card_width']; - } - - /** - * Sets card_width - * - * @param \Bandwidth\Model\CardWidthEnum $card_width card_width - * - * @return $this - */ - public function setCardWidth(\Bandwidth\Model\CardWidthEnum $card_width): static - { - if (is_null($card_width)) { - throw new InvalidArgumentException('non-nullable card_width cannot be null'); - } - $this->container['card_width'] = $card_width; - - return $this; - } - - /** - * Gets card_contents - * - * @return \Bandwidth\Model\RbmCardContent[] - */ - public function getCardContents(): array - { - return $this->container['card_contents']; - } - - /** - * Sets card_contents - * - * @param \Bandwidth\Model\RbmCardContent[] $card_contents card_contents - * - * @return $this - */ - public function setCardContents(array $card_contents): static - { - if (is_null($card_contents)) { - throw new InvalidArgumentException('non-nullable card_contents cannot be null'); - } - - if ((count($card_contents) > 10)) { - throw new InvalidArgumentException('invalid value for $card_contents when calling RbmMessageContentRichCard., number of items must be less than or equal to 10.'); - } - if ((count($card_contents) < 2)) { - throw new InvalidArgumentException('invalid length for $card_contents when calling RbmMessageContentRichCard., number of items must be greater than or equal to 2.'); - } - $this->container['card_contents'] = $card_contents; - - return $this; - } - /** - * Returns true if offset exists. False otherwise. - * - * @param int|string $offset Offset - * - * @return boolean - */ - public function offsetExists(mixed $offset): bool - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param int|string $offset Offset - * - * @return mixed|null - */ - #[ReturnTypeWillChange] - public function offsetGet(mixed $offset): mixed - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param int|string|null $offset Offset - * @param mixed $value Value to be set - * - * @return void - */ - public function offsetSet(mixed $offset, mixed $value): void - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param int|string $offset Offset - * - * @return void - */ - public function offsetUnset(mixed $offset): void - { - unset($this->container[$offset]); - } - - /** - * Serializes the object to a value that can be serialized natively by json_encode(). - * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php - * - * @return mixed Returns data which can be serialized by json_encode(), which is a value - * of any type other than a resource. - */ - #[ReturnTypeWillChange] - public function jsonSerialize(): mixed - { - return ObjectSerializer::sanitizeForSerialization($this); - } - - /** - * Gets the string presentation of the object - * - * @return string - */ - public function __toString(): string - { - return json_encode( - ObjectSerializer::sanitizeForSerialization($this), - JSON_PRETTY_PRINT - ); - } - - /** - * Gets a header-safe presentation of the object - * - * @return string - */ - public function toHeaderValue(): string + public static function getComposedDiscriminatorMappings(): array { - return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + return [ + + ]; } } diff --git a/src/Model/RbmMessageContentText.php b/src/Model/RbmMessageContentText.php index ecd33d3f..642438f9 100644 --- a/src/Model/RbmMessageContentText.php +++ b/src/Model/RbmMessageContentText.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -316,7 +316,7 @@ public function setText(string $text): static /** * Gets suggestions * - * @return \Bandwidth\Model\MultiChannelAction[]|null + * @return (\Bandwidth\Model\RbmActionBase|\Bandwidth\Model\RbmActionDial|\Bandwidth\Model\RbmActionViewLocation|\Bandwidth\Model\MultiChannelActionCalendarEvent|\Bandwidth\Model\RbmActionOpenUrl)[]|null */ public function getSuggestions(): ?array { @@ -326,7 +326,7 @@ public function getSuggestions(): ?array /** * Sets suggestions * - * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * @param (\Bandwidth\Model\RbmActionBase|\Bandwidth\Model\RbmActionDial|\Bandwidth\Model\RbmActionViewLocation|\Bandwidth\Model\MultiChannelActionCalendarEvent|\Bandwidth\Model\RbmActionOpenUrl)[]|null $suggestions An array of suggested actions for the recipient. * * @return $this */ @@ -335,7 +335,6 @@ public function setSuggestions(?array $suggestions): static if (is_null($suggestions)) { throw new InvalidArgumentException('non-nullable suggestions cannot be null'); } - if ((count($suggestions) > 11)) { throw new InvalidArgumentException('invalid value for $suggestions when calling RbmMessageContentText., number of items must be less than or equal to 11.'); } diff --git a/src/Model/RbmMessageMedia.php b/src/Model/RbmMessageMedia.php index 8cb7c3f8..79b3f3a2 100644 --- a/src/Model/RbmMessageMedia.php +++ b/src/Model/RbmMessageMedia.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -308,7 +308,7 @@ public function setMedia(array $media): static /** * Gets suggestions * - * @return \Bandwidth\Model\MultiChannelAction[]|null + * @return (\Bandwidth\Model\RbmActionBase|\Bandwidth\Model\RbmActionDial|\Bandwidth\Model\RbmActionViewLocation|\Bandwidth\Model\MultiChannelActionCalendarEvent|\Bandwidth\Model\RbmActionOpenUrl)[]|null */ public function getSuggestions(): ?array { @@ -318,7 +318,7 @@ public function getSuggestions(): ?array /** * Sets suggestions * - * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * @param (\Bandwidth\Model\RbmActionBase|\Bandwidth\Model\RbmActionDial|\Bandwidth\Model\RbmActionViewLocation|\Bandwidth\Model\MultiChannelActionCalendarEvent|\Bandwidth\Model\RbmActionOpenUrl)[]|null $suggestions An array of suggested actions for the recipient. * * @return $this */ @@ -327,7 +327,6 @@ public function setSuggestions(?array $suggestions): static if (is_null($suggestions)) { throw new InvalidArgumentException('non-nullable suggestions cannot be null'); } - if ((count($suggestions) > 11)) { throw new InvalidArgumentException('invalid value for $suggestions when calling RbmMessageMedia., number of items must be less than or equal to 11.'); } diff --git a/src/Model/RbmOpenUrlEnum.php b/src/Model/RbmOpenUrlEnum.php index 0a850fc4..725c4b73 100644 --- a/src/Model/RbmOpenUrlEnum.php +++ b/src/Model/RbmOpenUrlEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RbmStandaloneCard.php b/src/Model/RbmStandaloneCard.php index fb4f624a..a17eb3fb 100644 --- a/src/Model/RbmStandaloneCard.php +++ b/src/Model/RbmStandaloneCard.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -379,7 +379,7 @@ public function setCardContent(\Bandwidth\Model\RbmCardContent $card_content): s /** * Gets suggestions * - * @return \Bandwidth\Model\MultiChannelAction[]|null + * @return (\Bandwidth\Model\RbmActionBase|\Bandwidth\Model\RbmActionDial|\Bandwidth\Model\RbmActionViewLocation|\Bandwidth\Model\MultiChannelActionCalendarEvent|\Bandwidth\Model\RbmActionOpenUrl)[]|null */ public function getSuggestions(): ?array { @@ -389,7 +389,7 @@ public function getSuggestions(): ?array /** * Sets suggestions * - * @param \Bandwidth\Model\MultiChannelAction[]|null $suggestions An array of suggested actions for the recipient. + * @param (\Bandwidth\Model\RbmActionBase|\Bandwidth\Model\RbmActionDial|\Bandwidth\Model\RbmActionViewLocation|\Bandwidth\Model\MultiChannelActionCalendarEvent|\Bandwidth\Model\RbmActionOpenUrl)[]|null $suggestions An array of suggested actions for the recipient. * * @return $this */ @@ -398,7 +398,6 @@ public function setSuggestions(?array $suggestions): static if (is_null($suggestions)) { throw new InvalidArgumentException('non-nullable suggestions cannot be null'); } - if ((count($suggestions) > 11)) { throw new InvalidArgumentException('invalid value for $suggestions when calling RbmStandaloneCard., number of items must be less than or equal to 11.'); } diff --git a/src/Model/RbmSuggestionResponse.php b/src/Model/RbmSuggestionResponse.php index 6603ef87..b64c6f57 100644 --- a/src/Model/RbmSuggestionResponse.php +++ b/src/Model/RbmSuggestionResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -266,10 +266,6 @@ public function listInvalidProperties(): array { $invalidProperties = []; - if (!is_null($this->container['postback_data']) && (mb_strlen($this->container['postback_data']) > 2048)) { - $invalidProperties[] = "invalid value for 'postback_data', the character length must be smaller than or equal to 2048."; - } - return $invalidProperties; } @@ -331,9 +327,6 @@ public function setPostbackData(?string $postback_data): static if (is_null($postback_data)) { throw new InvalidArgumentException('non-nullable postback_data cannot be null'); } - if ((mb_strlen($postback_data) > 2048)) { - throw new InvalidArgumentException('invalid length for $postback_data when calling RbmSuggestionResponse., must be smaller than or equal to 2048.'); - } $this->container['postback_data'] = $postback_data; diff --git a/src/Model/RbmWebViewEnum.php b/src/Model/RbmWebViewEnum.php index 0e4574b6..1a117539 100644 --- a/src/Model/RbmWebViewEnum.php +++ b/src/Model/RbmWebViewEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RecordingAvailableCallback.php b/src/Model/RecordingAvailableCallback.php index 655613ce..2a914399 100644 --- a/src/Model/RecordingAvailableCallback.php +++ b/src/Model/RecordingAvailableCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RecordingCompleteCallback.php b/src/Model/RecordingCompleteCallback.php index 8df77dac..10737836 100644 --- a/src/Model/RecordingCompleteCallback.php +++ b/src/Model/RecordingCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RecordingStateEnum.php b/src/Model/RecordingStateEnum.php index 44544203..3fabc00b 100644 --- a/src/Model/RecordingStateEnum.php +++ b/src/Model/RecordingStateEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RecordingTranscriptionClip.php b/src/Model/RecordingTranscriptionClip.php index 49237212..47e46caf 100644 --- a/src/Model/RecordingTranscriptionClip.php +++ b/src/Model/RecordingTranscriptionClip.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -376,7 +376,6 @@ public function setConfidence(?float $confidence): static if (is_null($confidence)) { throw new InvalidArgumentException('non-nullable confidence cannot be null'); } - if (($confidence > 1)) { throw new InvalidArgumentException('invalid value for $confidence when calling RecordingTranscriptionClip., must be smaller than or equal to 1.'); } diff --git a/src/Model/RecordingTranscriptionMetadata.php b/src/Model/RecordingTranscriptionMetadata.php index f0bdd88a..7200311d 100644 --- a/src/Model/RecordingTranscriptionMetadata.php +++ b/src/Model/RecordingTranscriptionMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RecordingTranscriptions.php b/src/Model/RecordingTranscriptions.php index 365c731c..86597420 100644 --- a/src/Model/RecordingTranscriptions.php +++ b/src/Model/RecordingTranscriptions.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RedirectCallback.php b/src/Model/RedirectCallback.php index 40dc0e5b..dc8eb776 100644 --- a/src/Model/RedirectCallback.php +++ b/src/Model/RedirectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/RedirectMethodEnum.php b/src/Model/RedirectMethodEnum.php index 7642ba07..189c9010 100644 --- a/src/Model/RedirectMethodEnum.php +++ b/src/Model/RedirectMethodEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/SipConnectionMetadata.php b/src/Model/SipConnectionMetadata.php index 73bc4619..428f1f91 100644 --- a/src/Model/SipConnectionMetadata.php +++ b/src/Model/SipConnectionMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/SipCredentials.php b/src/Model/SipCredentials.php index 5299ebf2..f008473d 100644 --- a/src/Model/SipCredentials.php +++ b/src/Model/SipCredentials.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/SmsMessageContent.php b/src/Model/SmsMessageContent.php index a8bf40d1..a5cd72d6 100644 --- a/src/Model/SmsMessageContent.php +++ b/src/Model/SmsMessageContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/StandaloneCardOrientationEnum.php b/src/Model/StandaloneCardOrientationEnum.php index d5c0e44d..aa0862e6 100644 --- a/src/Model/StandaloneCardOrientationEnum.php +++ b/src/Model/StandaloneCardOrientationEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/StatusCallback.php b/src/Model/StatusCallback.php index 47dfb130..54859209 100644 --- a/src/Model/StatusCallback.php +++ b/src/Model/StatusCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/StatusCallbackMessage.php b/src/Model/StatusCallbackMessage.php index d8cc15e2..2fb41733 100644 --- a/src/Model/StatusCallbackMessage.php +++ b/src/Model/StatusCallbackMessage.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -558,7 +558,6 @@ public function setTo(array $to): static throw new InvalidArgumentException('non-nullable to cannot be null'); } - $this->container['to'] = $to; return $this; diff --git a/src/Model/StatusCallbackTypeEnum.php b/src/Model/StatusCallbackTypeEnum.php index 28bbcd7f..c592b744 100644 --- a/src/Model/StatusCallbackTypeEnum.php +++ b/src/Model/StatusCallbackTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/StirShaken.php b/src/Model/StirShaken.php index de9ba5f6..888bac2b 100644 --- a/src/Model/StirShaken.php +++ b/src/Model/StirShaken.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/SyncLookupRequest.php b/src/Model/SyncLookupRequest.php index a9385084..b36c3945 100644 --- a/src/Model/SyncLookupRequest.php +++ b/src/Model/SyncLookupRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -301,7 +301,6 @@ public function setPhoneNumbers(array $phone_numbers): static throw new InvalidArgumentException('non-nullable phone_numbers cannot be null'); } - $this->container['phone_numbers'] = $phone_numbers; return $this; diff --git a/src/Model/TelephoneNumber.php b/src/Model/TelephoneNumber.php index 5599cdf8..23e673a3 100644 --- a/src/Model/TelephoneNumber.php +++ b/src/Model/TelephoneNumber.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/TfvBasicAuthentication.php b/src/Model/TfvBasicAuthentication.php index c774065e..965628c8 100644 --- a/src/Model/TfvBasicAuthentication.php +++ b/src/Model/TfvBasicAuthentication.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/TfvCallbackStatusEnum.php b/src/Model/TfvCallbackStatusEnum.php index fa96c67d..17d84618 100644 --- a/src/Model/TfvCallbackStatusEnum.php +++ b/src/Model/TfvCallbackStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/TfvError.php b/src/Model/TfvError.php index 8f3597a5..ac6e2985 100644 --- a/src/Model/TfvError.php +++ b/src/Model/TfvError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/TfvStatus.php b/src/Model/TfvStatus.php index 5a90c34b..80664db5 100644 --- a/src/Model/TfvStatus.php +++ b/src/Model/TfvStatus.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/TfvStatusEnum.php b/src/Model/TfvStatusEnum.php index a6900f6b..f9323cc2 100644 --- a/src/Model/TfvStatusEnum.php +++ b/src/Model/TfvStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/TfvSubmissionInfo.php b/src/Model/TfvSubmissionInfo.php index 96e2ff07..a37f4b9d 100644 --- a/src/Model/TfvSubmissionInfo.php +++ b/src/Model/TfvSubmissionInfo.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -509,7 +509,6 @@ public function setMessageVolume(?int $message_volume): static if (is_null($message_volume)) { throw new InvalidArgumentException('non-nullable message_volume cannot be null'); } - if (($message_volume > 10000000)) { throw new InvalidArgumentException('invalid value for $message_volume when calling TfvSubmissionInfo., must be smaller than or equal to 10000000.'); } diff --git a/src/Model/TfvSubmissionWrapper.php b/src/Model/TfvSubmissionWrapper.php index 12c34830..2f07b21d 100644 --- a/src/Model/TfvSubmissionWrapper.php +++ b/src/Model/TfvSubmissionWrapper.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/ThumbnailAlignmentEnum.php b/src/Model/ThumbnailAlignmentEnum.php index 89619cf5..d2bb47b2 100644 --- a/src/Model/ThumbnailAlignmentEnum.php +++ b/src/Model/ThumbnailAlignmentEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/TranscribeRecording.php b/src/Model/TranscribeRecording.php index 10660238..c9c04d71 100644 --- a/src/Model/TranscribeRecording.php +++ b/src/Model/TranscribeRecording.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -522,7 +522,6 @@ public function setCallbackTimeout(?float $callback_timeout): static $this->setOpenAPINullablesSetToNull($nullablesSetToNull); } } - if (!is_null($callback_timeout) && ($callback_timeout > 25)) { throw new InvalidArgumentException('invalid value for $callback_timeout when calling TranscribeRecording., must be smaller than or equal to 25.'); } diff --git a/src/Model/Transcription.php b/src/Model/Transcription.php index 074b4e94..d400c99d 100644 --- a/src/Model/Transcription.php +++ b/src/Model/Transcription.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/TranscriptionAvailableCallback.php b/src/Model/TranscriptionAvailableCallback.php index de3fd8c1..4421ea6b 100644 --- a/src/Model/TranscriptionAvailableCallback.php +++ b/src/Model/TranscriptionAvailableCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/TransferAnswerCallback.php b/src/Model/TransferAnswerCallback.php index 9248b898..ad79d0bd 100644 --- a/src/Model/TransferAnswerCallback.php +++ b/src/Model/TransferAnswerCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/TransferCompleteCallback.php b/src/Model/TransferCompleteCallback.php index 15598c5c..c0815c31 100644 --- a/src/Model/TransferCompleteCallback.php +++ b/src/Model/TransferCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/TransferDisconnectCallback.php b/src/Model/TransferDisconnectCallback.php index 4d56405d..17b9373e 100644 --- a/src/Model/TransferDisconnectCallback.php +++ b/src/Model/TransferDisconnectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/UpdateCall.php b/src/Model/UpdateCall.php index 6022bc95..0f6418eb 100644 --- a/src/Model/UpdateCall.php +++ b/src/Model/UpdateCall.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/UpdateCallRecording.php b/src/Model/UpdateCallRecording.php index d8aee3b8..db023ccd 100644 --- a/src/Model/UpdateCallRecording.php +++ b/src/Model/UpdateCallRecording.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/UpdateConference.php b/src/Model/UpdateConference.php index 240de462..38d3317d 100644 --- a/src/Model/UpdateConference.php +++ b/src/Model/UpdateConference.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/UpdateConferenceMember.php b/src/Model/UpdateConferenceMember.php index a6352117..9691bd05 100644 --- a/src/Model/UpdateConferenceMember.php +++ b/src/Model/UpdateConferenceMember.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/VerificationDenialWebhook.php b/src/Model/VerificationDenialWebhook.php index 869313f0..3132306e 100644 --- a/src/Model/VerificationDenialWebhook.php +++ b/src/Model/VerificationDenialWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/VerificationRequest.php b/src/Model/VerificationRequest.php index e6fb7573..2768535d 100644 --- a/src/Model/VerificationRequest.php +++ b/src/Model/VerificationRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -584,7 +584,6 @@ public function setMessageVolume(int $message_volume): static if (is_null($message_volume)) { throw new InvalidArgumentException('non-nullable message_volume cannot be null'); } - if (($message_volume > 10000000)) { throw new InvalidArgumentException('invalid value for $message_volume when calling VerificationRequest., must be smaller than or equal to 10000000.'); } @@ -619,7 +618,6 @@ public function setPhoneNumbers(array $phone_numbers): static if (is_null($phone_numbers)) { throw new InvalidArgumentException('non-nullable phone_numbers cannot be null'); } - if ((count($phone_numbers) > 10)) { throw new InvalidArgumentException('invalid value for $phone_numbers when calling VerificationRequest., number of items must be less than or equal to 10.'); } diff --git a/src/Model/VerificationUpdateRequest.php b/src/Model/VerificationUpdateRequest.php index 6af507d5..780a3658 100644 --- a/src/Model/VerificationUpdateRequest.php +++ b/src/Model/VerificationUpdateRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -563,7 +563,6 @@ public function setMessageVolume(int $message_volume): static if (is_null($message_volume)) { throw new InvalidArgumentException('non-nullable message_volume cannot be null'); } - if (($message_volume > 10000000)) { throw new InvalidArgumentException('invalid value for $message_volume when calling VerificationUpdateRequest., must be smaller than or equal to 10000000.'); } diff --git a/src/Model/VerificationWebhook.php b/src/Model/VerificationWebhook.php index 0e5a548c..6cd945fd 100644 --- a/src/Model/VerificationWebhook.php +++ b/src/Model/VerificationWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/VerifyCodeRequest.php b/src/Model/VerifyCodeRequest.php index 28d99390..d2cee1a0 100644 --- a/src/Model/VerifyCodeRequest.php +++ b/src/Model/VerifyCodeRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -395,7 +395,6 @@ public function setExpirationTimeInMinutes(float $expiration_time_in_minutes): s if (is_null($expiration_time_in_minutes)) { throw new InvalidArgumentException('non-nullable expiration_time_in_minutes cannot be null'); } - if (($expiration_time_in_minutes > 15)) { throw new InvalidArgumentException('invalid value for $expiration_time_in_minutes when calling VerifyCodeRequest., must be smaller than or equal to 15.'); } diff --git a/src/Model/VerifyCodeResponse.php b/src/Model/VerifyCodeResponse.php index bc314948..08c80c49 100644 --- a/src/Model/VerifyCodeResponse.php +++ b/src/Model/VerifyCodeResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/VoiceApiError.php b/src/Model/VoiceApiError.php index e111b05e..3c0209a3 100644 --- a/src/Model/VoiceApiError.php +++ b/src/Model/VoiceApiError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/VoiceCodeResponse.php b/src/Model/VoiceCodeResponse.php index c46b1b69..622086e6 100644 --- a/src/Model/VoiceCodeResponse.php +++ b/src/Model/VoiceCodeResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/WebhookSubscription.php b/src/Model/WebhookSubscription.php index 621763ad..b446b2a5 100644 --- a/src/Model/WebhookSubscription.php +++ b/src/Model/WebhookSubscription.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/WebhookSubscriptionBasicAuthentication.php b/src/Model/WebhookSubscriptionBasicAuthentication.php index 497bc291..ec3d00df 100644 --- a/src/Model/WebhookSubscriptionBasicAuthentication.php +++ b/src/Model/WebhookSubscriptionBasicAuthentication.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/WebhookSubscriptionError.php b/src/Model/WebhookSubscriptionError.php index 9ffc39a5..99701f76 100644 --- a/src/Model/WebhookSubscriptionError.php +++ b/src/Model/WebhookSubscriptionError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/WebhookSubscriptionRequestSchema.php b/src/Model/WebhookSubscriptionRequestSchema.php index 61f50965..31531e92 100644 --- a/src/Model/WebhookSubscriptionRequestSchema.php +++ b/src/Model/WebhookSubscriptionRequestSchema.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/WebhookSubscriptionTypeEnum.php b/src/Model/WebhookSubscriptionTypeEnum.php index e8039806..944c8870 100644 --- a/src/Model/WebhookSubscriptionTypeEnum.php +++ b/src/Model/WebhookSubscriptionTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/Model/WebhookSubscriptionsListBody.php b/src/Model/WebhookSubscriptionsListBody.php index 39d50b2f..3c6bdb71 100644 --- a/src/Model/WebhookSubscriptionsListBody.php +++ b/src/Model/WebhookSubscriptionsListBody.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index a24d3872..dd708e0e 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -501,6 +501,12 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade } else { $data = is_string($data) ? json_decode($data) : $data; + // A oneOf/anyOf schema is not a value object: dispatch here, after json_decode (so + // members get the decoded value) but before the array-to-object cast (which breaks arrays). + if (is_subclass_of($class, '\Bandwidth\Model\ComposedInterface')) { + return self::deserializeComposed($data, $class, $httpHeaders); + } + if (is_array($data)) { $data = (object) $data; } @@ -540,6 +546,56 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade } } + /** + * Deserialize data into one of the member types of a `oneOf` or `anyOf` schema. + * + * When the schema declares a discriminator, its value selects the member type directly. + * Otherwise each member type is tried in turn and the first one that yields a valid model + * (or a non-null primitive) is returned. + * + * @param mixed $data the decoded data to resolve to a member type + * @param string $class a class name implementing ComposedInterface + * @param string[]|null $httpHeaders HTTP headers + * + * @return mixed an instance of one of the composed (`oneOf`/`anyOf`) member types + */ + private static function deserializeComposed(mixed $data, string $class, ?array $httpHeaders): mixed + { + // $data is already decoded (see deserialize()). Read the discriminator from an object view + // of it, but deserialize each member from the original $data so array and scalar members + // keep their own type handling instead of being coerced to an object here. + $probe = is_array($data) ? (object) $data : $data; + + $discriminator = $class::getComposedDiscriminator(); + if ($discriminator !== null && is_object($probe) && isset($probe->{$discriminator}) && is_string($probe->{$discriminator})) { + $mappings = $class::getComposedDiscriminatorMappings(); + if (isset($mappings[$probe->{$discriminator}])) { + return self::deserialize($data, $mappings[$probe->{$discriminator}], $httpHeaders); + } + } + + foreach ($class::getComposedTypes() as $type) { + try { + $instance = self::deserialize($data, $type, $httpHeaders); + } catch (\Throwable $e) { + // Any failure means the data does not match this member type; try the next one. + // The broad catch is intentional: a real failure is not hidden, since the loop + // throws below when no member type matches. + continue; + } + + if ($instance instanceof ModelInterface) { + if ($instance->valid()) { + return $instance; + } + } elseif ($instance !== null) { + return $instance; + } + } + + throw new \InvalidArgumentException(sprintf('No matching schema in composed type %s for the given data', $class)); + } + /** * Build a query string from an array of key value pairs. * From d54c7f50662574dfb2297765f903bfd20d30b938 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 15 Jul 2026 15:17:42 -0400 Subject: [PATCH 10/53] snapshot model tests --- tests/Model/AccountStatisticsTest.php | 2 +- tests/Model/AdditionalDenialReasonTest.php | 2 +- tests/Model/AddressTest.php | 2 +- tests/Model/AnswerCallbackTest.php | 2 +- tests/Model/AsyncLookupRequestTest.php | 2 +- tests/Model/BlockedWebhookTest.php | 2 +- tests/Model/BridgeCompleteCallbackTest.php | 2 +- .../BridgeTargetCompleteCallbackTest.php | 2 +- tests/Model/BrtcErrorResponseTest.php | 2 +- tests/Model/BrtcErrorSourceTest.php | 2 +- tests/Model/BrtcErrorTest.php | 2 +- tests/Model/BrtcLinkTest.php | 2 +- tests/Model/BusinessEntityTypeEnumTest.php | 2 +- .../BusinessRegistrationTypeEnumTest.php | 2 +- tests/Model/CallDirectionEnumTest.php | 2 +- tests/Model/CallRecordingMetadataTest.php | 2 +- tests/Model/CallStateEnumTest.php | 2 +- tests/Model/CallStateTest.php | 2 +- ...lTranscriptionDetectedLanguageEnumTest.php | 2 +- tests/Model/CallTranscriptionMetadataTest.php | 2 +- tests/Model/CallTranscriptionResponseTest.php | 2 +- tests/Model/CallTranscriptionTest.php | 2 +- .../Model/CallTranscriptionTrackEnumTest.php | 2 +- tests/Model/CallbackMethodEnumTest.php | 2 +- tests/Model/CallbackTest.php | 74 +--------- tests/Model/CardWidthEnumTest.php | 2 +- tests/Model/CodeRequestTest.php | 2 +- tests/Model/CompletedLookupStatusEnumTest.php | 2 +- .../Model/ConferenceCompletedCallbackTest.php | 2 +- tests/Model/ConferenceCreatedCallbackTest.php | 2 +- .../ConferenceMemberExitCallbackTest.php | 2 +- .../ConferenceMemberJoinCallbackTest.php | 2 +- tests/Model/ConferenceMemberTest.php | 2 +- ...nferenceRecordingAvailableCallbackTest.php | 2 +- .../Model/ConferenceRecordingMetadataTest.php | 2 +- .../Model/ConferenceRedirectCallbackTest.php | 2 +- tests/Model/ConferenceStateEnumTest.php | 2 +- tests/Model/ConferenceTest.php | 2 +- tests/Model/ContactTest.php | 2 +- .../CreateAsyncBulkLookupResponseDataTest.php | 2 +- .../CreateAsyncBulkLookupResponseTest.php | 2 +- tests/Model/CreateCallResponseTest.php | 2 +- tests/Model/CreateCallTest.php | 2 +- tests/Model/CreateEndpointRequestBaseTest.php | 2 +- .../Model/CreateEndpointResponseDataTest.php | 2 +- tests/Model/CreateEndpointResponseTest.php | 2 +- tests/Model/CreateMessageRequestErrorTest.php | 2 +- .../CreateMultiChannelMessageResponseTest.php | 2 +- .../CreateSyncLookupResponseDataTest.php | 2 +- tests/Model/CreateSyncLookupResponseTest.php | 2 +- .../CreateWebRtcConnectionRequestTest.php | 2 +- tests/Model/DeactivationEventEnumTest.php | 2 +- tests/Model/DeviceStatusEnumTest.php | 2 +- tests/Model/DeviceTest.php | 2 +- tests/Model/DisconnectCallbackTest.php | 2 +- tests/Model/DiversionTest.php | 2 +- tests/Model/DtmfCallbackTest.php | 2 +- tests/Model/EndpointDirectionEnumTest.php | 2 +- tests/Model/EndpointEventTest.php | 2 +- tests/Model/EndpointEventTypeEnumTest.php | 2 +- tests/Model/EndpointResponseTest.php | 2 +- tests/Model/EndpointStatusEnumTest.php | 2 +- tests/Model/EndpointTest.php | 2 +- tests/Model/EndpointTypeEnumTest.php | 2 +- tests/Model/EndpointsTest.php | 2 +- tests/Model/ErrorObjectTest.php | 2 +- tests/Model/ErrorSourceTest.php | 2 +- tests/Model/FailureWebhookTest.php | 2 +- tests/Model/FieldErrorTest.php | 2 +- tests/Model/FileFormatEnumTest.php | 2 +- tests/Model/GatherCallbackTest.php | 2 +- .../GetAsyncBulkLookupResponseDataTest.php | 2 +- .../Model/GetAsyncBulkLookupResponseTest.php | 2 +- .../Model/InProgressLookupStatusEnumTest.php | 2 +- tests/Model/InboundCallbackMessageTest.php | 2 +- tests/Model/InboundCallbackTest.php | 2 +- tests/Model/InboundCallbackTypeEnumTest.php | 2 +- tests/Model/InitiateCallbackTest.php | 2 +- .../LatestMessageDeliveryStatusEnumTest.php | 2 +- tests/Model/LineTypeEnumTest.php | 2 +- tests/Model/LinkSchemaTest.php | 2 +- tests/Model/LinkTest.php | 2 +- tests/Model/LinksObjectTest.php | 2 +- tests/Model/ListEndpointsResponseTest.php | 2 +- tests/Model/ListMessageDirectionEnumTest.php | 2 +- tests/Model/ListMessageItemTest.php | 2 +- tests/Model/LookupErrorResponseTest.php | 2 +- tests/Model/LookupErrorSchemaMetaTest.php | 2 +- tests/Model/LookupErrorSchemaTest.php | 2 +- tests/Model/LookupResultTest.php | 2 +- .../MachineDetectionCompleteCallbackTest.php | 2 +- .../MachineDetectionConfigurationTest.php | 2 +- tests/Model/MachineDetectionModeEnumTest.php | 2 +- tests/Model/MachineDetectionResultTest.php | 2 +- tests/Model/MediaTest.php | 2 +- tests/Model/MessageDirectionEnumTest.php | 2 +- tests/Model/MessageRequestTest.php | 2 +- tests/Model/MessageStatusEnumTest.php | 2 +- tests/Model/MessageTest.php | 2 +- tests/Model/MessageTypeEnumTest.php | 2 +- tests/Model/MessagesListTest.php | 2 +- tests/Model/MessagingCodeResponseTest.php | 2 +- tests/Model/MessagingRequestErrorTest.php | 2 +- tests/Model/MfaForbiddenRequestErrorTest.php | 2 +- tests/Model/MfaRequestErrorTest.php | 2 +- .../Model/MfaUnauthorizedRequestErrorTest.php | 2 +- tests/Model/MmsMessageContentFileTest.php | 2 +- tests/Model/MmsMessageContentTest.php | 2 +- .../MultiChannelActionCalendarEventTest.php | 2 +- tests/Model/MultiChannelActionTest.php | 128 +----------------- .../MultiChannelChannelListMMSObjectTest.php | 2 +- ...hannelChannelListMMSResponseObjectTest.php | 2 +- .../MultiChannelChannelListObjectBaseTest.php | 2 +- ...MultiChannelChannelListOwnerObjectTest.php | 2 +- ...elChannelListRBMObjectAllOfContentTest.php | 74 +--------- .../MultiChannelChannelListRBMObjectTest.php | 2 +- ...hannelChannelListRBMResponseObjectTest.php | 2 +- ...ltiChannelChannelListRequestObjectTest.php | 38 +----- ...tiChannelChannelListResponseObjectTest.php | 47 +------ .../MultiChannelChannelListSMSObjectTest.php | 2 +- ...hannelChannelListSMSResponseObjectTest.php | 2 +- tests/Model/MultiChannelErrorTest.php | 2 +- .../MultiChannelMessageChannelEnumTest.php | 2 +- .../Model/MultiChannelMessageContentTest.php | 2 +- .../Model/MultiChannelMessageRequestTest.php | 2 +- .../MultiChannelMessageResponseDataTest.php | 2 +- tests/Model/OptInWorkflowTest.php | 2 +- tests/Model/PageInfoTest.php | 2 +- tests/Model/PageTest.php | 2 +- tests/Model/PriorityEnumTest.php | 2 +- tests/Model/ProductTypeEnumTest.php | 2 +- tests/Model/RbmActionBaseTest.php | 2 +- tests/Model/RbmActionDialTest.php | 2 +- tests/Model/RbmActionOpenUrlTest.php | 2 +- tests/Model/RbmActionTypeEnumTest.php | 2 +- tests/Model/RbmActionViewLocationTest.php | 2 +- tests/Model/RbmCardContentMediaTest.php | 2 +- tests/Model/RbmCardContentTest.php | 2 +- tests/Model/RbmLocationResponseTest.php | 2 +- tests/Model/RbmMediaHeightEnumTest.php | 2 +- tests/Model/RbmMessageCarouselCardTest.php | 2 +- tests/Model/RbmMessageContentFileTest.php | 2 +- tests/Model/RbmMessageContentRichCardTest.php | 56 +------- tests/Model/RbmMessageContentTextTest.php | 2 +- tests/Model/RbmMessageMediaTest.php | 2 +- tests/Model/RbmOpenUrlEnumTest.php | 2 +- tests/Model/RbmStandaloneCardTest.php | 2 +- tests/Model/RbmSuggestionResponseTest.php | 2 +- tests/Model/RbmWebViewEnumTest.php | 2 +- .../Model/RecordingAvailableCallbackTest.php | 2 +- tests/Model/RecordingCompleteCallbackTest.php | 2 +- tests/Model/RecordingStateEnumTest.php | 2 +- .../Model/RecordingTranscriptionClipTest.php | 2 +- .../RecordingTranscriptionMetadataTest.php | 2 +- tests/Model/RecordingTranscriptionsTest.php | 2 +- tests/Model/RedirectCallbackTest.php | 2 +- tests/Model/RedirectMethodEnumTest.php | 2 +- tests/Model/SipConnectionMetadataTest.php | 2 +- tests/Model/SipCredentialsTest.php | 2 +- tests/Model/SmsMessageContentTest.php | 2 +- .../StandaloneCardOrientationEnumTest.php | 2 +- tests/Model/StatusCallbackMessageTest.php | 2 +- tests/Model/StatusCallbackTest.php | 2 +- tests/Model/StatusCallbackTypeEnumTest.php | 2 +- tests/Model/StirShakenTest.php | 2 +- tests/Model/SyncLookupRequestTest.php | 2 +- tests/Model/TelephoneNumberTest.php | 2 +- tests/Model/TfvBasicAuthenticationTest.php | 2 +- tests/Model/TfvCallbackStatusEnumTest.php | 2 +- tests/Model/TfvErrorTest.php | 2 +- tests/Model/TfvStatusEnumTest.php | 2 +- tests/Model/TfvStatusTest.php | 2 +- tests/Model/TfvSubmissionInfoTest.php | 2 +- tests/Model/TfvSubmissionWrapperTest.php | 2 +- tests/Model/ThumbnailAlignmentEnumTest.php | 2 +- tests/Model/TranscribeRecordingTest.php | 2 +- .../TranscriptionAvailableCallbackTest.php | 2 +- tests/Model/TranscriptionTest.php | 2 +- tests/Model/TransferAnswerCallbackTest.php | 2 +- tests/Model/TransferCompleteCallbackTest.php | 2 +- .../Model/TransferDisconnectCallbackTest.php | 2 +- tests/Model/UpdateCallRecordingTest.php | 2 +- tests/Model/UpdateCallTest.php | 2 +- tests/Model/UpdateConferenceMemberTest.php | 2 +- tests/Model/UpdateConferenceTest.php | 2 +- tests/Model/VerificationDenialWebhookTest.php | 2 +- tests/Model/VerificationRequestTest.php | 2 +- tests/Model/VerificationUpdateRequestTest.php | 2 +- tests/Model/VerificationWebhookTest.php | 2 +- tests/Model/VerifyCodeRequestTest.php | 2 +- tests/Model/VerifyCodeResponseTest.php | 2 +- tests/Model/VoiceApiErrorTest.php | 2 +- tests/Model/VoiceCodeResponseTest.php | 2 +- ...ookSubscriptionBasicAuthenticationTest.php | 2 +- tests/Model/WebhookSubscriptionErrorTest.php | 2 +- .../WebhookSubscriptionRequestSchemaTest.php | 2 +- tests/Model/WebhookSubscriptionTest.php | 2 +- .../Model/WebhookSubscriptionTypeEnumTest.php | 2 +- .../WebhookSubscriptionsListBodyTest.php | 2 +- 199 files changed, 199 insertions(+), 604 deletions(-) diff --git a/tests/Model/AccountStatisticsTest.php b/tests/Model/AccountStatisticsTest.php index b04cdbf9..0d8083ff 100644 --- a/tests/Model/AccountStatisticsTest.php +++ b/tests/Model/AccountStatisticsTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/AdditionalDenialReasonTest.php b/tests/Model/AdditionalDenialReasonTest.php index aed0c6b7..49190931 100644 --- a/tests/Model/AdditionalDenialReasonTest.php +++ b/tests/Model/AdditionalDenialReasonTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/AddressTest.php b/tests/Model/AddressTest.php index 6d052bda..2183d3b4 100644 --- a/tests/Model/AddressTest.php +++ b/tests/Model/AddressTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/AnswerCallbackTest.php b/tests/Model/AnswerCallbackTest.php index 838058da..accf41b9 100644 --- a/tests/Model/AnswerCallbackTest.php +++ b/tests/Model/AnswerCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/AsyncLookupRequestTest.php b/tests/Model/AsyncLookupRequestTest.php index ef8d5dbd..60f6af72 100644 --- a/tests/Model/AsyncLookupRequestTest.php +++ b/tests/Model/AsyncLookupRequestTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/BlockedWebhookTest.php b/tests/Model/BlockedWebhookTest.php index 7fe8ba7b..f346c45d 100644 --- a/tests/Model/BlockedWebhookTest.php +++ b/tests/Model/BlockedWebhookTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/BridgeCompleteCallbackTest.php b/tests/Model/BridgeCompleteCallbackTest.php index 6b671421..4e0747d2 100644 --- a/tests/Model/BridgeCompleteCallbackTest.php +++ b/tests/Model/BridgeCompleteCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/BridgeTargetCompleteCallbackTest.php b/tests/Model/BridgeTargetCompleteCallbackTest.php index 56ac2bce..31dca6d1 100644 --- a/tests/Model/BridgeTargetCompleteCallbackTest.php +++ b/tests/Model/BridgeTargetCompleteCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/BrtcErrorResponseTest.php b/tests/Model/BrtcErrorResponseTest.php index 54c27e82..1aa1b348 100644 --- a/tests/Model/BrtcErrorResponseTest.php +++ b/tests/Model/BrtcErrorResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/BrtcErrorSourceTest.php b/tests/Model/BrtcErrorSourceTest.php index 62b8967d..1f530208 100644 --- a/tests/Model/BrtcErrorSourceTest.php +++ b/tests/Model/BrtcErrorSourceTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/BrtcErrorTest.php b/tests/Model/BrtcErrorTest.php index 2d6b5277..0f952468 100644 --- a/tests/Model/BrtcErrorTest.php +++ b/tests/Model/BrtcErrorTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/BrtcLinkTest.php b/tests/Model/BrtcLinkTest.php index 3ee4cdcb..fc57e83a 100644 --- a/tests/Model/BrtcLinkTest.php +++ b/tests/Model/BrtcLinkTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/BusinessEntityTypeEnumTest.php b/tests/Model/BusinessEntityTypeEnumTest.php index c0334d04..04dfad79 100644 --- a/tests/Model/BusinessEntityTypeEnumTest.php +++ b/tests/Model/BusinessEntityTypeEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/BusinessRegistrationTypeEnumTest.php b/tests/Model/BusinessRegistrationTypeEnumTest.php index 2179618b..6e5ee134 100644 --- a/tests/Model/BusinessRegistrationTypeEnumTest.php +++ b/tests/Model/BusinessRegistrationTypeEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CallDirectionEnumTest.php b/tests/Model/CallDirectionEnumTest.php index 94b0a794..24baa516 100644 --- a/tests/Model/CallDirectionEnumTest.php +++ b/tests/Model/CallDirectionEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CallRecordingMetadataTest.php b/tests/Model/CallRecordingMetadataTest.php index 8584509e..e2cc61e5 100644 --- a/tests/Model/CallRecordingMetadataTest.php +++ b/tests/Model/CallRecordingMetadataTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CallStateEnumTest.php b/tests/Model/CallStateEnumTest.php index 228e5741..48b75f84 100644 --- a/tests/Model/CallStateEnumTest.php +++ b/tests/Model/CallStateEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CallStateTest.php b/tests/Model/CallStateTest.php index 88c2eae7..315e5570 100644 --- a/tests/Model/CallStateTest.php +++ b/tests/Model/CallStateTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CallTranscriptionDetectedLanguageEnumTest.php b/tests/Model/CallTranscriptionDetectedLanguageEnumTest.php index dfaa7b8b..02b90509 100644 --- a/tests/Model/CallTranscriptionDetectedLanguageEnumTest.php +++ b/tests/Model/CallTranscriptionDetectedLanguageEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CallTranscriptionMetadataTest.php b/tests/Model/CallTranscriptionMetadataTest.php index 5523bf9e..0ad2c57d 100644 --- a/tests/Model/CallTranscriptionMetadataTest.php +++ b/tests/Model/CallTranscriptionMetadataTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CallTranscriptionResponseTest.php b/tests/Model/CallTranscriptionResponseTest.php index 9f961ec2..91054401 100644 --- a/tests/Model/CallTranscriptionResponseTest.php +++ b/tests/Model/CallTranscriptionResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CallTranscriptionTest.php b/tests/Model/CallTranscriptionTest.php index 4819ca59..9bde7155 100644 --- a/tests/Model/CallTranscriptionTest.php +++ b/tests/Model/CallTranscriptionTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CallTranscriptionTrackEnumTest.php b/tests/Model/CallTranscriptionTrackEnumTest.php index e477a5ef..0d1e17ec 100644 --- a/tests/Model/CallTranscriptionTrackEnumTest.php +++ b/tests/Model/CallTranscriptionTrackEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CallbackMethodEnumTest.php b/tests/Model/CallbackMethodEnumTest.php index 7ec7a075..e1f9bdbb 100644 --- a/tests/Model/CallbackMethodEnumTest.php +++ b/tests/Model/CallbackMethodEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CallbackTest.php b/tests/Model/CallbackTest.php index 917b849c..ec514806 100644 --- a/tests/Model/CallbackTest.php +++ b/tests/Model/CallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -77,76 +77,4 @@ public function testCallback() // TODO: implement self::markTestIncomplete('Not implemented'); } - - /** - * Test attribute "time" - */ - public function testPropertyTime() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "event_time" - */ - public function testPropertyEventTime() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "type" - */ - public function testPropertyType() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "to" - */ - public function testPropertyTo() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "description" - */ - public function testPropertyDescription() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "message" - */ - public function testPropertyMessage() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "error_code" - */ - public function testPropertyErrorCode() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "carrier_name" - */ - public function testPropertyCarrierName() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } } diff --git a/tests/Model/CardWidthEnumTest.php b/tests/Model/CardWidthEnumTest.php index 38a9cb5e..04ec5ac2 100644 --- a/tests/Model/CardWidthEnumTest.php +++ b/tests/Model/CardWidthEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CodeRequestTest.php b/tests/Model/CodeRequestTest.php index a49f3747..decf204a 100644 --- a/tests/Model/CodeRequestTest.php +++ b/tests/Model/CodeRequestTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CompletedLookupStatusEnumTest.php b/tests/Model/CompletedLookupStatusEnumTest.php index e27c6df1..e9940592 100644 --- a/tests/Model/CompletedLookupStatusEnumTest.php +++ b/tests/Model/CompletedLookupStatusEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ConferenceCompletedCallbackTest.php b/tests/Model/ConferenceCompletedCallbackTest.php index 3602df2a..1aba3e62 100644 --- a/tests/Model/ConferenceCompletedCallbackTest.php +++ b/tests/Model/ConferenceCompletedCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ConferenceCreatedCallbackTest.php b/tests/Model/ConferenceCreatedCallbackTest.php index f7ad90f0..ae9903ab 100644 --- a/tests/Model/ConferenceCreatedCallbackTest.php +++ b/tests/Model/ConferenceCreatedCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ConferenceMemberExitCallbackTest.php b/tests/Model/ConferenceMemberExitCallbackTest.php index 0c1a5443..8725f4b0 100644 --- a/tests/Model/ConferenceMemberExitCallbackTest.php +++ b/tests/Model/ConferenceMemberExitCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ConferenceMemberJoinCallbackTest.php b/tests/Model/ConferenceMemberJoinCallbackTest.php index 93f77ea7..609d4ebc 100644 --- a/tests/Model/ConferenceMemberJoinCallbackTest.php +++ b/tests/Model/ConferenceMemberJoinCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ConferenceMemberTest.php b/tests/Model/ConferenceMemberTest.php index 2727b0d1..9aa66c4f 100644 --- a/tests/Model/ConferenceMemberTest.php +++ b/tests/Model/ConferenceMemberTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ConferenceRecordingAvailableCallbackTest.php b/tests/Model/ConferenceRecordingAvailableCallbackTest.php index fed72831..e025376c 100644 --- a/tests/Model/ConferenceRecordingAvailableCallbackTest.php +++ b/tests/Model/ConferenceRecordingAvailableCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ConferenceRecordingMetadataTest.php b/tests/Model/ConferenceRecordingMetadataTest.php index 4a1884ae..a1c10281 100644 --- a/tests/Model/ConferenceRecordingMetadataTest.php +++ b/tests/Model/ConferenceRecordingMetadataTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ConferenceRedirectCallbackTest.php b/tests/Model/ConferenceRedirectCallbackTest.php index b4f076a1..e5c49cff 100644 --- a/tests/Model/ConferenceRedirectCallbackTest.php +++ b/tests/Model/ConferenceRedirectCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ConferenceStateEnumTest.php b/tests/Model/ConferenceStateEnumTest.php index a23c1207..68dbca33 100644 --- a/tests/Model/ConferenceStateEnumTest.php +++ b/tests/Model/ConferenceStateEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ConferenceTest.php b/tests/Model/ConferenceTest.php index 451fe610..fd76e822 100644 --- a/tests/Model/ConferenceTest.php +++ b/tests/Model/ConferenceTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ContactTest.php b/tests/Model/ContactTest.php index f37ab474..7706dca3 100644 --- a/tests/Model/ContactTest.php +++ b/tests/Model/ContactTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CreateAsyncBulkLookupResponseDataTest.php b/tests/Model/CreateAsyncBulkLookupResponseDataTest.php index e252d943..2866b700 100644 --- a/tests/Model/CreateAsyncBulkLookupResponseDataTest.php +++ b/tests/Model/CreateAsyncBulkLookupResponseDataTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CreateAsyncBulkLookupResponseTest.php b/tests/Model/CreateAsyncBulkLookupResponseTest.php index cbf51714..befa7dd6 100644 --- a/tests/Model/CreateAsyncBulkLookupResponseTest.php +++ b/tests/Model/CreateAsyncBulkLookupResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CreateCallResponseTest.php b/tests/Model/CreateCallResponseTest.php index dae3329f..f3a2ff99 100644 --- a/tests/Model/CreateCallResponseTest.php +++ b/tests/Model/CreateCallResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CreateCallTest.php b/tests/Model/CreateCallTest.php index 6b39b2f6..7408353a 100644 --- a/tests/Model/CreateCallTest.php +++ b/tests/Model/CreateCallTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CreateEndpointRequestBaseTest.php b/tests/Model/CreateEndpointRequestBaseTest.php index b17b1229..3ceb0f58 100644 --- a/tests/Model/CreateEndpointRequestBaseTest.php +++ b/tests/Model/CreateEndpointRequestBaseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CreateEndpointResponseDataTest.php b/tests/Model/CreateEndpointResponseDataTest.php index 9f1d4e26..e07ed9d6 100644 --- a/tests/Model/CreateEndpointResponseDataTest.php +++ b/tests/Model/CreateEndpointResponseDataTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CreateEndpointResponseTest.php b/tests/Model/CreateEndpointResponseTest.php index a2e9d521..728273a7 100644 --- a/tests/Model/CreateEndpointResponseTest.php +++ b/tests/Model/CreateEndpointResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CreateMessageRequestErrorTest.php b/tests/Model/CreateMessageRequestErrorTest.php index 62cc5257..b9948ce7 100644 --- a/tests/Model/CreateMessageRequestErrorTest.php +++ b/tests/Model/CreateMessageRequestErrorTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CreateMultiChannelMessageResponseTest.php b/tests/Model/CreateMultiChannelMessageResponseTest.php index e1b02756..3b8d788c 100644 --- a/tests/Model/CreateMultiChannelMessageResponseTest.php +++ b/tests/Model/CreateMultiChannelMessageResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CreateSyncLookupResponseDataTest.php b/tests/Model/CreateSyncLookupResponseDataTest.php index 213d2107..e4cd6619 100644 --- a/tests/Model/CreateSyncLookupResponseDataTest.php +++ b/tests/Model/CreateSyncLookupResponseDataTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CreateSyncLookupResponseTest.php b/tests/Model/CreateSyncLookupResponseTest.php index cbcc2fba..d7e1a35b 100644 --- a/tests/Model/CreateSyncLookupResponseTest.php +++ b/tests/Model/CreateSyncLookupResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/CreateWebRtcConnectionRequestTest.php b/tests/Model/CreateWebRtcConnectionRequestTest.php index 4b34da8f..c8387bcf 100644 --- a/tests/Model/CreateWebRtcConnectionRequestTest.php +++ b/tests/Model/CreateWebRtcConnectionRequestTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/DeactivationEventEnumTest.php b/tests/Model/DeactivationEventEnumTest.php index 1897aa65..2790b4bf 100644 --- a/tests/Model/DeactivationEventEnumTest.php +++ b/tests/Model/DeactivationEventEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/DeviceStatusEnumTest.php b/tests/Model/DeviceStatusEnumTest.php index 64b22349..a1eef865 100644 --- a/tests/Model/DeviceStatusEnumTest.php +++ b/tests/Model/DeviceStatusEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/DeviceTest.php b/tests/Model/DeviceTest.php index b2255bce..0ed36e1e 100644 --- a/tests/Model/DeviceTest.php +++ b/tests/Model/DeviceTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/DisconnectCallbackTest.php b/tests/Model/DisconnectCallbackTest.php index 35713162..5a81cfa8 100644 --- a/tests/Model/DisconnectCallbackTest.php +++ b/tests/Model/DisconnectCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/DiversionTest.php b/tests/Model/DiversionTest.php index 87de6655..d8ca0632 100644 --- a/tests/Model/DiversionTest.php +++ b/tests/Model/DiversionTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/DtmfCallbackTest.php b/tests/Model/DtmfCallbackTest.php index c187e45d..b27ad1aa 100644 --- a/tests/Model/DtmfCallbackTest.php +++ b/tests/Model/DtmfCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/EndpointDirectionEnumTest.php b/tests/Model/EndpointDirectionEnumTest.php index 0457f2ad..6899a66e 100644 --- a/tests/Model/EndpointDirectionEnumTest.php +++ b/tests/Model/EndpointDirectionEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/EndpointEventTest.php b/tests/Model/EndpointEventTest.php index 3cc7e0cf..8d079186 100644 --- a/tests/Model/EndpointEventTest.php +++ b/tests/Model/EndpointEventTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/EndpointEventTypeEnumTest.php b/tests/Model/EndpointEventTypeEnumTest.php index f04f7417..84824ea4 100644 --- a/tests/Model/EndpointEventTypeEnumTest.php +++ b/tests/Model/EndpointEventTypeEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/EndpointResponseTest.php b/tests/Model/EndpointResponseTest.php index 00ba5795..337db3aa 100644 --- a/tests/Model/EndpointResponseTest.php +++ b/tests/Model/EndpointResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/EndpointStatusEnumTest.php b/tests/Model/EndpointStatusEnumTest.php index c0be392f..b85fb4b1 100644 --- a/tests/Model/EndpointStatusEnumTest.php +++ b/tests/Model/EndpointStatusEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/EndpointTest.php b/tests/Model/EndpointTest.php index 3e72c25b..bd5f5b8a 100644 --- a/tests/Model/EndpointTest.php +++ b/tests/Model/EndpointTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/EndpointTypeEnumTest.php b/tests/Model/EndpointTypeEnumTest.php index e79cc740..880eb720 100644 --- a/tests/Model/EndpointTypeEnumTest.php +++ b/tests/Model/EndpointTypeEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/EndpointsTest.php b/tests/Model/EndpointsTest.php index e61fbeef..1d2afb5d 100644 --- a/tests/Model/EndpointsTest.php +++ b/tests/Model/EndpointsTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ErrorObjectTest.php b/tests/Model/ErrorObjectTest.php index 1e3b5f3d..4a89a8b1 100644 --- a/tests/Model/ErrorObjectTest.php +++ b/tests/Model/ErrorObjectTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ErrorSourceTest.php b/tests/Model/ErrorSourceTest.php index cc64336d..198ede5d 100644 --- a/tests/Model/ErrorSourceTest.php +++ b/tests/Model/ErrorSourceTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/FailureWebhookTest.php b/tests/Model/FailureWebhookTest.php index 23fed9e6..786b4f5e 100644 --- a/tests/Model/FailureWebhookTest.php +++ b/tests/Model/FailureWebhookTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/FieldErrorTest.php b/tests/Model/FieldErrorTest.php index affeedec..55b4572a 100644 --- a/tests/Model/FieldErrorTest.php +++ b/tests/Model/FieldErrorTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/FileFormatEnumTest.php b/tests/Model/FileFormatEnumTest.php index 6b100e02..c8d2b25c 100644 --- a/tests/Model/FileFormatEnumTest.php +++ b/tests/Model/FileFormatEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/GatherCallbackTest.php b/tests/Model/GatherCallbackTest.php index 51f87627..21e85959 100644 --- a/tests/Model/GatherCallbackTest.php +++ b/tests/Model/GatherCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/GetAsyncBulkLookupResponseDataTest.php b/tests/Model/GetAsyncBulkLookupResponseDataTest.php index 9345fff7..bee5fb6a 100644 --- a/tests/Model/GetAsyncBulkLookupResponseDataTest.php +++ b/tests/Model/GetAsyncBulkLookupResponseDataTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/GetAsyncBulkLookupResponseTest.php b/tests/Model/GetAsyncBulkLookupResponseTest.php index bbd6da68..9284cba7 100644 --- a/tests/Model/GetAsyncBulkLookupResponseTest.php +++ b/tests/Model/GetAsyncBulkLookupResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/InProgressLookupStatusEnumTest.php b/tests/Model/InProgressLookupStatusEnumTest.php index 0a148d40..7a82bffe 100644 --- a/tests/Model/InProgressLookupStatusEnumTest.php +++ b/tests/Model/InProgressLookupStatusEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/InboundCallbackMessageTest.php b/tests/Model/InboundCallbackMessageTest.php index 429052d2..f9ed6084 100644 --- a/tests/Model/InboundCallbackMessageTest.php +++ b/tests/Model/InboundCallbackMessageTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/InboundCallbackTest.php b/tests/Model/InboundCallbackTest.php index 947f2dd8..e4e757e9 100644 --- a/tests/Model/InboundCallbackTest.php +++ b/tests/Model/InboundCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/InboundCallbackTypeEnumTest.php b/tests/Model/InboundCallbackTypeEnumTest.php index bff2e988..98fa5e85 100644 --- a/tests/Model/InboundCallbackTypeEnumTest.php +++ b/tests/Model/InboundCallbackTypeEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/InitiateCallbackTest.php b/tests/Model/InitiateCallbackTest.php index 848e7578..30e05dca 100644 --- a/tests/Model/InitiateCallbackTest.php +++ b/tests/Model/InitiateCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/LatestMessageDeliveryStatusEnumTest.php b/tests/Model/LatestMessageDeliveryStatusEnumTest.php index 945eb746..d9eafc4d 100644 --- a/tests/Model/LatestMessageDeliveryStatusEnumTest.php +++ b/tests/Model/LatestMessageDeliveryStatusEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/LineTypeEnumTest.php b/tests/Model/LineTypeEnumTest.php index a79b58f5..eea3a96a 100644 --- a/tests/Model/LineTypeEnumTest.php +++ b/tests/Model/LineTypeEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/LinkSchemaTest.php b/tests/Model/LinkSchemaTest.php index c2a85d9d..33c0c54b 100644 --- a/tests/Model/LinkSchemaTest.php +++ b/tests/Model/LinkSchemaTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/LinkTest.php b/tests/Model/LinkTest.php index f1ea866c..b1bc9d0e 100644 --- a/tests/Model/LinkTest.php +++ b/tests/Model/LinkTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/LinksObjectTest.php b/tests/Model/LinksObjectTest.php index cd5f2db3..1ba27bf8 100644 --- a/tests/Model/LinksObjectTest.php +++ b/tests/Model/LinksObjectTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ListEndpointsResponseTest.php b/tests/Model/ListEndpointsResponseTest.php index 29e99d34..197bc159 100644 --- a/tests/Model/ListEndpointsResponseTest.php +++ b/tests/Model/ListEndpointsResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ListMessageDirectionEnumTest.php b/tests/Model/ListMessageDirectionEnumTest.php index 86a69809..0c16847c 100644 --- a/tests/Model/ListMessageDirectionEnumTest.php +++ b/tests/Model/ListMessageDirectionEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ListMessageItemTest.php b/tests/Model/ListMessageItemTest.php index f8e15dae..c2c7286c 100644 --- a/tests/Model/ListMessageItemTest.php +++ b/tests/Model/ListMessageItemTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/LookupErrorResponseTest.php b/tests/Model/LookupErrorResponseTest.php index 0af606c9..97b92b15 100644 --- a/tests/Model/LookupErrorResponseTest.php +++ b/tests/Model/LookupErrorResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/LookupErrorSchemaMetaTest.php b/tests/Model/LookupErrorSchemaMetaTest.php index 880d5695..ab9ff69e 100644 --- a/tests/Model/LookupErrorSchemaMetaTest.php +++ b/tests/Model/LookupErrorSchemaMetaTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/LookupErrorSchemaTest.php b/tests/Model/LookupErrorSchemaTest.php index 41ec6389..c5c49b07 100644 --- a/tests/Model/LookupErrorSchemaTest.php +++ b/tests/Model/LookupErrorSchemaTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/LookupResultTest.php b/tests/Model/LookupResultTest.php index b1bc31bd..d78364f6 100644 --- a/tests/Model/LookupResultTest.php +++ b/tests/Model/LookupResultTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MachineDetectionCompleteCallbackTest.php b/tests/Model/MachineDetectionCompleteCallbackTest.php index aaa2a2c3..f368c4dd 100644 --- a/tests/Model/MachineDetectionCompleteCallbackTest.php +++ b/tests/Model/MachineDetectionCompleteCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MachineDetectionConfigurationTest.php b/tests/Model/MachineDetectionConfigurationTest.php index 8789ba70..22dd9221 100644 --- a/tests/Model/MachineDetectionConfigurationTest.php +++ b/tests/Model/MachineDetectionConfigurationTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MachineDetectionModeEnumTest.php b/tests/Model/MachineDetectionModeEnumTest.php index 5135c7d6..c0fbc2a0 100644 --- a/tests/Model/MachineDetectionModeEnumTest.php +++ b/tests/Model/MachineDetectionModeEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MachineDetectionResultTest.php b/tests/Model/MachineDetectionResultTest.php index ddbd4469..a588ab99 100644 --- a/tests/Model/MachineDetectionResultTest.php +++ b/tests/Model/MachineDetectionResultTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MediaTest.php b/tests/Model/MediaTest.php index 3f9d0baa..68a11dca 100644 --- a/tests/Model/MediaTest.php +++ b/tests/Model/MediaTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MessageDirectionEnumTest.php b/tests/Model/MessageDirectionEnumTest.php index cf8281ca..c5445b5d 100644 --- a/tests/Model/MessageDirectionEnumTest.php +++ b/tests/Model/MessageDirectionEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MessageRequestTest.php b/tests/Model/MessageRequestTest.php index 79916ddb..6bbe8172 100644 --- a/tests/Model/MessageRequestTest.php +++ b/tests/Model/MessageRequestTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MessageStatusEnumTest.php b/tests/Model/MessageStatusEnumTest.php index e788ac57..2aa606d0 100644 --- a/tests/Model/MessageStatusEnumTest.php +++ b/tests/Model/MessageStatusEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MessageTest.php b/tests/Model/MessageTest.php index 33fdb9c4..2ca74864 100644 --- a/tests/Model/MessageTest.php +++ b/tests/Model/MessageTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MessageTypeEnumTest.php b/tests/Model/MessageTypeEnumTest.php index c3fc7ceb..b4985f4e 100644 --- a/tests/Model/MessageTypeEnumTest.php +++ b/tests/Model/MessageTypeEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MessagesListTest.php b/tests/Model/MessagesListTest.php index 1425d611..428326be 100644 --- a/tests/Model/MessagesListTest.php +++ b/tests/Model/MessagesListTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MessagingCodeResponseTest.php b/tests/Model/MessagingCodeResponseTest.php index 1d4e2e1a..bec9a73e 100644 --- a/tests/Model/MessagingCodeResponseTest.php +++ b/tests/Model/MessagingCodeResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MessagingRequestErrorTest.php b/tests/Model/MessagingRequestErrorTest.php index 1f335bbb..a399309c 100644 --- a/tests/Model/MessagingRequestErrorTest.php +++ b/tests/Model/MessagingRequestErrorTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MfaForbiddenRequestErrorTest.php b/tests/Model/MfaForbiddenRequestErrorTest.php index 6c05c9a1..6d357668 100644 --- a/tests/Model/MfaForbiddenRequestErrorTest.php +++ b/tests/Model/MfaForbiddenRequestErrorTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MfaRequestErrorTest.php b/tests/Model/MfaRequestErrorTest.php index 1cc2f19b..b95f2935 100644 --- a/tests/Model/MfaRequestErrorTest.php +++ b/tests/Model/MfaRequestErrorTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MfaUnauthorizedRequestErrorTest.php b/tests/Model/MfaUnauthorizedRequestErrorTest.php index 2adb9e01..6ba75398 100644 --- a/tests/Model/MfaUnauthorizedRequestErrorTest.php +++ b/tests/Model/MfaUnauthorizedRequestErrorTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MmsMessageContentFileTest.php b/tests/Model/MmsMessageContentFileTest.php index 68cd9b6d..eb171799 100644 --- a/tests/Model/MmsMessageContentFileTest.php +++ b/tests/Model/MmsMessageContentFileTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MmsMessageContentTest.php b/tests/Model/MmsMessageContentTest.php index 7a26e447..a8b514dc 100644 --- a/tests/Model/MmsMessageContentTest.php +++ b/tests/Model/MmsMessageContentTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelActionCalendarEventTest.php b/tests/Model/MultiChannelActionCalendarEventTest.php index fda5137f..8f31d8aa 100644 --- a/tests/Model/MultiChannelActionCalendarEventTest.php +++ b/tests/Model/MultiChannelActionCalendarEventTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelActionTest.php b/tests/Model/MultiChannelActionTest.php index 205de2d4..f48bf91f 100644 --- a/tests/Model/MultiChannelActionTest.php +++ b/tests/Model/MultiChannelActionTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -77,130 +77,4 @@ public function testMultiChannelAction() // TODO: implement self::markTestIncomplete('Not implemented'); } - - /** - * Test attribute "type" - */ - public function testPropertyType() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "text" - */ - public function testPropertyText() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "postback_data" - */ - public function testPropertyPostbackData() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "phone_number" - */ - public function testPropertyPhoneNumber() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "latitude" - */ - public function testPropertyLatitude() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "longitude" - */ - public function testPropertyLongitude() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "label" - */ - public function testPropertyLabel() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "title" - */ - public function testPropertyTitle() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "start_time" - */ - public function testPropertyStartTime() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "end_time" - */ - public function testPropertyEndTime() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "description" - */ - public function testPropertyDescription() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "url" - */ - public function testPropertyUrl() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "application" - */ - public function testPropertyApplication() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "webview_view_mode" - */ - public function testPropertyWebviewViewMode() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } } diff --git a/tests/Model/MultiChannelChannelListMMSObjectTest.php b/tests/Model/MultiChannelChannelListMMSObjectTest.php index b339cb88..39c8a400 100644 --- a/tests/Model/MultiChannelChannelListMMSObjectTest.php +++ b/tests/Model/MultiChannelChannelListMMSObjectTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelChannelListMMSResponseObjectTest.php b/tests/Model/MultiChannelChannelListMMSResponseObjectTest.php index 2f240ae0..562e1498 100644 --- a/tests/Model/MultiChannelChannelListMMSResponseObjectTest.php +++ b/tests/Model/MultiChannelChannelListMMSResponseObjectTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelChannelListObjectBaseTest.php b/tests/Model/MultiChannelChannelListObjectBaseTest.php index 57904e84..2dbdb474 100644 --- a/tests/Model/MultiChannelChannelListObjectBaseTest.php +++ b/tests/Model/MultiChannelChannelListObjectBaseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelChannelListOwnerObjectTest.php b/tests/Model/MultiChannelChannelListOwnerObjectTest.php index ad5f363f..0848aabc 100644 --- a/tests/Model/MultiChannelChannelListOwnerObjectTest.php +++ b/tests/Model/MultiChannelChannelListOwnerObjectTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php b/tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php index 3b558d50..3d6365f9 100644 --- a/tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php +++ b/tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -77,76 +77,4 @@ public function testMultiChannelChannelListRBMObjectAllOfContent() // TODO: implement self::markTestIncomplete('Not implemented'); } - - /** - * Test attribute "text" - */ - public function testPropertyText() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "suggestions" - */ - public function testPropertySuggestions() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "media" - */ - public function testPropertyMedia() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "orientation" - */ - public function testPropertyOrientation() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "thumbnail_image_alignment" - */ - public function testPropertyThumbnailImageAlignment() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "card_content" - */ - public function testPropertyCardContent() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "card_width" - */ - public function testPropertyCardWidth() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "card_contents" - */ - public function testPropertyCardContents() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } } diff --git a/tests/Model/MultiChannelChannelListRBMObjectTest.php b/tests/Model/MultiChannelChannelListRBMObjectTest.php index bc5b824a..7556d969 100644 --- a/tests/Model/MultiChannelChannelListRBMObjectTest.php +++ b/tests/Model/MultiChannelChannelListRBMObjectTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelChannelListRBMResponseObjectTest.php b/tests/Model/MultiChannelChannelListRBMResponseObjectTest.php index bcd7d944..654781c9 100644 --- a/tests/Model/MultiChannelChannelListRBMResponseObjectTest.php +++ b/tests/Model/MultiChannelChannelListRBMResponseObjectTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelChannelListRequestObjectTest.php b/tests/Model/MultiChannelChannelListRequestObjectTest.php index f845c08d..6770ee56 100644 --- a/tests/Model/MultiChannelChannelListRequestObjectTest.php +++ b/tests/Model/MultiChannelChannelListRequestObjectTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -77,40 +77,4 @@ public function testMultiChannelChannelListRequestObject() // TODO: implement self::markTestIncomplete('Not implemented'); } - - /** - * Test attribute "from" - */ - public function testPropertyFrom() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "application_id" - */ - public function testPropertyApplicationId() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "channel" - */ - public function testPropertyChannel() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "content" - */ - public function testPropertyContent() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } } diff --git a/tests/Model/MultiChannelChannelListResponseObjectTest.php b/tests/Model/MultiChannelChannelListResponseObjectTest.php index 80b6bf4b..2b7ee6dd 100644 --- a/tests/Model/MultiChannelChannelListResponseObjectTest.php +++ b/tests/Model/MultiChannelChannelListResponseObjectTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -77,49 +77,4 @@ public function testMultiChannelChannelListResponseObject() // TODO: implement self::markTestIncomplete('Not implemented'); } - - /** - * Test attribute "from" - */ - public function testPropertyFrom() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "application_id" - */ - public function testPropertyApplicationId() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "channel" - */ - public function testPropertyChannel() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "content" - */ - public function testPropertyContent() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "owner" - */ - public function testPropertyOwner() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } } diff --git a/tests/Model/MultiChannelChannelListSMSObjectTest.php b/tests/Model/MultiChannelChannelListSMSObjectTest.php index 8138fc68..b7f24ba3 100644 --- a/tests/Model/MultiChannelChannelListSMSObjectTest.php +++ b/tests/Model/MultiChannelChannelListSMSObjectTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelChannelListSMSResponseObjectTest.php b/tests/Model/MultiChannelChannelListSMSResponseObjectTest.php index 12618126..1ab7eff3 100644 --- a/tests/Model/MultiChannelChannelListSMSResponseObjectTest.php +++ b/tests/Model/MultiChannelChannelListSMSResponseObjectTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelErrorTest.php b/tests/Model/MultiChannelErrorTest.php index f96c56ed..7a04fc0b 100644 --- a/tests/Model/MultiChannelErrorTest.php +++ b/tests/Model/MultiChannelErrorTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelMessageChannelEnumTest.php b/tests/Model/MultiChannelMessageChannelEnumTest.php index cbc9ddb5..188ee632 100644 --- a/tests/Model/MultiChannelMessageChannelEnumTest.php +++ b/tests/Model/MultiChannelMessageChannelEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelMessageContentTest.php b/tests/Model/MultiChannelMessageContentTest.php index 07d954b0..168fcd37 100644 --- a/tests/Model/MultiChannelMessageContentTest.php +++ b/tests/Model/MultiChannelMessageContentTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelMessageRequestTest.php b/tests/Model/MultiChannelMessageRequestTest.php index e9b5a4e6..5e359909 100644 --- a/tests/Model/MultiChannelMessageRequestTest.php +++ b/tests/Model/MultiChannelMessageRequestTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/MultiChannelMessageResponseDataTest.php b/tests/Model/MultiChannelMessageResponseDataTest.php index ecb26360..1ab0bb9d 100644 --- a/tests/Model/MultiChannelMessageResponseDataTest.php +++ b/tests/Model/MultiChannelMessageResponseDataTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/OptInWorkflowTest.php b/tests/Model/OptInWorkflowTest.php index 55188bb5..7b9c8977 100644 --- a/tests/Model/OptInWorkflowTest.php +++ b/tests/Model/OptInWorkflowTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/PageInfoTest.php b/tests/Model/PageInfoTest.php index b696c01f..adf682f7 100644 --- a/tests/Model/PageInfoTest.php +++ b/tests/Model/PageInfoTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/PageTest.php b/tests/Model/PageTest.php index 4448c00f..186cb7ca 100644 --- a/tests/Model/PageTest.php +++ b/tests/Model/PageTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/PriorityEnumTest.php b/tests/Model/PriorityEnumTest.php index a467d100..b81b84a7 100644 --- a/tests/Model/PriorityEnumTest.php +++ b/tests/Model/PriorityEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ProductTypeEnumTest.php b/tests/Model/ProductTypeEnumTest.php index eb71819e..5f833f3c 100644 --- a/tests/Model/ProductTypeEnumTest.php +++ b/tests/Model/ProductTypeEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmActionBaseTest.php b/tests/Model/RbmActionBaseTest.php index e1ed064b..99a9c956 100644 --- a/tests/Model/RbmActionBaseTest.php +++ b/tests/Model/RbmActionBaseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmActionDialTest.php b/tests/Model/RbmActionDialTest.php index 5689c488..1c246427 100644 --- a/tests/Model/RbmActionDialTest.php +++ b/tests/Model/RbmActionDialTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmActionOpenUrlTest.php b/tests/Model/RbmActionOpenUrlTest.php index 0ff05b0a..991ae62e 100644 --- a/tests/Model/RbmActionOpenUrlTest.php +++ b/tests/Model/RbmActionOpenUrlTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmActionTypeEnumTest.php b/tests/Model/RbmActionTypeEnumTest.php index 90b0ce0e..81a0103e 100644 --- a/tests/Model/RbmActionTypeEnumTest.php +++ b/tests/Model/RbmActionTypeEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmActionViewLocationTest.php b/tests/Model/RbmActionViewLocationTest.php index 73270877..367ff2eb 100644 --- a/tests/Model/RbmActionViewLocationTest.php +++ b/tests/Model/RbmActionViewLocationTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmCardContentMediaTest.php b/tests/Model/RbmCardContentMediaTest.php index a63ed160..35fde68c 100644 --- a/tests/Model/RbmCardContentMediaTest.php +++ b/tests/Model/RbmCardContentMediaTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmCardContentTest.php b/tests/Model/RbmCardContentTest.php index b0cac050..6a082d5a 100644 --- a/tests/Model/RbmCardContentTest.php +++ b/tests/Model/RbmCardContentTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmLocationResponseTest.php b/tests/Model/RbmLocationResponseTest.php index c4ffef2c..af426703 100644 --- a/tests/Model/RbmLocationResponseTest.php +++ b/tests/Model/RbmLocationResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmMediaHeightEnumTest.php b/tests/Model/RbmMediaHeightEnumTest.php index 9bf58450..a5f1646a 100644 --- a/tests/Model/RbmMediaHeightEnumTest.php +++ b/tests/Model/RbmMediaHeightEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmMessageCarouselCardTest.php b/tests/Model/RbmMessageCarouselCardTest.php index f851f62b..8a966b3c 100644 --- a/tests/Model/RbmMessageCarouselCardTest.php +++ b/tests/Model/RbmMessageCarouselCardTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmMessageContentFileTest.php b/tests/Model/RbmMessageContentFileTest.php index a442302f..35d75ec9 100644 --- a/tests/Model/RbmMessageContentFileTest.php +++ b/tests/Model/RbmMessageContentFileTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmMessageContentRichCardTest.php b/tests/Model/RbmMessageContentRichCardTest.php index 954130f3..98a9e2a6 100644 --- a/tests/Model/RbmMessageContentRichCardTest.php +++ b/tests/Model/RbmMessageContentRichCardTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** @@ -77,58 +77,4 @@ public function testRbmMessageContentRichCard() // TODO: implement self::markTestIncomplete('Not implemented'); } - - /** - * Test attribute "orientation" - */ - public function testPropertyOrientation() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "thumbnail_image_alignment" - */ - public function testPropertyThumbnailImageAlignment() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "card_content" - */ - public function testPropertyCardContent() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "suggestions" - */ - public function testPropertySuggestions() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "card_width" - */ - public function testPropertyCardWidth() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "card_contents" - */ - public function testPropertyCardContents() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } } diff --git a/tests/Model/RbmMessageContentTextTest.php b/tests/Model/RbmMessageContentTextTest.php index d8e67700..99127c22 100644 --- a/tests/Model/RbmMessageContentTextTest.php +++ b/tests/Model/RbmMessageContentTextTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmMessageMediaTest.php b/tests/Model/RbmMessageMediaTest.php index edf932f4..b802c19a 100644 --- a/tests/Model/RbmMessageMediaTest.php +++ b/tests/Model/RbmMessageMediaTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmOpenUrlEnumTest.php b/tests/Model/RbmOpenUrlEnumTest.php index 87a257ec..8a303126 100644 --- a/tests/Model/RbmOpenUrlEnumTest.php +++ b/tests/Model/RbmOpenUrlEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmStandaloneCardTest.php b/tests/Model/RbmStandaloneCardTest.php index 834f5c4d..2f59cbb9 100644 --- a/tests/Model/RbmStandaloneCardTest.php +++ b/tests/Model/RbmStandaloneCardTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmSuggestionResponseTest.php b/tests/Model/RbmSuggestionResponseTest.php index ead3e6ca..f1b63d5c 100644 --- a/tests/Model/RbmSuggestionResponseTest.php +++ b/tests/Model/RbmSuggestionResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RbmWebViewEnumTest.php b/tests/Model/RbmWebViewEnumTest.php index 01a25125..c07899eb 100644 --- a/tests/Model/RbmWebViewEnumTest.php +++ b/tests/Model/RbmWebViewEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RecordingAvailableCallbackTest.php b/tests/Model/RecordingAvailableCallbackTest.php index 4048b36f..0d9f45dd 100644 --- a/tests/Model/RecordingAvailableCallbackTest.php +++ b/tests/Model/RecordingAvailableCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RecordingCompleteCallbackTest.php b/tests/Model/RecordingCompleteCallbackTest.php index f11855a3..139009a5 100644 --- a/tests/Model/RecordingCompleteCallbackTest.php +++ b/tests/Model/RecordingCompleteCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RecordingStateEnumTest.php b/tests/Model/RecordingStateEnumTest.php index c6a0aee5..c41d7f65 100644 --- a/tests/Model/RecordingStateEnumTest.php +++ b/tests/Model/RecordingStateEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RecordingTranscriptionClipTest.php b/tests/Model/RecordingTranscriptionClipTest.php index 5cb3132b..2c361ddc 100644 --- a/tests/Model/RecordingTranscriptionClipTest.php +++ b/tests/Model/RecordingTranscriptionClipTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RecordingTranscriptionMetadataTest.php b/tests/Model/RecordingTranscriptionMetadataTest.php index ca10e033..85e8ac1c 100644 --- a/tests/Model/RecordingTranscriptionMetadataTest.php +++ b/tests/Model/RecordingTranscriptionMetadataTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RecordingTranscriptionsTest.php b/tests/Model/RecordingTranscriptionsTest.php index 1d176161..e5c89085 100644 --- a/tests/Model/RecordingTranscriptionsTest.php +++ b/tests/Model/RecordingTranscriptionsTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RedirectCallbackTest.php b/tests/Model/RedirectCallbackTest.php index 2b73fc38..badd345e 100644 --- a/tests/Model/RedirectCallbackTest.php +++ b/tests/Model/RedirectCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/RedirectMethodEnumTest.php b/tests/Model/RedirectMethodEnumTest.php index 1c953f81..ded4df05 100644 --- a/tests/Model/RedirectMethodEnumTest.php +++ b/tests/Model/RedirectMethodEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/SipConnectionMetadataTest.php b/tests/Model/SipConnectionMetadataTest.php index b453e3fd..c8c6567c 100644 --- a/tests/Model/SipConnectionMetadataTest.php +++ b/tests/Model/SipConnectionMetadataTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/SipCredentialsTest.php b/tests/Model/SipCredentialsTest.php index 76e7fa8b..3df44cf8 100644 --- a/tests/Model/SipCredentialsTest.php +++ b/tests/Model/SipCredentialsTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/SmsMessageContentTest.php b/tests/Model/SmsMessageContentTest.php index 9870181f..e4584c50 100644 --- a/tests/Model/SmsMessageContentTest.php +++ b/tests/Model/SmsMessageContentTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/StandaloneCardOrientationEnumTest.php b/tests/Model/StandaloneCardOrientationEnumTest.php index 541a78b0..60dc077f 100644 --- a/tests/Model/StandaloneCardOrientationEnumTest.php +++ b/tests/Model/StandaloneCardOrientationEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/StatusCallbackMessageTest.php b/tests/Model/StatusCallbackMessageTest.php index 60c9e648..a3fb228b 100644 --- a/tests/Model/StatusCallbackMessageTest.php +++ b/tests/Model/StatusCallbackMessageTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/StatusCallbackTest.php b/tests/Model/StatusCallbackTest.php index b3aee9eb..45e3cb80 100644 --- a/tests/Model/StatusCallbackTest.php +++ b/tests/Model/StatusCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/StatusCallbackTypeEnumTest.php b/tests/Model/StatusCallbackTypeEnumTest.php index 0249bc48..cf8a7e15 100644 --- a/tests/Model/StatusCallbackTypeEnumTest.php +++ b/tests/Model/StatusCallbackTypeEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/StirShakenTest.php b/tests/Model/StirShakenTest.php index b8f45c43..4191e302 100644 --- a/tests/Model/StirShakenTest.php +++ b/tests/Model/StirShakenTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/SyncLookupRequestTest.php b/tests/Model/SyncLookupRequestTest.php index 6400e04b..de3ad612 100644 --- a/tests/Model/SyncLookupRequestTest.php +++ b/tests/Model/SyncLookupRequestTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TelephoneNumberTest.php b/tests/Model/TelephoneNumberTest.php index fcc8beb9..fe8c9c1b 100644 --- a/tests/Model/TelephoneNumberTest.php +++ b/tests/Model/TelephoneNumberTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TfvBasicAuthenticationTest.php b/tests/Model/TfvBasicAuthenticationTest.php index eb0537a1..07c150be 100644 --- a/tests/Model/TfvBasicAuthenticationTest.php +++ b/tests/Model/TfvBasicAuthenticationTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TfvCallbackStatusEnumTest.php b/tests/Model/TfvCallbackStatusEnumTest.php index 040b762d..97aa42fb 100644 --- a/tests/Model/TfvCallbackStatusEnumTest.php +++ b/tests/Model/TfvCallbackStatusEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TfvErrorTest.php b/tests/Model/TfvErrorTest.php index 94963334..47002416 100644 --- a/tests/Model/TfvErrorTest.php +++ b/tests/Model/TfvErrorTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TfvStatusEnumTest.php b/tests/Model/TfvStatusEnumTest.php index 9048d56a..aed6a4d4 100644 --- a/tests/Model/TfvStatusEnumTest.php +++ b/tests/Model/TfvStatusEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TfvStatusTest.php b/tests/Model/TfvStatusTest.php index 1e8c856b..96f966ab 100644 --- a/tests/Model/TfvStatusTest.php +++ b/tests/Model/TfvStatusTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TfvSubmissionInfoTest.php b/tests/Model/TfvSubmissionInfoTest.php index 15e4860d..5c70bacd 100644 --- a/tests/Model/TfvSubmissionInfoTest.php +++ b/tests/Model/TfvSubmissionInfoTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TfvSubmissionWrapperTest.php b/tests/Model/TfvSubmissionWrapperTest.php index 51c79760..a99103dd 100644 --- a/tests/Model/TfvSubmissionWrapperTest.php +++ b/tests/Model/TfvSubmissionWrapperTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/ThumbnailAlignmentEnumTest.php b/tests/Model/ThumbnailAlignmentEnumTest.php index 62b2cc67..6c6584d3 100644 --- a/tests/Model/ThumbnailAlignmentEnumTest.php +++ b/tests/Model/ThumbnailAlignmentEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TranscribeRecordingTest.php b/tests/Model/TranscribeRecordingTest.php index 797fd0d2..7d90e84a 100644 --- a/tests/Model/TranscribeRecordingTest.php +++ b/tests/Model/TranscribeRecordingTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TranscriptionAvailableCallbackTest.php b/tests/Model/TranscriptionAvailableCallbackTest.php index 012ede44..9460e772 100644 --- a/tests/Model/TranscriptionAvailableCallbackTest.php +++ b/tests/Model/TranscriptionAvailableCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TranscriptionTest.php b/tests/Model/TranscriptionTest.php index d3e89eeb..05838711 100644 --- a/tests/Model/TranscriptionTest.php +++ b/tests/Model/TranscriptionTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TransferAnswerCallbackTest.php b/tests/Model/TransferAnswerCallbackTest.php index feafdb54..b7463378 100644 --- a/tests/Model/TransferAnswerCallbackTest.php +++ b/tests/Model/TransferAnswerCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TransferCompleteCallbackTest.php b/tests/Model/TransferCompleteCallbackTest.php index 447c3fbb..7efd005f 100644 --- a/tests/Model/TransferCompleteCallbackTest.php +++ b/tests/Model/TransferCompleteCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/TransferDisconnectCallbackTest.php b/tests/Model/TransferDisconnectCallbackTest.php index 2ff7291f..445d7ec6 100644 --- a/tests/Model/TransferDisconnectCallbackTest.php +++ b/tests/Model/TransferDisconnectCallbackTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/UpdateCallRecordingTest.php b/tests/Model/UpdateCallRecordingTest.php index 7da1f1bd..bcebd4cc 100644 --- a/tests/Model/UpdateCallRecordingTest.php +++ b/tests/Model/UpdateCallRecordingTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/UpdateCallTest.php b/tests/Model/UpdateCallTest.php index bca0854d..be0e9b2c 100644 --- a/tests/Model/UpdateCallTest.php +++ b/tests/Model/UpdateCallTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/UpdateConferenceMemberTest.php b/tests/Model/UpdateConferenceMemberTest.php index 24de27f0..18452de5 100644 --- a/tests/Model/UpdateConferenceMemberTest.php +++ b/tests/Model/UpdateConferenceMemberTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/UpdateConferenceTest.php b/tests/Model/UpdateConferenceTest.php index fa7a01ed..57393dc0 100644 --- a/tests/Model/UpdateConferenceTest.php +++ b/tests/Model/UpdateConferenceTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/VerificationDenialWebhookTest.php b/tests/Model/VerificationDenialWebhookTest.php index a949e9d9..37fdead3 100644 --- a/tests/Model/VerificationDenialWebhookTest.php +++ b/tests/Model/VerificationDenialWebhookTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/VerificationRequestTest.php b/tests/Model/VerificationRequestTest.php index a7288c2d..1596f25f 100644 --- a/tests/Model/VerificationRequestTest.php +++ b/tests/Model/VerificationRequestTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/VerificationUpdateRequestTest.php b/tests/Model/VerificationUpdateRequestTest.php index 7356cedc..7a0508ba 100644 --- a/tests/Model/VerificationUpdateRequestTest.php +++ b/tests/Model/VerificationUpdateRequestTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/VerificationWebhookTest.php b/tests/Model/VerificationWebhookTest.php index 7187dcbb..606ab85a 100644 --- a/tests/Model/VerificationWebhookTest.php +++ b/tests/Model/VerificationWebhookTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/VerifyCodeRequestTest.php b/tests/Model/VerifyCodeRequestTest.php index 7bafb9f5..ce21d20f 100644 --- a/tests/Model/VerifyCodeRequestTest.php +++ b/tests/Model/VerifyCodeRequestTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/VerifyCodeResponseTest.php b/tests/Model/VerifyCodeResponseTest.php index 7ccc957c..f907089a 100644 --- a/tests/Model/VerifyCodeResponseTest.php +++ b/tests/Model/VerifyCodeResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/VoiceApiErrorTest.php b/tests/Model/VoiceApiErrorTest.php index 06c2cd94..6e6b58a6 100644 --- a/tests/Model/VoiceApiErrorTest.php +++ b/tests/Model/VoiceApiErrorTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/VoiceCodeResponseTest.php b/tests/Model/VoiceCodeResponseTest.php index 518ad312..e6f377e3 100644 --- a/tests/Model/VoiceCodeResponseTest.php +++ b/tests/Model/VoiceCodeResponseTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/WebhookSubscriptionBasicAuthenticationTest.php b/tests/Model/WebhookSubscriptionBasicAuthenticationTest.php index e0fb2fad..d4cce9ea 100644 --- a/tests/Model/WebhookSubscriptionBasicAuthenticationTest.php +++ b/tests/Model/WebhookSubscriptionBasicAuthenticationTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/WebhookSubscriptionErrorTest.php b/tests/Model/WebhookSubscriptionErrorTest.php index d67c6184..84ca0ed4 100644 --- a/tests/Model/WebhookSubscriptionErrorTest.php +++ b/tests/Model/WebhookSubscriptionErrorTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/WebhookSubscriptionRequestSchemaTest.php b/tests/Model/WebhookSubscriptionRequestSchemaTest.php index fb9463ce..7c26c898 100644 --- a/tests/Model/WebhookSubscriptionRequestSchemaTest.php +++ b/tests/Model/WebhookSubscriptionRequestSchemaTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/WebhookSubscriptionTest.php b/tests/Model/WebhookSubscriptionTest.php index 2416d343..bfeace71 100644 --- a/tests/Model/WebhookSubscriptionTest.php +++ b/tests/Model/WebhookSubscriptionTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/WebhookSubscriptionTypeEnumTest.php b/tests/Model/WebhookSubscriptionTypeEnumTest.php index d17c00b0..aad615ea 100644 --- a/tests/Model/WebhookSubscriptionTypeEnumTest.php +++ b/tests/Model/WebhookSubscriptionTypeEnumTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** diff --git a/tests/Model/WebhookSubscriptionsListBodyTest.php b/tests/Model/WebhookSubscriptionsListBodyTest.php index 1b44684e..8fa53776 100644 --- a/tests/Model/WebhookSubscriptionsListBodyTest.php +++ b/tests/Model/WebhookSubscriptionsListBodyTest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.24.0-SNAPSHOT */ /** From ee20792c9d9c28bdcd77b6d739c25b3ac38dc373 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 15 Jul 2026 15:49:06 -0400 Subject: [PATCH 11/53] multi channel smoke tests --- tests/Api/MultiChannelApiTest.php | 449 +++++++++++++++++++++++++++++- 1 file changed, 437 insertions(+), 12 deletions(-) diff --git a/tests/Api/MultiChannelApiTest.php b/tests/Api/MultiChannelApiTest.php index 9597d705..7a067099 100644 --- a/tests/Api/MultiChannelApiTest.php +++ b/tests/Api/MultiChannelApiTest.php @@ -28,8 +28,35 @@ namespace Bandwidth\Test\Api; use Bandwidth\Configuration; -use Bandwidth\ApiException; -use Bandwidth\ObjectSerializer; +use Bandwidth\Api\MultiChannelApi; +use Bandwidth\Model\CreateMultiChannelMessageResponse; +use Bandwidth\Model\CardWidthEnum; +use Bandwidth\Model\MessageDirectionEnum; +use Bandwidth\Model\MmsMessageContent; +use Bandwidth\Model\MmsMessageContentFile; +use Bandwidth\Model\MultiChannelChannelListMMSObject; +use Bandwidth\Model\MultiChannelChannelListMMSResponseObject; +use Bandwidth\Model\MultiChannelChannelListRBMObject; +use Bandwidth\Model\MultiChannelChannelListRBMResponseObject; +use Bandwidth\Model\MultiChannelChannelListSMSObject; +use Bandwidth\Model\MultiChannelChannelListSMSResponseObject; +use Bandwidth\Model\MultiChannelMessageChannelEnum; +use Bandwidth\Model\PriorityEnum; +use Bandwidth\Model\RbmActionDial; +use Bandwidth\Model\RbmActionTypeEnum; +use Bandwidth\Model\RbmCardContent; +use Bandwidth\Model\RbmCardContentMedia; +use Bandwidth\Model\RbmMediaHeightEnum; +use Bandwidth\Model\RbmMessageCarouselCard; +use Bandwidth\Model\RbmMessageContentFile; +use Bandwidth\Model\RbmMessageContentText; +use Bandwidth\Model\RbmMessageMedia; +use Bandwidth\Model\RbmStandaloneCard; +use Bandwidth\Model\StandaloneCardOrientationEnum; +use Bandwidth\Model\ThumbnailAlignmentEnum; +use Bandwidth\Model\SmsMessageContent; +use Bandwidth\Model\MultiChannelMessageRequest; + use PHPUnit\Framework\TestCase; /** @@ -41,44 +68,442 @@ */ class MultiChannelApiTest extends TestCase { + private static MultiChannelApi $apiInstance; + private static string $account_id; + private static string $bw_number; + private static string $user_number; + private static string $bw_messaging_application_id; + private static \DateTime $expiration; /** * Setup before running any test cases */ public static function setUpBeforeClass(): void { + $config = Configuration::getDefaultConfiguration() + ->setUsername(getenv("BW_USERNAME")) + ->setPassword(getenv("BW_PASSWORD")); + + self::$apiInstance = new MultiChannelApi(config: $config); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$expiration = (new \DateTime('@' . strtotime('+1 minute'))) + ->setTimezone(new \DateTimeZone('UTC')); + self::$bw_number = getenv("BW_NUMBER"); + self::$user_number = getenv("USER_NUMBER"); + self::$bw_messaging_application_id = getenv("BW_MESSAGING_APPLICATION_ID"); + } + + /** + * Test case for createMultiChannelMessage + * + * Create Multi-Channel SMS Message. + * + */ + public function testCreateMultiChannelSMSMessage() + { + $content = new SmsMessageContent(['text' => 'Hello World']); + + $channel_list_object = new MultiChannelChannelListSMSObject([ + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'channel' => MultiChannelMessageChannelEnum::SMS, + 'content' => $content + ]); + + $multi_channel_message_request = new MultiChannelMessageRequest([ + 'to' => self::$user_number, + 'tag' => "tag", + 'priority' => PriorityEnum::HIGH, + 'expiration' => self::$expiration, + 'channel_list' => [$channel_list_object] + ]); + + [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( + self::$account_id, + $multi_channel_message_request + ); + + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertIsArray($data->getErrors()); + $this->assertIsString($data->getData()->getId()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); + $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); + $this->assertEquals([self::$user_number], $data->getData()->getTo()); + $this->assertEquals("tag", $data->getData()->getTag()); + $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); + $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); + $this->assertIsArray($data->getData()->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListSMSResponseObject::class, $data->getData()->getChannelList()[0]); + $this->assertEquals(MultiChannelMessageChannelEnum::SMS, $data->getData()->getChannelList()[0]->getChannel()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); + $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); + $this->assertInstanceOf(SmsMessageContent::class, $data->getData()->getChannelList()[0]->getContent()); + $this->assertIsString($data->getData()->getChannelList()[0]->getContent()->getText()); + } + + /** + * Test case for createMultiChannelMessage + * + * Create Multi-Channel MMS Message. + * + */ + public function testCreateMultiChannelMMSMessage() + { + $content = new MmsMessageContent([ + 'text' => 'Hello World!', + 'media' => [ + new MmsMessageContentFile(['file_url' => 'https://www.example.com/image.png']) + ] + ]); + + $channel_list_object = new MultiChannelChannelListMMSObject([ + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'channel' => MultiChannelMessageChannelEnum::MMS, + 'content' => $content + ]); + + $multi_channel_message_request = new MultiChannelMessageRequest([ + 'to' => self::$user_number, + 'tag' => "tag", + 'priority' => PriorityEnum::HIGH, + 'expiration' => self::$expiration, + 'channel_list' => [$channel_list_object] + ]); + + [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( + self::$account_id, + $multi_channel_message_request + ); + + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertIsArray($data->getErrors()); + $this->assertIsString($data->getData()->getId()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); + $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); + $this->assertEquals([self::$user_number], $data->getData()->getTo()); + $this->assertEquals("tag", $data->getData()->getTag()); + $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); + $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); + $this->assertIsArray($data->getData()->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListMMSResponseObject::class, $data->getData()->getChannelList()[0]); + $this->assertEquals(MultiChannelMessageChannelEnum::MMS, $data->getData()->getChannelList()[0]->getChannel()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); + $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); + $this->assertInstanceOf(MmsMessageContent::class, $data->getData()->getChannelList()[0]->getContent()); + $this->assertIsString($data->getData()->getChannelList()[0]->getContent()->getText()); + $this->assertIsArray($data->getData()->getChannelList()[0]->getContent()->getMedia()); + $this->assertInstanceOf(MmsMessageContentFile::class, $data->getData()->getChannelList()[0]->getContent()->getMedia()[0]); + $this->assertIsString($data->getData()->getChannelList()[0]->getContent()->getMedia()[0]->getFileUrl()); } /** - * Setup before running each test case + * Test case for createMultiChannelMessage + * + * Create Multi-Channel RMB Text Message. + * */ - public function setUp(): void + public function testCreateMultiChannelRMBTextMessage() { + $content = new RbmMessageContentText([ + 'text' => 'Hello World!', + 'suggestions' => [ + new RbmActionDial([ + 'type' => RbmActionTypeEnum::DIAL_PHONE, + 'text' => 'Call Us', + 'postback_data' => base64_encode('postback data'), + 'phone_number' => self::$bw_number + ]) + ] + ]); + + $channel_list_object = new MultiChannelChannelListRBMObject([ + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => $content + ]); + + $multi_channel_message_request = new MultiChannelMessageRequest([ + 'to' => self::$user_number, + 'tag' => "tag", + 'priority' => PriorityEnum::HIGH, + 'expiration' => self::$expiration, + 'channel_list' => [$channel_list_object] + ]); + + [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( + self::$account_id, + $multi_channel_message_request + ); + + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertIsArray($data->getErrors()); + $this->assertIsString($data->getData()->getId()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); + $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); + $this->assertEquals([self::$user_number], $data->getData()->getTo()); + $this->assertEquals("tag", $data->getData()->getTag()); + $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); + $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); + $this->assertIsArray($data->getData()->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, $data->getData()->getChannelList()[0]); + $this->assertEquals(MultiChannelMessageChannelEnum::RBM, $data->getData()->getChannelList()[0]->getChannel()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); + $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); + $this->assertInstanceOf(RbmMessageContentText::class, $data->getData()->getChannelList()[0]->getContent()); + $rbm_content = $data->getData()->getChannelList()[0]->getContent(); + $this->assertIsString($rbm_content->getText()); + $this->assertIsArray($rbm_content->getSuggestions()); + $this->assertInstanceOf(RbmActionDial::class, $rbm_content->getSuggestions()[0]); + $rbm_action_dial = $rbm_content->getSuggestions()[0]; + $this->assertEquals(RbmActionTypeEnum::DIAL_PHONE, $rbm_action_dial->getType()); + $this->assertIsString($rbm_action_dial->getText()); + $this->assertIsString($rbm_action_dial->getPostbackData()); + $this->assertIsString($rbm_action_dial->getPhoneNumber()); } /** - * Clean up after running each test case + * Test case for createMultiChannelMessage + * + * Create Multi-Channel RBM Media Message. + * */ - public function tearDown(): void + public function testCreateMultiChannelRBMMediaMessage() { + $content = new RbmMessageMedia([ + 'media' => [ + new RbmMessageContentFile([ + 'file_url' => 'https://www.example.com/image1.png', + 'thumbnail_url' => 'https://www.example.com/thumbnail' + ]) + ], + 'suggestions' => [ + new RbmActionDial([ + 'type' => RbmActionTypeEnum::DIAL_PHONE, + 'text' => 'Call Us', + 'postback_data' => base64_encode('postback data'), + 'phone_number' => self::$bw_number + ]) + ] + ]); + + $channel_list_object = new MultiChannelChannelListRBMObject([ + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => $content + ]); + + $multi_channel_message_request = new MultiChannelMessageRequest([ + 'to' => self::$user_number, + 'tag' => "tag", + 'priority' => PriorityEnum::HIGH, + 'expiration' => self::$expiration, + 'channel_list' => [$channel_list_object] + ]); + + [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( + self::$account_id, + $multi_channel_message_request + ); + + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertIsArray($data->getErrors()); + $this->assertIsString($data->getData()->getId()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); + $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); + $this->assertEquals([self::$user_number], $data->getData()->getTo()); + $this->assertEquals("tag", $data->getData()->getTag()); + $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); + $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); + $this->assertIsArray($data->getData()->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, $data->getData()->getChannelList()[0]); + $this->assertEquals(MultiChannelMessageChannelEnum::RBM, $data->getData()->getChannelList()[0]->getChannel()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); + $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); + $this->assertInstanceOf(RbmMessageMedia::class, $data->getData()->getChannelList()[0]->getContent()); + $rbm_content = $data->getData()->getChannelList()[0]->getContent(); + $this->assertIsArray($rbm_content->getMedia()); + $this->assertInstanceOf(RbmMessageContentFile::class, $rbm_content->getMedia()[0]); + $this->assertIsString($rbm_content->getMedia()[0]->getFileUrl()); + $this->assertIsString($rbm_content->getMedia()[0]->getThumbnailUrl()); + $this->assertIsArray($rbm_content->getSuggestions()); + $this->assertInstanceOf(RbmActionDial::class, $rbm_content->getSuggestions()[0]); + $rbm_action_dial = $rbm_content->getSuggestions()[0]; + $this->assertEquals(RbmActionTypeEnum::DIAL_PHONE, $rbm_action_dial->getType()); + $this->assertIsString($rbm_action_dial->getText()); + $this->assertIsString($rbm_action_dial->getPostbackData()); + $this->assertIsString($rbm_action_dial->getPhoneNumber()); } /** - * Clean up after running all test cases + * Test case for createMultiChannelMessage + * + * Create Multi-Channel RBM Rich Standalone Message. + * */ - public static function tearDownAfterClass(): void + public function testCreateMultiChannelRMBRichStandaloneMessage() { + $content = new RbmStandaloneCard([ + 'orientation' => StandaloneCardOrientationEnum::HORIZONTAL, + 'thumbnail_image_alignment' => ThumbnailAlignmentEnum::LEFT, + 'card_content' => new RbmCardContent([ + 'title' => 'Test Title' + ]) + ]); + + $channel_list_object = new MultiChannelChannelListRBMObject([ + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => $content + ]); + + $multi_channel_message_request = new MultiChannelMessageRequest([ + 'to' => self::$user_number, + 'tag' => "tag", + 'priority' => PriorityEnum::HIGH, + 'expiration' => self::$expiration, + 'channel_list' => [$channel_list_object] + ]); + + [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( + self::$account_id, + $multi_channel_message_request + ); + + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertIsArray($data->getErrors()); + $this->assertIsString($data->getData()->getId()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); + $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); + $this->assertEquals([self::$user_number], $data->getData()->getTo()); + $this->assertEquals("tag", $data->getData()->getTag()); + $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); + $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); + $this->assertIsArray($data->getData()->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, $data->getData()->getChannelList()[0]); + $this->assertEquals(MultiChannelMessageChannelEnum::RBM, $data->getData()->getChannelList()[0]->getChannel()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); + $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); + $this->assertInstanceOf(RbmStandaloneCard::class, $data->getData()->getChannelList()[0]->getContent()); + $rbm_card = $data->getData()->getChannelList()[0]->getContent(); + $this->assertEquals(StandaloneCardOrientationEnum::HORIZONTAL, $rbm_card->getOrientation()); + $this->assertEquals(ThumbnailAlignmentEnum::LEFT, $rbm_card->getThumbnailImageAlignment()); + $this->assertInstanceOf(RbmCardContent::class, $rbm_card->getCardContent()); + $this->assertIsString($rbm_card->getCardContent()->getTitle()); } /** * Test case for createMultiChannelMessage * - * Create Multi-Channel Message. + * Create Multi-Channel RBM RichCarousel Message. * */ - public function testCreateMultiChannelMessage() + public function testCreateMultiChannelRMBRichCarouselMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $content = new RbmMessageCarouselCard([ + 'card_width' => CardWidthEnum::MEDIUM, + 'card_contents' => [ + new RbmCardContent([ + 'title' => 'Card 1 Title', + 'description' => 'Card 1 Description', + 'media' => new RbmCardContentMedia([ + 'file_url' => 'https://www.example.com/image1.png', + 'thumbnail_url' => 'https://www.example.com/thumbnail', + 'height' => RbmMediaHeightEnum::TALL + ]), + 'suggestions' => [ + new RbmActionDial([ + 'type' => RbmActionTypeEnum::DIAL_PHONE, + 'text' => 'Call Us', + 'postback_data' => base64_encode('postback data'), + 'phone_number' => self::$bw_number + ]) + ] + ]), + new RbmCardContent([ + 'title' => 'Card 2 Title' + ]) + ] + ]); + + $channel_list_object = new MultiChannelChannelListRBMObject([ + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => $content + ]); + + $multi_channel_message_request = new MultiChannelMessageRequest([ + 'to' => self::$user_number, + 'tag' => "tag", + 'priority' => PriorityEnum::HIGH, + 'expiration' => self::$expiration, + 'channel_list' => [$channel_list_object] + ]); + + [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( + self::$account_id, + $multi_channel_message_request + ); + + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertIsArray($data->getErrors()); + $this->assertIsString($data->getData()->getId()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); + $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); + $this->assertEquals([self::$user_number], $data->getData()->getTo()); + $this->assertEquals("tag", $data->getData()->getTag()); + $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); + $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); + $this->assertIsArray($data->getData()->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, $data->getData()->getChannelList()[0]); + $this->assertEquals(MultiChannelMessageChannelEnum::RBM, $data->getData()->getChannelList()[0]->getChannel()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); + $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); + $this->assertInstanceOf(RbmMessageCarouselCard::class, $data->getData()->getChannelList()[0]->getContent()); + $rbm_card = $data->getData()->getChannelList()[0]->getContent(); + $this->assertEquals(CardWidthEnum::MEDIUM, $rbm_card->getCardWidth()); + $this->assertIsArray($rbm_card->getCardContents()); + $this->assertInstanceOf(RbmCardContent::class, $rbm_card->getCardContents()[0]); + $card1 = $rbm_card->getCardContents()[0]; + $this->assertIsString($card1->getTitle()); + $this->assertIsString($card1->getDescription()); + $this->assertInstanceOf(RbmCardContentMedia::class, $card1->getMedia()); + $media = $card1->getMedia(); + $this->assertIsString($media->getFileUrl()); + $this->assertIsString($media->getThumbnailUrl()); + $this->assertEquals(RbmMediaHeightEnum::TALL, $media->getHeight()); + $this->assertIsArray($card1->getSuggestions()); + $this->assertInstanceOf(RbmActionDial::class, $card1->getSuggestions()[0]); + $rbm_action_dial = $card1->getSuggestions()[0]; + $this->assertEquals(RbmActionTypeEnum::DIAL_PHONE, $rbm_action_dial->getType()); + $this->assertIsString($rbm_action_dial->getText()); + $this->assertIsString($rbm_action_dial->getPostbackData()); + $this->assertIsString($rbm_action_dial->getPhoneNumber()); + $this->assertInstanceOf(RbmCardContent::class, $rbm_card->getCardContents()[1]); + $card2 = $rbm_card->getCardContents()[1]; + $this->assertIsString($card2->getTitle()); } } From 8a2d78875e0fbfb63bb2065062ef22215cda79e2 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 21 Jul 2026 14:45:20 -0400 Subject: [PATCH 12/53] add ignore operation servers --- src/Api/CallsApi.php | 100 ++++++++------ src/Api/ConferencesApi.php | 180 +++++++++++++++---------- src/Api/EndpointsApi.php | 100 ++++++++------ src/Api/MFAApi.php | 60 +++++---- src/Api/MediaApi.php | 80 ++++++----- src/Api/MessagesApi.php | 40 +++--- src/Api/MultiChannelApi.php | 20 +-- src/Api/PhoneNumberLookupApi.php | 60 +++++---- src/Api/RecordingsApi.php | 200 +++++++++++++++++----------- src/Api/StatisticsApi.php | 20 +-- src/Api/TollFreeVerificationApi.php | 180 +++++++++++++++---------- src/Api/TranscriptionsApi.php | 60 +++++---- src/Configuration.php | 30 +++++ 13 files changed, 690 insertions(+), 440 deletions(-) diff --git a/src/Api/CallsApi.php b/src/Api/CallsApi.php index 6a0c5aa8..5b605673 100644 --- a/src/Api/CallsApi.php +++ b/src/Api/CallsApi.php @@ -587,17 +587,21 @@ public function createCallRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForcreateCall(); + $hostSettings = $this->getHostSettingsForcreateCall(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', @@ -1049,17 +1053,21 @@ public function getCallStateRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgetCallState(); + $hostSettings = $this->getHostSettingsForgetCallState(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -1626,17 +1634,21 @@ public function listCallsRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForlistCalls(); + $hostSettings = $this->getHostSettingsForlistCalls(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -2050,17 +2062,21 @@ public function updateCallRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForupdateCall(); + $hostSettings = $this->getHostSettingsForupdateCall(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', @@ -2474,17 +2490,21 @@ public function updateCallBxmlRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForupdateCallBxml(); + $hostSettings = $this->getHostSettingsForupdateCallBxml(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', diff --git a/src/Api/ConferencesApi.php b/src/Api/ConferencesApi.php index a4dff350..8a1d7378 100644 --- a/src/Api/ConferencesApi.php +++ b/src/Api/ConferencesApi.php @@ -599,17 +599,21 @@ public function downloadConferenceRecordingRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsFordownloadConferenceRecording(); + $hostSettings = $this->getHostSettingsFordownloadConferenceRecording(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -1061,17 +1065,21 @@ public function getConferenceRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgetConference(); + $hostSettings = $this->getHostSettingsForgetConference(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -1547,17 +1555,21 @@ public function getConferenceMemberRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgetConferenceMember(); + $hostSettings = $this->getHostSettingsForgetConferenceMember(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -2033,17 +2045,21 @@ public function getConferenceRecordingRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgetConferenceRecording(); + $hostSettings = $this->getHostSettingsForgetConferenceRecording(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -2495,17 +2511,21 @@ public function listConferenceRecordingsRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForlistConferenceRecordings(); + $hostSettings = $this->getHostSettingsForlistConferenceRecordings(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -3034,17 +3054,21 @@ public function listConferencesRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForlistConferences(); + $hostSettings = $this->getHostSettingsForlistConferences(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -3450,17 +3474,21 @@ public function updateConferenceRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForupdateConference(); + $hostSettings = $this->getHostSettingsForupdateConference(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', @@ -3866,17 +3894,21 @@ public function updateConferenceBxmlRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForupdateConferenceBxml(); + $hostSettings = $this->getHostSettingsForupdateConferenceBxml(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', @@ -4306,17 +4338,21 @@ public function updateConferenceMemberRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForupdateConferenceMember(); + $hostSettings = $this->getHostSettingsForupdateConferenceMember(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', diff --git a/src/Api/EndpointsApi.php b/src/Api/EndpointsApi.php index 504640ff..eef967d2 100644 --- a/src/Api/EndpointsApi.php +++ b/src/Api/EndpointsApi.php @@ -587,17 +587,21 @@ public function createEndpointRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForcreateEndpoint(); + $hostSettings = $this->getHostSettingsForcreateEndpoint(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', @@ -955,17 +959,21 @@ public function deleteEndpointRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsFordeleteEndpoint(); + $hostSettings = $this->getHostSettingsFordeleteEndpoint(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', @@ -1417,17 +1425,21 @@ public function getEndpointRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgetEndpoint(); + $hostSettings = $this->getHostSettingsForgetEndpoint(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -1937,17 +1949,21 @@ public function listEndpointsRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForlistEndpoints(); + $hostSettings = $this->getHostSettingsForlistEndpoints(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -2353,17 +2369,21 @@ public function updateEndpointBxmlRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForupdateEndpointBxml(); + $hostSettings = $this->getHostSettingsForupdateEndpointBxml(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', diff --git a/src/Api/MFAApi.php b/src/Api/MFAApi.php index 6fad0b5d..3c3829c3 100644 --- a/src/Api/MFAApi.php +++ b/src/Api/MFAApi.php @@ -525,17 +525,21 @@ public function generateMessagingCodeRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgenerateMessagingCode(); + $hostSettings = $this->getHostSettingsForgenerateMessagingCode(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', @@ -955,17 +959,21 @@ public function generateVoiceCodeRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgenerateVoiceCode(); + $hostSettings = $this->getHostSettingsForgenerateVoiceCode(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', @@ -1399,17 +1407,21 @@ public function verifyCodeRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForverifyCode(); + $hostSettings = $this->getHostSettingsForverifyCode(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', diff --git a/src/Api/MediaApi.php b/src/Api/MediaApi.php index 88f25f6c..377c7aee 100644 --- a/src/Api/MediaApi.php +++ b/src/Api/MediaApi.php @@ -513,17 +513,21 @@ public function deleteMediaRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsFordeleteMedia(); + $hostSettings = $this->getHostSettingsFordeleteMedia(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', @@ -975,17 +979,21 @@ public function getMediaRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgetMedia(); + $hostSettings = $this->getHostSettingsForgetMedia(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -1427,17 +1435,21 @@ public function listMediaRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForlistMedia(); + $hostSettings = $this->getHostSettingsForlistMedia(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -1871,17 +1883,21 @@ public function uploadMediaRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForuploadMedia(); + $hostSettings = $this->getHostSettingsForuploadMedia(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', diff --git a/src/Api/MessagesApi.php b/src/Api/MessagesApi.php index 5f9e18d0..d22e6a57 100644 --- a/src/Api/MessagesApi.php +++ b/src/Api/MessagesApi.php @@ -592,17 +592,21 @@ public function createMessageRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForcreateMessage(); + $hostSettings = $this->getHostSettingsForcreateMessage(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', @@ -1543,17 +1547,21 @@ public function listMessagesRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForlistMessages(); + $hostSettings = $this->getHostSettingsForlistMessages(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', diff --git a/src/Api/MultiChannelApi.php b/src/Api/MultiChannelApi.php index 11d2df91..9b37e8f4 100644 --- a/src/Api/MultiChannelApi.php +++ b/src/Api/MultiChannelApi.php @@ -575,17 +575,21 @@ public function createMultiChannelMessageRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForcreateMultiChannelMessage(); + $hostSettings = $this->getHostSettingsForcreateMultiChannelMessage(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', diff --git a/src/Api/PhoneNumberLookupApi.php b/src/Api/PhoneNumberLookupApi.php index da2578e4..8f69038f 100644 --- a/src/Api/PhoneNumberLookupApi.php +++ b/src/Api/PhoneNumberLookupApi.php @@ -483,17 +483,21 @@ public function createAsyncBulkLookupRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForcreateAsyncBulkLookup(); + $hostSettings = $this->getHostSettingsForcreateAsyncBulkLookup(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', @@ -871,17 +875,21 @@ public function createSyncLookupRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForcreateSyncLookup(); + $hostSettings = $this->getHostSettingsForcreateSyncLookup(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', @@ -1235,17 +1243,21 @@ public function getAsyncBulkLookupRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgetAsyncBulkLookup(); + $hostSettings = $this->getHostSettingsForgetAsyncBulkLookup(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', diff --git a/src/Api/RecordingsApi.php b/src/Api/RecordingsApi.php index e7266f11..72f88fc4 100644 --- a/src/Api/RecordingsApi.php +++ b/src/Api/RecordingsApi.php @@ -508,17 +508,21 @@ public function deleteRecordingRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsFordeleteRecording(); + $hostSettings = $this->getHostSettingsFordeleteRecording(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', @@ -900,17 +904,21 @@ public function deleteRecordingMediaRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsFordeleteRecordingMedia(); + $hostSettings = $this->getHostSettingsFordeleteRecordingMedia(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', @@ -1292,17 +1300,21 @@ public function deleteRecordingTranscriptionRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsFordeleteRecordingTranscription(); + $hostSettings = $this->getHostSettingsFordeleteRecordingTranscription(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', @@ -1778,17 +1790,21 @@ public function downloadCallRecordingRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsFordownloadCallRecording(); + $hostSettings = $this->getHostSettingsFordownloadCallRecording(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -2264,17 +2280,21 @@ public function getCallRecordingRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgetCallRecording(); + $hostSettings = $this->getHostSettingsForgetCallRecording(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -2750,17 +2770,21 @@ public function getRecordingTranscriptionRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgetRecordingTranscription(); + $hostSettings = $this->getHostSettingsForgetRecordingTranscription(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -3264,17 +3288,21 @@ public function listAccountCallRecordingsRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForlistAccountCallRecordings(); + $hostSettings = $this->getHostSettingsForlistAccountCallRecordings(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -3726,17 +3754,21 @@ public function listCallRecordingsRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForlistCallRecordings(); + $hostSettings = $this->getHostSettingsForlistCallRecordings(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -4166,17 +4198,21 @@ public function transcribeCallRecordingRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsFortranscribeCallRecording(); + $hostSettings = $this->getHostSettingsFortranscribeCallRecording(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', @@ -4582,17 +4618,21 @@ public function updateCallRecordingStateRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForupdateCallRecordingState(); + $hostSettings = $this->getHostSettingsForupdateCallRecordingState(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', diff --git a/src/Api/StatisticsApi.php b/src/Api/StatisticsApi.php index 6b74bdca..fee9719e 100644 --- a/src/Api/StatisticsApi.php +++ b/src/Api/StatisticsApi.php @@ -527,17 +527,21 @@ public function getStatisticsRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgetStatistics(); + $hostSettings = $this->getHostSettingsForgetStatistics(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', diff --git a/src/Api/TollFreeVerificationApi.php b/src/Api/TollFreeVerificationApi.php index fae80426..ff593062 100644 --- a/src/Api/TollFreeVerificationApi.php +++ b/src/Api/TollFreeVerificationApi.php @@ -599,17 +599,21 @@ public function createWebhookSubscriptionRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForcreateWebhookSubscription(); + $hostSettings = $this->getHostSettingsForcreateWebhookSubscription(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', @@ -976,17 +980,21 @@ public function deleteVerificationRequestRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsFordeleteVerificationRequest(); + $hostSettings = $this->getHostSettingsFordeleteVerificationRequest(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', @@ -1344,17 +1352,21 @@ public function deleteWebhookSubscriptionRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsFordeleteWebhookSubscription(); + $hostSettings = $this->getHostSettingsFordeleteWebhookSubscription(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', @@ -1815,17 +1827,21 @@ public function getTollFreeVerificationStatusRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgetTollFreeVerificationStatus(); + $hostSettings = $this->getHostSettingsForgetTollFreeVerificationStatus(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -2229,17 +2245,21 @@ public function listTollFreeUseCasesRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForlistTollFreeUseCases(); + $hostSettings = $this->getHostSettingsForlistTollFreeUseCases(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -2653,17 +2673,21 @@ public function listWebhookSubscriptionsRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForlistWebhookSubscriptions(); + $hostSettings = $this->getHostSettingsForlistWebhookSubscriptions(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -3037,17 +3061,21 @@ public function requestTollFreeVerificationRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForrequestTollFreeVerification(); + $hostSettings = $this->getHostSettingsForrequestTollFreeVerification(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'POST', @@ -3454,17 +3482,21 @@ public function updateTollFreeVerificationRequestRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForupdateTollFreeVerificationRequest(); + $hostSettings = $this->getHostSettingsForupdateTollFreeVerificationRequest(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', @@ -3964,17 +3996,21 @@ public function updateWebhookSubscriptionRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForupdateWebhookSubscription(); + $hostSettings = $this->getHostSettingsForupdateWebhookSubscription(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'PUT', diff --git a/src/Api/TranscriptionsApi.php b/src/Api/TranscriptionsApi.php index f5ce77c1..259c91a9 100644 --- a/src/Api/TranscriptionsApi.php +++ b/src/Api/TranscriptionsApi.php @@ -487,17 +487,21 @@ public function deleteRealTimeTranscriptionRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsFordeleteRealTimeTranscription(); + $hostSettings = $this->getHostSettingsFordeleteRealTimeTranscription(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'DELETE', @@ -973,17 +977,21 @@ public function getRealTimeTranscriptionRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForgetRealTimeTranscription(); + $hostSettings = $this->getHostSettingsForgetRealTimeTranscription(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', @@ -1435,17 +1443,21 @@ public function listRealTimeTranscriptionsRequest( $headers ); - # Preserve the original behavior of server indexing. - if ($hostIndex === null) { - $hostIndex = $this->hostIndex; - } + if ($this->config->getIgnoreOperationHosts()) { + $operationHost = $this->config->getHost(); + } else { + # Preserve the original behavior of server indexing. + if ($hostIndex === null) { + $hostIndex = $this->hostIndex; + } - $hostSettings = $this->getHostSettingsForlistRealTimeTranscriptions(); + $hostSettings = $this->getHostSettingsForlistRealTimeTranscriptions(); - if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { - throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index {$hostIndex} when selecting the host. Must be less than ".count($hostSettings)); + } + $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); } - $operationHost = Configuration::getHostString($hostSettings, $hostIndex, $variables); $query = ObjectSerializer::buildQuery($queryParams); return new Request( 'GET', diff --git a/src/Configuration.php b/src/Configuration.php index eb7ed080..8296ddfb 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -123,6 +123,13 @@ class Configuration */ protected string $tempFolderPath; + /** + * Ignore operation specific hosts + * + * @var bool + */ + protected bool $ignoreOperationHosts = false; + /** * Constructor */ @@ -392,6 +399,29 @@ public function getTempFolderPath(): string return $this->tempFolderPath; } + /** + * Sets the ignore operation specific hosts flag + * + * @param bool $ignoreOperationHosts Ignore operation specific hosts flag + * + * @return $this + */ + public function setIgnoreOperationHosts(bool $ignoreOperationHosts): static + { + $this->ignoreOperationHosts = $ignoreOperationHosts; + return $this; + } + + /** + * Gets the ignore operation specific hosts flag + * + * @return bool Ignore operation specific hosts flag + */ + public function getIgnoreOperationHosts(): bool + { + return $this->ignoreOperationHosts; + } + /** * Gets the default configuration instance * From 1d7936b88f753f9a4024df6400bac981eac9e576 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 21 Jul 2026 14:46:23 -0400 Subject: [PATCH 13/53] regenerate after splitting oneOf/anyOf --- .openapi-generator/FILES | 3 +- .openapi-generator/VERSION | 2 +- README.md | 2 +- src/APIException.php | 2 +- src/FormDataProcessor.php | 2 +- src/HeaderSelector.php | 2 +- src/Model/AccountStatistics.php | 2 +- src/Model/AdditionalDenialReason.php | 2 +- src/Model/Address.php | 2 +- src/Model/AnswerCallback.php | 2 +- src/Model/AnyOfInterface.php | 66 ++++++++++++++++ src/Model/AsyncLookupRequest.php | 2 +- src/Model/BlockedWebhook.php | 2 +- src/Model/BridgeCompleteCallback.php | 2 +- src/Model/BridgeTargetCompleteCallback.php | 2 +- src/Model/BrtcError.php | 2 +- src/Model/BrtcErrorResponse.php | 2 +- src/Model/BrtcErrorSource.php | 2 +- src/Model/BrtcLink.php | 2 +- src/Model/BusinessEntityTypeEnum.php | 2 +- src/Model/BusinessRegistrationTypeEnum.php | 2 +- src/Model/CallDirectionEnum.php | 2 +- src/Model/CallRecordingMetadata.php | 2 +- src/Model/CallState.php | 2 +- src/Model/CallStateEnum.php | 2 +- src/Model/CallTranscription.php | 2 +- .../CallTranscriptionDetectedLanguageEnum.php | 2 +- src/Model/CallTranscriptionMetadata.php | 2 +- src/Model/CallTranscriptionResponse.php | 2 +- src/Model/CallTranscriptionTrackEnum.php | 2 +- src/Model/Callback.php | 10 +-- src/Model/CallbackMethodEnum.php | 2 +- src/Model/CardWidthEnum.php | 2 +- src/Model/CodeRequest.php | 2 +- src/Model/CompletedLookupStatusEnum.php | 2 +- src/Model/Conference.php | 2 +- src/Model/ConferenceCompletedCallback.php | 2 +- src/Model/ConferenceCreatedCallback.php | 2 +- src/Model/ConferenceMember.php | 2 +- src/Model/ConferenceMemberExitCallback.php | 2 +- src/Model/ConferenceMemberJoinCallback.php | 2 +- .../ConferenceRecordingAvailableCallback.php | 2 +- src/Model/ConferenceRecordingMetadata.php | 2 +- src/Model/ConferenceRedirectCallback.php | 2 +- src/Model/ConferenceStateEnum.php | 2 +- src/Model/Contact.php | 2 +- src/Model/CreateAsyncBulkLookupResponse.php | 2 +- .../CreateAsyncBulkLookupResponseData.php | 2 +- src/Model/CreateCall.php | 2 +- src/Model/CreateCallResponse.php | 2 +- src/Model/CreateEndpointRequestBase.php | 2 +- src/Model/CreateEndpointResponse.php | 2 +- src/Model/CreateEndpointResponseData.php | 2 +- src/Model/CreateMessageRequestError.php | 2 +- .../CreateMultiChannelMessageResponse.php | 2 +- src/Model/CreateSyncLookupResponse.php | 2 +- src/Model/CreateSyncLookupResponseData.php | 2 +- src/Model/CreateWebRtcConnectionRequest.php | 2 +- src/Model/DeactivationEventEnum.php | 2 +- src/Model/Device.php | 2 +- src/Model/DeviceStatusEnum.php | 2 +- src/Model/DisconnectCallback.php | 2 +- src/Model/Diversion.php | 2 +- src/Model/DtmfCallback.php | 2 +- src/Model/Endpoint.php | 2 +- src/Model/EndpointDirectionEnum.php | 2 +- src/Model/EndpointEvent.php | 2 +- src/Model/EndpointEventTypeEnum.php | 2 +- src/Model/EndpointResponse.php | 2 +- src/Model/EndpointStatusEnum.php | 2 +- src/Model/EndpointTypeEnum.php | 2 +- src/Model/Endpoints.php | 2 +- src/Model/ErrorObject.php | 2 +- src/Model/ErrorSource.php | 2 +- src/Model/FailureWebhook.php | 2 +- src/Model/FieldError.php | 2 +- src/Model/FileFormatEnum.php | 2 +- src/Model/GatherCallback.php | 2 +- src/Model/GetAsyncBulkLookupResponse.php | 2 +- src/Model/GetAsyncBulkLookupResponseData.php | 2 +- src/Model/InProgressLookupStatusEnum.php | 2 +- src/Model/InboundCallback.php | 2 +- src/Model/InboundCallbackMessage.php | 2 +- src/Model/InboundCallbackTypeEnum.php | 2 +- src/Model/InitiateCallback.php | 2 +- src/Model/LatestMessageDeliveryStatusEnum.php | 2 +- src/Model/LineTypeEnum.php | 2 +- src/Model/Link.php | 2 +- src/Model/LinkSchema.php | 2 +- src/Model/LinksObject.php | 2 +- src/Model/ListEndpointsResponse.php | 2 +- src/Model/ListMessageDirectionEnum.php | 2 +- src/Model/ListMessageItem.php | 2 +- src/Model/LookupErrorResponse.php | 2 +- src/Model/LookupErrorSchema.php | 2 +- src/Model/LookupErrorSchemaMeta.php | 2 +- src/Model/LookupResult.php | 2 +- .../MachineDetectionCompleteCallback.php | 2 +- src/Model/MachineDetectionConfiguration.php | 2 +- src/Model/MachineDetectionModeEnum.php | 2 +- src/Model/MachineDetectionResult.php | 2 +- src/Model/Media.php | 2 +- src/Model/Message.php | 2 +- src/Model/MessageDirectionEnum.php | 2 +- src/Model/MessageRequest.php | 2 +- src/Model/MessageStatusEnum.php | 2 +- src/Model/MessageTypeEnum.php | 2 +- src/Model/MessagesList.php | 2 +- src/Model/MessagingCodeResponse.php | 2 +- src/Model/MessagingRequestError.php | 2 +- src/Model/MfaForbiddenRequestError.php | 2 +- src/Model/MfaRequestError.php | 2 +- src/Model/MfaUnauthorizedRequestError.php | 2 +- src/Model/MmsMessageContent.php | 2 +- src/Model/MmsMessageContentFile.php | 2 +- src/Model/ModelInterface.php | 2 +- src/Model/MultiChannelAction.php | 10 +-- src/Model/MultiChannelActionCalendarEvent.php | 2 +- .../MultiChannelChannelListMMSObject.php | 2 +- ...ltiChannelChannelListMMSResponseObject.php | 2 +- .../MultiChannelChannelListObjectBase.php | 2 +- .../MultiChannelChannelListOwnerObject.php | 2 +- .../MultiChannelChannelListRBMObject.php | 2 +- ...hannelChannelListRBMObjectAllOfContent.php | 10 +-- ...ltiChannelChannelListRBMResponseObject.php | 2 +- .../MultiChannelChannelListRequestObject.php | 10 +-- .../MultiChannelChannelListResponseObject.php | 10 +-- .../MultiChannelChannelListSMSObject.php | 2 +- ...ltiChannelChannelListSMSResponseObject.php | 2 +- src/Model/MultiChannelError.php | 2 +- src/Model/MultiChannelMessageChannelEnum.php | 2 +- src/Model/MultiChannelMessageContent.php | 2 +- src/Model/MultiChannelMessageRequest.php | 2 +- src/Model/MultiChannelMessageResponseData.php | 2 +- ...mposedInterface.php => OneOfInterface.php} | 18 ++--- src/Model/OptInWorkflow.php | 2 +- src/Model/Page.php | 2 +- src/Model/PageInfo.php | 2 +- src/Model/PriorityEnum.php | 2 +- src/Model/ProductTypeEnum.php | 2 +- src/Model/RbmActionBase.php | 2 +- src/Model/RbmActionDial.php | 2 +- src/Model/RbmActionOpenUrl.php | 2 +- src/Model/RbmActionTypeEnum.php | 2 +- src/Model/RbmActionViewLocation.php | 2 +- src/Model/RbmCardContent.php | 2 +- src/Model/RbmCardContentMedia.php | 2 +- src/Model/RbmLocationResponse.php | 2 +- src/Model/RbmMediaHeightEnum.php | 2 +- src/Model/RbmMessageCarouselCard.php | 2 +- src/Model/RbmMessageContentFile.php | 2 +- src/Model/RbmMessageContentRichCard.php | 10 +-- src/Model/RbmMessageContentText.php | 2 +- src/Model/RbmMessageMedia.php | 2 +- src/Model/RbmOpenUrlEnum.php | 2 +- src/Model/RbmStandaloneCard.php | 2 +- src/Model/RbmSuggestionResponse.php | 2 +- src/Model/RbmWebViewEnum.php | 2 +- src/Model/RecordingAvailableCallback.php | 2 +- src/Model/RecordingCompleteCallback.php | 2 +- src/Model/RecordingStateEnum.php | 2 +- src/Model/RecordingTranscriptionClip.php | 2 +- src/Model/RecordingTranscriptionMetadata.php | 2 +- src/Model/RecordingTranscriptions.php | 2 +- src/Model/RedirectCallback.php | 2 +- src/Model/RedirectMethodEnum.php | 2 +- src/Model/SipConnectionMetadata.php | 2 +- src/Model/SipCredentials.php | 2 +- src/Model/SmsMessageContent.php | 2 +- src/Model/StandaloneCardOrientationEnum.php | 2 +- src/Model/StatusCallback.php | 2 +- src/Model/StatusCallbackMessage.php | 2 +- src/Model/StatusCallbackTypeEnum.php | 2 +- src/Model/StirShaken.php | 2 +- src/Model/SyncLookupRequest.php | 2 +- src/Model/TelephoneNumber.php | 2 +- src/Model/TfvBasicAuthentication.php | 2 +- src/Model/TfvCallbackStatusEnum.php | 2 +- src/Model/TfvError.php | 2 +- src/Model/TfvStatus.php | 2 +- src/Model/TfvStatusEnum.php | 2 +- src/Model/TfvSubmissionInfo.php | 2 +- src/Model/TfvSubmissionWrapper.php | 2 +- src/Model/ThumbnailAlignmentEnum.php | 2 +- src/Model/TranscribeRecording.php | 2 +- src/Model/Transcription.php | 2 +- src/Model/TranscriptionAvailableCallback.php | 2 +- src/Model/TransferAnswerCallback.php | 2 +- src/Model/TransferCompleteCallback.php | 2 +- src/Model/TransferDisconnectCallback.php | 2 +- src/Model/UpdateCall.php | 2 +- src/Model/UpdateCallRecording.php | 2 +- src/Model/UpdateConference.php | 2 +- src/Model/UpdateConferenceMember.php | 2 +- src/Model/VerificationDenialWebhook.php | 2 +- src/Model/VerificationRequest.php | 2 +- src/Model/VerificationUpdateRequest.php | 2 +- src/Model/VerificationWebhook.php | 2 +- src/Model/VerifyCodeRequest.php | 2 +- src/Model/VerifyCodeResponse.php | 2 +- src/Model/VoiceApiError.php | 2 +- src/Model/VoiceCodeResponse.php | 2 +- src/Model/WebhookSubscription.php | 2 +- ...WebhookSubscriptionBasicAuthentication.php | 2 +- src/Model/WebhookSubscriptionError.php | 2 +- .../WebhookSubscriptionRequestSchema.php | 2 +- src/Model/WebhookSubscriptionTypeEnum.php | 2 +- src/Model/WebhookSubscriptionsListBody.php | 2 +- src/ObjectSerializer.php | 75 ++++++++++++++++--- 209 files changed, 370 insertions(+), 250 deletions(-) create mode 100644 src/Model/AnyOfInterface.php rename src/Model/{ComposedInterface.php => OneOfInterface.php} (70%) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 0c887d99..7272a802 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -237,6 +237,7 @@ src/Model/AccountStatistics.php src/Model/AdditionalDenialReason.php src/Model/Address.php src/Model/AnswerCallback.php +src/Model/AnyOfInterface.php src/Model/AsyncLookupRequest.php src/Model/BlockedWebhook.php src/Model/BridgeCompleteCallback.php @@ -261,7 +262,6 @@ src/Model/CallbackMethodEnum.php src/Model/CardWidthEnum.php src/Model/CodeRequest.php src/Model/CompletedLookupStatusEnum.php -src/Model/ComposedInterface.php src/Model/Conference.php src/Model/ConferenceCompletedCallback.php src/Model/ConferenceCreatedCallback.php @@ -361,6 +361,7 @@ src/Model/MultiChannelMessageChannelEnum.php src/Model/MultiChannelMessageContent.php src/Model/MultiChannelMessageRequest.php src/Model/MultiChannelMessageResponseData.php +src/Model/OneOfInterface.php src/Model/OptInWorkflow.php src/Model/Page.php src/Model/PageInfo.php diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 186c33c9..8fc8df61 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.24.0-SNAPSHOT +7.25.0-SNAPSHOT diff --git a/README.md b/README.md index 5cc040d4..866a9a56 100644 --- a/README.md +++ b/README.md @@ -372,5 +372,5 @@ letstalk@bandwidth.com This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `1.0.0` - - Generator version: `7.24.0-SNAPSHOT` + - Generator version: `7.25.0-SNAPSHOT` - Build package: `org.openapitools.codegen.languages.PhpNextgenClientCodegen` diff --git a/src/APIException.php b/src/APIException.php index ca4becb8..9de75086 100644 --- a/src/APIException.php +++ b/src/APIException.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/FormDataProcessor.php b/src/FormDataProcessor.php index 01446fc2..b409cf99 100644 --- a/src/FormDataProcessor.php +++ b/src/FormDataProcessor.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php index 90c4050d..4884754d 100644 --- a/src/HeaderSelector.php +++ b/src/HeaderSelector.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/AccountStatistics.php b/src/Model/AccountStatistics.php index a58cf675..a4a65fa1 100644 --- a/src/Model/AccountStatistics.php +++ b/src/Model/AccountStatistics.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/AdditionalDenialReason.php b/src/Model/AdditionalDenialReason.php index b341389e..9da7a3b4 100644 --- a/src/Model/AdditionalDenialReason.php +++ b/src/Model/AdditionalDenialReason.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/Address.php b/src/Model/Address.php index bf126edc..db6710ad 100644 --- a/src/Model/Address.php +++ b/src/Model/Address.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/AnswerCallback.php b/src/Model/AnswerCallback.php index cdb46fe0..838124e0 100644 --- a/src/Model/AnswerCallback.php +++ b/src/Model/AnswerCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/AnyOfInterface.php b/src/Model/AnyOfInterface.php new file mode 100644 index 00000000..9c010101 --- /dev/null +++ b/src/Model/AnyOfInterface.php @@ -0,0 +1,66 @@ + + */ + public static function getAnyOfDiscriminatorMappings(): array; +} diff --git a/src/Model/AsyncLookupRequest.php b/src/Model/AsyncLookupRequest.php index ded939b3..03705e02 100644 --- a/src/Model/AsyncLookupRequest.php +++ b/src/Model/AsyncLookupRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/BlockedWebhook.php b/src/Model/BlockedWebhook.php index ff6f81ed..b0a0c648 100644 --- a/src/Model/BlockedWebhook.php +++ b/src/Model/BlockedWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/BridgeCompleteCallback.php b/src/Model/BridgeCompleteCallback.php index 1c4ba911..73601fec 100644 --- a/src/Model/BridgeCompleteCallback.php +++ b/src/Model/BridgeCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/BridgeTargetCompleteCallback.php b/src/Model/BridgeTargetCompleteCallback.php index 739c534f..3abf34e4 100644 --- a/src/Model/BridgeTargetCompleteCallback.php +++ b/src/Model/BridgeTargetCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/BrtcError.php b/src/Model/BrtcError.php index 84a07ee9..9d787bb7 100644 --- a/src/Model/BrtcError.php +++ b/src/Model/BrtcError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/BrtcErrorResponse.php b/src/Model/BrtcErrorResponse.php index 59ea1155..34ac11b9 100644 --- a/src/Model/BrtcErrorResponse.php +++ b/src/Model/BrtcErrorResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/BrtcErrorSource.php b/src/Model/BrtcErrorSource.php index 85b576bb..4398ef91 100644 --- a/src/Model/BrtcErrorSource.php +++ b/src/Model/BrtcErrorSource.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/BrtcLink.php b/src/Model/BrtcLink.php index beac9a7f..edb329c2 100644 --- a/src/Model/BrtcLink.php +++ b/src/Model/BrtcLink.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/BusinessEntityTypeEnum.php b/src/Model/BusinessEntityTypeEnum.php index ee0c4f6f..4ef0d953 100644 --- a/src/Model/BusinessEntityTypeEnum.php +++ b/src/Model/BusinessEntityTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/BusinessRegistrationTypeEnum.php b/src/Model/BusinessRegistrationTypeEnum.php index f0db3f0a..3f7f31e3 100644 --- a/src/Model/BusinessRegistrationTypeEnum.php +++ b/src/Model/BusinessRegistrationTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CallDirectionEnum.php b/src/Model/CallDirectionEnum.php index 739530ff..fd0ed197 100644 --- a/src/Model/CallDirectionEnum.php +++ b/src/Model/CallDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CallRecordingMetadata.php b/src/Model/CallRecordingMetadata.php index de4b5193..640021fa 100644 --- a/src/Model/CallRecordingMetadata.php +++ b/src/Model/CallRecordingMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CallState.php b/src/Model/CallState.php index 93812297..e7881a9d 100644 --- a/src/Model/CallState.php +++ b/src/Model/CallState.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CallStateEnum.php b/src/Model/CallStateEnum.php index 5f4a2c53..8213f29c 100644 --- a/src/Model/CallStateEnum.php +++ b/src/Model/CallStateEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CallTranscription.php b/src/Model/CallTranscription.php index c5d6159a..ed8c14c8 100644 --- a/src/Model/CallTranscription.php +++ b/src/Model/CallTranscription.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CallTranscriptionDetectedLanguageEnum.php b/src/Model/CallTranscriptionDetectedLanguageEnum.php index 3527c4f5..d903c3a5 100644 --- a/src/Model/CallTranscriptionDetectedLanguageEnum.php +++ b/src/Model/CallTranscriptionDetectedLanguageEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CallTranscriptionMetadata.php b/src/Model/CallTranscriptionMetadata.php index 70788988..56babc4e 100644 --- a/src/Model/CallTranscriptionMetadata.php +++ b/src/Model/CallTranscriptionMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CallTranscriptionResponse.php b/src/Model/CallTranscriptionResponse.php index 3c53fe2f..324e514c 100644 --- a/src/Model/CallTranscriptionResponse.php +++ b/src/Model/CallTranscriptionResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CallTranscriptionTrackEnum.php b/src/Model/CallTranscriptionTrackEnum.php index 92433c91..a6c40fb3 100644 --- a/src/Model/CallTranscriptionTrackEnum.php +++ b/src/Model/CallTranscriptionTrackEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/Callback.php b/src/Model/Callback.php index fab94fa3..9cd50bb9 100644 --- a/src/Model/Callback.php +++ b/src/Model/Callback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -36,7 +36,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class Callback implements ComposedInterface +class Callback implements OneOfInterface { /** * The original name of the model. @@ -55,7 +55,7 @@ class Callback implements ComposedInterface /** * {@inheritdoc} */ - public static function getComposedTypes(): array + public static function getOneOfTypes(): array { return [ '\Bandwidth\Model\StatusCallback', @@ -66,7 +66,7 @@ public static function getComposedTypes(): array /** * {@inheritdoc} */ - public static function getComposedDiscriminator(): ?string + public static function getOneOfDiscriminator(): ?string { return self::DISCRIMINATOR; } @@ -74,7 +74,7 @@ public static function getComposedDiscriminator(): ?string /** * {@inheritdoc} */ - public static function getComposedDiscriminatorMappings(): array + public static function getOneOfDiscriminatorMappings(): array { return [ 'message-delivered' => '\Bandwidth\Model\StatusCallback', diff --git a/src/Model/CallbackMethodEnum.php b/src/Model/CallbackMethodEnum.php index 893c3d7e..db853ac9 100644 --- a/src/Model/CallbackMethodEnum.php +++ b/src/Model/CallbackMethodEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CardWidthEnum.php b/src/Model/CardWidthEnum.php index 51ec8020..853891ff 100644 --- a/src/Model/CardWidthEnum.php +++ b/src/Model/CardWidthEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CodeRequest.php b/src/Model/CodeRequest.php index 7e6bae08..a2bd6d20 100644 --- a/src/Model/CodeRequest.php +++ b/src/Model/CodeRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CompletedLookupStatusEnum.php b/src/Model/CompletedLookupStatusEnum.php index a2c3e69a..4dd73acc 100644 --- a/src/Model/CompletedLookupStatusEnum.php +++ b/src/Model/CompletedLookupStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/Conference.php b/src/Model/Conference.php index 4374069e..1ac69dd8 100644 --- a/src/Model/Conference.php +++ b/src/Model/Conference.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceCompletedCallback.php b/src/Model/ConferenceCompletedCallback.php index fa665d47..9a6c2245 100644 --- a/src/Model/ConferenceCompletedCallback.php +++ b/src/Model/ConferenceCompletedCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceCreatedCallback.php b/src/Model/ConferenceCreatedCallback.php index 281540da..1775bf46 100644 --- a/src/Model/ConferenceCreatedCallback.php +++ b/src/Model/ConferenceCreatedCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceMember.php b/src/Model/ConferenceMember.php index ac4d47b0..a27a4327 100644 --- a/src/Model/ConferenceMember.php +++ b/src/Model/ConferenceMember.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceMemberExitCallback.php b/src/Model/ConferenceMemberExitCallback.php index 3b814262..2083caf2 100644 --- a/src/Model/ConferenceMemberExitCallback.php +++ b/src/Model/ConferenceMemberExitCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceMemberJoinCallback.php b/src/Model/ConferenceMemberJoinCallback.php index 24b54ccc..52245c14 100644 --- a/src/Model/ConferenceMemberJoinCallback.php +++ b/src/Model/ConferenceMemberJoinCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceRecordingAvailableCallback.php b/src/Model/ConferenceRecordingAvailableCallback.php index 5744e313..3167bb22 100644 --- a/src/Model/ConferenceRecordingAvailableCallback.php +++ b/src/Model/ConferenceRecordingAvailableCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceRecordingMetadata.php b/src/Model/ConferenceRecordingMetadata.php index b0e82945..0131bead 100644 --- a/src/Model/ConferenceRecordingMetadata.php +++ b/src/Model/ConferenceRecordingMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceRedirectCallback.php b/src/Model/ConferenceRedirectCallback.php index d52753a3..e4f451b2 100644 --- a/src/Model/ConferenceRedirectCallback.php +++ b/src/Model/ConferenceRedirectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ConferenceStateEnum.php b/src/Model/ConferenceStateEnum.php index 62df2ed5..2e7b893d 100644 --- a/src/Model/ConferenceStateEnum.php +++ b/src/Model/ConferenceStateEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 12a42dc3..f77d7968 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CreateAsyncBulkLookupResponse.php b/src/Model/CreateAsyncBulkLookupResponse.php index 7117ef84..24cd2267 100644 --- a/src/Model/CreateAsyncBulkLookupResponse.php +++ b/src/Model/CreateAsyncBulkLookupResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CreateAsyncBulkLookupResponseData.php b/src/Model/CreateAsyncBulkLookupResponseData.php index 8f2f0369..11b00283 100644 --- a/src/Model/CreateAsyncBulkLookupResponseData.php +++ b/src/Model/CreateAsyncBulkLookupResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CreateCall.php b/src/Model/CreateCall.php index 586fb220..750e0810 100644 --- a/src/Model/CreateCall.php +++ b/src/Model/CreateCall.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CreateCallResponse.php b/src/Model/CreateCallResponse.php index f9a98b70..01008a11 100644 --- a/src/Model/CreateCallResponse.php +++ b/src/Model/CreateCallResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CreateEndpointRequestBase.php b/src/Model/CreateEndpointRequestBase.php index 9fb84021..7555d3e6 100644 --- a/src/Model/CreateEndpointRequestBase.php +++ b/src/Model/CreateEndpointRequestBase.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CreateEndpointResponse.php b/src/Model/CreateEndpointResponse.php index 86608e39..cf0f91ae 100644 --- a/src/Model/CreateEndpointResponse.php +++ b/src/Model/CreateEndpointResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CreateEndpointResponseData.php b/src/Model/CreateEndpointResponseData.php index 7e05b047..a1e29923 100644 --- a/src/Model/CreateEndpointResponseData.php +++ b/src/Model/CreateEndpointResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CreateMessageRequestError.php b/src/Model/CreateMessageRequestError.php index aef9555a..7d1ea431 100644 --- a/src/Model/CreateMessageRequestError.php +++ b/src/Model/CreateMessageRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CreateMultiChannelMessageResponse.php b/src/Model/CreateMultiChannelMessageResponse.php index e9d1ad04..12ebcb36 100644 --- a/src/Model/CreateMultiChannelMessageResponse.php +++ b/src/Model/CreateMultiChannelMessageResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CreateSyncLookupResponse.php b/src/Model/CreateSyncLookupResponse.php index 740d9dd1..6430c4a9 100644 --- a/src/Model/CreateSyncLookupResponse.php +++ b/src/Model/CreateSyncLookupResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CreateSyncLookupResponseData.php b/src/Model/CreateSyncLookupResponseData.php index aa509e3d..f0594e0e 100644 --- a/src/Model/CreateSyncLookupResponseData.php +++ b/src/Model/CreateSyncLookupResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/CreateWebRtcConnectionRequest.php b/src/Model/CreateWebRtcConnectionRequest.php index a8d0d8d9..79a1fc12 100644 --- a/src/Model/CreateWebRtcConnectionRequest.php +++ b/src/Model/CreateWebRtcConnectionRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/DeactivationEventEnum.php b/src/Model/DeactivationEventEnum.php index 870aca23..c8911631 100644 --- a/src/Model/DeactivationEventEnum.php +++ b/src/Model/DeactivationEventEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/Device.php b/src/Model/Device.php index 07230748..e75d5934 100644 --- a/src/Model/Device.php +++ b/src/Model/Device.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/DeviceStatusEnum.php b/src/Model/DeviceStatusEnum.php index 04a0b214..c89e8123 100644 --- a/src/Model/DeviceStatusEnum.php +++ b/src/Model/DeviceStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/DisconnectCallback.php b/src/Model/DisconnectCallback.php index 6ff9de6e..93562ca6 100644 --- a/src/Model/DisconnectCallback.php +++ b/src/Model/DisconnectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/Diversion.php b/src/Model/Diversion.php index 08022474..4dd3c582 100644 --- a/src/Model/Diversion.php +++ b/src/Model/Diversion.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/DtmfCallback.php b/src/Model/DtmfCallback.php index 81f62353..edfa9265 100644 --- a/src/Model/DtmfCallback.php +++ b/src/Model/DtmfCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/Endpoint.php b/src/Model/Endpoint.php index d2fffa6a..52a3a3d6 100644 --- a/src/Model/Endpoint.php +++ b/src/Model/Endpoint.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/EndpointDirectionEnum.php b/src/Model/EndpointDirectionEnum.php index c29d0f61..aa3b79c1 100644 --- a/src/Model/EndpointDirectionEnum.php +++ b/src/Model/EndpointDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/EndpointEvent.php b/src/Model/EndpointEvent.php index eb297b93..3eaa8f0a 100644 --- a/src/Model/EndpointEvent.php +++ b/src/Model/EndpointEvent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/EndpointEventTypeEnum.php b/src/Model/EndpointEventTypeEnum.php index 18b4d449..0ea0a93a 100644 --- a/src/Model/EndpointEventTypeEnum.php +++ b/src/Model/EndpointEventTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/EndpointResponse.php b/src/Model/EndpointResponse.php index 228ddca5..71c77a50 100644 --- a/src/Model/EndpointResponse.php +++ b/src/Model/EndpointResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/EndpointStatusEnum.php b/src/Model/EndpointStatusEnum.php index ee13793e..84eb986c 100644 --- a/src/Model/EndpointStatusEnum.php +++ b/src/Model/EndpointStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/EndpointTypeEnum.php b/src/Model/EndpointTypeEnum.php index 355f269d..73fe7daf 100644 --- a/src/Model/EndpointTypeEnum.php +++ b/src/Model/EndpointTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/Endpoints.php b/src/Model/Endpoints.php index 4d866dcc..e72b5f41 100644 --- a/src/Model/Endpoints.php +++ b/src/Model/Endpoints.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ErrorObject.php b/src/Model/ErrorObject.php index a1f97c0d..fd2d2bf1 100644 --- a/src/Model/ErrorObject.php +++ b/src/Model/ErrorObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ErrorSource.php b/src/Model/ErrorSource.php index 5e85c988..39f57425 100644 --- a/src/Model/ErrorSource.php +++ b/src/Model/ErrorSource.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/FailureWebhook.php b/src/Model/FailureWebhook.php index a3f6bcbf..152f246b 100644 --- a/src/Model/FailureWebhook.php +++ b/src/Model/FailureWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/FieldError.php b/src/Model/FieldError.php index 29237bfd..ef837d40 100644 --- a/src/Model/FieldError.php +++ b/src/Model/FieldError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/FileFormatEnum.php b/src/Model/FileFormatEnum.php index 5d937e76..0eb6d1b8 100644 --- a/src/Model/FileFormatEnum.php +++ b/src/Model/FileFormatEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/GatherCallback.php b/src/Model/GatherCallback.php index b039dfc4..553b810b 100644 --- a/src/Model/GatherCallback.php +++ b/src/Model/GatherCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/GetAsyncBulkLookupResponse.php b/src/Model/GetAsyncBulkLookupResponse.php index 2be8da22..5f29a028 100644 --- a/src/Model/GetAsyncBulkLookupResponse.php +++ b/src/Model/GetAsyncBulkLookupResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/GetAsyncBulkLookupResponseData.php b/src/Model/GetAsyncBulkLookupResponseData.php index 4c0915ba..3bc9d5c3 100644 --- a/src/Model/GetAsyncBulkLookupResponseData.php +++ b/src/Model/GetAsyncBulkLookupResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/InProgressLookupStatusEnum.php b/src/Model/InProgressLookupStatusEnum.php index b8d29a58..b54a8ff6 100644 --- a/src/Model/InProgressLookupStatusEnum.php +++ b/src/Model/InProgressLookupStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/InboundCallback.php b/src/Model/InboundCallback.php index 95a8f33c..a995fa7f 100644 --- a/src/Model/InboundCallback.php +++ b/src/Model/InboundCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/InboundCallbackMessage.php b/src/Model/InboundCallbackMessage.php index 6acbb1ae..a984eb3c 100644 --- a/src/Model/InboundCallbackMessage.php +++ b/src/Model/InboundCallbackMessage.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/InboundCallbackTypeEnum.php b/src/Model/InboundCallbackTypeEnum.php index 065a4f4f..b0c94631 100644 --- a/src/Model/InboundCallbackTypeEnum.php +++ b/src/Model/InboundCallbackTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/InitiateCallback.php b/src/Model/InitiateCallback.php index 80a584d4..ea3e58ad 100644 --- a/src/Model/InitiateCallback.php +++ b/src/Model/InitiateCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/LatestMessageDeliveryStatusEnum.php b/src/Model/LatestMessageDeliveryStatusEnum.php index 6cc5f6b6..aa02724c 100644 --- a/src/Model/LatestMessageDeliveryStatusEnum.php +++ b/src/Model/LatestMessageDeliveryStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/LineTypeEnum.php b/src/Model/LineTypeEnum.php index d0058494..9f10386d 100644 --- a/src/Model/LineTypeEnum.php +++ b/src/Model/LineTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/Link.php b/src/Model/Link.php index 9016c47d..d06f11b0 100644 --- a/src/Model/Link.php +++ b/src/Model/Link.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/LinkSchema.php b/src/Model/LinkSchema.php index 62e91536..3bb93a7c 100644 --- a/src/Model/LinkSchema.php +++ b/src/Model/LinkSchema.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/LinksObject.php b/src/Model/LinksObject.php index ed46073d..941a1c1e 100644 --- a/src/Model/LinksObject.php +++ b/src/Model/LinksObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ListEndpointsResponse.php b/src/Model/ListEndpointsResponse.php index d672d2dd..d34df680 100644 --- a/src/Model/ListEndpointsResponse.php +++ b/src/Model/ListEndpointsResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ListMessageDirectionEnum.php b/src/Model/ListMessageDirectionEnum.php index 9c0a8c0f..08728775 100644 --- a/src/Model/ListMessageDirectionEnum.php +++ b/src/Model/ListMessageDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ListMessageItem.php b/src/Model/ListMessageItem.php index 42b8f35c..a2574f33 100644 --- a/src/Model/ListMessageItem.php +++ b/src/Model/ListMessageItem.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/LookupErrorResponse.php b/src/Model/LookupErrorResponse.php index 5ce79fad..56544afa 100644 --- a/src/Model/LookupErrorResponse.php +++ b/src/Model/LookupErrorResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/LookupErrorSchema.php b/src/Model/LookupErrorSchema.php index 24b3d365..d11ec7dc 100644 --- a/src/Model/LookupErrorSchema.php +++ b/src/Model/LookupErrorSchema.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/LookupErrorSchemaMeta.php b/src/Model/LookupErrorSchemaMeta.php index b202fd30..acf43a91 100644 --- a/src/Model/LookupErrorSchemaMeta.php +++ b/src/Model/LookupErrorSchemaMeta.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/LookupResult.php b/src/Model/LookupResult.php index 21b523d7..de8a322f 100644 --- a/src/Model/LookupResult.php +++ b/src/Model/LookupResult.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MachineDetectionCompleteCallback.php b/src/Model/MachineDetectionCompleteCallback.php index 35b8d6ec..3143a5bc 100644 --- a/src/Model/MachineDetectionCompleteCallback.php +++ b/src/Model/MachineDetectionCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MachineDetectionConfiguration.php b/src/Model/MachineDetectionConfiguration.php index 8e5ed34b..7f108218 100644 --- a/src/Model/MachineDetectionConfiguration.php +++ b/src/Model/MachineDetectionConfiguration.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MachineDetectionModeEnum.php b/src/Model/MachineDetectionModeEnum.php index 88e20219..e02b887d 100644 --- a/src/Model/MachineDetectionModeEnum.php +++ b/src/Model/MachineDetectionModeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MachineDetectionResult.php b/src/Model/MachineDetectionResult.php index 6ecac6a4..3250d00d 100644 --- a/src/Model/MachineDetectionResult.php +++ b/src/Model/MachineDetectionResult.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/Media.php b/src/Model/Media.php index acf90943..2dc01f5f 100644 --- a/src/Model/Media.php +++ b/src/Model/Media.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/Message.php b/src/Model/Message.php index e24e3d10..342c4a4d 100644 --- a/src/Model/Message.php +++ b/src/Model/Message.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MessageDirectionEnum.php b/src/Model/MessageDirectionEnum.php index 1c1e9978..d94ab974 100644 --- a/src/Model/MessageDirectionEnum.php +++ b/src/Model/MessageDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MessageRequest.php b/src/Model/MessageRequest.php index c20145f5..3280c588 100644 --- a/src/Model/MessageRequest.php +++ b/src/Model/MessageRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MessageStatusEnum.php b/src/Model/MessageStatusEnum.php index 8d4de725..127429bd 100644 --- a/src/Model/MessageStatusEnum.php +++ b/src/Model/MessageStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MessageTypeEnum.php b/src/Model/MessageTypeEnum.php index ed0068f2..55d9b5de 100644 --- a/src/Model/MessageTypeEnum.php +++ b/src/Model/MessageTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MessagesList.php b/src/Model/MessagesList.php index 158e361e..6a32eef8 100644 --- a/src/Model/MessagesList.php +++ b/src/Model/MessagesList.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MessagingCodeResponse.php b/src/Model/MessagingCodeResponse.php index 1762f3e7..c13a2094 100644 --- a/src/Model/MessagingCodeResponse.php +++ b/src/Model/MessagingCodeResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MessagingRequestError.php b/src/Model/MessagingRequestError.php index 1f1caf2b..604027f7 100644 --- a/src/Model/MessagingRequestError.php +++ b/src/Model/MessagingRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MfaForbiddenRequestError.php b/src/Model/MfaForbiddenRequestError.php index ec36c8fa..464e0a8d 100644 --- a/src/Model/MfaForbiddenRequestError.php +++ b/src/Model/MfaForbiddenRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MfaRequestError.php b/src/Model/MfaRequestError.php index a558164f..df92c8e0 100644 --- a/src/Model/MfaRequestError.php +++ b/src/Model/MfaRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MfaUnauthorizedRequestError.php b/src/Model/MfaUnauthorizedRequestError.php index 45bf413c..efff3de9 100644 --- a/src/Model/MfaUnauthorizedRequestError.php +++ b/src/Model/MfaUnauthorizedRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MmsMessageContent.php b/src/Model/MmsMessageContent.php index 6a9f4bba..52be96e2 100644 --- a/src/Model/MmsMessageContent.php +++ b/src/Model/MmsMessageContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MmsMessageContentFile.php b/src/Model/MmsMessageContentFile.php index 8707c3e0..d8fbec0c 100644 --- a/src/Model/MmsMessageContentFile.php +++ b/src/Model/MmsMessageContentFile.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index 9ba89d12..7e84d058 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelAction.php b/src/Model/MultiChannelAction.php index 95277d67..13fe978e 100644 --- a/src/Model/MultiChannelAction.php +++ b/src/Model/MultiChannelAction.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -35,7 +35,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class MultiChannelAction implements ComposedInterface +class MultiChannelAction implements AnyOfInterface { /** * The original name of the model. @@ -54,7 +54,7 @@ class MultiChannelAction implements ComposedInterface /** * {@inheritdoc} */ - public static function getComposedTypes(): array + public static function getAnyOfTypes(): array { return [ '\Bandwidth\Model\RbmActionBase', @@ -68,7 +68,7 @@ public static function getComposedTypes(): array /** * {@inheritdoc} */ - public static function getComposedDiscriminator(): ?string + public static function getAnyOfDiscriminator(): ?string { return self::DISCRIMINATOR; } @@ -76,7 +76,7 @@ public static function getComposedDiscriminator(): ?string /** * {@inheritdoc} */ - public static function getComposedDiscriminatorMappings(): array + public static function getAnyOfDiscriminatorMappings(): array { return [ 'CREATE_CALENDAR_EVENT' => '\Bandwidth\Model\MultiChannelActionCalendarEvent', diff --git a/src/Model/MultiChannelActionCalendarEvent.php b/src/Model/MultiChannelActionCalendarEvent.php index 48b5d551..f549ea1d 100644 --- a/src/Model/MultiChannelActionCalendarEvent.php +++ b/src/Model/MultiChannelActionCalendarEvent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelChannelListMMSObject.php b/src/Model/MultiChannelChannelListMMSObject.php index ffa161c5..9029f7cb 100644 --- a/src/Model/MultiChannelChannelListMMSObject.php +++ b/src/Model/MultiChannelChannelListMMSObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelChannelListMMSResponseObject.php b/src/Model/MultiChannelChannelListMMSResponseObject.php index 7561c1e7..5ee73f5f 100644 --- a/src/Model/MultiChannelChannelListMMSResponseObject.php +++ b/src/Model/MultiChannelChannelListMMSResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelChannelListObjectBase.php b/src/Model/MultiChannelChannelListObjectBase.php index 4d230798..7b8f574c 100644 --- a/src/Model/MultiChannelChannelListObjectBase.php +++ b/src/Model/MultiChannelChannelListObjectBase.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelChannelListOwnerObject.php b/src/Model/MultiChannelChannelListOwnerObject.php index f970d05e..40f6d0ae 100644 --- a/src/Model/MultiChannelChannelListOwnerObject.php +++ b/src/Model/MultiChannelChannelListOwnerObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelChannelListRBMObject.php b/src/Model/MultiChannelChannelListRBMObject.php index f3400095..98b31beb 100644 --- a/src/Model/MultiChannelChannelListRBMObject.php +++ b/src/Model/MultiChannelChannelListRBMObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php b/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php index 6db5a02a..130515ae 100644 --- a/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php +++ b/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -36,7 +36,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class MultiChannelChannelListRBMObjectAllOfContent implements ComposedInterface +class MultiChannelChannelListRBMObjectAllOfContent implements OneOfInterface { /** * The original name of the model. @@ -55,7 +55,7 @@ class MultiChannelChannelListRBMObjectAllOfContent implements ComposedInterface /** * {@inheritdoc} */ - public static function getComposedTypes(): array + public static function getOneOfTypes(): array { return [ '\Bandwidth\Model\RbmMessageContentText', @@ -67,7 +67,7 @@ public static function getComposedTypes(): array /** * {@inheritdoc} */ - public static function getComposedDiscriminator(): ?string + public static function getOneOfDiscriminator(): ?string { return self::DISCRIMINATOR; } @@ -75,7 +75,7 @@ public static function getComposedDiscriminator(): ?string /** * {@inheritdoc} */ - public static function getComposedDiscriminatorMappings(): array + public static function getOneOfDiscriminatorMappings(): array { return [ diff --git a/src/Model/MultiChannelChannelListRBMResponseObject.php b/src/Model/MultiChannelChannelListRBMResponseObject.php index a3a7f381..59de2d1c 100644 --- a/src/Model/MultiChannelChannelListRBMResponseObject.php +++ b/src/Model/MultiChannelChannelListRBMResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelChannelListRequestObject.php b/src/Model/MultiChannelChannelListRequestObject.php index c2558dea..3d4fe321 100644 --- a/src/Model/MultiChannelChannelListRequestObject.php +++ b/src/Model/MultiChannelChannelListRequestObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -35,7 +35,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class MultiChannelChannelListRequestObject implements ComposedInterface +class MultiChannelChannelListRequestObject implements AnyOfInterface { /** * The original name of the model. @@ -54,7 +54,7 @@ class MultiChannelChannelListRequestObject implements ComposedInterface /** * {@inheritdoc} */ - public static function getComposedTypes(): array + public static function getAnyOfTypes(): array { return [ '\Bandwidth\Model\MultiChannelChannelListRBMObject', @@ -66,7 +66,7 @@ public static function getComposedTypes(): array /** * {@inheritdoc} */ - public static function getComposedDiscriminator(): ?string + public static function getAnyOfDiscriminator(): ?string { return self::DISCRIMINATOR; } @@ -74,7 +74,7 @@ public static function getComposedDiscriminator(): ?string /** * {@inheritdoc} */ - public static function getComposedDiscriminatorMappings(): array + public static function getAnyOfDiscriminatorMappings(): array { return [ 'MMS' => '\Bandwidth\Model\MultiChannelChannelListMMSObject', diff --git a/src/Model/MultiChannelChannelListResponseObject.php b/src/Model/MultiChannelChannelListResponseObject.php index 5920a678..64ef5a1f 100644 --- a/src/Model/MultiChannelChannelListResponseObject.php +++ b/src/Model/MultiChannelChannelListResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -35,7 +35,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class MultiChannelChannelListResponseObject implements ComposedInterface +class MultiChannelChannelListResponseObject implements AnyOfInterface { /** * The original name of the model. @@ -54,7 +54,7 @@ class MultiChannelChannelListResponseObject implements ComposedInterface /** * {@inheritdoc} */ - public static function getComposedTypes(): array + public static function getAnyOfTypes(): array { return [ '\Bandwidth\Model\MultiChannelChannelListRBMResponseObject', @@ -66,7 +66,7 @@ public static function getComposedTypes(): array /** * {@inheritdoc} */ - public static function getComposedDiscriminator(): ?string + public static function getAnyOfDiscriminator(): ?string { return self::DISCRIMINATOR; } @@ -74,7 +74,7 @@ public static function getComposedDiscriminator(): ?string /** * {@inheritdoc} */ - public static function getComposedDiscriminatorMappings(): array + public static function getAnyOfDiscriminatorMappings(): array { return [ 'MMS' => '\Bandwidth\Model\MultiChannelChannelListMMSResponseObject', diff --git a/src/Model/MultiChannelChannelListSMSObject.php b/src/Model/MultiChannelChannelListSMSObject.php index 7dbbe6d2..787223ab 100644 --- a/src/Model/MultiChannelChannelListSMSObject.php +++ b/src/Model/MultiChannelChannelListSMSObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelChannelListSMSResponseObject.php b/src/Model/MultiChannelChannelListSMSResponseObject.php index 0fc2ba2e..8f768780 100644 --- a/src/Model/MultiChannelChannelListSMSResponseObject.php +++ b/src/Model/MultiChannelChannelListSMSResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelError.php b/src/Model/MultiChannelError.php index 52ec09d8..128e9a15 100644 --- a/src/Model/MultiChannelError.php +++ b/src/Model/MultiChannelError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelMessageChannelEnum.php b/src/Model/MultiChannelMessageChannelEnum.php index 0e397d87..75b88658 100644 --- a/src/Model/MultiChannelMessageChannelEnum.php +++ b/src/Model/MultiChannelMessageChannelEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelMessageContent.php b/src/Model/MultiChannelMessageContent.php index 9e6267da..34c8fed3 100644 --- a/src/Model/MultiChannelMessageContent.php +++ b/src/Model/MultiChannelMessageContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelMessageRequest.php b/src/Model/MultiChannelMessageRequest.php index 252621e0..71d66242 100644 --- a/src/Model/MultiChannelMessageRequest.php +++ b/src/Model/MultiChannelMessageRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/MultiChannelMessageResponseData.php b/src/Model/MultiChannelMessageResponseData.php index 5daa29d3..a2d82308 100644 --- a/src/Model/MultiChannelMessageResponseData.php +++ b/src/Model/MultiChannelMessageResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ComposedInterface.php b/src/Model/OneOfInterface.php similarity index 70% rename from src/Model/ComposedInterface.php rename to src/Model/OneOfInterface.php index 8e09a9a1..b01b20b7 100644 --- a/src/Model/ComposedInterface.php +++ b/src/Model/OneOfInterface.php @@ -1,6 +1,6 @@ */ - public static function getComposedDiscriminatorMappings(): array; + public static function getOneOfDiscriminatorMappings(): array; } diff --git a/src/Model/OptInWorkflow.php b/src/Model/OptInWorkflow.php index 6d1f80fe..5576b038 100644 --- a/src/Model/OptInWorkflow.php +++ b/src/Model/OptInWorkflow.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/Page.php b/src/Model/Page.php index c85b3683..1ebb9e07 100644 --- a/src/Model/Page.php +++ b/src/Model/Page.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/PageInfo.php b/src/Model/PageInfo.php index adbc1c5c..53cee021 100644 --- a/src/Model/PageInfo.php +++ b/src/Model/PageInfo.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/PriorityEnum.php b/src/Model/PriorityEnum.php index 13607a07..9791454c 100644 --- a/src/Model/PriorityEnum.php +++ b/src/Model/PriorityEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ProductTypeEnum.php b/src/Model/ProductTypeEnum.php index 79c4d47a..5a32ba70 100644 --- a/src/Model/ProductTypeEnum.php +++ b/src/Model/ProductTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmActionBase.php b/src/Model/RbmActionBase.php index eb9a4aa8..3afd1b0b 100644 --- a/src/Model/RbmActionBase.php +++ b/src/Model/RbmActionBase.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmActionDial.php b/src/Model/RbmActionDial.php index 0894efcb..d9aa4640 100644 --- a/src/Model/RbmActionDial.php +++ b/src/Model/RbmActionDial.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmActionOpenUrl.php b/src/Model/RbmActionOpenUrl.php index 028095d1..f4a3eda4 100644 --- a/src/Model/RbmActionOpenUrl.php +++ b/src/Model/RbmActionOpenUrl.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmActionTypeEnum.php b/src/Model/RbmActionTypeEnum.php index 8a61be63..926da025 100644 --- a/src/Model/RbmActionTypeEnum.php +++ b/src/Model/RbmActionTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmActionViewLocation.php b/src/Model/RbmActionViewLocation.php index e958b2bf..b1137b55 100644 --- a/src/Model/RbmActionViewLocation.php +++ b/src/Model/RbmActionViewLocation.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmCardContent.php b/src/Model/RbmCardContent.php index 7892e15b..17e3dddc 100644 --- a/src/Model/RbmCardContent.php +++ b/src/Model/RbmCardContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmCardContentMedia.php b/src/Model/RbmCardContentMedia.php index 3231dfb2..a2c0b478 100644 --- a/src/Model/RbmCardContentMedia.php +++ b/src/Model/RbmCardContentMedia.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmLocationResponse.php b/src/Model/RbmLocationResponse.php index e6b622df..9417565d 100644 --- a/src/Model/RbmLocationResponse.php +++ b/src/Model/RbmLocationResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmMediaHeightEnum.php b/src/Model/RbmMediaHeightEnum.php index 3dbc4704..d09e05a7 100644 --- a/src/Model/RbmMediaHeightEnum.php +++ b/src/Model/RbmMediaHeightEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmMessageCarouselCard.php b/src/Model/RbmMessageCarouselCard.php index d95202a2..27a83e18 100644 --- a/src/Model/RbmMessageCarouselCard.php +++ b/src/Model/RbmMessageCarouselCard.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmMessageContentFile.php b/src/Model/RbmMessageContentFile.php index 797df284..3ed416d3 100644 --- a/src/Model/RbmMessageContentFile.php +++ b/src/Model/RbmMessageContentFile.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmMessageContentRichCard.php b/src/Model/RbmMessageContentRichCard.php index 16fb6214..5dcc0700 100644 --- a/src/Model/RbmMessageContentRichCard.php +++ b/src/Model/RbmMessageContentRichCard.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -35,7 +35,7 @@ * @author OpenAPI Generator team * @link https://openapi-generator.tech */ -class RbmMessageContentRichCard implements ComposedInterface +class RbmMessageContentRichCard implements OneOfInterface { /** * The original name of the model. @@ -54,7 +54,7 @@ class RbmMessageContentRichCard implements ComposedInterface /** * {@inheritdoc} */ - public static function getComposedTypes(): array + public static function getOneOfTypes(): array { return [ '\Bandwidth\Model\RbmStandaloneCard', @@ -65,7 +65,7 @@ public static function getComposedTypes(): array /** * {@inheritdoc} */ - public static function getComposedDiscriminator(): ?string + public static function getOneOfDiscriminator(): ?string { return self::DISCRIMINATOR; } @@ -73,7 +73,7 @@ public static function getComposedDiscriminator(): ?string /** * {@inheritdoc} */ - public static function getComposedDiscriminatorMappings(): array + public static function getOneOfDiscriminatorMappings(): array { return [ diff --git a/src/Model/RbmMessageContentText.php b/src/Model/RbmMessageContentText.php index 642438f9..c2ad1fae 100644 --- a/src/Model/RbmMessageContentText.php +++ b/src/Model/RbmMessageContentText.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmMessageMedia.php b/src/Model/RbmMessageMedia.php index 79b3f3a2..2583688d 100644 --- a/src/Model/RbmMessageMedia.php +++ b/src/Model/RbmMessageMedia.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmOpenUrlEnum.php b/src/Model/RbmOpenUrlEnum.php index 725c4b73..4b2c943f 100644 --- a/src/Model/RbmOpenUrlEnum.php +++ b/src/Model/RbmOpenUrlEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmStandaloneCard.php b/src/Model/RbmStandaloneCard.php index a17eb3fb..d63a0d43 100644 --- a/src/Model/RbmStandaloneCard.php +++ b/src/Model/RbmStandaloneCard.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmSuggestionResponse.php b/src/Model/RbmSuggestionResponse.php index b64c6f57..97058c53 100644 --- a/src/Model/RbmSuggestionResponse.php +++ b/src/Model/RbmSuggestionResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RbmWebViewEnum.php b/src/Model/RbmWebViewEnum.php index 1a117539..ffdbf347 100644 --- a/src/Model/RbmWebViewEnum.php +++ b/src/Model/RbmWebViewEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RecordingAvailableCallback.php b/src/Model/RecordingAvailableCallback.php index 2a914399..6693846d 100644 --- a/src/Model/RecordingAvailableCallback.php +++ b/src/Model/RecordingAvailableCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RecordingCompleteCallback.php b/src/Model/RecordingCompleteCallback.php index 10737836..774f8e61 100644 --- a/src/Model/RecordingCompleteCallback.php +++ b/src/Model/RecordingCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RecordingStateEnum.php b/src/Model/RecordingStateEnum.php index 3fabc00b..2215ba67 100644 --- a/src/Model/RecordingStateEnum.php +++ b/src/Model/RecordingStateEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RecordingTranscriptionClip.php b/src/Model/RecordingTranscriptionClip.php index 47e46caf..e27a37df 100644 --- a/src/Model/RecordingTranscriptionClip.php +++ b/src/Model/RecordingTranscriptionClip.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RecordingTranscriptionMetadata.php b/src/Model/RecordingTranscriptionMetadata.php index 7200311d..9eafcda4 100644 --- a/src/Model/RecordingTranscriptionMetadata.php +++ b/src/Model/RecordingTranscriptionMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RecordingTranscriptions.php b/src/Model/RecordingTranscriptions.php index 86597420..7e9fa6b8 100644 --- a/src/Model/RecordingTranscriptions.php +++ b/src/Model/RecordingTranscriptions.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RedirectCallback.php b/src/Model/RedirectCallback.php index dc8eb776..602c5e39 100644 --- a/src/Model/RedirectCallback.php +++ b/src/Model/RedirectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/RedirectMethodEnum.php b/src/Model/RedirectMethodEnum.php index 189c9010..724269be 100644 --- a/src/Model/RedirectMethodEnum.php +++ b/src/Model/RedirectMethodEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/SipConnectionMetadata.php b/src/Model/SipConnectionMetadata.php index 428f1f91..803312f8 100644 --- a/src/Model/SipConnectionMetadata.php +++ b/src/Model/SipConnectionMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/SipCredentials.php b/src/Model/SipCredentials.php index f008473d..4818b042 100644 --- a/src/Model/SipCredentials.php +++ b/src/Model/SipCredentials.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/SmsMessageContent.php b/src/Model/SmsMessageContent.php index a5cd72d6..26bd4f58 100644 --- a/src/Model/SmsMessageContent.php +++ b/src/Model/SmsMessageContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/StandaloneCardOrientationEnum.php b/src/Model/StandaloneCardOrientationEnum.php index aa0862e6..5494299d 100644 --- a/src/Model/StandaloneCardOrientationEnum.php +++ b/src/Model/StandaloneCardOrientationEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/StatusCallback.php b/src/Model/StatusCallback.php index 54859209..be170724 100644 --- a/src/Model/StatusCallback.php +++ b/src/Model/StatusCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/StatusCallbackMessage.php b/src/Model/StatusCallbackMessage.php index 2fb41733..1c4ac053 100644 --- a/src/Model/StatusCallbackMessage.php +++ b/src/Model/StatusCallbackMessage.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/StatusCallbackTypeEnum.php b/src/Model/StatusCallbackTypeEnum.php index c592b744..20ead8e1 100644 --- a/src/Model/StatusCallbackTypeEnum.php +++ b/src/Model/StatusCallbackTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/StirShaken.php b/src/Model/StirShaken.php index 888bac2b..c8dcaa9c 100644 --- a/src/Model/StirShaken.php +++ b/src/Model/StirShaken.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/SyncLookupRequest.php b/src/Model/SyncLookupRequest.php index b36c3945..e1e136d1 100644 --- a/src/Model/SyncLookupRequest.php +++ b/src/Model/SyncLookupRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/TelephoneNumber.php b/src/Model/TelephoneNumber.php index 23e673a3..35562bb7 100644 --- a/src/Model/TelephoneNumber.php +++ b/src/Model/TelephoneNumber.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/TfvBasicAuthentication.php b/src/Model/TfvBasicAuthentication.php index 965628c8..346bf136 100644 --- a/src/Model/TfvBasicAuthentication.php +++ b/src/Model/TfvBasicAuthentication.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/TfvCallbackStatusEnum.php b/src/Model/TfvCallbackStatusEnum.php index 17d84618..741c029b 100644 --- a/src/Model/TfvCallbackStatusEnum.php +++ b/src/Model/TfvCallbackStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/TfvError.php b/src/Model/TfvError.php index ac6e2985..141962ca 100644 --- a/src/Model/TfvError.php +++ b/src/Model/TfvError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/TfvStatus.php b/src/Model/TfvStatus.php index 80664db5..9b1dde49 100644 --- a/src/Model/TfvStatus.php +++ b/src/Model/TfvStatus.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/TfvStatusEnum.php b/src/Model/TfvStatusEnum.php index f9323cc2..4cf5fd41 100644 --- a/src/Model/TfvStatusEnum.php +++ b/src/Model/TfvStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/TfvSubmissionInfo.php b/src/Model/TfvSubmissionInfo.php index a37f4b9d..1c26a1cf 100644 --- a/src/Model/TfvSubmissionInfo.php +++ b/src/Model/TfvSubmissionInfo.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/TfvSubmissionWrapper.php b/src/Model/TfvSubmissionWrapper.php index 2f07b21d..ceda5ba4 100644 --- a/src/Model/TfvSubmissionWrapper.php +++ b/src/Model/TfvSubmissionWrapper.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/ThumbnailAlignmentEnum.php b/src/Model/ThumbnailAlignmentEnum.php index d2bb47b2..20a76b5a 100644 --- a/src/Model/ThumbnailAlignmentEnum.php +++ b/src/Model/ThumbnailAlignmentEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/TranscribeRecording.php b/src/Model/TranscribeRecording.php index c9c04d71..4510b45a 100644 --- a/src/Model/TranscribeRecording.php +++ b/src/Model/TranscribeRecording.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/Transcription.php b/src/Model/Transcription.php index d400c99d..5365b640 100644 --- a/src/Model/Transcription.php +++ b/src/Model/Transcription.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/TranscriptionAvailableCallback.php b/src/Model/TranscriptionAvailableCallback.php index 4421ea6b..23f12198 100644 --- a/src/Model/TranscriptionAvailableCallback.php +++ b/src/Model/TranscriptionAvailableCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/TransferAnswerCallback.php b/src/Model/TransferAnswerCallback.php index ad79d0bd..8a81490f 100644 --- a/src/Model/TransferAnswerCallback.php +++ b/src/Model/TransferAnswerCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/TransferCompleteCallback.php b/src/Model/TransferCompleteCallback.php index c0815c31..f36d92fb 100644 --- a/src/Model/TransferCompleteCallback.php +++ b/src/Model/TransferCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/TransferDisconnectCallback.php b/src/Model/TransferDisconnectCallback.php index 17b9373e..c9611035 100644 --- a/src/Model/TransferDisconnectCallback.php +++ b/src/Model/TransferDisconnectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/UpdateCall.php b/src/Model/UpdateCall.php index 0f6418eb..1f0f1a8e 100644 --- a/src/Model/UpdateCall.php +++ b/src/Model/UpdateCall.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/UpdateCallRecording.php b/src/Model/UpdateCallRecording.php index db023ccd..b7e64fcd 100644 --- a/src/Model/UpdateCallRecording.php +++ b/src/Model/UpdateCallRecording.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/UpdateConference.php b/src/Model/UpdateConference.php index 38d3317d..aacaf8a9 100644 --- a/src/Model/UpdateConference.php +++ b/src/Model/UpdateConference.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/UpdateConferenceMember.php b/src/Model/UpdateConferenceMember.php index 9691bd05..d2e400d5 100644 --- a/src/Model/UpdateConferenceMember.php +++ b/src/Model/UpdateConferenceMember.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/VerificationDenialWebhook.php b/src/Model/VerificationDenialWebhook.php index 3132306e..64e176bb 100644 --- a/src/Model/VerificationDenialWebhook.php +++ b/src/Model/VerificationDenialWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/VerificationRequest.php b/src/Model/VerificationRequest.php index 2768535d..a7e9e50e 100644 --- a/src/Model/VerificationRequest.php +++ b/src/Model/VerificationRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/VerificationUpdateRequest.php b/src/Model/VerificationUpdateRequest.php index 780a3658..5b233305 100644 --- a/src/Model/VerificationUpdateRequest.php +++ b/src/Model/VerificationUpdateRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/VerificationWebhook.php b/src/Model/VerificationWebhook.php index 6cd945fd..96cd3926 100644 --- a/src/Model/VerificationWebhook.php +++ b/src/Model/VerificationWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/VerifyCodeRequest.php b/src/Model/VerifyCodeRequest.php index d2cee1a0..ef2a7016 100644 --- a/src/Model/VerifyCodeRequest.php +++ b/src/Model/VerifyCodeRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/VerifyCodeResponse.php b/src/Model/VerifyCodeResponse.php index 08c80c49..88364742 100644 --- a/src/Model/VerifyCodeResponse.php +++ b/src/Model/VerifyCodeResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/VoiceApiError.php b/src/Model/VoiceApiError.php index 3c0209a3..304c7673 100644 --- a/src/Model/VoiceApiError.php +++ b/src/Model/VoiceApiError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/VoiceCodeResponse.php b/src/Model/VoiceCodeResponse.php index 622086e6..5313288e 100644 --- a/src/Model/VoiceCodeResponse.php +++ b/src/Model/VoiceCodeResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/WebhookSubscription.php b/src/Model/WebhookSubscription.php index b446b2a5..395c5c80 100644 --- a/src/Model/WebhookSubscription.php +++ b/src/Model/WebhookSubscription.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/WebhookSubscriptionBasicAuthentication.php b/src/Model/WebhookSubscriptionBasicAuthentication.php index ec3d00df..fa0887dd 100644 --- a/src/Model/WebhookSubscriptionBasicAuthentication.php +++ b/src/Model/WebhookSubscriptionBasicAuthentication.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/WebhookSubscriptionError.php b/src/Model/WebhookSubscriptionError.php index 99701f76..ba0a9a76 100644 --- a/src/Model/WebhookSubscriptionError.php +++ b/src/Model/WebhookSubscriptionError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/WebhookSubscriptionRequestSchema.php b/src/Model/WebhookSubscriptionRequestSchema.php index 31531e92..91d39445 100644 --- a/src/Model/WebhookSubscriptionRequestSchema.php +++ b/src/Model/WebhookSubscriptionRequestSchema.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/WebhookSubscriptionTypeEnum.php b/src/Model/WebhookSubscriptionTypeEnum.php index 944c8870..f89beaee 100644 --- a/src/Model/WebhookSubscriptionTypeEnum.php +++ b/src/Model/WebhookSubscriptionTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Model/WebhookSubscriptionsListBody.php b/src/Model/WebhookSubscriptionsListBody.php index 3c6bdb71..e9df3577 100644 --- a/src/Model/WebhookSubscriptionsListBody.php +++ b/src/Model/WebhookSubscriptionsListBody.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index dd708e0e..6fa9c55e 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -503,8 +503,11 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade // A oneOf/anyOf schema is not a value object: dispatch here, after json_decode (so // members get the decoded value) but before the array-to-object cast (which breaks arrays). - if (is_subclass_of($class, '\Bandwidth\Model\ComposedInterface')) { - return self::deserializeComposed($data, $class, $httpHeaders); + if (is_subclass_of($class, '\Bandwidth\Model\OneOfInterface')) { + return self::deserializeOneOf($data, $class, $httpHeaders); + } + if (is_subclass_of($class, '\Bandwidth\Model\AnyOfInterface')) { + return self::deserializeAnyOf($data, $class, $httpHeaders); } if (is_array($data)) { @@ -547,34 +550,84 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade } /** - * Deserialize data into one of the member types of a `oneOf` or `anyOf` schema. + * Deserialize data into one of the member types of a `oneOf` schema. + * + * When the schema declares a discriminator, its value selects the member type directly. + * Otherwise each member type is tried in turn and the first one that yields a valid model + * (or a non-null primitive) is returned. + * + * @param mixed $data the decoded data to resolve to a member type + * @param string $class a class name implementing OneOfInterface + * @param string[]|null $httpHeaders HTTP headers + * + * @return mixed an instance of one of the `oneOf` member types + */ + private static function deserializeOneOf(mixed $data, string $class, ?array $httpHeaders): mixed + { + // $data is already decoded (see deserialize()). Read the discriminator from an object view + // of it, but deserialize each member from the original $data so array and scalar members + // keep their own type handling instead of being coerced to an object here. + $probe = is_array($data) ? (object) $data : $data; + + $discriminator = $class::getOneOfDiscriminator(); + if ($discriminator !== null && is_object($probe) && isset($probe->{$discriminator}) && is_string($probe->{$discriminator})) { + $mappings = $class::getOneOfDiscriminatorMappings(); + if (isset($mappings[$probe->{$discriminator}])) { + return self::deserialize($data, $mappings[$probe->{$discriminator}], $httpHeaders); + } + } + + foreach ($class::getOneOfTypes() as $type) { + try { + $instance = self::deserialize($data, $type, $httpHeaders); + } catch (\Throwable $e) { + // Any failure means the data does not match this member type; try the next one. + // The broad catch is intentional: a real failure is not hidden, since the loop + // throws below when no member type matches. + continue; + } + + if ($instance instanceof ModelInterface) { + if ($instance->valid()) { + return $instance; + } + } elseif ($instance !== null) { + return $instance; + } + } + + throw new \InvalidArgumentException(sprintf('No matching schema in oneOf %s for the given data', $class)); + } + + /** + * Deserialize data into one of the member types of an `anyOf` schema. * * When the schema declares a discriminator, its value selects the member type directly. * Otherwise each member type is tried in turn and the first one that yields a valid model * (or a non-null primitive) is returned. * * @param mixed $data the decoded data to resolve to a member type - * @param string $class a class name implementing ComposedInterface + * @param string $class a class name implementing AnyOfInterface * @param string[]|null $httpHeaders HTTP headers * - * @return mixed an instance of one of the composed (`oneOf`/`anyOf`) member types + * @return mixed an instance of one of the `anyOf` member types */ - private static function deserializeComposed(mixed $data, string $class, ?array $httpHeaders): mixed + private static function deserializeAnyOf(mixed $data, string $class, ?array $httpHeaders): mixed { // $data is already decoded (see deserialize()). Read the discriminator from an object view // of it, but deserialize each member from the original $data so array and scalar members // keep their own type handling instead of being coerced to an object here. $probe = is_array($data) ? (object) $data : $data; - $discriminator = $class::getComposedDiscriminator(); + $discriminator = $class::getAnyOfDiscriminator(); if ($discriminator !== null && is_object($probe) && isset($probe->{$discriminator}) && is_string($probe->{$discriminator})) { - $mappings = $class::getComposedDiscriminatorMappings(); + $mappings = $class::getAnyOfDiscriminatorMappings(); if (isset($mappings[$probe->{$discriminator}])) { return self::deserialize($data, $mappings[$probe->{$discriminator}], $httpHeaders); } } - foreach ($class::getComposedTypes() as $type) { + foreach ($class::getAnyOfTypes() as $type) { try { $instance = self::deserialize($data, $type, $httpHeaders); } catch (\Throwable $e) { @@ -593,7 +646,7 @@ private static function deserializeComposed(mixed $data, string $class, ?array $ } } - throw new \InvalidArgumentException(sprintf('No matching schema in composed type %s for the given data', $class)); + throw new \InvalidArgumentException(sprintf('No matching schema in anyOf %s for the given data', $class)); } /** From 1a428c2307f9b01e2c7ab8247ad5cc29e8245708 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 22 Jul 2026 16:58:37 -0400 Subject: [PATCH 14/53] regenerate with generator PR updates --- src/ObjectSerializer.php | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 6fa9c55e..0bfa45e5 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -499,7 +499,11 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade } return $data; } else { - $data = is_string($data) ? json_decode($data) : $data; + if (is_string($data)) { + $decoded = json_decode($data); + // Keep the original string if decode fails (nested values are already PHP strings). + $data = ($decoded !== null || $data === 'null') ? $decoded : $data; + } // A oneOf/anyOf schema is not a value object: dispatch here, after json_decode (so // members get the decoded value) but before the array-to-object cast (which breaks arrays). @@ -549,6 +553,25 @@ public static function deserialize(mixed $data, string $class, ?array $httpHeade } } + /** + * Returns true when $data's PHP type is compatible with the OpenAPI primitive $type. + * Prevents settype() coercion (e.g. "abc" → 0 for integer) from producing a false match + * when iterating over oneOf/anyOf candidate types. + * Non-primitive types always return true and are validated downstream by ModelInterface::valid(). + */ + private static function isPrimitiveTypeCompatible(mixed $data, string $type): bool + { + return match($type) { + 'int', 'integer' => is_int($data), + 'float', 'double', 'number' => is_int($data) || is_float($data), + 'bool', 'boolean' => is_bool($data), + 'string' => is_string($data), + 'array' => is_array($data), + 'object' => is_object($data), + default => true, + }; + } + /** * Deserialize data into one of the member types of a `oneOf` schema. * @@ -578,6 +601,9 @@ private static function deserializeOneOf(mixed $data, string $class, ?array $htt } foreach ($class::getOneOfTypes() as $type) { + if (!self::isPrimitiveTypeCompatible($data, $type)) { + continue; + } try { $instance = self::deserialize($data, $type, $httpHeaders); } catch (\Throwable $e) { @@ -628,6 +654,9 @@ private static function deserializeAnyOf(mixed $data, string $class, ?array $htt } foreach ($class::getAnyOfTypes() as $type) { + if (!self::isPrimitiveTypeCompatible($data, $type)) { + continue; + } try { $instance = self::deserialize($data, $type, $httpHeaders); } catch (\Throwable $e) { From 00eac9f3f12917a6458b9887ee2f7a2eae20bf53 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 22 Jul 2026 17:13:37 -0400 Subject: [PATCH 15/53] mfa, statistics, and tfv tests --- tests/Api/MFAApiTest.php | 101 ++++++++++++++++------ tests/Api/StatisticsApiTest.php | 39 ++++----- tests/Api/TollFreeVerificationApiTest.php | 35 +++----- 3 files changed, 101 insertions(+), 74 deletions(-) diff --git a/tests/Api/MFAApiTest.php b/tests/Api/MFAApiTest.php index b1903dbb..37e4c2e5 100644 --- a/tests/Api/MFAApiTest.php +++ b/tests/Api/MFAApiTest.php @@ -28,8 +28,13 @@ namespace Bandwidth\Test\Api; use Bandwidth\Configuration; -use Bandwidth\ApiException; -use Bandwidth\ObjectSerializer; +use Bandwidth\Api\MFAApi; +use Bandwidth\Model\CodeRequest; +use Bandwidth\Model\MessagingCodeResponse; +use Bandwidth\Model\VerifyCodeRequest; +use Bandwidth\Model\VerifyCodeResponse; +use Bandwidth\Model\VoiceCodeResponse; + use PHPUnit\Framework\TestCase; /** @@ -41,33 +46,29 @@ */ class MFAApiTest extends TestCase { + private static MFAApi $apiInstance; + private static string $account_id; + private static string $bw_number; + private static string $user_number; + private static string $bw_messaging_application_id; + private static string $bw_voice_application_id; /** * Setup before running any test cases */ public static function setUpBeforeClass(): void { - } + $config = Configuration::getDefaultConfiguration() + ->setUsername(getenv("BW_USERNAME")) + ->setPassword(getenv("BW_PASSWORD")); - /** - * Setup before running each test case - */ - public function setUp(): void - { - } + self::$apiInstance = new MFAApi(config: $config); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$bw_number = getenv("BW_NUMBER"); + self::$user_number = getenv("USER_NUMBER"); + self::$bw_messaging_application_id = getenv("BW_MESSAGING_APPLICATION_ID"); + self::$bw_voice_application_id = getenv("BW_VOICE_APPLICATION_ID"); } /** @@ -78,8 +79,23 @@ public static function tearDownAfterClass(): void */ public function testGenerateMessagingCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $request = new CodeRequest([ + 'to' => self::$user_number, + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'scope' => 'scope', + 'message' => 'Your temporary {NAME} {SCOPE} code is {CODE}', + 'digits' => 6 + ]); + + [$data, $status_code] = self::$apiInstance->generateMessagingCodeWithHttpInfo( + self::$account_id, + $request + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(MessagingCodeResponse::class, $data); + $this->assertIsString($data->getMessageId()); } /** @@ -90,8 +106,23 @@ public function testGenerateMessagingCode() */ public function testGenerateVoiceCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $request = new CodeRequest([ + 'to' => self::$user_number, + 'from' => self::$bw_number, + 'application_id' => self::$bw_voice_application_id, + 'scope' => 'scope', + 'message' => 'Your temporary {NAME} {SCOPE} code is {CODE}', + 'digits' => 6 + ]); + + [$data, $status_code] = self::$apiInstance->generateVoiceCodeWithHttpInfo( + self::$account_id, + $request + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(VoiceCodeResponse::class, $data); + $this->assertIsString($data->getCallId()); } /** @@ -102,7 +133,23 @@ public function testGenerateVoiceCode() */ public function testVerifyCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + // Use a random TN to avoid rate limiting + $random_tn = '+1' . (string) rand(1111111111, 9999999999); + + $request = new VerifyCodeRequest([ + 'to' => $random_tn, + 'scope' => '2FA', + 'expiration_time_in_minutes' => 3, + 'code' => '123456' + ]); + + [$data, $status_code] = self::$apiInstance->verifyCodeWithHttpInfo( + self::$account_id, + $request + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(VerifyCodeResponse::class, $data); + $this->assertFalse($data->getValid()); } } diff --git a/tests/Api/StatisticsApiTest.php b/tests/Api/StatisticsApiTest.php index c06f47fa..81a145a5 100644 --- a/tests/Api/StatisticsApiTest.php +++ b/tests/Api/StatisticsApiTest.php @@ -28,8 +28,9 @@ namespace Bandwidth\Test\Api; use Bandwidth\Configuration; -use Bandwidth\ApiException; -use Bandwidth\ObjectSerializer; +use Bandwidth\Api\StatisticsApi; +use Bandwidth\Model\AccountStatistics; + use PHPUnit\Framework\TestCase; /** @@ -41,33 +42,21 @@ */ class StatisticsApiTest extends TestCase { + private static StatisticsApi $apiInstance; + private static string $account_id; /** * Setup before running any test cases */ public static function setUpBeforeClass(): void { - } + $config = Configuration::getDefaultConfiguration() + ->setUsername(getenv("BW_USERNAME")) + ->setPassword(getenv("BW_PASSWORD")); - /** - * Setup before running each test case - */ - public function setUp(): void - { - } + self::$apiInstance = new StatisticsApi(config: $config); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$account_id = getenv("BW_ACCOUNT_ID"); } /** @@ -78,7 +67,11 @@ public static function tearDownAfterClass(): void */ public function testGetStatistics() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$data, $status_code] = self::$apiInstance->getStatisticsWithHttpInfo(self::$account_id); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(AccountStatistics::class, $data); + $this->assertIsInt($data->getCurrentCallQueueSize()); + $this->assertIsInt($data->getMaxCallQueueSize()); } } diff --git a/tests/Api/TollFreeVerificationApiTest.php b/tests/Api/TollFreeVerificationApiTest.php index 78d3d58f..1db5cdb9 100644 --- a/tests/Api/TollFreeVerificationApiTest.php +++ b/tests/Api/TollFreeVerificationApiTest.php @@ -28,8 +28,8 @@ namespace Bandwidth\Test\Api; use Bandwidth\Configuration; -use Bandwidth\ApiException; -use Bandwidth\ObjectSerializer; +use Bandwidth\Api\TollFreeVerificationApi; + use PHPUnit\Framework\TestCase; /** @@ -41,33 +41,18 @@ */ class TollFreeVerificationApiTest extends TestCase { + private static TollFreeVerificationApi $apiInstance; /** * Setup before running any test cases */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } + $config = Configuration::getDefaultConfiguration() + ->setUsername(getenv("BW_USERNAME")) + ->setPassword(getenv("BW_PASSWORD")); - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$apiInstance = new TollFreeVerificationApi(config: $config); } /** @@ -126,8 +111,10 @@ public function testGetTollFreeVerificationStatus() */ public function testListTollFreeUseCases() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$data, $status_code] = self::$apiInstance->listTollFreeUseCasesWithHttpInfo(); + + $this->assertEquals(200, $status_code); + $this->assertIsArray($data); } /** From ff2a2561da88f93b6461a115290eebaf55c5f5b8 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 22 Jul 2026 17:16:41 -0400 Subject: [PATCH 16/53] \strlen to make linter happy --- tests/Api/MessagesApiTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Api/MessagesApiTest.php b/tests/Api/MessagesApiTest.php index 4aecc087..3989aa89 100644 --- a/tests/Api/MessagesApiTest.php +++ b/tests/Api/MessagesApiTest.php @@ -96,7 +96,7 @@ public function testCreateMessage() [$data, $status_code] = self::$apiInstance->createMessageWithHttpInfo(self::$account_id, $messageRequest); $this->assertEquals(202, $status_code); $this->assertInstanceOf(Message::class, $data); - $this->assertEquals(29, strlen($data->getId())); + $this->assertEquals(29, \strlen($data->getId())); $this->assertEquals($from_number, $data->getOwner()); $this->assertEquals([$to_number], $data->getTo()); $this->assertEquals($from_number, $data->getFrom()); @@ -126,7 +126,7 @@ public function testListMessages() $this->assertInstanceOf(MessagesList::class, $data); $this->assertInstanceOf(ListMessageItem::class, $data->getMessages()[0]); $this->assertEquals(self::$account_id, $data->getMessages()[0]->getAccountId()); - $this->assertEquals(29, strlen($data->getMessages()[0]->getMessageId())); + $this->assertEquals(29, \strlen($data->getMessages()[0]->getMessageId())); $this->assertEquals($list_message_direction, $data->getMessages()[0]->getMessageDirection()); $this->assertEquals($calling_number_country_a3, $data->getMessages()[0]->getCallingNumberCountryA3()); } From 2ac7d97699a613002de725eaa4642274e5e9f3e5 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 23 Jul 2026 15:36:33 -0400 Subject: [PATCH 17/53] update doc after generator change --- docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md b/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md index 17cc7776..d8e82e4f 100644 --- a/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md +++ b/docs/Model/MultiChannelChannelListRBMObjectAllOfContent.md @@ -7,6 +7,7 @@ It is never instantiated directly — use one of the concrete types. - [**\Bandwidth\Model\RbmMessageContentText**](RbmMessageContentText.md) - [**\Bandwidth\Model\RbmMessageMedia**](RbmMessageMedia.md) -- [**\Bandwidth\Model\RbmMessageContentRichCard**](RbmMessageContentRichCard.md) +- [**\Bandwidth\Model\RbmStandaloneCard**](RbmStandaloneCard.md) +- [**\Bandwidth\Model\RbmMessageCarouselCard**](RbmMessageCarouselCard.md) [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) From e4c5fea77087b6a6cdd5d28bb6598718f5f323c5 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 28 Jul 2026 16:33:57 -0400 Subject: [PATCH 18/53] update config for oauth --- custom_templates/Configuration.mustache | 736 ++++++++++++++++++++++++ openapi-config.yml | 1 + src/Configuration.php | 164 +++++- 3 files changed, 900 insertions(+), 1 deletion(-) create mode 100644 custom_templates/Configuration.mustache diff --git a/custom_templates/Configuration.mustache b/custom_templates/Configuration.mustache new file mode 100644 index 00000000..96269031 --- /dev/null +++ b/custom_templates/Configuration.mustache @@ -0,0 +1,736 @@ +partial_header}} + +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +namespace {{invokerPackage}}; + +use InvalidArgumentException; +use GuzzleHttp\Client; + +/** + * Configuration Class Doc Comment + * + * @package {{invokerPackage}} + * @author OpenAPI Generator team + * @link https://openapi-generator.tech + */ +class Configuration +{ + public const BOOLEAN_FORMAT_INT = 'int'; + public const BOOLEAN_FORMAT_STRING = 'string'; + + /** + * @var Configuration|null + */ + private static ?Configuration $defaultConfiguration = null; + + /** + * Associate array to store API key(s) + * + * @var string[] + */ + protected array $apiKeys = []; + + /** + * Associate array to store API prefix (e.g. Bearer) + * + * @var string[] + */ + protected array $apiKeyPrefixes = []; + + /** + * Access token for OAuth/Bearer authentication + * + * @var string + */ + protected string $accessToken = ''; + + /** + * Client ID for OAuth2 client credentials authentication + * + * @var string + */ + protected string $clientId = ''; + + /** + * Client secret for OAuth2 client credentials authentication + * + * @var string + */ + protected string $clientSecret = ''; + + /** + * Token endpoint used to fetch an OAuth2 access token + * + * @var string + */ + protected string $tokenUrl = 'https://api.bandwidth.com/api/v1/oauth2/token'; + + /** + * Unix timestamp at which the current access token expires + * + * @var int|null + */ + protected ?int $accessTokenExpiration = null; + + /** + * Callable that returns a valid access token. Overrides the static access + * token when set. Defaults to an OAuth2 client credentials getter. + * + * @var \Closure|null + */ + protected ?\Closure $accessTokenGetter = null; + + /** + * Boolean format for query string + * + * @var string + */ + protected string $booleanFormatForQueryString = self::BOOLEAN_FORMAT_INT; + + /** + * Username for HTTP basic authentication + * + * @var string + */ + protected string $username = ''; + + /** + * Password for HTTP basic authentication + * + * @var string + */ + protected string $password = ''; + + /** + * The host + * + * @var string + */ + protected string $host = '{{basePath}}'; + + /** + * User agent of the HTTP request, set to "OpenAPI-Generator/{version}/PHP" by default + * + * @var string + */ + protected string $userAgent = '{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}{{^artifactVersion}}1.0.0{{/artifactVersion}}/PHP{{/httpUserAgent}}'; + + /** + * Debug switch (default set to false) + * + * @var bool + */ + protected bool $debug = false; + + /** + * Debug file location (log to STDOUT by default) + * + * @var string + */ + protected string $debugFile = 'php://output'; + + /** + * Debug file location (log to STDOUT by default) + * + * @var string + */ + protected string $tempFolderPath; + + /** + * Ignore operation specific hosts + * + * @var bool + */ + protected bool $ignoreOperationHosts = false; + + /** + * Constructor + */ + public function __construct() + { + $this->tempFolderPath = sys_get_temp_dir(); + + // Default OAuth2 getter: reuses a cached token until it nears expiry, + // otherwise fetches a new one via the client credentials grant. + $this->accessTokenGetter = function (): string { + $tokenValid = $this->accessToken !== '' + && ($this->accessTokenExpiration === null || $this->accessTokenExpiration > time() + 60); + if ($tokenValid) { + return $this->accessToken; + } + + // Fall back to the static token when client credentials aren't set + if ($this->clientId === '' || $this->clientSecret === '') { + return $this->accessToken; + } + + $response = (new Client())->post($this->tokenUrl, [ + 'headers' => [ + 'Authorization' => 'Basic ' . base64_encode("{$this->clientId}:{$this->clientSecret}"), + 'Content-Type' => 'application/x-www-form-urlencoded', + ], + 'body' => 'grant_type=client_credentials', + 'http_errors' => false, + ]); + + if ($response->getStatusCode() !== 200) { + throw new \RuntimeException( + "Failed to obtain access token: [{$response->getStatusCode()}] " . (string) $response->getBody() + ); + } + + $body = json_decode((string) $response->getBody(), true); + $this->accessToken = $body['access_token']; + $this->accessTokenExpiration = time() + $body['expires_in']; + + return $this->accessToken; + }; + } + + /** + * Sets API key + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $key API key or token + * + * @return $this + */ + public function setApiKey(string $apiKeyIdentifier, string $key): static + { + $this->apiKeys[$apiKeyIdentifier] = $key; + return $this; + } + + /** + * Gets API key + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return null|string API key or token + */ + public function getApiKey(string $apiKeyIdentifier): ?string + { + return $this->apiKeys[$apiKeyIdentifier] ?? null; + } + + /** + * Sets the prefix for API key (e.g. Bearer) + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * @param string $prefix API key prefix, e.g. Bearer + * + * @return $this + */ + public function setApiKeyPrefix(string $apiKeyIdentifier, string $prefix): static + { + $this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix; + return $this; + } + + /** + * Gets API key prefix + * + * @param string $apiKeyIdentifier API key identifier (authentication scheme) + * + * @return null|string + */ + public function getApiKeyPrefix(string $apiKeyIdentifier): ?string + { + return $this->apiKeyPrefixes[$apiKeyIdentifier] ?? null; + } + + /** + * Sets the access token for OAuth + * + * @param string $accessToken Token for OAuth + * + * @return $this + */ + public function setAccessToken(string $accessToken): static + { + $this->accessToken = $accessToken; + return $this; + } + + /** + * Gets the access token for OAuth + * + * Delegates to the access token getter when set, which may fetch or refresh + * the token (and can therefore perform a network request). Falls back to the + * static access token otherwise. + * + * @return string Access token for OAuth + */ + public function getAccessToken(): string + { + if ($this->accessTokenGetter !== null) { + return ($this->accessTokenGetter)() ?? ''; + } + return $this->accessToken; + } + + /** + * Sets the client ID for OAuth2 client credentials authentication + * + * @param string $clientId Client ID for OAuth2 + * + * @return $this + */ + public function setClientId(string $clientId): static + { + $this->clientId = $clientId; + return $this; + } + + /** + * Gets the client ID for OAuth2 client credentials authentication + * + * @return string Client ID for OAuth2 + */ + public function getClientId(): string + { + return $this->clientId; + } + + /** + * Sets the client secret for OAuth2 client credentials authentication + * + * @param string $clientSecret Client secret for OAuth2 + * + * @return $this + */ + public function setClientSecret(string $clientSecret): static + { + $this->clientSecret = $clientSecret; + return $this; + } + + /** + * Gets the client secret for OAuth2 client credentials authentication + * + * @return string Client secret for OAuth2 + */ + public function getClientSecret(): string + { + return $this->clientSecret; + } + + /** + * Sets the token endpoint used to fetch an OAuth2 access token + * + * @param string $tokenUrl Token endpoint URL + * + * @return $this + */ + public function setTokenUrl(string $tokenUrl): static + { + $this->tokenUrl = $tokenUrl; + return $this; + } + + /** + * Gets the token endpoint used to fetch an OAuth2 access token + * + * @return string Token endpoint URL + */ + public function getTokenUrl(): string + { + return $this->tokenUrl; + } + + /** + * Sets the access token getter. Set to null to use the static access token. + * + * @param \Closure|null $accessTokenGetter Callable returning a valid access token + * + * @return $this + */ + public function setAccessTokenGetter(?\Closure $accessTokenGetter): static + { + $this->accessTokenGetter = $accessTokenGetter; + return $this; + } + + /** + * Sets boolean format for query string. + * + * @param string $booleanFormat Boolean format for query string + * + * @return $this + */ + public function setBooleanFormatForQueryString(string $booleanFormat): static + { + $this->booleanFormatForQueryString = $booleanFormat; + + return $this; + } + + /** + * Gets boolean format for query string. + * + * @return string Boolean format for query string + */ + public function getBooleanFormatForQueryString(): string + { + return $this->booleanFormatForQueryString; + } + + /** + * Sets the username for HTTP basic authentication + * + * @param string $username Username for HTTP basic authentication + * + * @return $this + */ + public function setUsername(string $username): static + { + $this->username = $username; + return $this; + } + + /** + * Gets the username for HTTP basic authentication + * + * @return string Username for HTTP basic authentication + */ + public function getUsername(): string + { + return $this->username; + } + + /** + * Sets the password for HTTP basic authentication + * + * @param string $password Password for HTTP basic authentication + * + * @return $this + */ + public function setPassword(string $password): static + { + $this->password = $password; + return $this; + } + + /** + * Gets the password for HTTP basic authentication + * + * @return string Password for HTTP basic authentication + */ + public function getPassword(): string + { + return $this->password; + } + + /** + * Sets the host + * + * @param string $host Host + * + * @return $this + */ + public function setHost(string $host): static + { + $this->host = $host; + return $this; + } + + /** + * Gets the host + * + * @return string Host + */ + public function getHost(): string + { + return $this->host; + } + + /** + * Sets the user agent of the api client + * + * @param string $userAgent the user agent of the api client + * + * @throws InvalidArgumentException + * @return $this + */ + public function setUserAgent(string $userAgent): static + { + $this->userAgent = $userAgent; + return $this; + } + + /** + * Gets the user agent of the api client + * + * @return string user agent + */ + public function getUserAgent(): string + { + return $this->userAgent; + } + + /** + * Sets debug flag + * + * @param bool $debug Debug flag + * + * @return $this + */ + public function setDebug(bool $debug): static + { + $this->debug = $debug; + return $this; + } + + /** + * Gets the debug flag + * + * @return bool + */ + public function getDebug(): bool + { + return $this->debug; + } + + /** + * Sets the debug file + * + * @param string $debugFile Debug file + * + * @return $this + */ + public function setDebugFile(string $debugFile): static + { + $this->debugFile = $debugFile; + return $this; + } + + /** + * Gets the debug file + * + * @return string + */ + public function getDebugFile(): string + { + return $this->debugFile; + } + + /** + * Sets the temp folder path + * + * @param string $tempFolderPath Temp folder path + * + * @return $this + */ + public function setTempFolderPath(string $tempFolderPath): static + { + $this->tempFolderPath = $tempFolderPath; + return $this; + } + + /** + * Gets the temp folder path + * + * @return string Temp folder path + */ + public function getTempFolderPath(): string + { + return $this->tempFolderPath; + } + + /** + * Sets the ignore operation specific hosts flag + * + * @param bool $ignoreOperationHosts Ignore operation specific hosts flag + * + * @return $this + */ + public function setIgnoreOperationHosts(bool $ignoreOperationHosts): static + { + $this->ignoreOperationHosts = $ignoreOperationHosts; + return $this; + } + + /** + * Gets the ignore operation specific hosts flag + * + * @return bool Ignore operation specific hosts flag + */ + public function getIgnoreOperationHosts(): bool + { + return $this->ignoreOperationHosts; + } + + /** + * Gets the default configuration instance + * + * @return Configuration + */ + public static function getDefaultConfiguration(): Configuration + { + if (self::$defaultConfiguration === null) { + self::$defaultConfiguration = new Configuration(); + } + + return self::$defaultConfiguration; + } + + /** + * Sets the default configuration instance + * + * @param Configuration $config An instance of the Configuration Object + * + * @return void + */ + public static function setDefaultConfiguration(Configuration $config): void + { + self::$defaultConfiguration = $config; + } + + /** + * Gets the essential information for debugging + * + * @return string The report for debugging + */ + public static function toDebugReport(): string + { + $report = 'PHP SDK ({{invokerPackage}}) Debug Report:' . PHP_EOL; + $report .= ' OS: ' . php_uname() . PHP_EOL; + $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; + $report .= ' The version of the OpenAPI document: {{version}}' . PHP_EOL; + {{#artifactVersion}} + $report .= ' SDK Package Version: {{.}}' . PHP_EOL; + {{/artifactVersion}} + $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; + + return $report; + } + + /** + * Get API key (with prefix if set) + * + * @param string $apiKeyIdentifier name of apikey + * + * @return null|string API key with the prefix + */ + public function getApiKeyWithPrefix(string $apiKeyIdentifier): ?string + { + $prefix = $this->getApiKeyPrefix($apiKeyIdentifier); + $apiKey = $this->getApiKey($apiKeyIdentifier); + + if ($apiKey === null) { + return null; + } + + if ($prefix === null) { + $keyWithPrefix = $apiKey; + } else { + $keyWithPrefix = $prefix . ' ' . $apiKey; + } + + return $keyWithPrefix; + } + + /** + * Returns an array of host settings + * + * @return array an array of host settings + */ + public function getHostSettings(): array + { + return [ + {{#servers}} + [ + "url" => "{{{url}}}", + "description" => "{{{description}}}{{^description}}No description provided{{/description}}", + {{#variables}} + {{#-first}} + "variables" => [ + {{/-first}} + "{{{name}}}" => [ + "description" => "{{{description}}}{{^description}}No description provided{{/description}}", + "default_value" => "{{{defaultValue}}}", + {{#enumValues}} + {{#-first}} + "enum_values" => [ + {{/-first}} + "{{{.}}}"{{^-last}},{{/-last}} + {{#-last}} + ] + {{/-last}} + {{/enumValues}} + ]{{^-last}},{{/-last}} + {{#-last}} + ] + {{/-last}} + {{/variables}} + ]{{^-last}},{{/-last}} + {{/servers}} + ]; + } + + /** + * Returns URL based on host settings, index and variables + * + * @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients + * @param int $hostIndex index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public static function getHostString(array $hostSettings, int $hostIndex, ?array $variables = null): string + { + if (null === $variables) { + $variables = []; + } + + // check array index out of bound + if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { + throw new InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than ".count($hostSettings)); + } + + $host = $hostSettings[$hostIndex]; + $url = $host["url"]; + + // go through variable and assign a value + foreach ($host["variables"] ?? [] as $name => $variable) { + if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user + if (!isset($variable['enum_values']) || in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum + $url = str_replace("{".$name."}", $variables[$name], $url); + } else { + throw new InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].". Must be ".join(',', $variable["enum_values"])."."); + } + } else { + // use default value + $url = str_replace("{".$name."}", $variable["default_value"], $url); + } + } + + return $url; + } + + /** + * Returns URL based on the index and variables + * + * @param int $index index of the host settings + * @param array|null $variables hash of variable and the corresponding value (optional) + * @return string URL based on host settings + */ + public function getHostFromSettings(int $index, ?array $variables = null): string + { + return self::getHostString($this->getHostSettings(), $index, $variables); + } +} diff --git a/openapi-config.yml b/openapi-config.yml index 2950f86f..b5668532 100644 --- a/openapi-config.yml +++ b/openapi-config.yml @@ -3,3 +3,4 @@ composerPackageName: bandwidth/sdk invokerPackage: Bandwidth gitUserId: bandwidth gitRepoId: php-sdk +templateDir: custom_templates diff --git a/src/Configuration.php b/src/Configuration.php index 8296ddfb..7b638c85 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -28,6 +28,7 @@ namespace Bandwidth; use InvalidArgumentException; +use GuzzleHttp\Client; /** * Configuration Class Doc Comment @@ -67,6 +68,42 @@ class Configuration */ protected string $accessToken = ''; + /** + * Client ID for OAuth2 client credentials authentication + * + * @var string + */ + protected string $clientId = ''; + + /** + * Client secret for OAuth2 client credentials authentication + * + * @var string + */ + protected string $clientSecret = ''; + + /** + * Token endpoint used to fetch an OAuth2 access token + * + * @var string + */ + protected string $tokenUrl = 'https://api.bandwidth.com/api/v1/oauth2/token'; + + /** + * Unix timestamp at which the current access token expires + * + * @var int|null + */ + protected ?int $accessTokenExpiration = null; + + /** + * Callable that returns a valid access token. Overrides the static access + * token when set. Defaults to an OAuth2 client credentials getter. + * + * @var \Closure|null + */ + protected ?\Closure $accessTokenGetter = null; + /** * Boolean format for query string * @@ -136,6 +173,42 @@ class Configuration public function __construct() { $this->tempFolderPath = sys_get_temp_dir(); + + // Default OAuth2 getter: reuses a cached token until it nears expiry, + // otherwise fetches a new one via the client credentials grant. + $this->accessTokenGetter = function (): string { + $tokenValid = $this->accessToken !== '' + && ($this->accessTokenExpiration === null || $this->accessTokenExpiration > time() + 60); + if ($tokenValid) { + return $this->accessToken; + } + + // Fall back to the static token when client credentials aren't set + if ($this->clientId === '' || $this->clientSecret === '') { + return $this->accessToken; + } + + $response = (new Client())->post($this->tokenUrl, [ + 'headers' => [ + 'Authorization' => 'Basic ' . base64_encode("{$this->clientId}:{$this->clientSecret}"), + 'Content-Type' => 'application/x-www-form-urlencoded', + ], + 'body' => 'grant_type=client_credentials', + 'http_errors' => false, + ]); + + if ($response->getStatusCode() !== 200) { + throw new \RuntimeException( + "Failed to obtain access token: [{$response->getStatusCode()}] " . (string) $response->getBody() + ); + } + + $body = json_decode((string) $response->getBody(), true); + $this->accessToken = $body['access_token']; + $this->accessTokenExpiration = time() + $body['expires_in']; + + return $this->accessToken; + }; } /** @@ -206,13 +279,102 @@ public function setAccessToken(string $accessToken): static /** * Gets the access token for OAuth * + * Delegates to the access token getter when set, which may fetch or refresh + * the token (and can therefore perform a network request). Falls back to the + * static access token otherwise. + * * @return string Access token for OAuth */ public function getAccessToken(): string { + if ($this->accessTokenGetter !== null) { + return ($this->accessTokenGetter)() ?? ''; + } return $this->accessToken; } + /** + * Sets the client ID for OAuth2 client credentials authentication + * + * @param string $clientId Client ID for OAuth2 + * + * @return $this + */ + public function setClientId(string $clientId): static + { + $this->clientId = $clientId; + return $this; + } + + /** + * Gets the client ID for OAuth2 client credentials authentication + * + * @return string Client ID for OAuth2 + */ + public function getClientId(): string + { + return $this->clientId; + } + + /** + * Sets the client secret for OAuth2 client credentials authentication + * + * @param string $clientSecret Client secret for OAuth2 + * + * @return $this + */ + public function setClientSecret(string $clientSecret): static + { + $this->clientSecret = $clientSecret; + return $this; + } + + /** + * Gets the client secret for OAuth2 client credentials authentication + * + * @return string Client secret for OAuth2 + */ + public function getClientSecret(): string + { + return $this->clientSecret; + } + + /** + * Sets the token endpoint used to fetch an OAuth2 access token + * + * @param string $tokenUrl Token endpoint URL + * + * @return $this + */ + public function setTokenUrl(string $tokenUrl): static + { + $this->tokenUrl = $tokenUrl; + return $this; + } + + /** + * Gets the token endpoint used to fetch an OAuth2 access token + * + * @return string Token endpoint URL + */ + public function getTokenUrl(): string + { + return $this->tokenUrl; + } + + /** + * Sets the access token getter. Set to null to use the static access token. + * + * @param \Closure|null $accessTokenGetter Callable returning a valid access token + * + * @return $this + */ + public function setAccessTokenGetter(?\Closure $accessTokenGetter): static + { + $this->accessTokenGetter = $accessTokenGetter; + return $this; + } + /** * Sets boolean format for query string. * From 3373e66f6aafa5168ce5986639d1964f3855e8dc Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 28 Jul 2026 16:35:06 -0400 Subject: [PATCH 19/53] endpoints and tn lookup tests --- tests/Api/EndpointsApiTest.php | 115 ++++++++++++++++------- tests/Api/PhoneNumberLookupApiTest.php | 123 +++++++++++++++++-------- 2 files changed, 166 insertions(+), 72 deletions(-) diff --git a/tests/Api/EndpointsApiTest.php b/tests/Api/EndpointsApiTest.php index 777c372b..22a8e43f 100644 --- a/tests/Api/EndpointsApiTest.php +++ b/tests/Api/EndpointsApiTest.php @@ -28,8 +28,19 @@ namespace Bandwidth\Test\Api; use Bandwidth\Configuration; -use Bandwidth\ApiException; -use Bandwidth\ObjectSerializer; +use Bandwidth\Api\EndpointsApi; +use Bandwidth\Model\CreateWebRtcConnectionRequest; +use Bandwidth\Model\CreateEndpointResponse; +use Bandwidth\Model\CreateEndpointResponseData; +use Bandwidth\Model\Endpoint; +use Bandwidth\Model\EndpointResponse; +use Bandwidth\Model\Endpoints; +use Bandwidth\Model\EndpointDirectionEnum; +use Bandwidth\Model\EndpointStatusEnum; +use Bandwidth\Model\EndpointTypeEnum; +use Bandwidth\Model\ListEndpointsResponse; +use Bandwidth\Model\Page; + use PHPUnit\Framework\TestCase; /** @@ -41,33 +52,25 @@ */ class EndpointsApiTest extends TestCase { + private static EndpointsApi $apiInstance; + private static string $account_id; + private static string $endpoint_id; + private static string $endpoint_tag; /** * Setup before running any test cases */ public static function setUpBeforeClass(): void { - } + $config = Configuration::getDefaultConfiguration() + ->setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); - /** - * Setup before running each test case - */ - public function setUp(): void - { - } + self::$apiInstance = new EndpointsApi(config: $config); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } + self::$account_id = getenv("BW_ACCOUNT_ID"); - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$endpoint_tag = 'php-smoke-' . uniqid(); } /** @@ -78,20 +81,53 @@ public static function tearDownAfterClass(): void */ public function testCreateEndpoint() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $body = new CreateWebRtcConnectionRequest([ + 'type' => EndpointTypeEnum::WEBRTC, + 'direction' => EndpointDirectionEnum::BIDIRECTIONAL, + 'tag' => self::$endpoint_tag + ]); + + [$data, $status_code] = self::$apiInstance->createEndpointWithHttpInfo(self::$account_id, $body); + + $this->assertEquals(201, $status_code); + $this->assertInstanceOf(CreateEndpointResponse::class, $data); + $this->assertInstanceOf(CreateEndpointResponseData::class, $data->getData()); + $this->assertIsString($data->getData()->getEndpointId()); + $this->assertIsString($data->getData()->getToken()); + $this->assertEquals(EndpointTypeEnum::WEBRTC, $data->getData()->getType()); + $this->assertInstanceOf(EndpointStatusEnum::class, $data->getData()->getStatus()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getCreationTimestamp()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getExpirationTimestamp()); + $this->assertEquals(self::$endpoint_tag, $data->getData()->getTag()); + $this->assertIsArray($data->getErrors()); + + self::$endpoint_id = $data->getData()->getEndpointId(); } /** - * Test case for deleteEndpoint + * Test case for listEndpoints * - * Delete Endpoint. + * List Endpoints. * */ - public function testDeleteEndpoint() + public function testListEndpoints() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$data, $status_code] = self::$apiInstance->listEndpointsWithHttpInfo(self::$account_id); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(ListEndpointsResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertInstanceOf(Page::class, $data->getPage()); + $this->assertIsArray($data->getData()); + $this->assertIsArray($data->getErrors()); + + $first_endpoint = $data->getData()[0]; + $this->assertInstanceOf(Endpoints::class, $first_endpoint); + $this->assertIsString($first_endpoint->getEndpointId()); + $this->assertInstanceOf(EndpointTypeEnum::class, $first_endpoint->getType()); + $this->assertInstanceOf(EndpointStatusEnum::class, $first_endpoint->getStatus()); + $this->assertInstanceOf(\DateTime::class, $first_endpoint->getCreationTimestamp()); + $this->assertInstanceOf(\DateTime::class, $first_endpoint->getExpirationTimestamp()); } /** @@ -102,20 +138,31 @@ public function testDeleteEndpoint() */ public function testGetEndpoint() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$data, $status_code] = self::$apiInstance->getEndpointWithHttpInfo(self::$account_id, self::$endpoint_id); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(EndpointResponse::class, $data); + $this->assertIsArray($data->getErrors()); + $this->assertInstanceOf(Endpoint::class, $data->getData()); + $this->assertEquals(self::$endpoint_id, $data->getData()->getEndpointId()); + $this->assertEquals(EndpointTypeEnum::WEBRTC, $data->getData()->getType()); + $this->assertInstanceOf(EndpointStatusEnum::class, $data->getData()->getStatus()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getCreationTimestamp()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getExpirationTimestamp()); + $this->assertEquals(self::$endpoint_tag, $data->getData()->getTag()); } /** - * Test case for listEndpoints + * Test case for deleteEndpoint * - * List Endpoints. + * Delete Endpoint. * */ - public function testListEndpoints() + public function testDeleteEndpoint() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [, $status_code] = self::$apiInstance->deleteEndpointWithHttpInfo(self::$account_id, self::$endpoint_id); + + $this->assertEquals(204, $status_code); } /** diff --git a/tests/Api/PhoneNumberLookupApiTest.php b/tests/Api/PhoneNumberLookupApiTest.php index d5334995..71403ff7 100644 --- a/tests/Api/PhoneNumberLookupApiTest.php +++ b/tests/Api/PhoneNumberLookupApiTest.php @@ -28,8 +28,20 @@ namespace Bandwidth\Test\Api; use Bandwidth\Configuration; -use Bandwidth\ApiException; -use Bandwidth\ObjectSerializer; +use Bandwidth\Api\PhoneNumberLookupApi; +use Bandwidth\Model\AsyncLookupRequest; +use Bandwidth\Model\CompletedLookupStatusEnum; +use Bandwidth\Model\CreateAsyncBulkLookupResponse; +use Bandwidth\Model\CreateAsyncBulkLookupResponseData; +use Bandwidth\Model\CreateSyncLookupResponse; +use Bandwidth\Model\CreateSyncLookupResponseData; +use Bandwidth\Model\GetAsyncBulkLookupResponse; +use Bandwidth\Model\GetAsyncBulkLookupResponseData; +use Bandwidth\Model\InProgressLookupStatusEnum; +use Bandwidth\Model\LineTypeEnum; +use Bandwidth\Model\LookupResult; +use Bandwidth\Model\SyncLookupRequest; + use PHPUnit\Framework\TestCase; /** @@ -41,45 +53,29 @@ */ class PhoneNumberLookupApiTest extends TestCase { + private static PhoneNumberLookupApi $apiInstance; + private static string $account_id; + private static array $phone_numbers; + private static string $request_id; /** * Setup before running any test cases */ public static function setUpBeforeClass(): void { - } + $config = Configuration::getDefaultConfiguration() + ->setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); - /** - * Setup before running each test case - */ - public function setUp(): void - { - } + self::$apiInstance = new PhoneNumberLookupApi(config: $config); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - - /** - * Test case for createAsyncBulkLookup - * - * Create Asynchronous Bulk Number Lookup. - * - */ - public function testCreateAsyncBulkLookup() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$phone_numbers = [ + getenv("BW_NUMBER"), + getenv("VZW_NUMBER"), + getenv("ATT_NUMBER"), + getenv("T_MOBILE_NUMBER") + ]; } /** @@ -90,8 +86,26 @@ public function testCreateAsyncBulkLookup() */ public function testCreateSyncLookup() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $lookup_request = new SyncLookupRequest(['phone_numbers' => self::$phone_numbers]); + + [$data, $status_code] = self::$apiInstance->createSyncLookupWithHttpInfo( + self::$account_id, + $lookup_request + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(CreateSyncLookupResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertInstanceOf(CreateSyncLookupResponseData::class, $data->getData()); + $this->assertIsString($data->getData()->getRequestId()); + $this->assertInstanceOf(CompletedLookupStatusEnum::class, $data->getData()->getStatus()); + $this->assertIsArray($data->getData()->getResults()); + $first_result = $data->getData()->getResults()[0]; + $this->assertInstanceOf(LookupResult::class, $first_result); + $this->assertIsString($first_result->getPhoneNumber()); + $this->assertInstanceOf(LineTypeEnum::class, $first_result->getLineType()); + $this->assertIsString($first_result->getVoiceProvider()); + $this->assertIsString($first_result->getCountryCodeA3()); } /** @@ -100,9 +114,42 @@ public function testCreateSyncLookup() * Get Asynchronous Bulk Number Lookup. * */ - public function testGetAsyncBulkLookup() + public function testCreateGetAsyncBulkLookup() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $lookup_request = new AsyncLookupRequest(['phone_numbers' => self::$phone_numbers]); + + [$create_data, $create_status_code] = self::$apiInstance->createAsyncBulkLookupWithHttpInfo( + self::$account_id, + $lookup_request + ); + + $this->assertEquals(202, $create_status_code); + $this->assertInstanceOf(CreateAsyncBulkLookupResponse::class, $create_data); + $this->assertInstanceOf(CreateAsyncBulkLookupResponseData::class, $create_data->getData()); + $this->assertIsString($create_data->getData()->getRequestId()); + $this->assertInstanceOf(InProgressLookupStatusEnum::class, $create_data->getData()->getStatus()); + + self::$request_id = $create_data->getData()->getRequestId(); + + sleep(60); + + [$get_data, $get_status_code] = self::$apiInstance->getAsyncBulkLookupWithHttpInfo( + self::$account_id, + self::$request_id + ); + + $this->assertEquals(200, $get_status_code); + $this->assertInstanceOf(GetAsyncBulkLookupResponse::class, $get_data); + $this->assertIsArray($get_data->getLinks()); + $this->assertInstanceOf(GetAsyncBulkLookupResponseData::class, $get_data->getData()); + $this->assertEquals(self::$request_id, $get_data->getData()->getRequestId()); + $this->assertInstanceOf(InProgressLookupStatusEnum::class, $get_data->getData()->getStatus()); + $this->assertIsArray($get_data->getData()->getResults()); + $first_result = $get_data->getData()->getResults()[0]; + $this->assertInstanceOf(LookupResult::class, $first_result); + $this->assertIsString($first_result->getPhoneNumber()); + $this->assertInstanceOf(LineTypeEnum::class, $first_result->getLineType()); + $this->assertIsString($first_result->getVoiceProvider()); + $this->assertIsString($first_result->getCountryCodeA3()); } } From b31ca310b8f5900857f0a29f012fb366bfbbb002 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 28 Jul 2026 16:42:53 -0400 Subject: [PATCH 20/53] update other tests to use oauth --- tests/Api/StatisticsApiTest.php | 4 ++-- tests/Api/TollFreeVerificationApiTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Api/StatisticsApiTest.php b/tests/Api/StatisticsApiTest.php index 81a145a5..8c7c5123 100644 --- a/tests/Api/StatisticsApiTest.php +++ b/tests/Api/StatisticsApiTest.php @@ -51,8 +51,8 @@ class StatisticsApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setUsername(getenv("BW_USERNAME")) - ->setPassword(getenv("BW_PASSWORD")); + ->setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); self::$apiInstance = new StatisticsApi(config: $config); diff --git a/tests/Api/TollFreeVerificationApiTest.php b/tests/Api/TollFreeVerificationApiTest.php index 1db5cdb9..b03ab528 100644 --- a/tests/Api/TollFreeVerificationApiTest.php +++ b/tests/Api/TollFreeVerificationApiTest.php @@ -49,8 +49,8 @@ class TollFreeVerificationApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setUsername(getenv("BW_USERNAME")) - ->setPassword(getenv("BW_PASSWORD")); + ->setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); self::$apiInstance = new TollFreeVerificationApi(config: $config); } From 17ff3ddf49ea1ba9c60a5a2a44f54ac4f7d2b61f Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 30 Jul 2026 15:39:48 -0400 Subject: [PATCH 21/53] regenerate with generate prs merged to main --- src/Api/CallsApi.php | 2 +- src/Api/ConferencesApi.php | 2 +- src/Api/EndpointsApi.php | 2 +- src/Api/MFAApi.php | 2 +- src/Api/MediaApi.php | 2 +- src/Api/MessagesApi.php | 2 +- src/Api/MultiChannelApi.php | 2 +- src/Api/PhoneNumberLookupApi.php | 2 +- src/Api/RecordingsApi.php | 2 +- src/Api/StatisticsApi.php | 2 +- src/Api/TollFreeVerificationApi.php | 2 +- src/Api/TranscriptionsApi.php | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Api/CallsApi.php b/src/Api/CallsApi.php index 5b605673..c1ffdfd1 100644 --- a/src/Api/CallsApi.php +++ b/src/Api/CallsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Api/ConferencesApi.php b/src/Api/ConferencesApi.php index 8a1d7378..b90c9fe4 100644 --- a/src/Api/ConferencesApi.php +++ b/src/Api/ConferencesApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Api/EndpointsApi.php b/src/Api/EndpointsApi.php index eef967d2..30ee44cb 100644 --- a/src/Api/EndpointsApi.php +++ b/src/Api/EndpointsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Api/MFAApi.php b/src/Api/MFAApi.php index 3c3829c3..52947ec4 100644 --- a/src/Api/MFAApi.php +++ b/src/Api/MFAApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Api/MediaApi.php b/src/Api/MediaApi.php index 377c7aee..2bfc4dd5 100644 --- a/src/Api/MediaApi.php +++ b/src/Api/MediaApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Api/MessagesApi.php b/src/Api/MessagesApi.php index d22e6a57..bab49b32 100644 --- a/src/Api/MessagesApi.php +++ b/src/Api/MessagesApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Api/MultiChannelApi.php b/src/Api/MultiChannelApi.php index 9b37e8f4..46f92142 100644 --- a/src/Api/MultiChannelApi.php +++ b/src/Api/MultiChannelApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Api/PhoneNumberLookupApi.php b/src/Api/PhoneNumberLookupApi.php index 8f69038f..845ee9c0 100644 --- a/src/Api/PhoneNumberLookupApi.php +++ b/src/Api/PhoneNumberLookupApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Api/RecordingsApi.php b/src/Api/RecordingsApi.php index 72f88fc4..e7ebef61 100644 --- a/src/Api/RecordingsApi.php +++ b/src/Api/RecordingsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Api/StatisticsApi.php b/src/Api/StatisticsApi.php index fee9719e..08d9a226 100644 --- a/src/Api/StatisticsApi.php +++ b/src/Api/StatisticsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Api/TollFreeVerificationApi.php b/src/Api/TollFreeVerificationApi.php index ff593062..7acaa4e6 100644 --- a/src/Api/TollFreeVerificationApi.php +++ b/src/Api/TollFreeVerificationApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** diff --git a/src/Api/TranscriptionsApi.php b/src/Api/TranscriptionsApi.php index 259c91a9..424402d3 100644 --- a/src/Api/TranscriptionsApi.php +++ b/src/Api/TranscriptionsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.24.0-SNAPSHOT + * Generator version: 7.25.0-SNAPSHOT */ /** From 2d9d6dcdb28800f9a47a54171591d06e841b91e2 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 3 Aug 2026 16:02:37 -0400 Subject: [PATCH 22/53] voice api tests --- tests/Api/CallsApiTest.php | 237 ++++++++++++++++++++---- tests/Api/ConferencesApiTest.php | 261 +++++++++++++++----------- tests/Api/RecordingsApiTest.php | 272 ++++++++++++++++------------ tests/Api/TranscriptionsApiTest.php | 146 ++++++++++----- tests/Utils/CallCleanup.php | 44 +++++ tests/Utils/Manteca.php | 72 ++++++++ 6 files changed, 733 insertions(+), 299 deletions(-) create mode 100644 tests/Utils/CallCleanup.php create mode 100644 tests/Utils/Manteca.php diff --git a/tests/Api/CallsApiTest.php b/tests/Api/CallsApiTest.php index ec4ea1af..67fc872f 100644 --- a/tests/Api/CallsApiTest.php +++ b/tests/Api/CallsApiTest.php @@ -28,8 +28,18 @@ namespace Bandwidth\Test\Api; use Bandwidth\Configuration; -use Bandwidth\ApiException; -use Bandwidth\ObjectSerializer; +use Bandwidth\Api\CallsApi; +use Bandwidth\Model\CallbackMethodEnum; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\CallState; +use Bandwidth\Model\CallStateEnum; +use Bandwidth\Model\CreateCall; +use Bandwidth\Model\CreateCallResponse; +use Bandwidth\Model\MachineDetectionConfiguration; +use Bandwidth\Model\MachineDetectionModeEnum; +use Bandwidth\Model\UpdateCall; +use Bandwidth\Test\Utils\CallCleanup; + use PHPUnit\Framework\TestCase; /** @@ -41,33 +51,111 @@ */ class CallsApiTest extends TestCase { + private const TEST_SLEEP = 6; + + private static CallsApi $apiInstance; + private static string $account_id; + private static string $bw_number; + private static string $user_number; + private static string $voice_application_id; + + /** @var string[] */ + private static array $call_id_list = []; + + private static CreateCall $create_call_body; + private static CreateCall $create_manteca_call_body; + private static UpdateCall $update_manteca_call_body; + private static UpdateCall $complete_manteca_call_body; + + private static string $test_xml_body = 'This is a test bxml response'; /** * Setup before running any test cases */ public static function setUpBeforeClass(): void { - } + $config = Configuration::getDefaultConfiguration() + ->setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); - /** - * Setup before running each test case - */ - public function setUp(): void - { - } + self::$apiInstance = new CallsApi(config: $config); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$bw_number = getenv("BW_NUMBER"); + self::$user_number = getenv("USER_NUMBER"); + self::$voice_application_id = getenv("BW_VOICE_APPLICATION_ID"); + + $answer_url = getenv("BASE_CALLBACK_URL"); + $manteca_base_url = getenv("MANTECA_BASE_URL"); + $manteca_answer_url = "{$manteca_base_url}/bxml/pause"; + $fallback_url = "https://www.myFallbackServer.com/webhooks/answer"; + $disconnect_url = "https://myServer.com/bandwidth/webhooks/disconnectUrl"; + $machine_detection_url = "https://myServer.com/bandwidth/webhooks/machineDetectionComplete"; + $machine_detection_complete_url = "https://myFallbackServer.com/bandwidth/webhooks/machineDetectionComplete"; + + $machine_detection = new MachineDetectionConfiguration([ + 'mode' => MachineDetectionModeEnum::ASYNC, + 'detection_timeout' => 15.0, + 'silence_timeout' => 10.0, + 'speech_threshold' => 10.0, + 'speech_end_threshold' => 5.0, + 'machine_speech_end_threshold' => 5.0, + 'delay_result' => false, + 'callback_url' => $machine_detection_url, + 'callback_method' => CallbackMethodEnum::POST, + 'username' => 'mySecretUsername', + 'password' => 'mySecretPassword1!', + 'fallback_url' => $machine_detection_complete_url, + 'fallback_method' => CallbackMethodEnum::POST, + 'fallback_username' => 'mySecretUsername', + 'fallback_password' => 'mySecretPassword1!' + ]); + + self::$create_call_body = new CreateCall([ + 'to' => self::$user_number, + 'from' => self::$bw_number, + 'application_id' => self::$voice_application_id, + 'answer_url' => $answer_url, + 'answer_method' => CallbackMethodEnum::POST, + 'username' => 'mySecretUsername', + 'password' => 'mySecretPassword1!', + 'answer_fallback_url' => $fallback_url, + 'answer_fallback_method' => CallbackMethodEnum::POST, + 'fallback_username' => 'mySecretUsername', + 'fallback_password' => 'mySecretPassword1!', + 'disconnect_url' => $disconnect_url, + 'disconnect_method' => CallbackMethodEnum::POST, + 'call_timeout' => 30.0, + 'callback_timeout' => 15.0, + 'machine_detection' => $machine_detection, + 'priority' => 5, + 'privacy' => false, + 'tag' => 'tag_example' + ]); + + self::$create_manteca_call_body = new CreateCall([ + 'from' => getenv("MANTECA_ACTIVE_NUMBER"), + 'to' => getenv("MANTECA_IDLE_NUMBER"), + 'application_id' => getenv("MANTECA_APPLICATION_ID"), + 'answer_url' => $manteca_answer_url + ]); + + self::$update_manteca_call_body = new UpdateCall([ + 'state' => CallStateEnum::ACTIVE, + 'redirect_url' => $manteca_answer_url + ]); + + self::$complete_manteca_call_body = new UpdateCall([ + 'state' => CallStateEnum::COMPLETED + ]); } /** - * Clean up after running all test cases + * Ensure that all calls collected during the suite have been hung up */ public static function tearDownAfterClass(): void { + CallCleanup::cleanup(self::$apiInstance, self::$account_id, self::$call_id_list); } /** @@ -78,32 +166,65 @@ public static function tearDownAfterClass(): void */ public function testCreateCall() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$data, $status_code] = self::$apiInstance->createCallWithHttpInfo( + self::$account_id, + self::$create_call_body + ); + self::$call_id_list[] = $data->getCallId(); + + $this->assertEquals(201, $status_code); + $this->assertInstanceOf(CreateCallResponse::class, $data); + $this->assertIsString($data->getCallId()); + $this->assertEquals(self::$account_id, $data->getAccountId()); + $this->assertEquals(self::$voice_application_id, $data->getApplicationId()); + $this->assertEquals(self::$user_number, $data->getTo()); + $this->assertEquals(self::$bw_number, $data->getFrom()); } /** - * Test case for getCallState + * Test case for listCalls * - * Get Call State Information. + * Get Calls. * */ - public function testGetCallState() + public function testListCalls() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$data, $status_code] = self::$apiInstance->listCallsWithHttpInfo( + self::$account_id, + to: self::$user_number, + from: self::$bw_number + ); + + $this->assertEquals(200, $status_code); + $this->assertIsArray($data); + $this->assertInstanceOf(CallState::class, $data[0]); + $this->assertIsString($data[0]->getAccountId()); + $this->assertIsString($data[0]->getApplicationId()); + $this->assertIsString($data[0]->getCallId()); + $this->assertIsString($data[0]->getState()); + $this->assertInstanceOf(CallDirectionEnum::class, $data[0]->getDirection()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getStartTime()); } /** - * Test case for listCalls + * Test case for getCallState * - * Get Calls. + * Get Call State Information. * */ - public function testListCalls() + public function testGetCallState() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + sleep(40); + [$data, $status_code] = self::$apiInstance->getCallStateWithHttpInfo( + self::$account_id, + self::$call_id_list[0] + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(CallState::class, $data); + $this->assertIsString($data->getCallId()); + $this->assertIsString($data->getState()); + $this->assertEquals(CallDirectionEnum::OUTBOUND, $data->getDirection()); } /** @@ -114,8 +235,35 @@ public function testListCalls() */ public function testUpdateCall() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + // Create call + sleep(self::TEST_SLEEP); + [$create_data, $create_status_code] = self::$apiInstance->createCallWithHttpInfo( + self::$account_id, + self::$create_manteca_call_body + ); + self::$call_id_list[] = $create_data->getCallId(); + + $this->assertEquals(201, $create_status_code); + + // Redirect call to a different url + sleep(self::TEST_SLEEP); + [, $update_status_code] = self::$apiInstance->updateCallWithHttpInfo( + self::$account_id, + $create_data->getCallId(), + self::$update_manteca_call_body + ); + + $this->assertEquals(200, $update_status_code); + + // Complete call + sleep(self::TEST_SLEEP); + [, $complete_status_code] = self::$apiInstance->updateCallWithHttpInfo( + self::$account_id, + $create_data->getCallId(), + self::$complete_manteca_call_body + ); + + $this->assertEquals(200, $complete_status_code); } /** @@ -126,7 +274,34 @@ public function testUpdateCall() */ public function testUpdateCallBxml() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + // Create call + sleep(self::TEST_SLEEP); + [$create_data, $create_status_code] = self::$apiInstance->createCallWithHttpInfo( + self::$account_id, + self::$create_manteca_call_body + ); + self::$call_id_list[] = $create_data->getCallId(); + + $this->assertEquals(201, $create_status_code); + + // Update call with BXML + sleep(self::TEST_SLEEP); + [, $update_status_code] = self::$apiInstance->updateCallBxmlWithHttpInfo( + self::$account_id, + $create_data->getCallId(), + self::$test_xml_body + ); + + $this->assertEquals(204, $update_status_code); + + // Complete call + sleep(self::TEST_SLEEP); + [, $complete_status_code] = self::$apiInstance->updateCallWithHttpInfo( + self::$account_id, + $create_data->getCallId(), + self::$complete_manteca_call_body + ); + + $this->assertEquals(200, $complete_status_code); } } diff --git a/tests/Api/ConferencesApiTest.php b/tests/Api/ConferencesApiTest.php index 70d500e6..14c12a81 100644 --- a/tests/Api/ConferencesApiTest.php +++ b/tests/Api/ConferencesApiTest.php @@ -28,8 +28,20 @@ namespace Bandwidth\Test\Api; use Bandwidth\Configuration; -use Bandwidth\ApiException; -use Bandwidth\ObjectSerializer; +use Bandwidth\Api\CallsApi; +use Bandwidth\Api\ConferencesApi; +use Bandwidth\Model\Conference; +use Bandwidth\Model\ConferenceMember; +use Bandwidth\Model\ConferenceRecordingMetadata; +use Bandwidth\Model\ConferenceStateEnum; +use Bandwidth\Model\CreateCall; +use Bandwidth\Model\FileFormatEnum; +use Bandwidth\Model\RedirectMethodEnum; +use Bandwidth\Model\UpdateConference; +use Bandwidth\Model\UpdateConferenceMember; +use Bandwidth\Test\Utils\CallCleanup; +use Bandwidth\Test\Utils\Manteca; + use PHPUnit\Framework\TestCase; /** @@ -41,140 +53,185 @@ */ class ConferencesApiTest extends TestCase { + private const TEST_SLEEP = 6; + private const MAX_RETRIES = 60; - /** - * Setup before running any test cases - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } + private static CallsApi $callsApi; + private static ConferencesApi $conferencesApi; + private static string $account_id; + private static string $test_id; + private static string $call_id; + private static string $conference_id; + private static string $answer_url; + private static string $conference_redirect_url; - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - - /** - * Test case for downloadConferenceRecording - * - * Download Conference Recording. - * - */ - public function testDownloadConferenceRecording() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } + private static string $update_recording_bxml = 'This should be a conference recording.'; /** - * Test case for getConference - * - * Get Conference Information. - * + * Setup before running any test cases */ - public function testGetConference() + public static function setUpBeforeClass(): void { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } + $config = Configuration::getDefaultConfiguration() + ->setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); - /** - * Test case for getConferenceMember - * - * Get Conference Member. - * - */ - public function testGetConferenceMember() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } + self::$callsApi = new CallsApi(config: $config); + self::$conferencesApi = new ConferencesApi(config: $config); - /** - * Test case for getConferenceRecording - * - * Get Conference Recording Information. - * - */ - public function testGetConferenceRecording() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } + self::$account_id = getenv("BW_ACCOUNT_ID"); - /** - * Test case for listConferenceRecordings - * - * Get Conference Recordings. - * - */ - public function testListConferenceRecordings() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $manteca_base_url = getenv("MANTECA_BASE_URL"); + self::$answer_url = "{$manteca_base_url}/bxml/joinConferencePause"; + self::$conference_redirect_url = "{$manteca_base_url}/bxml/pause"; } /** - * Test case for listConferences - * - * Get Conferences. - * + * Ensure the conference call is hung up after the suite */ - public function testListConferences() + public static function tearDownAfterClass(): void { - // TODO: implement - self::markTestIncomplete('Not implemented'); + CallCleanup::cleanup(self::$callsApi, self::$account_id, [self::$call_id]); } /** - * Test case for updateConference + * Test case for createCall, listConferences, getConference * - * Update Conference. + * Create a conference call and fetch the resulting conference. * */ - public function testUpdateConference() + public function testCreateAndFetchConference() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $os = getenv("OPERATING_SYSTEM"); + $language = "PHP" . phpversion(); + self::$test_id = Manteca::createTest($os, $language, "conference"); + + $conference_call_body = new CreateCall([ + 'to' => getenv("MANTECA_IDLE_NUMBER"), + 'from' => getenv("MANTECA_ACTIVE_NUMBER"), + 'application_id' => getenv("MANTECA_APPLICATION_ID"), + 'answer_url' => self::$answer_url, + 'tag' => self::$test_id + ]); + + [$create_data, $create_status_code] = self::$callsApi->createCallWithHttpInfo( + self::$account_id, + $conference_call_body + ); + + $this->assertEquals(201, $create_status_code); + self::$call_id = $create_data->getCallId(); + + sleep(self::TEST_SLEEP); + + [$list_data, $list_status_code] = self::$conferencesApi->listConferencesWithHttpInfo( + self::$account_id, + name: self::$test_id + ); + $this->assertEquals(200, $list_status_code); + + self::$conference_id = $list_data[0]->getId(); + + [$get_data, $get_status_code] = self::$conferencesApi->getConferenceWithHttpInfo( + self::$account_id, + self::$conference_id + ); + $this->assertEquals(200, $get_status_code); + $this->assertInstanceOf(Conference::class, $get_data); } /** - * Test case for updateConferenceBxml + * Test case for getConferenceMember, updateConferenceMember, updateConference, updateConferenceBxml * - * Update Conference BXML. + * Fetch and update a conference member and the conference. * */ - public function testUpdateConferenceBxml() + public function testConferenceAndMembers() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$member_data, $member_status_code] = self::$conferencesApi->getConferenceMemberWithHttpInfo( + self::$account_id, + self::$conference_id, + self::$call_id + ); + $this->assertEquals(200, $member_status_code); + $this->assertInstanceOf(ConferenceMember::class, $member_data); + + $update_member = new UpdateConferenceMember(['mute' => false]); + [, $update_member_status_code] = self::$conferencesApi->updateConferenceMemberWithHttpInfo( + self::$account_id, + self::$conference_id, + self::$call_id, + $update_member + ); + $this->assertEquals(204, $update_member_status_code); + + $update_conference = new UpdateConference([ + 'status' => ConferenceStateEnum::ACTIVE, + 'redirect_url' => self::$conference_redirect_url, + 'redirect_method' => RedirectMethodEnum::POST, + 'username' => 'myUsername', + 'password' => 'myPassword1!', + 'redirect_fallback_url' => self::$conference_redirect_url, + 'redirect_fallback_method' => RedirectMethodEnum::POST, + 'fallback_username' => 'myUsername', + 'fallback_password' => 'myPassword1!' + ]); + [, $update_conference_status_code] = self::$conferencesApi->updateConferenceWithHttpInfo( + self::$account_id, + self::$conference_id, + $update_conference + ); + $this->assertEquals(204, $update_conference_status_code); + + [, $update_bxml_status_code] = self::$conferencesApi->updateConferenceBxmlWithHttpInfo( + self::$account_id, + self::$conference_id, + self::$update_recording_bxml + ); + $this->assertEquals(204, $update_bxml_status_code); } /** - * Test case for updateConferenceMember + * Test case for listConferenceRecordings, getConferenceRecording, downloadConferenceRecording * - * Update Conference Member. + * Validate conference recordings. * */ - public function testUpdateConferenceMember() + public function testConferenceRecordings() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + self::markTestSkipped('issues with PV API, can re-enable after fixed'); + + // Poll Manteca until the conference call has been recorded + $recording_status = false; + for ($i = 0; $i < self::MAX_RETRIES && !$recording_status; $i++) { + sleep(self::TEST_SLEEP); + $recording_status = Manteca::getStatus(self::$test_id)['callRecorded'] ?? false; + } + $this->assertTrue($recording_status); + + [$list_data, $list_status_code] = self::$conferencesApi->listConferenceRecordingsWithHttpInfo( + self::$account_id, + self::$conference_id + ); + $this->assertEquals(200, $list_status_code); + + $conference_recording = $list_data[0]; + $this->assertInstanceOf(ConferenceRecordingMetadata::class, $conference_recording); + + [$recording_data, $recording_status_code] = self::$conferencesApi->getConferenceRecordingWithHttpInfo( + self::$account_id, + self::$conference_id, + $conference_recording->getRecordingId() + ); + $this->assertEquals(200, $recording_status_code); + $this->assertEquals('complete', $recording_data->getStatus()); + $this->assertEquals(FileFormatEnum::WAV, $recording_data->getFileFormat()); + + [, $download_status_code] = self::$conferencesApi->downloadConferenceRecordingWithHttpInfo( + self::$account_id, + self::$conference_id, + $conference_recording->getRecordingId() + ); + $this->assertEquals(200, $download_status_code); } } diff --git a/tests/Api/RecordingsApiTest.php b/tests/Api/RecordingsApiTest.php index edc6370a..3b581717 100644 --- a/tests/Api/RecordingsApiTest.php +++ b/tests/Api/RecordingsApiTest.php @@ -28,8 +28,19 @@ namespace Bandwidth\Test\Api; use Bandwidth\Configuration; -use Bandwidth\ApiException; -use Bandwidth\ObjectSerializer; +use Bandwidth\Api\CallsApi; +use Bandwidth\Api\RecordingsApi; +use Bandwidth\Model\CallRecordingMetadata; +use Bandwidth\Model\CallStateEnum; +use Bandwidth\Model\CreateCall; +use Bandwidth\Model\RecordingStateEnum; +use Bandwidth\Model\RecordingTranscriptions; +use Bandwidth\Model\TranscribeRecording; +use Bandwidth\Model\UpdateCall; +use Bandwidth\Model\UpdateCallRecording; +use Bandwidth\Test\Utils\CallCleanup; +use Bandwidth\Test\Utils\Manteca; + use PHPUnit\Framework\TestCase; /** @@ -41,105 +52,165 @@ */ class RecordingsApiTest extends TestCase { + private const TEST_SLEEP = 3; + private const MAX_RETRIES = 40; + + private static CallsApi $callsApi; + private static RecordingsApi $recordingsApi; + private static string $account_id; + private static string $test_id; + private static string $answer_url; + private static string $call_id; + private static string $recording_id; /** * Setup before running any test cases */ public static function setUpBeforeClass(): void { - } + $config = Configuration::getDefaultConfiguration() + ->setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); - /** - * Setup before running each test case - */ - public function setUp(): void - { - } + self::$callsApi = new CallsApi(config: $config); + self::$recordingsApi = new RecordingsApi(config: $config); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$answer_url = getenv("MANTECA_BASE_URL") . "/bxml/startLongRecording"; } /** - * Clean up after running all test cases + * Ensure the call is hung up after the suite */ public static function tearDownAfterClass(): void { + CallCleanup::cleanup(self::$callsApi, self::$account_id, [self::$call_id]); } /** - * Test case for deleteRecording - * - * Delete Recording. - * - */ - public function testDeleteRecording() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test case for deleteRecordingMedia - * - * Delete Recording Media. - * - */ - public function testDeleteRecordingMedia() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test case for deleteRecordingTranscription - * - * Delete Transcription. - * - */ - public function testDeleteRecordingTranscription() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test case for downloadCallRecording - * - * Download Recording. - * - */ - public function testDownloadCallRecording() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test case for getCallRecording - * - * Get Call Recording. + * Test case for the full call recording and transcription lifecycle. * */ - public function testGetCallRecording() + public function testCallRecordingAndTranscription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test case for getRecordingTranscription - * - * Get Transcription. - * - */ - public function testGetRecordingTranscription() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $os = getenv("OPERATING_SYSTEM"); + $language = "PHP" . phpversion() . "_" . getenv("DISTRIBUTION"); + self::$test_id = Manteca::createTest($os, $language, "CALL"); + + $create_call_body = new CreateCall([ + 'to' => getenv("MANTECA_IDLE_NUMBER"), + 'from' => getenv("MANTECA_ACTIVE_NUMBER"), + 'application_id' => getenv("MANTECA_APPLICATION_ID"), + 'answer_url' => self::$answer_url, + 'tag' => self::$test_id + ]); + + [$create_data] = self::$callsApi->createCallWithHttpInfo(self::$account_id, $create_call_body); + self::$call_id = $create_data->getCallId(); + + // Pause recording + sleep(self::TEST_SLEEP * 2); + [, $pause_status_code] = self::$recordingsApi->updateCallRecordingStateWithHttpInfo( + self::$account_id, + self::$call_id, + new UpdateCallRecording(['state' => RecordingStateEnum::PAUSED]) + ); + $this->assertEquals(200, $pause_status_code); + + // Resume recording + sleep(self::TEST_SLEEP); + [, $resume_status_code] = self::$recordingsApi->updateCallRecordingStateWithHttpInfo( + self::$account_id, + self::$call_id, + new UpdateCallRecording(['state' => RecordingStateEnum::RECORDING]) + ); + $this->assertEquals(200, $resume_status_code); + + // Terminate the call + [, $update_call_status_code] = self::$callsApi->updateCallWithHttpInfo( + self::$account_id, + self::$call_id, + new UpdateCall(['state' => CallStateEnum::COMPLETED]) + ); + $this->assertEquals(200, $update_call_status_code); + + // Poll Manteca until the call has been recorded + $recording_status = false; + for ($x = 0; $x < self::MAX_RETRIES && !$recording_status; $x++) { + sleep(self::TEST_SLEEP); + $recording_status = Manteca::getStatus(self::$test_id)['callRecorded'] ?? false; + } + $this->assertTrue($recording_status); + + // Validate the recording metadata endpoints + [$list_data, $list_status_code] = self::$recordingsApi->listCallRecordingsWithHttpInfo( + self::$account_id, + self::$call_id + ); + $this->assertEquals(200, $list_status_code); + self::$recording_id = $list_data[0]->getRecordingId(); + + [$get_data, $get_status_code] = self::$recordingsApi->getCallRecordingWithHttpInfo( + self::$account_id, + self::$call_id, + self::$recording_id + ); + $this->assertEquals(200, $get_status_code); + $this->assertInstanceOf(CallRecordingMetadata::class, $get_data); + + // Request a transcription; pass the tag to receive the Manteca callback + $transcribe_recording = new TranscribeRecording([ + 'callback_url' => getenv("MANTECA_BASE_URL") . "/transcriptions", + 'tag' => self::$test_id + ]); + [, $transcribe_status_code] = self::$recordingsApi->transcribeCallRecordingWithHttpInfo( + self::$account_id, + self::$call_id, + self::$recording_id, + $transcribe_recording + ); + $this->assertEquals(204, $transcribe_status_code); + + // Poll Manteca until the call has been transcribed + $transcription_status = false; + for ($i = 0; $i < self::MAX_RETRIES && !$transcription_status; $i++) { + sleep(self::TEST_SLEEP); + $transcription_status = Manteca::getStatus(self::$test_id)['callTranscribed'] ?? false; + } + $this->assertTrue($transcription_status); + + // Validate the transcription metadata endpoint + [$transcription_data, $transcription_get_status_code] = self::$recordingsApi->getRecordingTranscriptionWithHttpInfo( + self::$account_id, + self::$call_id, + self::$recording_id + ); + $this->assertEquals(200, $transcription_get_status_code); + $this->assertInstanceOf(RecordingTranscriptions::class, $transcription_data); + + // Delete transcription + [, $delete_transcription_status_code] = self::$recordingsApi->deleteRecordingTranscriptionWithHttpInfo( + self::$account_id, + self::$call_id, + self::$recording_id + ); + $this->assertEquals(204, $delete_transcription_status_code); + + // Delete recording media + [, $delete_media_status_code] = self::$recordingsApi->deleteRecordingMediaWithHttpInfo( + self::$account_id, + self::$call_id, + self::$recording_id + ); + $this->assertEquals(204, $delete_media_status_code); + + // Delete recording metadata + [, $delete_recording_status_code] = self::$recordingsApi->deleteRecordingWithHttpInfo( + self::$account_id, + self::$call_id, + self::$recording_id + ); + $this->assertEquals(204, $delete_recording_status_code); } /** @@ -150,43 +221,8 @@ public function testGetRecordingTranscription() */ public function testListAccountCallRecordings() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } + [, $status_code] = self::$recordingsApi->listAccountCallRecordingsWithHttpInfo(self::$account_id); - /** - * Test case for listCallRecordings - * - * List Call Recordings. - * - */ - public function testListCallRecordings() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test case for transcribeCallRecording - * - * Create Transcription Request. - * - */ - public function testTranscribeCallRecording() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } - - /** - * Test case for updateCallRecordingState - * - * Update Recording. - * - */ - public function testUpdateCallRecordingState() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertEquals(200, $status_code); } } diff --git a/tests/Api/TranscriptionsApiTest.php b/tests/Api/TranscriptionsApiTest.php index 5ec8822a..9cd3e8ec 100644 --- a/tests/Api/TranscriptionsApiTest.php +++ b/tests/Api/TranscriptionsApiTest.php @@ -28,8 +28,15 @@ namespace Bandwidth\Test\Api; use Bandwidth\Configuration; -use Bandwidth\ApiException; -use Bandwidth\ObjectSerializer; +use Bandwidth\Api\CallsApi; +use Bandwidth\Api\TranscriptionsApi; +use Bandwidth\Model\CallStateEnum; +use Bandwidth\Model\CallTranscription; +use Bandwidth\Model\CallTranscriptionResponse; +use Bandwidth\Model\CallTranscriptionTrackEnum; +use Bandwidth\Model\CreateCall; +use Bandwidth\Model\UpdateCall; + use PHPUnit\Framework\TestCase; /** @@ -41,68 +48,111 @@ */ class TranscriptionsApiTest extends TestCase { + private const TEST_SLEEP = 10; + private const TEST_SLEEP_LONG = 60; + + private static CallsApi $callsApi; + private static TranscriptionsApi $transcriptionsApi; + private static string $account_id; + private static string $manteca_answer_url; + + private static string $bxml_body = 'This is a bxml start transcription test.Ideally this part is being transcribed.'; /** * Setup before running any test cases */ public static function setUpBeforeClass(): void { - } + $config = Configuration::getDefaultConfiguration() + ->setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); - /** - * Setup before running each test case - */ - public function setUp(): void - { - } + self::$callsApi = new CallsApi(config: $config); + self::$transcriptionsApi = new TranscriptionsApi(config: $config); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$manteca_answer_url = getenv("MANTECA_BASE_URL") . "/bxml/pause"; } /** - * Test case for deleteRealTimeTranscription + * Test case for listRealTimeTranscriptions, getRealTimeTranscription, deleteRealTimeTranscription * - * Delete Real-time Transcription. + * Create a transcribed call, then list, get, and delete its real-time transcriptions. * */ - public function testDeleteRealTimeTranscription() + public function testGetAndDeleteRealTimeTranscriptions() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } + self::markTestSkipped('issue with PV API, can re-enable when fixed'); - /** - * Test case for getRealTimeTranscription - * - * Get Real-time Transcription. - * - */ - public function testGetRealTimeTranscription() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } + // Create a call, start transcription via BXML, and complete it so there is + // a transcription to exercise the endpoints below. + $create_call_body = new CreateCall([ + 'from' => getenv("MANTECA_ACTIVE_NUMBER"), + 'to' => getenv("MANTECA_IDLE_NUMBER"), + 'application_id' => getenv("MANTECA_APPLICATION_ID"), + 'answer_url' => self::$manteca_answer_url + ]); - /** - * Test case for listRealTimeTranscriptions - * - * List Real-time Transcriptions. - * - */ - public function testListRealTimeTranscriptions() - { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$create_data, $create_status_code] = self::$callsApi->createCallWithHttpInfo( + self::$account_id, + $create_call_body + ); + $this->assertEquals(201, $create_status_code); + $call_id = $create_data->getCallId(); + + // Redirect the call to start transcription + sleep(self::TEST_SLEEP); + [, $update_status_code] = self::$callsApi->updateCallBxmlWithHttpInfo( + self::$account_id, + $call_id, + self::$bxml_body + ); + $this->assertEquals(204, $update_status_code); + + // Complete the call + sleep(self::TEST_SLEEP); + [, $complete_status_code] = self::$callsApi->updateCallWithHttpInfo( + self::$account_id, + $call_id, + new UpdateCall(['state' => CallStateEnum::COMPLETED]) + ); + $this->assertEquals(200, $complete_status_code); + + // List the real-time transcriptions + sleep(self::TEST_SLEEP_LONG); + [$list_data, $list_status_code] = self::$transcriptionsApi->listRealTimeTranscriptionsWithHttpInfo( + self::$account_id, + $call_id + ); + $this->assertEquals(200, $list_status_code); + $this->assertIsString($list_data[0]->getTranscriptionId()); + $this->assertIsString($list_data[0]->getTranscriptionName()); + $this->assertIsString($list_data[0]->getTranscriptionUrl()); + + $transcription_id = $list_data[0]->getTranscriptionId(); + + // Get the real-time transcription + sleep(self::TEST_SLEEP); + [$get_data, $get_status_code] = self::$transcriptionsApi->getRealTimeTranscriptionWithHttpInfo( + self::$account_id, + $call_id, + $transcription_id + ); + $this->assertEquals(200, $get_status_code); + $this->assertInstanceOf(CallTranscriptionResponse::class, $get_data); + $this->assertIsString($get_data->getTranscriptionId()); + $this->assertInstanceOf(CallTranscription::class, $get_data->getTracks()[0]); + $this->assertInstanceOf(CallTranscriptionTrackEnum::class, $get_data->getTracks()[0]->getTrack()); + $this->assertIsString($get_data->getTracks()[0]->getTranscript()); + $this->assertEquals(0.0, $get_data->getTracks()[0]->getConfidence()); + + // Delete the real-time transcription + // NOTE: this should be 204, but there is currently an API bug tracked in VAPI-1863 + [, $delete_status_code] = self::$transcriptionsApi->deleteRealTimeTranscriptionWithHttpInfo( + self::$account_id, + $call_id, + $transcription_id + ); + $this->assertEquals(200, $delete_status_code); } } diff --git a/tests/Utils/CallCleanup.php b/tests/Utils/CallCleanup.php new file mode 100644 index 00000000..4275b4c6 --- /dev/null +++ b/tests/Utils/CallCleanup.php @@ -0,0 +1,44 @@ +getCallStateWithHttpInfo($accountId, $callId); + if (strcasecmp($call_state->getState(), 'disconnected') !== 0) { + $api->updateCallWithHttpInfo( + $accountId, + $callId, + new UpdateCall(['state' => CallStateEnum::COMPLETED]) + ); + } + } + } +} diff --git a/tests/Utils/Manteca.php b/tests/Utils/Manteca.php new file mode 100644 index 00000000..a8bfae34 --- /dev/null +++ b/tests/Utils/Manteca.php @@ -0,0 +1,72 @@ +post("{$base_url}/tests", [ + 'json' => [ + 'os' => $os, + 'language' => $language, + 'type' => $type, + ], + 'http_errors' => false, + ]); + + if ($response->getStatusCode() >= 300) { + throw new \RuntimeException( + "Failed to create Manteca test: [{$response->getStatusCode()}] " . (string) $response->getBody() + ); + } + + return (string) $response->getBody(); + } + + /** + * Fetch the status of a Manteca test. + * + * @param string $testId The Manteca test ID + * + * @return array Decoded status body (e.g. callRecorded, callTranscribed) + */ + public static function getStatus(string $testId): array + { + $base_url = getenv("MANTECA_BASE_URL"); + + $response = (new Client())->get("{$base_url}/tests/{$testId}", [ + 'http_errors' => false, + ]); + + if ($response->getStatusCode() >= 300) { + throw new \RuntimeException( + "Failed to get Manteca test status: [{$response->getStatusCode()}] " . (string) $response->getBody() + ); + } + + return json_decode((string) $response->getBody(), true); + } +} From 2961d42663f00c860a8f675be32ab084824d7091 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 18 Aug 2026 11:39:32 -0400 Subject: [PATCH 23/53] split api tests into smoke and unit --- tests/{Api => Smoke}/CallsApiTest.php | 2 +- tests/{Api => Smoke}/ConferencesApiTest.php | 2 +- tests/{Api => Smoke}/EndpointsApiTest.php | 2 +- tests/{Api => Smoke}/MFAApiTest.php | 2 +- tests/{Api => Smoke}/MediaApiTest.php | 2 +- tests/{Api => Smoke}/MessagesApiTest.php | 2 +- tests/{Api => Smoke}/MultiChannelApiTest.php | 2 +- .../PhoneNumberLookupApiTest.php | 2 +- tests/{Api => Smoke}/RecordingsApiTest.php | 2 +- tests/{Api => Smoke}/StatisticsApiTest.php | 2 +- .../TollFreeVerificationApiTest.php | 2 +- .../{Api => Smoke}/TranscriptionsApiTest.php | 2 +- tests/Unit/Api/CallsApiTest.php | 307 +++++++++++ tests/Unit/Api/ConferencesApiTest.php | 237 ++++++++ tests/Unit/Api/EndpointsApiTest.php | 179 ++++++ tests/Unit/Api/MFAApiTest.php | 155 ++++++ tests/Unit/Api/MediaApiTest.php | 160 ++++++ tests/Unit/Api/MessagesApiTest.php | 133 +++++ tests/Unit/Api/MultiChannelApiTest.php | 509 ++++++++++++++++++ tests/Unit/Api/PhoneNumberLookupApiTest.php | 155 ++++++ tests/Unit/Api/RecordingsApiTest.php | 228 ++++++++ tests/Unit/Api/StatisticsApiTest.php | 77 +++ .../Unit/Api/TollFreeVerificationApiTest.php | 167 ++++++ tests/Unit/Api/TranscriptionsApiTest.php | 158 ++++++ 24 files changed, 2477 insertions(+), 12 deletions(-) rename tests/{Api => Smoke}/CallsApiTest.php (99%) rename tests/{Api => Smoke}/ConferencesApiTest.php (99%) rename tests/{Api => Smoke}/EndpointsApiTest.php (99%) rename tests/{Api => Smoke}/MFAApiTest.php (99%) rename tests/{Api => Smoke}/MediaApiTest.php (99%) rename tests/{Api => Smoke}/MessagesApiTest.php (99%) rename tests/{Api => Smoke}/MultiChannelApiTest.php (99%) rename tests/{Api => Smoke}/PhoneNumberLookupApiTest.php (99%) rename tests/{Api => Smoke}/RecordingsApiTest.php (99%) rename tests/{Api => Smoke}/StatisticsApiTest.php (98%) rename tests/{Api => Smoke}/TollFreeVerificationApiTest.php (99%) rename tests/{Api => Smoke}/TranscriptionsApiTest.php (99%) create mode 100644 tests/Unit/Api/CallsApiTest.php create mode 100644 tests/Unit/Api/ConferencesApiTest.php create mode 100644 tests/Unit/Api/EndpointsApiTest.php create mode 100644 tests/Unit/Api/MFAApiTest.php create mode 100644 tests/Unit/Api/MediaApiTest.php create mode 100644 tests/Unit/Api/MessagesApiTest.php create mode 100644 tests/Unit/Api/MultiChannelApiTest.php create mode 100644 tests/Unit/Api/PhoneNumberLookupApiTest.php create mode 100644 tests/Unit/Api/RecordingsApiTest.php create mode 100644 tests/Unit/Api/StatisticsApiTest.php create mode 100644 tests/Unit/Api/TollFreeVerificationApiTest.php create mode 100644 tests/Unit/Api/TranscriptionsApiTest.php diff --git a/tests/Api/CallsApiTest.php b/tests/Smoke/CallsApiTest.php similarity index 99% rename from tests/Api/CallsApiTest.php rename to tests/Smoke/CallsApiTest.php index 67fc872f..44056c27 100644 --- a/tests/Api/CallsApiTest.php +++ b/tests/Smoke/CallsApiTest.php @@ -25,7 +25,7 @@ * Please update the test case below to test the endpoint. */ -namespace Bandwidth\Test\Api; +namespace Bandwidth\Test\Smoke; use Bandwidth\Configuration; use Bandwidth\Api\CallsApi; diff --git a/tests/Api/ConferencesApiTest.php b/tests/Smoke/ConferencesApiTest.php similarity index 99% rename from tests/Api/ConferencesApiTest.php rename to tests/Smoke/ConferencesApiTest.php index 14c12a81..3d8d7a23 100644 --- a/tests/Api/ConferencesApiTest.php +++ b/tests/Smoke/ConferencesApiTest.php @@ -25,7 +25,7 @@ * Please update the test case below to test the endpoint. */ -namespace Bandwidth\Test\Api; +namespace Bandwidth\Test\Smoke; use Bandwidth\Configuration; use Bandwidth\Api\CallsApi; diff --git a/tests/Api/EndpointsApiTest.php b/tests/Smoke/EndpointsApiTest.php similarity index 99% rename from tests/Api/EndpointsApiTest.php rename to tests/Smoke/EndpointsApiTest.php index 22a8e43f..81778000 100644 --- a/tests/Api/EndpointsApiTest.php +++ b/tests/Smoke/EndpointsApiTest.php @@ -25,7 +25,7 @@ * Please update the test case below to test the endpoint. */ -namespace Bandwidth\Test\Api; +namespace Bandwidth\Test\Smoke; use Bandwidth\Configuration; use Bandwidth\Api\EndpointsApi; diff --git a/tests/Api/MFAApiTest.php b/tests/Smoke/MFAApiTest.php similarity index 99% rename from tests/Api/MFAApiTest.php rename to tests/Smoke/MFAApiTest.php index 37e4c2e5..d5db3154 100644 --- a/tests/Api/MFAApiTest.php +++ b/tests/Smoke/MFAApiTest.php @@ -25,7 +25,7 @@ * Please update the test case below to test the endpoint. */ -namespace Bandwidth\Test\Api; +namespace Bandwidth\Test\Smoke; use Bandwidth\Configuration; use Bandwidth\Api\MFAApi; diff --git a/tests/Api/MediaApiTest.php b/tests/Smoke/MediaApiTest.php similarity index 99% rename from tests/Api/MediaApiTest.php rename to tests/Smoke/MediaApiTest.php index 8198214e..a0eb8176 100644 --- a/tests/Api/MediaApiTest.php +++ b/tests/Smoke/MediaApiTest.php @@ -25,7 +25,7 @@ * Please update the test case below to test the endpoint. */ -namespace Bandwidth\Test\Api; +namespace Bandwidth\Test\Smoke; use SplFileObject; use Bandwidth\ApiException; diff --git a/tests/Api/MessagesApiTest.php b/tests/Smoke/MessagesApiTest.php similarity index 99% rename from tests/Api/MessagesApiTest.php rename to tests/Smoke/MessagesApiTest.php index 3989aa89..48fef681 100644 --- a/tests/Api/MessagesApiTest.php +++ b/tests/Smoke/MessagesApiTest.php @@ -25,7 +25,7 @@ * Please update the test case below to test the endpoint. */ -namespace Bandwidth\Test\Api; +namespace Bandwidth\Test\Smoke; use Bandwidth\Configuration; use Bandwidth\Api\MessagesApi; diff --git a/tests/Api/MultiChannelApiTest.php b/tests/Smoke/MultiChannelApiTest.php similarity index 99% rename from tests/Api/MultiChannelApiTest.php rename to tests/Smoke/MultiChannelApiTest.php index 7a067099..cd6798be 100644 --- a/tests/Api/MultiChannelApiTest.php +++ b/tests/Smoke/MultiChannelApiTest.php @@ -25,7 +25,7 @@ * Please update the test case below to test the endpoint. */ -namespace Bandwidth\Test\Api; +namespace Bandwidth\Test\Smoke; use Bandwidth\Configuration; use Bandwidth\Api\MultiChannelApi; diff --git a/tests/Api/PhoneNumberLookupApiTest.php b/tests/Smoke/PhoneNumberLookupApiTest.php similarity index 99% rename from tests/Api/PhoneNumberLookupApiTest.php rename to tests/Smoke/PhoneNumberLookupApiTest.php index 71403ff7..a2a3270f 100644 --- a/tests/Api/PhoneNumberLookupApiTest.php +++ b/tests/Smoke/PhoneNumberLookupApiTest.php @@ -25,7 +25,7 @@ * Please update the test case below to test the endpoint. */ -namespace Bandwidth\Test\Api; +namespace Bandwidth\Test\Smoke; use Bandwidth\Configuration; use Bandwidth\Api\PhoneNumberLookupApi; diff --git a/tests/Api/RecordingsApiTest.php b/tests/Smoke/RecordingsApiTest.php similarity index 99% rename from tests/Api/RecordingsApiTest.php rename to tests/Smoke/RecordingsApiTest.php index 3b581717..76b246c2 100644 --- a/tests/Api/RecordingsApiTest.php +++ b/tests/Smoke/RecordingsApiTest.php @@ -25,7 +25,7 @@ * Please update the test case below to test the endpoint. */ -namespace Bandwidth\Test\Api; +namespace Bandwidth\Test\Smoke; use Bandwidth\Configuration; use Bandwidth\Api\CallsApi; diff --git a/tests/Api/StatisticsApiTest.php b/tests/Smoke/StatisticsApiTest.php similarity index 98% rename from tests/Api/StatisticsApiTest.php rename to tests/Smoke/StatisticsApiTest.php index 8c7c5123..1bae5142 100644 --- a/tests/Api/StatisticsApiTest.php +++ b/tests/Smoke/StatisticsApiTest.php @@ -25,7 +25,7 @@ * Please update the test case below to test the endpoint. */ -namespace Bandwidth\Test\Api; +namespace Bandwidth\Test\Smoke; use Bandwidth\Configuration; use Bandwidth\Api\StatisticsApi; diff --git a/tests/Api/TollFreeVerificationApiTest.php b/tests/Smoke/TollFreeVerificationApiTest.php similarity index 99% rename from tests/Api/TollFreeVerificationApiTest.php rename to tests/Smoke/TollFreeVerificationApiTest.php index b03ab528..a798bd7d 100644 --- a/tests/Api/TollFreeVerificationApiTest.php +++ b/tests/Smoke/TollFreeVerificationApiTest.php @@ -25,7 +25,7 @@ * Please update the test case below to test the endpoint. */ -namespace Bandwidth\Test\Api; +namespace Bandwidth\Test\Smoke; use Bandwidth\Configuration; use Bandwidth\Api\TollFreeVerificationApi; diff --git a/tests/Api/TranscriptionsApiTest.php b/tests/Smoke/TranscriptionsApiTest.php similarity index 99% rename from tests/Api/TranscriptionsApiTest.php rename to tests/Smoke/TranscriptionsApiTest.php index 9cd3e8ec..eda18db9 100644 --- a/tests/Api/TranscriptionsApiTest.php +++ b/tests/Smoke/TranscriptionsApiTest.php @@ -25,7 +25,7 @@ * Please update the test case below to test the endpoint. */ -namespace Bandwidth\Test\Api; +namespace Bandwidth\Test\Smoke; use Bandwidth\Configuration; use Bandwidth\Api\CallsApi; diff --git a/tests/Unit/Api/CallsApiTest.php b/tests/Unit/Api/CallsApiTest.php new file mode 100644 index 00000000..2be97e7f --- /dev/null +++ b/tests/Unit/Api/CallsApiTest.php @@ -0,0 +1,307 @@ +This is a test bxml response'; + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void + { + $config = Configuration::getDefaultConfiguration() + ->setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); + + self::$apiInstance = new CallsApi(config: $config); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$bw_number = getenv("BW_NUMBER"); + self::$user_number = getenv("USER_NUMBER"); + self::$voice_application_id = getenv("BW_VOICE_APPLICATION_ID"); + + $answer_url = getenv("BASE_CALLBACK_URL"); + $manteca_base_url = getenv("MANTECA_BASE_URL"); + $manteca_answer_url = "{$manteca_base_url}/bxml/pause"; + $fallback_url = "https://www.myFallbackServer.com/webhooks/answer"; + $disconnect_url = "https://myServer.com/bandwidth/webhooks/disconnectUrl"; + $machine_detection_url = "https://myServer.com/bandwidth/webhooks/machineDetectionComplete"; + $machine_detection_complete_url = "https://myFallbackServer.com/bandwidth/webhooks/machineDetectionComplete"; + + $machine_detection = new MachineDetectionConfiguration([ + 'mode' => MachineDetectionModeEnum::ASYNC, + 'detection_timeout' => 15.0, + 'silence_timeout' => 10.0, + 'speech_threshold' => 10.0, + 'speech_end_threshold' => 5.0, + 'machine_speech_end_threshold' => 5.0, + 'delay_result' => false, + 'callback_url' => $machine_detection_url, + 'callback_method' => CallbackMethodEnum::POST, + 'username' => 'mySecretUsername', + 'password' => 'mySecretPassword1!', + 'fallback_url' => $machine_detection_complete_url, + 'fallback_method' => CallbackMethodEnum::POST, + 'fallback_username' => 'mySecretUsername', + 'fallback_password' => 'mySecretPassword1!' + ]); + + self::$create_call_body = new CreateCall([ + 'to' => self::$user_number, + 'from' => self::$bw_number, + 'application_id' => self::$voice_application_id, + 'answer_url' => $answer_url, + 'answer_method' => CallbackMethodEnum::POST, + 'username' => 'mySecretUsername', + 'password' => 'mySecretPassword1!', + 'answer_fallback_url' => $fallback_url, + 'answer_fallback_method' => CallbackMethodEnum::POST, + 'fallback_username' => 'mySecretUsername', + 'fallback_password' => 'mySecretPassword1!', + 'disconnect_url' => $disconnect_url, + 'disconnect_method' => CallbackMethodEnum::POST, + 'call_timeout' => 30.0, + 'callback_timeout' => 15.0, + 'machine_detection' => $machine_detection, + 'priority' => 5, + 'privacy' => false, + 'tag' => 'tag_example' + ]); + + self::$create_manteca_call_body = new CreateCall([ + 'from' => getenv("MANTECA_ACTIVE_NUMBER"), + 'to' => getenv("MANTECA_IDLE_NUMBER"), + 'application_id' => getenv("MANTECA_APPLICATION_ID"), + 'answer_url' => $manteca_answer_url + ]); + + self::$update_manteca_call_body = new UpdateCall([ + 'state' => CallStateEnum::ACTIVE, + 'redirect_url' => $manteca_answer_url + ]); + + self::$complete_manteca_call_body = new UpdateCall([ + 'state' => CallStateEnum::COMPLETED + ]); + } + + /** + * Ensure that all calls collected during the suite have been hung up + */ + public static function tearDownAfterClass(): void + { + CallCleanup::cleanup(self::$apiInstance, self::$account_id, self::$call_id_list); + } + + /** + * Test case for createCall + * + * Create Call. + * + */ + public function testCreateCall() + { + [$data, $status_code] = self::$apiInstance->createCallWithHttpInfo( + self::$account_id, + self::$create_call_body + ); + self::$call_id_list[] = $data->getCallId(); + + $this->assertEquals(201, $status_code); + $this->assertInstanceOf(CreateCallResponse::class, $data); + $this->assertIsString($data->getCallId()); + $this->assertEquals(self::$account_id, $data->getAccountId()); + $this->assertEquals(self::$voice_application_id, $data->getApplicationId()); + $this->assertEquals(self::$user_number, $data->getTo()); + $this->assertEquals(self::$bw_number, $data->getFrom()); + } + + /** + * Test case for listCalls + * + * Get Calls. + * + */ + public function testListCalls() + { + [$data, $status_code] = self::$apiInstance->listCallsWithHttpInfo( + self::$account_id, + to: self::$user_number, + from: self::$bw_number + ); + + $this->assertEquals(200, $status_code); + $this->assertIsArray($data); + $this->assertInstanceOf(CallState::class, $data[0]); + $this->assertIsString($data[0]->getAccountId()); + $this->assertIsString($data[0]->getApplicationId()); + $this->assertIsString($data[0]->getCallId()); + $this->assertIsString($data[0]->getState()); + $this->assertInstanceOf(CallDirectionEnum::class, $data[0]->getDirection()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getStartTime()); + } + + /** + * Test case for getCallState + * + * Get Call State Information. + * + */ + public function testGetCallState() + { + sleep(40); + [$data, $status_code] = self::$apiInstance->getCallStateWithHttpInfo( + self::$account_id, + self::$call_id_list[0] + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(CallState::class, $data); + $this->assertIsString($data->getCallId()); + $this->assertIsString($data->getState()); + $this->assertEquals(CallDirectionEnum::OUTBOUND, $data->getDirection()); + } + + /** + * Test case for updateCall + * + * Update Call. + * + */ + public function testUpdateCall() + { + // Create call + sleep(self::TEST_SLEEP); + [$create_data, $create_status_code] = self::$apiInstance->createCallWithHttpInfo( + self::$account_id, + self::$create_manteca_call_body + ); + self::$call_id_list[] = $create_data->getCallId(); + + $this->assertEquals(201, $create_status_code); + + // Redirect call to a different url + sleep(self::TEST_SLEEP); + [, $update_status_code] = self::$apiInstance->updateCallWithHttpInfo( + self::$account_id, + $create_data->getCallId(), + self::$update_manteca_call_body + ); + + $this->assertEquals(200, $update_status_code); + + // Complete call + sleep(self::TEST_SLEEP); + [, $complete_status_code] = self::$apiInstance->updateCallWithHttpInfo( + self::$account_id, + $create_data->getCallId(), + self::$complete_manteca_call_body + ); + + $this->assertEquals(200, $complete_status_code); + } + + /** + * Test case for updateCallBxml + * + * Update Call BXML. + * + */ + public function testUpdateCallBxml() + { + // Create call + sleep(self::TEST_SLEEP); + [$create_data, $create_status_code] = self::$apiInstance->createCallWithHttpInfo( + self::$account_id, + self::$create_manteca_call_body + ); + self::$call_id_list[] = $create_data->getCallId(); + + $this->assertEquals(201, $create_status_code); + + // Update call with BXML + sleep(self::TEST_SLEEP); + [, $update_status_code] = self::$apiInstance->updateCallBxmlWithHttpInfo( + self::$account_id, + $create_data->getCallId(), + self::$test_xml_body + ); + + $this->assertEquals(204, $update_status_code); + + // Complete call + sleep(self::TEST_SLEEP); + [, $complete_status_code] = self::$apiInstance->updateCallWithHttpInfo( + self::$account_id, + $create_data->getCallId(), + self::$complete_manteca_call_body + ); + + $this->assertEquals(200, $complete_status_code); + } +} diff --git a/tests/Unit/Api/ConferencesApiTest.php b/tests/Unit/Api/ConferencesApiTest.php new file mode 100644 index 00000000..5ac711a6 --- /dev/null +++ b/tests/Unit/Api/ConferencesApiTest.php @@ -0,0 +1,237 @@ +This should be a conference recording.'; + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void + { + $config = Configuration::getDefaultConfiguration() + ->setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); + + self::$callsApi = new CallsApi(config: $config); + self::$conferencesApi = new ConferencesApi(config: $config); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + + $manteca_base_url = getenv("MANTECA_BASE_URL"); + self::$answer_url = "{$manteca_base_url}/bxml/joinConferencePause"; + self::$conference_redirect_url = "{$manteca_base_url}/bxml/pause"; + } + + /** + * Ensure the conference call is hung up after the suite + */ + public static function tearDownAfterClass(): void + { + CallCleanup::cleanup(self::$callsApi, self::$account_id, [self::$call_id]); + } + + /** + * Test case for createCall, listConferences, getConference + * + * Create a conference call and fetch the resulting conference. + * + */ + public function testCreateAndFetchConference() + { + $os = getenv("OPERATING_SYSTEM"); + $language = "PHP" . phpversion(); + self::$test_id = Manteca::createTest($os, $language, "conference"); + + $conference_call_body = new CreateCall([ + 'to' => getenv("MANTECA_IDLE_NUMBER"), + 'from' => getenv("MANTECA_ACTIVE_NUMBER"), + 'application_id' => getenv("MANTECA_APPLICATION_ID"), + 'answer_url' => self::$answer_url, + 'tag' => self::$test_id + ]); + + [$create_data, $create_status_code] = self::$callsApi->createCallWithHttpInfo( + self::$account_id, + $conference_call_body + ); + + $this->assertEquals(201, $create_status_code); + self::$call_id = $create_data->getCallId(); + + sleep(self::TEST_SLEEP); + + [$list_data, $list_status_code] = self::$conferencesApi->listConferencesWithHttpInfo( + self::$account_id, + name: self::$test_id + ); + $this->assertEquals(200, $list_status_code); + + self::$conference_id = $list_data[0]->getId(); + + [$get_data, $get_status_code] = self::$conferencesApi->getConferenceWithHttpInfo( + self::$account_id, + self::$conference_id + ); + $this->assertEquals(200, $get_status_code); + $this->assertInstanceOf(Conference::class, $get_data); + } + + /** + * Test case for getConferenceMember, updateConferenceMember, updateConference, updateConferenceBxml + * + * Fetch and update a conference member and the conference. + * + */ + public function testConferenceAndMembers() + { + [$member_data, $member_status_code] = self::$conferencesApi->getConferenceMemberWithHttpInfo( + self::$account_id, + self::$conference_id, + self::$call_id + ); + $this->assertEquals(200, $member_status_code); + $this->assertInstanceOf(ConferenceMember::class, $member_data); + + $update_member = new UpdateConferenceMember(['mute' => false]); + [, $update_member_status_code] = self::$conferencesApi->updateConferenceMemberWithHttpInfo( + self::$account_id, + self::$conference_id, + self::$call_id, + $update_member + ); + $this->assertEquals(204, $update_member_status_code); + + $update_conference = new UpdateConference([ + 'status' => ConferenceStateEnum::ACTIVE, + 'redirect_url' => self::$conference_redirect_url, + 'redirect_method' => RedirectMethodEnum::POST, + 'username' => 'myUsername', + 'password' => 'myPassword1!', + 'redirect_fallback_url' => self::$conference_redirect_url, + 'redirect_fallback_method' => RedirectMethodEnum::POST, + 'fallback_username' => 'myUsername', + 'fallback_password' => 'myPassword1!' + ]); + [, $update_conference_status_code] = self::$conferencesApi->updateConferenceWithHttpInfo( + self::$account_id, + self::$conference_id, + $update_conference + ); + $this->assertEquals(204, $update_conference_status_code); + + [, $update_bxml_status_code] = self::$conferencesApi->updateConferenceBxmlWithHttpInfo( + self::$account_id, + self::$conference_id, + self::$update_recording_bxml + ); + $this->assertEquals(204, $update_bxml_status_code); + } + + /** + * Test case for listConferenceRecordings, getConferenceRecording, downloadConferenceRecording + * + * Validate conference recordings. + * + */ + public function testConferenceRecordings() + { + self::markTestSkipped('issues with PV API, can re-enable after fixed'); + + // Poll Manteca until the conference call has been recorded + $recording_status = false; + for ($i = 0; $i < self::MAX_RETRIES && !$recording_status; $i++) { + sleep(self::TEST_SLEEP); + $recording_status = Manteca::getStatus(self::$test_id)['callRecorded'] ?? false; + } + $this->assertTrue($recording_status); + + [$list_data, $list_status_code] = self::$conferencesApi->listConferenceRecordingsWithHttpInfo( + self::$account_id, + self::$conference_id + ); + $this->assertEquals(200, $list_status_code); + + $conference_recording = $list_data[0]; + $this->assertInstanceOf(ConferenceRecordingMetadata::class, $conference_recording); + + [$recording_data, $recording_status_code] = self::$conferencesApi->getConferenceRecordingWithHttpInfo( + self::$account_id, + self::$conference_id, + $conference_recording->getRecordingId() + ); + $this->assertEquals(200, $recording_status_code); + $this->assertEquals('complete', $recording_data->getStatus()); + $this->assertEquals(FileFormatEnum::WAV, $recording_data->getFileFormat()); + + [, $download_status_code] = self::$conferencesApi->downloadConferenceRecordingWithHttpInfo( + self::$account_id, + self::$conference_id, + $conference_recording->getRecordingId() + ); + $this->assertEquals(200, $download_status_code); + } +} diff --git a/tests/Unit/Api/EndpointsApiTest.php b/tests/Unit/Api/EndpointsApiTest.php new file mode 100644 index 00000000..f3cabec2 --- /dev/null +++ b/tests/Unit/Api/EndpointsApiTest.php @@ -0,0 +1,179 @@ +setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); + + self::$apiInstance = new EndpointsApi(config: $config); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + + self::$endpoint_tag = 'php-smoke-' . uniqid(); + } + + /** + * Test case for createEndpoint + * + * Create Endpoint. + * + */ + public function testCreateEndpoint() + { + $body = new CreateWebRtcConnectionRequest([ + 'type' => EndpointTypeEnum::WEBRTC, + 'direction' => EndpointDirectionEnum::BIDIRECTIONAL, + 'tag' => self::$endpoint_tag + ]); + + [$data, $status_code] = self::$apiInstance->createEndpointWithHttpInfo(self::$account_id, $body); + + $this->assertEquals(201, $status_code); + $this->assertInstanceOf(CreateEndpointResponse::class, $data); + $this->assertInstanceOf(CreateEndpointResponseData::class, $data->getData()); + $this->assertIsString($data->getData()->getEndpointId()); + $this->assertIsString($data->getData()->getToken()); + $this->assertEquals(EndpointTypeEnum::WEBRTC, $data->getData()->getType()); + $this->assertInstanceOf(EndpointStatusEnum::class, $data->getData()->getStatus()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getCreationTimestamp()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getExpirationTimestamp()); + $this->assertEquals(self::$endpoint_tag, $data->getData()->getTag()); + $this->assertIsArray($data->getErrors()); + + self::$endpoint_id = $data->getData()->getEndpointId(); + } + + /** + * Test case for listEndpoints + * + * List Endpoints. + * + */ + public function testListEndpoints() + { + [$data, $status_code] = self::$apiInstance->listEndpointsWithHttpInfo(self::$account_id); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(ListEndpointsResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertInstanceOf(Page::class, $data->getPage()); + $this->assertIsArray($data->getData()); + $this->assertIsArray($data->getErrors()); + + $first_endpoint = $data->getData()[0]; + $this->assertInstanceOf(Endpoints::class, $first_endpoint); + $this->assertIsString($first_endpoint->getEndpointId()); + $this->assertInstanceOf(EndpointTypeEnum::class, $first_endpoint->getType()); + $this->assertInstanceOf(EndpointStatusEnum::class, $first_endpoint->getStatus()); + $this->assertInstanceOf(\DateTime::class, $first_endpoint->getCreationTimestamp()); + $this->assertInstanceOf(\DateTime::class, $first_endpoint->getExpirationTimestamp()); + } + + /** + * Test case for getEndpoint + * + * Get Endpoint. + * + */ + public function testGetEndpoint() + { + [$data, $status_code] = self::$apiInstance->getEndpointWithHttpInfo(self::$account_id, self::$endpoint_id); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(EndpointResponse::class, $data); + $this->assertIsArray($data->getErrors()); + $this->assertInstanceOf(Endpoint::class, $data->getData()); + $this->assertEquals(self::$endpoint_id, $data->getData()->getEndpointId()); + $this->assertEquals(EndpointTypeEnum::WEBRTC, $data->getData()->getType()); + $this->assertInstanceOf(EndpointStatusEnum::class, $data->getData()->getStatus()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getCreationTimestamp()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getExpirationTimestamp()); + $this->assertEquals(self::$endpoint_tag, $data->getData()->getTag()); + } + + /** + * Test case for deleteEndpoint + * + * Delete Endpoint. + * + */ + public function testDeleteEndpoint() + { + [, $status_code] = self::$apiInstance->deleteEndpointWithHttpInfo(self::$account_id, self::$endpoint_id); + + $this->assertEquals(204, $status_code); + } + + /** + * Test case for updateEndpointBxml + * + * Update Endpoint BXML. + * + */ + public function testUpdateEndpointBxml() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +} diff --git a/tests/Unit/Api/MFAApiTest.php b/tests/Unit/Api/MFAApiTest.php new file mode 100644 index 00000000..3623fec6 --- /dev/null +++ b/tests/Unit/Api/MFAApiTest.php @@ -0,0 +1,155 @@ +setUsername(getenv("BW_USERNAME")) + ->setPassword(getenv("BW_PASSWORD")); + + self::$apiInstance = new MFAApi(config: $config); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$bw_number = getenv("BW_NUMBER"); + self::$user_number = getenv("USER_NUMBER"); + self::$bw_messaging_application_id = getenv("BW_MESSAGING_APPLICATION_ID"); + self::$bw_voice_application_id = getenv("BW_VOICE_APPLICATION_ID"); + } + + /** + * Test case for generateMessagingCode + * + * Messaging Authentication Code. + * + */ + public function testGenerateMessagingCode() + { + $request = new CodeRequest([ + 'to' => self::$user_number, + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'scope' => 'scope', + 'message' => 'Your temporary {NAME} {SCOPE} code is {CODE}', + 'digits' => 6 + ]); + + [$data, $status_code] = self::$apiInstance->generateMessagingCodeWithHttpInfo( + self::$account_id, + $request + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(MessagingCodeResponse::class, $data); + $this->assertIsString($data->getMessageId()); + } + + /** + * Test case for generateVoiceCode + * + * Voice Authentication Code. + * + */ + public function testGenerateVoiceCode() + { + $request = new CodeRequest([ + 'to' => self::$user_number, + 'from' => self::$bw_number, + 'application_id' => self::$bw_voice_application_id, + 'scope' => 'scope', + 'message' => 'Your temporary {NAME} {SCOPE} code is {CODE}', + 'digits' => 6 + ]); + + [$data, $status_code] = self::$apiInstance->generateVoiceCodeWithHttpInfo( + self::$account_id, + $request + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(VoiceCodeResponse::class, $data); + $this->assertIsString($data->getCallId()); + } + + /** + * Test case for verifyCode + * + * Verify Authentication Code. + * + */ + public function testVerifyCode() + { + // Use a random TN to avoid rate limiting + $random_tn = '+1' . (string) rand(1111111111, 9999999999); + + $request = new VerifyCodeRequest([ + 'to' => $random_tn, + 'scope' => '2FA', + 'expiration_time_in_minutes' => 3, + 'code' => '123456' + ]); + + [$data, $status_code] = self::$apiInstance->verifyCodeWithHttpInfo( + self::$account_id, + $request + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(VerifyCodeResponse::class, $data); + $this->assertFalse($data->getValid()); + } +} diff --git a/tests/Unit/Api/MediaApiTest.php b/tests/Unit/Api/MediaApiTest.php new file mode 100644 index 00000000..d066c1b9 --- /dev/null +++ b/tests/Unit/Api/MediaApiTest.php @@ -0,0 +1,160 @@ +setUsername(getenv("BW_USERNAME")) + ->setPassword(getenv("BW_PASSWORD")); + + self::$apiInstance = new MediaApi(config: $config); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$media_name = "php_binary_media" . uniqid() . ".txt"; + self::$media_data = "123456"; + + $path = tempnam(sys_get_temp_dir(), 'bw_media_'); + file_put_contents($path, self::$media_data); + self::$media_file = new SplFileObject($path, 'rb'); + } + + /** + * Test case for uploadMedia + * + * Upload Media. + * + */ + public function testUploadMedia() + { + [, $status_code] = self::$apiInstance->uploadMediaWithHttpInfo( + self::$account_id, + self::$media_name, + self::$media_file, + contentType: 'text/plain' + ); + + $this->assertEquals(204, $status_code); + } + + /** + * Test case for listMedia + * + * List Media. + * + */ + public function testListMedia() + { + [$data, $status_code] = self::$apiInstance->listMediaWithHttpInfo( + self::$account_id + ); + + $this->assertEquals(200, $status_code); + $this->assertIsArray($data); + $this->assertInstanceOf(Media::class, $data[0]); + $this->assertIsString($data[0]->getContent()); + $this->assertGreaterThan(0, $data[0]->getContentLength()); + } + + /** + * Test case for getMedia + * + * Get Media. + * + */ + public function testGetMedia() + { + [$data, $status_code] = self::$apiInstance->getMediaWithHttpInfo( + self::$account_id, + self::$media_name + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(SplFileObject::class, $data); + $this->assertEquals(self::$media_data, file_get_contents($data->getRealPath())); + } + + /** + * Test case for deleteMedia + * + * Delete Media. + * + */ + public function testDeleteMedia() + { + [, $status_code] = self::$apiInstance->deleteMediaWithHttpInfo( + account_id: self::$account_id, + media_id: self::$media_name + ); + + $this->assertEquals(204, $status_code); + } + + /** + * Test case HTTP 404 + * + * Get Media 404 + * + */ + public function testGetMedia404() + { + $this->expectException(ApiException::class); + $this->expectExceptionCode(404); + + self::$apiInstance->getMediaWithHttpInfo( + account_id: self::$account_id, + media_id: 'non_existent_media' + ); + } +} diff --git a/tests/Unit/Api/MessagesApiTest.php b/tests/Unit/Api/MessagesApiTest.php new file mode 100644 index 00000000..df8fe9d1 --- /dev/null +++ b/tests/Unit/Api/MessagesApiTest.php @@ -0,0 +1,133 @@ +setUsername(getenv("BW_USERNAME")) + ->setPassword(getenv("BW_PASSWORD")); + + self::$apiInstance = new MessagesApi(config: $config); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$bw_number = getenv("BW_NUMBER"); + } + + /** + * Test case for createMessage + * + * Create Message. + * + */ + public function testCreateMessage() + { + $application_id = getenv("BW_MESSAGING_APPLICATION_ID"); + $to_number = getenv("USER_NUMBER"); + $from_number = self::$bw_number; + $text = 'python integration'; + $media = ['https://cdn2.thecatapi.com/images/MTY3ODIyMQ.jpg']; + $tag = 'python integration tag'; + $priority = PriorityEnum::_DEFAULT; + + # Message Request + $messageRequest = new MessageRequest([ + 'application_id' => $application_id, + 'to' => [$to_number], + 'from' => $from_number, + 'text' => $text, + 'media' => $media, + 'tag' => $tag, + 'priority' => $priority, + ]); + + [$data, $status_code] = self::$apiInstance->createMessageWithHttpInfo(self::$account_id, $messageRequest); + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(Message::class, $data); + $this->assertEquals(29, \strlen($data->getId())); + $this->assertEquals($from_number, $data->getOwner()); + $this->assertEquals([$to_number], $data->getTo()); + $this->assertEquals($from_number, $data->getFrom()); + $this->assertEquals($text, $data->getText()); + $this->assertEquals($tag, $data->getTag()); + $this->assertEquals($priority, $data->getPriority()); + } + + /** + * Test case for listMessages + * + * List Messages. + * + */ + public function testListMessages() + { + $list_message_direction = ListMessageDirectionEnum::OUTBOUND; + $calling_number_country_a3 = 'USA'; + + [$data, $status_code] = self::$apiInstance->listMessagesWithHttpInfo( + account_id: self::$account_id, + message_direction: $list_message_direction, + calling_number_country_a3: $calling_number_country_a3 + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(MessagesList::class, $data); + $this->assertInstanceOf(ListMessageItem::class, $data->getMessages()[0]); + $this->assertEquals(self::$account_id, $data->getMessages()[0]->getAccountId()); + $this->assertEquals(29, \strlen($data->getMessages()[0]->getMessageId())); + $this->assertEquals($list_message_direction, $data->getMessages()[0]->getMessageDirection()); + $this->assertEquals($calling_number_country_a3, $data->getMessages()[0]->getCallingNumberCountryA3()); + } +} diff --git a/tests/Unit/Api/MultiChannelApiTest.php b/tests/Unit/Api/MultiChannelApiTest.php new file mode 100644 index 00000000..cdc52d9d --- /dev/null +++ b/tests/Unit/Api/MultiChannelApiTest.php @@ -0,0 +1,509 @@ +setUsername(getenv("BW_USERNAME")) + ->setPassword(getenv("BW_PASSWORD")); + + self::$apiInstance = new MultiChannelApi(config: $config); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$expiration = (new \DateTime('@' . strtotime('+1 minute'))) + ->setTimezone(new \DateTimeZone('UTC')); + self::$bw_number = getenv("BW_NUMBER"); + self::$user_number = getenv("USER_NUMBER"); + self::$bw_messaging_application_id = getenv("BW_MESSAGING_APPLICATION_ID"); + } + + /** + * Test case for createMultiChannelMessage + * + * Create Multi-Channel SMS Message. + * + */ + public function testCreateMultiChannelSMSMessage() + { + $content = new SmsMessageContent(['text' => 'Hello World']); + + $channel_list_object = new MultiChannelChannelListSMSObject([ + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'channel' => MultiChannelMessageChannelEnum::SMS, + 'content' => $content + ]); + + $multi_channel_message_request = new MultiChannelMessageRequest([ + 'to' => self::$user_number, + 'tag' => "tag", + 'priority' => PriorityEnum::HIGH, + 'expiration' => self::$expiration, + 'channel_list' => [$channel_list_object] + ]); + + [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( + self::$account_id, + $multi_channel_message_request + ); + + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertIsArray($data->getErrors()); + $this->assertIsString($data->getData()->getId()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); + $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); + $this->assertEquals([self::$user_number], $data->getData()->getTo()); + $this->assertEquals("tag", $data->getData()->getTag()); + $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); + $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); + $this->assertIsArray($data->getData()->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListSMSResponseObject::class, $data->getData()->getChannelList()[0]); + $this->assertEquals(MultiChannelMessageChannelEnum::SMS, $data->getData()->getChannelList()[0]->getChannel()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); + $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); + $this->assertInstanceOf(SmsMessageContent::class, $data->getData()->getChannelList()[0]->getContent()); + $this->assertIsString($data->getData()->getChannelList()[0]->getContent()->getText()); + } + + /** + * Test case for createMultiChannelMessage + * + * Create Multi-Channel MMS Message. + * + */ + public function testCreateMultiChannelMMSMessage() + { + $content = new MmsMessageContent([ + 'text' => 'Hello World!', + 'media' => [ + new MmsMessageContentFile(['file_url' => 'https://www.example.com/image.png']) + ] + ]); + + $channel_list_object = new MultiChannelChannelListMMSObject([ + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'channel' => MultiChannelMessageChannelEnum::MMS, + 'content' => $content + ]); + + $multi_channel_message_request = new MultiChannelMessageRequest([ + 'to' => self::$user_number, + 'tag' => "tag", + 'priority' => PriorityEnum::HIGH, + 'expiration' => self::$expiration, + 'channel_list' => [$channel_list_object] + ]); + + [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( + self::$account_id, + $multi_channel_message_request + ); + + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertIsArray($data->getErrors()); + $this->assertIsString($data->getData()->getId()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); + $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); + $this->assertEquals([self::$user_number], $data->getData()->getTo()); + $this->assertEquals("tag", $data->getData()->getTag()); + $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); + $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); + $this->assertIsArray($data->getData()->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListMMSResponseObject::class, $data->getData()->getChannelList()[0]); + $this->assertEquals(MultiChannelMessageChannelEnum::MMS, $data->getData()->getChannelList()[0]->getChannel()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); + $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); + $this->assertInstanceOf(MmsMessageContent::class, $data->getData()->getChannelList()[0]->getContent()); + $this->assertIsString($data->getData()->getChannelList()[0]->getContent()->getText()); + $this->assertIsArray($data->getData()->getChannelList()[0]->getContent()->getMedia()); + $this->assertInstanceOf(MmsMessageContentFile::class, $data->getData()->getChannelList()[0]->getContent()->getMedia()[0]); + $this->assertIsString($data->getData()->getChannelList()[0]->getContent()->getMedia()[0]->getFileUrl()); + } + + /** + * Test case for createMultiChannelMessage + * + * Create Multi-Channel RMB Text Message. + * + */ + public function testCreateMultiChannelRMBTextMessage() + { + $content = new RbmMessageContentText([ + 'text' => 'Hello World!', + 'suggestions' => [ + new RbmActionDial([ + 'type' => RbmActionTypeEnum::DIAL_PHONE, + 'text' => 'Call Us', + 'postback_data' => base64_encode('postback data'), + 'phone_number' => self::$bw_number + ]) + ] + ]); + + $channel_list_object = new MultiChannelChannelListRBMObject([ + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => $content + ]); + + $multi_channel_message_request = new MultiChannelMessageRequest([ + 'to' => self::$user_number, + 'tag' => "tag", + 'priority' => PriorityEnum::HIGH, + 'expiration' => self::$expiration, + 'channel_list' => [$channel_list_object] + ]); + + [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( + self::$account_id, + $multi_channel_message_request + ); + + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertIsArray($data->getErrors()); + $this->assertIsString($data->getData()->getId()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); + $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); + $this->assertEquals([self::$user_number], $data->getData()->getTo()); + $this->assertEquals("tag", $data->getData()->getTag()); + $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); + $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); + $this->assertIsArray($data->getData()->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, $data->getData()->getChannelList()[0]); + $this->assertEquals(MultiChannelMessageChannelEnum::RBM, $data->getData()->getChannelList()[0]->getChannel()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); + $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); + $this->assertInstanceOf(RbmMessageContentText::class, $data->getData()->getChannelList()[0]->getContent()); + $rbm_content = $data->getData()->getChannelList()[0]->getContent(); + $this->assertIsString($rbm_content->getText()); + $this->assertIsArray($rbm_content->getSuggestions()); + $this->assertInstanceOf(RbmActionDial::class, $rbm_content->getSuggestions()[0]); + $rbm_action_dial = $rbm_content->getSuggestions()[0]; + $this->assertEquals(RbmActionTypeEnum::DIAL_PHONE, $rbm_action_dial->getType()); + $this->assertIsString($rbm_action_dial->getText()); + $this->assertIsString($rbm_action_dial->getPostbackData()); + $this->assertIsString($rbm_action_dial->getPhoneNumber()); + } + + /** + * Test case for createMultiChannelMessage + * + * Create Multi-Channel RBM Media Message. + * + */ + public function testCreateMultiChannelRBMMediaMessage() + { + $content = new RbmMessageMedia([ + 'media' => [ + new RbmMessageContentFile([ + 'file_url' => 'https://www.example.com/image1.png', + 'thumbnail_url' => 'https://www.example.com/thumbnail' + ]) + ], + 'suggestions' => [ + new RbmActionDial([ + 'type' => RbmActionTypeEnum::DIAL_PHONE, + 'text' => 'Call Us', + 'postback_data' => base64_encode('postback data'), + 'phone_number' => self::$bw_number + ]) + ] + ]); + + $channel_list_object = new MultiChannelChannelListRBMObject([ + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => $content + ]); + + $multi_channel_message_request = new MultiChannelMessageRequest([ + 'to' => self::$user_number, + 'tag' => "tag", + 'priority' => PriorityEnum::HIGH, + 'expiration' => self::$expiration, + 'channel_list' => [$channel_list_object] + ]); + + [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( + self::$account_id, + $multi_channel_message_request + ); + + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertIsArray($data->getErrors()); + $this->assertIsString($data->getData()->getId()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); + $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); + $this->assertEquals([self::$user_number], $data->getData()->getTo()); + $this->assertEquals("tag", $data->getData()->getTag()); + $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); + $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); + $this->assertIsArray($data->getData()->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, $data->getData()->getChannelList()[0]); + $this->assertEquals(MultiChannelMessageChannelEnum::RBM, $data->getData()->getChannelList()[0]->getChannel()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); + $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); + $this->assertInstanceOf(RbmMessageMedia::class, $data->getData()->getChannelList()[0]->getContent()); + $rbm_content = $data->getData()->getChannelList()[0]->getContent(); + $this->assertIsArray($rbm_content->getMedia()); + $this->assertInstanceOf(RbmMessageContentFile::class, $rbm_content->getMedia()[0]); + $this->assertIsString($rbm_content->getMedia()[0]->getFileUrl()); + $this->assertIsString($rbm_content->getMedia()[0]->getThumbnailUrl()); + $this->assertIsArray($rbm_content->getSuggestions()); + $this->assertInstanceOf(RbmActionDial::class, $rbm_content->getSuggestions()[0]); + $rbm_action_dial = $rbm_content->getSuggestions()[0]; + $this->assertEquals(RbmActionTypeEnum::DIAL_PHONE, $rbm_action_dial->getType()); + $this->assertIsString($rbm_action_dial->getText()); + $this->assertIsString($rbm_action_dial->getPostbackData()); + $this->assertIsString($rbm_action_dial->getPhoneNumber()); + } + + /** + * Test case for createMultiChannelMessage + * + * Create Multi-Channel RBM Rich Standalone Message. + * + */ + public function testCreateMultiChannelRMBRichStandaloneMessage() + { + $content = new RbmStandaloneCard([ + 'orientation' => StandaloneCardOrientationEnum::HORIZONTAL, + 'thumbnail_image_alignment' => ThumbnailAlignmentEnum::LEFT, + 'card_content' => new RbmCardContent([ + 'title' => 'Test Title' + ]) + ]); + + $channel_list_object = new MultiChannelChannelListRBMObject([ + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => $content + ]); + + $multi_channel_message_request = new MultiChannelMessageRequest([ + 'to' => self::$user_number, + 'tag' => "tag", + 'priority' => PriorityEnum::HIGH, + 'expiration' => self::$expiration, + 'channel_list' => [$channel_list_object] + ]); + + [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( + self::$account_id, + $multi_channel_message_request + ); + + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertIsArray($data->getErrors()); + $this->assertIsString($data->getData()->getId()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); + $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); + $this->assertEquals([self::$user_number], $data->getData()->getTo()); + $this->assertEquals("tag", $data->getData()->getTag()); + $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); + $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); + $this->assertIsArray($data->getData()->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, $data->getData()->getChannelList()[0]); + $this->assertEquals(MultiChannelMessageChannelEnum::RBM, $data->getData()->getChannelList()[0]->getChannel()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); + $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); + $this->assertInstanceOf(RbmStandaloneCard::class, $data->getData()->getChannelList()[0]->getContent()); + $rbm_card = $data->getData()->getChannelList()[0]->getContent(); + $this->assertEquals(StandaloneCardOrientationEnum::HORIZONTAL, $rbm_card->getOrientation()); + $this->assertEquals(ThumbnailAlignmentEnum::LEFT, $rbm_card->getThumbnailImageAlignment()); + $this->assertInstanceOf(RbmCardContent::class, $rbm_card->getCardContent()); + $this->assertIsString($rbm_card->getCardContent()->getTitle()); + } + + /** + * Test case for createMultiChannelMessage + * + * Create Multi-Channel RBM RichCarousel Message. + * + */ + public function testCreateMultiChannelRMBRichCarouselMessage() + { + $content = new RbmMessageCarouselCard([ + 'card_width' => CardWidthEnum::MEDIUM, + 'card_contents' => [ + new RbmCardContent([ + 'title' => 'Card 1 Title', + 'description' => 'Card 1 Description', + 'media' => new RbmCardContentMedia([ + 'file_url' => 'https://www.example.com/image1.png', + 'thumbnail_url' => 'https://www.example.com/thumbnail', + 'height' => RbmMediaHeightEnum::TALL + ]), + 'suggestions' => [ + new RbmActionDial([ + 'type' => RbmActionTypeEnum::DIAL_PHONE, + 'text' => 'Call Us', + 'postback_data' => base64_encode('postback data'), + 'phone_number' => self::$bw_number + ]) + ] + ]), + new RbmCardContent([ + 'title' => 'Card 2 Title' + ]) + ] + ]); + + $channel_list_object = new MultiChannelChannelListRBMObject([ + 'from' => self::$bw_number, + 'application_id' => self::$bw_messaging_application_id, + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => $content + ]); + + $multi_channel_message_request = new MultiChannelMessageRequest([ + 'to' => self::$user_number, + 'tag' => "tag", + 'priority' => PriorityEnum::HIGH, + 'expiration' => self::$expiration, + 'channel_list' => [$channel_list_object] + ]); + + [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( + self::$account_id, + $multi_channel_message_request + ); + + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertIsArray($data->getErrors()); + $this->assertIsString($data->getData()->getId()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); + $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); + $this->assertEquals([self::$user_number], $data->getData()->getTo()); + $this->assertEquals("tag", $data->getData()->getTag()); + $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); + $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); + $this->assertIsArray($data->getData()->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, $data->getData()->getChannelList()[0]); + $this->assertEquals(MultiChannelMessageChannelEnum::RBM, $data->getData()->getChannelList()[0]->getChannel()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); + $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); + $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); + $this->assertInstanceOf(RbmMessageCarouselCard::class, $data->getData()->getChannelList()[0]->getContent()); + $rbm_card = $data->getData()->getChannelList()[0]->getContent(); + $this->assertEquals(CardWidthEnum::MEDIUM, $rbm_card->getCardWidth()); + $this->assertIsArray($rbm_card->getCardContents()); + $this->assertInstanceOf(RbmCardContent::class, $rbm_card->getCardContents()[0]); + $card1 = $rbm_card->getCardContents()[0]; + $this->assertIsString($card1->getTitle()); + $this->assertIsString($card1->getDescription()); + $this->assertInstanceOf(RbmCardContentMedia::class, $card1->getMedia()); + $media = $card1->getMedia(); + $this->assertIsString($media->getFileUrl()); + $this->assertIsString($media->getThumbnailUrl()); + $this->assertEquals(RbmMediaHeightEnum::TALL, $media->getHeight()); + $this->assertIsArray($card1->getSuggestions()); + $this->assertInstanceOf(RbmActionDial::class, $card1->getSuggestions()[0]); + $rbm_action_dial = $card1->getSuggestions()[0]; + $this->assertEquals(RbmActionTypeEnum::DIAL_PHONE, $rbm_action_dial->getType()); + $this->assertIsString($rbm_action_dial->getText()); + $this->assertIsString($rbm_action_dial->getPostbackData()); + $this->assertIsString($rbm_action_dial->getPhoneNumber()); + $this->assertInstanceOf(RbmCardContent::class, $rbm_card->getCardContents()[1]); + $card2 = $rbm_card->getCardContents()[1]; + $this->assertIsString($card2->getTitle()); + } +} diff --git a/tests/Unit/Api/PhoneNumberLookupApiTest.php b/tests/Unit/Api/PhoneNumberLookupApiTest.php new file mode 100644 index 00000000..ab524d5c --- /dev/null +++ b/tests/Unit/Api/PhoneNumberLookupApiTest.php @@ -0,0 +1,155 @@ +setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); + + self::$apiInstance = new PhoneNumberLookupApi(config: $config); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$phone_numbers = [ + getenv("BW_NUMBER"), + getenv("VZW_NUMBER"), + getenv("ATT_NUMBER"), + getenv("T_MOBILE_NUMBER") + ]; + } + + /** + * Test case for createSyncLookup + * + * Create Synchronous Number Lookup. + * + */ + public function testCreateSyncLookup() + { + $lookup_request = new SyncLookupRequest(['phone_numbers' => self::$phone_numbers]); + + [$data, $status_code] = self::$apiInstance->createSyncLookupWithHttpInfo( + self::$account_id, + $lookup_request + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(CreateSyncLookupResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertInstanceOf(CreateSyncLookupResponseData::class, $data->getData()); + $this->assertIsString($data->getData()->getRequestId()); + $this->assertInstanceOf(CompletedLookupStatusEnum::class, $data->getData()->getStatus()); + $this->assertIsArray($data->getData()->getResults()); + $first_result = $data->getData()->getResults()[0]; + $this->assertInstanceOf(LookupResult::class, $first_result); + $this->assertIsString($first_result->getPhoneNumber()); + $this->assertInstanceOf(LineTypeEnum::class, $first_result->getLineType()); + $this->assertIsString($first_result->getVoiceProvider()); + $this->assertIsString($first_result->getCountryCodeA3()); + } + + /** + * Test case for getAsyncBulkLookup + * + * Get Asynchronous Bulk Number Lookup. + * + */ + public function testCreateGetAsyncBulkLookup() + { + $lookup_request = new AsyncLookupRequest(['phone_numbers' => self::$phone_numbers]); + + [$create_data, $create_status_code] = self::$apiInstance->createAsyncBulkLookupWithHttpInfo( + self::$account_id, + $lookup_request + ); + + $this->assertEquals(202, $create_status_code); + $this->assertInstanceOf(CreateAsyncBulkLookupResponse::class, $create_data); + $this->assertInstanceOf(CreateAsyncBulkLookupResponseData::class, $create_data->getData()); + $this->assertIsString($create_data->getData()->getRequestId()); + $this->assertInstanceOf(InProgressLookupStatusEnum::class, $create_data->getData()->getStatus()); + + self::$request_id = $create_data->getData()->getRequestId(); + + sleep(60); + + [$get_data, $get_status_code] = self::$apiInstance->getAsyncBulkLookupWithHttpInfo( + self::$account_id, + self::$request_id + ); + + $this->assertEquals(200, $get_status_code); + $this->assertInstanceOf(GetAsyncBulkLookupResponse::class, $get_data); + $this->assertIsArray($get_data->getLinks()); + $this->assertInstanceOf(GetAsyncBulkLookupResponseData::class, $get_data->getData()); + $this->assertEquals(self::$request_id, $get_data->getData()->getRequestId()); + $this->assertInstanceOf(InProgressLookupStatusEnum::class, $get_data->getData()->getStatus()); + $this->assertIsArray($get_data->getData()->getResults()); + $first_result = $get_data->getData()->getResults()[0]; + $this->assertInstanceOf(LookupResult::class, $first_result); + $this->assertIsString($first_result->getPhoneNumber()); + $this->assertInstanceOf(LineTypeEnum::class, $first_result->getLineType()); + $this->assertIsString($first_result->getVoiceProvider()); + $this->assertIsString($first_result->getCountryCodeA3()); + } +} diff --git a/tests/Unit/Api/RecordingsApiTest.php b/tests/Unit/Api/RecordingsApiTest.php new file mode 100644 index 00000000..50d61855 --- /dev/null +++ b/tests/Unit/Api/RecordingsApiTest.php @@ -0,0 +1,228 @@ +setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); + + self::$callsApi = new CallsApi(config: $config); + self::$recordingsApi = new RecordingsApi(config: $config); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$answer_url = getenv("MANTECA_BASE_URL") . "/bxml/startLongRecording"; + } + + /** + * Ensure the call is hung up after the suite + */ + public static function tearDownAfterClass(): void + { + CallCleanup::cleanup(self::$callsApi, self::$account_id, [self::$call_id]); + } + + /** + * Test case for the full call recording and transcription lifecycle. + * + */ + public function testCallRecordingAndTranscription() + { + $os = getenv("OPERATING_SYSTEM"); + $language = "PHP" . phpversion() . "_" . getenv("DISTRIBUTION"); + self::$test_id = Manteca::createTest($os, $language, "CALL"); + + $create_call_body = new CreateCall([ + 'to' => getenv("MANTECA_IDLE_NUMBER"), + 'from' => getenv("MANTECA_ACTIVE_NUMBER"), + 'application_id' => getenv("MANTECA_APPLICATION_ID"), + 'answer_url' => self::$answer_url, + 'tag' => self::$test_id + ]); + + [$create_data] = self::$callsApi->createCallWithHttpInfo(self::$account_id, $create_call_body); + self::$call_id = $create_data->getCallId(); + + // Pause recording + sleep(self::TEST_SLEEP * 2); + [, $pause_status_code] = self::$recordingsApi->updateCallRecordingStateWithHttpInfo( + self::$account_id, + self::$call_id, + new UpdateCallRecording(['state' => RecordingStateEnum::PAUSED]) + ); + $this->assertEquals(200, $pause_status_code); + + // Resume recording + sleep(self::TEST_SLEEP); + [, $resume_status_code] = self::$recordingsApi->updateCallRecordingStateWithHttpInfo( + self::$account_id, + self::$call_id, + new UpdateCallRecording(['state' => RecordingStateEnum::RECORDING]) + ); + $this->assertEquals(200, $resume_status_code); + + // Terminate the call + [, $update_call_status_code] = self::$callsApi->updateCallWithHttpInfo( + self::$account_id, + self::$call_id, + new UpdateCall(['state' => CallStateEnum::COMPLETED]) + ); + $this->assertEquals(200, $update_call_status_code); + + // Poll Manteca until the call has been recorded + $recording_status = false; + for ($x = 0; $x < self::MAX_RETRIES && !$recording_status; $x++) { + sleep(self::TEST_SLEEP); + $recording_status = Manteca::getStatus(self::$test_id)['callRecorded'] ?? false; + } + $this->assertTrue($recording_status); + + // Validate the recording metadata endpoints + [$list_data, $list_status_code] = self::$recordingsApi->listCallRecordingsWithHttpInfo( + self::$account_id, + self::$call_id + ); + $this->assertEquals(200, $list_status_code); + self::$recording_id = $list_data[0]->getRecordingId(); + + [$get_data, $get_status_code] = self::$recordingsApi->getCallRecordingWithHttpInfo( + self::$account_id, + self::$call_id, + self::$recording_id + ); + $this->assertEquals(200, $get_status_code); + $this->assertInstanceOf(CallRecordingMetadata::class, $get_data); + + // Request a transcription; pass the tag to receive the Manteca callback + $transcribe_recording = new TranscribeRecording([ + 'callback_url' => getenv("MANTECA_BASE_URL") . "/transcriptions", + 'tag' => self::$test_id + ]); + [, $transcribe_status_code] = self::$recordingsApi->transcribeCallRecordingWithHttpInfo( + self::$account_id, + self::$call_id, + self::$recording_id, + $transcribe_recording + ); + $this->assertEquals(204, $transcribe_status_code); + + // Poll Manteca until the call has been transcribed + $transcription_status = false; + for ($i = 0; $i < self::MAX_RETRIES && !$transcription_status; $i++) { + sleep(self::TEST_SLEEP); + $transcription_status = Manteca::getStatus(self::$test_id)['callTranscribed'] ?? false; + } + $this->assertTrue($transcription_status); + + // Validate the transcription metadata endpoint + [$transcription_data, $transcription_get_status_code] = self::$recordingsApi->getRecordingTranscriptionWithHttpInfo( + self::$account_id, + self::$call_id, + self::$recording_id + ); + $this->assertEquals(200, $transcription_get_status_code); + $this->assertInstanceOf(RecordingTranscriptions::class, $transcription_data); + + // Delete transcription + [, $delete_transcription_status_code] = self::$recordingsApi->deleteRecordingTranscriptionWithHttpInfo( + self::$account_id, + self::$call_id, + self::$recording_id + ); + $this->assertEquals(204, $delete_transcription_status_code); + + // Delete recording media + [, $delete_media_status_code] = self::$recordingsApi->deleteRecordingMediaWithHttpInfo( + self::$account_id, + self::$call_id, + self::$recording_id + ); + $this->assertEquals(204, $delete_media_status_code); + + // Delete recording metadata + [, $delete_recording_status_code] = self::$recordingsApi->deleteRecordingWithHttpInfo( + self::$account_id, + self::$call_id, + self::$recording_id + ); + $this->assertEquals(204, $delete_recording_status_code); + } + + /** + * Test case for listAccountCallRecordings + * + * Get Call Recordings. + * + */ + public function testListAccountCallRecordings() + { + [, $status_code] = self::$recordingsApi->listAccountCallRecordingsWithHttpInfo(self::$account_id); + + $this->assertEquals(200, $status_code); + } +} diff --git a/tests/Unit/Api/StatisticsApiTest.php b/tests/Unit/Api/StatisticsApiTest.php new file mode 100644 index 00000000..8b9935b0 --- /dev/null +++ b/tests/Unit/Api/StatisticsApiTest.php @@ -0,0 +1,77 @@ +setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); + + self::$apiInstance = new StatisticsApi(config: $config); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + } + + /** + * Test case for getStatistics + * + * Get Account Statistics. + * + */ + public function testGetStatistics() + { + [$data, $status_code] = self::$apiInstance->getStatisticsWithHttpInfo(self::$account_id); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(AccountStatistics::class, $data); + $this->assertIsInt($data->getCurrentCallQueueSize()); + $this->assertIsInt($data->getMaxCallQueueSize()); + } +} diff --git a/tests/Unit/Api/TollFreeVerificationApiTest.php b/tests/Unit/Api/TollFreeVerificationApiTest.php new file mode 100644 index 00000000..bdc97e46 --- /dev/null +++ b/tests/Unit/Api/TollFreeVerificationApiTest.php @@ -0,0 +1,167 @@ +setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); + + self::$apiInstance = new TollFreeVerificationApi(config: $config); + } + + /** + * Test case for createWebhookSubscription + * + * Create Webhook Subscription. + * + */ + public function testCreateWebhookSubscription() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for deleteVerificationRequest + * + * Delete a Toll-Free Verification Submission. + * + */ + public function testDeleteVerificationRequest() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for deleteWebhookSubscription + * + * Delete Webhook Subscription. + * + */ + public function testDeleteWebhookSubscription() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for getTollFreeVerificationStatus + * + * Get Toll-Free Verification Status. + * + */ + public function testGetTollFreeVerificationStatus() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for listTollFreeUseCases + * + * List Toll-Free Use Cases. + * + */ + public function testListTollFreeUseCases() + { + [$data, $status_code] = self::$apiInstance->listTollFreeUseCasesWithHttpInfo(); + + $this->assertEquals(200, $status_code); + $this->assertIsArray($data); + } + + /** + * Test case for listWebhookSubscriptions + * + * List Webhook Subscriptions. + * + */ + public function testListWebhookSubscriptions() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for requestTollFreeVerification + * + * Request Toll-Free Verification. + * + */ + public function testRequestTollFreeVerification() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for updateTollFreeVerificationRequest + * + * Update Toll-Free Verification Request. + * + */ + public function testUpdateTollFreeVerificationRequest() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } + + /** + * Test case for updateWebhookSubscription + * + * Update Webhook Subscription. + * + */ + public function testUpdateWebhookSubscription() + { + // TODO: implement + self::markTestIncomplete('Not implemented'); + } +} diff --git a/tests/Unit/Api/TranscriptionsApiTest.php b/tests/Unit/Api/TranscriptionsApiTest.php new file mode 100644 index 00000000..84ad0786 --- /dev/null +++ b/tests/Unit/Api/TranscriptionsApiTest.php @@ -0,0 +1,158 @@ +This is a bxml start transcription test.Ideally this part is being transcribed.'; + + /** + * Setup before running any test cases + */ + public static function setUpBeforeClass(): void + { + $config = Configuration::getDefaultConfiguration() + ->setClientId(getenv("BW_CLIENT_ID")) + ->setClientSecret(getenv("BW_CLIENT_SECRET")); + + self::$callsApi = new CallsApi(config: $config); + self::$transcriptionsApi = new TranscriptionsApi(config: $config); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + self::$manteca_answer_url = getenv("MANTECA_BASE_URL") . "/bxml/pause"; + } + + /** + * Test case for listRealTimeTranscriptions, getRealTimeTranscription, deleteRealTimeTranscription + * + * Create a transcribed call, then list, get, and delete its real-time transcriptions. + * + */ + public function testGetAndDeleteRealTimeTranscriptions() + { + self::markTestSkipped('issue with PV API, can re-enable when fixed'); + + // Create a call, start transcription via BXML, and complete it so there is + // a transcription to exercise the endpoints below. + $create_call_body = new CreateCall([ + 'from' => getenv("MANTECA_ACTIVE_NUMBER"), + 'to' => getenv("MANTECA_IDLE_NUMBER"), + 'application_id' => getenv("MANTECA_APPLICATION_ID"), + 'answer_url' => self::$manteca_answer_url + ]); + + [$create_data, $create_status_code] = self::$callsApi->createCallWithHttpInfo( + self::$account_id, + $create_call_body + ); + $this->assertEquals(201, $create_status_code); + $call_id = $create_data->getCallId(); + + // Redirect the call to start transcription + sleep(self::TEST_SLEEP); + [, $update_status_code] = self::$callsApi->updateCallBxmlWithHttpInfo( + self::$account_id, + $call_id, + self::$bxml_body + ); + $this->assertEquals(204, $update_status_code); + + // Complete the call + sleep(self::TEST_SLEEP); + [, $complete_status_code] = self::$callsApi->updateCallWithHttpInfo( + self::$account_id, + $call_id, + new UpdateCall(['state' => CallStateEnum::COMPLETED]) + ); + $this->assertEquals(200, $complete_status_code); + + // List the real-time transcriptions + sleep(self::TEST_SLEEP_LONG); + [$list_data, $list_status_code] = self::$transcriptionsApi->listRealTimeTranscriptionsWithHttpInfo( + self::$account_id, + $call_id + ); + $this->assertEquals(200, $list_status_code); + $this->assertIsString($list_data[0]->getTranscriptionId()); + $this->assertIsString($list_data[0]->getTranscriptionName()); + $this->assertIsString($list_data[0]->getTranscriptionUrl()); + + $transcription_id = $list_data[0]->getTranscriptionId(); + + // Get the real-time transcription + sleep(self::TEST_SLEEP); + [$get_data, $get_status_code] = self::$transcriptionsApi->getRealTimeTranscriptionWithHttpInfo( + self::$account_id, + $call_id, + $transcription_id + ); + $this->assertEquals(200, $get_status_code); + $this->assertInstanceOf(CallTranscriptionResponse::class, $get_data); + $this->assertIsString($get_data->getTranscriptionId()); + $this->assertInstanceOf(CallTranscription::class, $get_data->getTracks()[0]); + $this->assertInstanceOf(CallTranscriptionTrackEnum::class, $get_data->getTracks()[0]->getTrack()); + $this->assertIsString($get_data->getTracks()[0]->getTranscript()); + $this->assertEquals(0.0, $get_data->getTracks()[0]->getConfidence()); + + // Delete the real-time transcription + // NOTE: this should be 204, but there is currently an API bug tracked in VAPI-1863 + [, $delete_status_code] = self::$transcriptionsApi->deleteRealTimeTranscriptionWithHttpInfo( + self::$account_id, + $call_id, + $transcription_id + ); + $this->assertEquals(200, $delete_status_code); + } +} From ba50fe0c492c147111e9300995639e0ccd2186b0 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 18 Aug 2026 11:45:20 -0400 Subject: [PATCH 24/53] update pr test wf --- .github/workflows/test-pr.yml | 51 +++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 43 ----------------------------- 2 files changed, 51 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/test-pr.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml new file mode 100644 index 00000000..38c8acf7 --- /dev/null +++ b/.github/workflows/test-pr.yml @@ -0,0 +1,51 @@ +name: Test PR + +on: + pull_request: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + +env: + BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }} + BW_USERNAME: ${{ secrets.BW_USERNAME }} + BW_PASSWORD: ${{ secrets.BW_PASSWORD }} + BW_CLIENT_ID: ${{ secrets.BW_CLIENT_ID }} + BW_CLIENT_SECRET: ${{ secrets.BW_CLIENT_SECRET }} + BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }} + BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }} + BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }} + BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }} + BW_NUMBER: ${{ secrets.BW_NUMBER }} + USER_NUMBER: ${{ secrets.USER_NUMBER }} + BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }} + MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }} + MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }} + MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }} + MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }} + +jobs: + test: + name: Test PR + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-2022, windows-2025, ubuntu-22.04, ubuntu-24.04] + php-version: [8.2, 8.3, 8.4, 8.5] + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + + - name: Install Packages and Test + run: | + npm install -g @stoplight/prism-cli + composer install + prism mock ./bandwidth.yml & ./vendor/bin/phpunit tests/Unit diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 669c386a..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Test - -on: - schedule: - - cron: "0 4 * * *" - pull_request: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref }} - cancel-in-progress: true - -jobs: - test: - name: Test - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [windows-2022, windows-2025, ubuntu-22.04, ubuntu-24.04] - php-version: [8.0, 8.1, 8.2, 8.3, 8.4] - steps: - - name: Checkout - uses: actions/checkout@v5 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-version }} - - - name: Install Packages - run: composer install - - - name: Test - env: - BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }} - BW_USERNAME: ${{ secrets.BW_USERNAME }} - BW_PASSWORD: ${{ secrets.BW_PASSWORD }} - BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }} - BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }} - BW_NUMBER: ${{ secrets.BW_NUMBER }} - USER_NUMBER: ${{ secrets.USER_NUMBER }} - BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }} - run: ./vendor/bin/phpunit tests From c7d209a69c2f6a86b96a4390ba5c93443b1d8319 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 18 Aug 2026 11:46:55 -0400 Subject: [PATCH 25/53] add smoke test wf --- .github/workflows/test-smoke.yml | 88 ++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 .github/workflows/test-smoke.yml diff --git a/.github/workflows/test-smoke.yml b/.github/workflows/test-smoke.yml new file mode 100644 index 00000000..44550a5d --- /dev/null +++ b/.github/workflows/test-smoke.yml @@ -0,0 +1,88 @@ +name: Smoke Tests + +on: + schedule: + - cron: "0 4 * * *" + pull_request: + paths: + - "spec/smoke/*" + - ".github/workflows/test-smoke.yml" + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + +env: + BW_USERNAME: ${{ secrets.BW_USERNAME }} + BW_PASSWORD: ${{ secrets.BW_PASSWORD }} + BW_CLIENT_ID: ${{ secrets.BW_CLIENT_ID }} + BW_CLIENT_SECRET: ${{ secrets.BW_CLIENT_SECRET }} + BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }} + BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }} + USER_NUMBER: ${{ secrets.USER_NUMBER }} + BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }} + MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }} + +jobs: + test: + name: Smoke Test + runs-on: ubuntu-latest + env: + BW_NUMBER: ${{ secrets.BW_NUMBER }} + BW_ACCOUNT_ID: ${{ secrets.BW_ACCOUNT_ID }} + BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }} + BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }} + MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_ACTIVE_NUMBER }} + MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_IDLE_NUMBER }} + MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_APPLICATION_ID }} + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.5 + + - name: Install Packages and Test + run: | + composer install + ./vendor/bin/phpunit tests/Smoke + + test_up: + name: Smoke Test UP Account + runs-on: ubuntu-latest + env: + BW_NUMBER: ${{ secrets.BW_UP_NUMBER }} + BW_ACCOUNT_ID: ${{ secrets.BW_UP_ACCOUNT_ID }} + BW_VOICE_APPLICATION_ID: ${{ secrets.BW_UP_VOICE_APPLICATION_ID }} + BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_UP_MESSAGING_APPLICATION_ID }} + MANTECA_ACTIVE_NUMBER: ${{ secrets.MANTECA_UP_ACTIVE_NUMBER }} + MANTECA_IDLE_NUMBER: ${{ secrets.MANTECA_UP_IDLE_NUMBER }} + MANTECA_APPLICATION_ID: ${{ secrets.MANTECA_UP_APPLICATION_ID }} + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: 8.5 + + - name: Install Packages and Test + run: | + composer install + ./vendor/bin/phpunit tests/Smoke + + notify_for_failures: + name: Notify for Failures + needs: [test, test_up] + if: failure() + runs-on: ubuntu-latest + steps: + - name: Notify Slack of Failures + uses: Bandwidth/build-notify-slack-action@v2 + with: + job-status: failure + slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + slack-channel: ${{ secrets.SLACK_CHANNEL }} From c5ff52420e0bc9af65e7b95451ebacc4fe1f59f5 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 18 Aug 2026 11:47:15 -0400 Subject: [PATCH 26/53] move model tests --- tests/{ => Unit}/Model/AccountStatisticsTest.php | 0 tests/{ => Unit}/Model/AdditionalDenialReasonTest.php | 0 tests/{ => Unit}/Model/AddressTest.php | 0 tests/{ => Unit}/Model/AnswerCallbackTest.php | 0 tests/{ => Unit}/Model/AsyncLookupRequestTest.php | 0 tests/{ => Unit}/Model/BlockedWebhookTest.php | 0 tests/{ => Unit}/Model/BridgeCompleteCallbackTest.php | 0 tests/{ => Unit}/Model/BridgeTargetCompleteCallbackTest.php | 0 tests/{ => Unit}/Model/BrtcErrorResponseTest.php | 0 tests/{ => Unit}/Model/BrtcErrorSourceTest.php | 0 tests/{ => Unit}/Model/BrtcErrorTest.php | 0 tests/{ => Unit}/Model/BrtcLinkTest.php | 0 tests/{ => Unit}/Model/BusinessEntityTypeEnumTest.php | 0 tests/{ => Unit}/Model/BusinessRegistrationTypeEnumTest.php | 0 tests/{ => Unit}/Model/CallDirectionEnumTest.php | 0 tests/{ => Unit}/Model/CallRecordingMetadataTest.php | 0 tests/{ => Unit}/Model/CallStateEnumTest.php | 0 tests/{ => Unit}/Model/CallStateTest.php | 0 .../Model/CallTranscriptionDetectedLanguageEnumTest.php | 0 tests/{ => Unit}/Model/CallTranscriptionMetadataTest.php | 0 tests/{ => Unit}/Model/CallTranscriptionResponseTest.php | 0 tests/{ => Unit}/Model/CallTranscriptionTest.php | 0 tests/{ => Unit}/Model/CallTranscriptionTrackEnumTest.php | 0 tests/{ => Unit}/Model/CallbackMethodEnumTest.php | 0 tests/{ => Unit}/Model/CallbackTest.php | 0 tests/{ => Unit}/Model/CardWidthEnumTest.php | 0 tests/{ => Unit}/Model/CodeRequestTest.php | 0 tests/{ => Unit}/Model/CompletedLookupStatusEnumTest.php | 0 tests/{ => Unit}/Model/ConferenceCompletedCallbackTest.php | 0 tests/{ => Unit}/Model/ConferenceCreatedCallbackTest.php | 0 tests/{ => Unit}/Model/ConferenceMemberExitCallbackTest.php | 0 tests/{ => Unit}/Model/ConferenceMemberJoinCallbackTest.php | 0 tests/{ => Unit}/Model/ConferenceMemberTest.php | 0 .../{ => Unit}/Model/ConferenceRecordingAvailableCallbackTest.php | 0 tests/{ => Unit}/Model/ConferenceRecordingMetadataTest.php | 0 tests/{ => Unit}/Model/ConferenceRedirectCallbackTest.php | 0 tests/{ => Unit}/Model/ConferenceStateEnumTest.php | 0 tests/{ => Unit}/Model/ConferenceTest.php | 0 tests/{ => Unit}/Model/ContactTest.php | 0 tests/{ => Unit}/Model/CreateAsyncBulkLookupResponseDataTest.php | 0 tests/{ => Unit}/Model/CreateAsyncBulkLookupResponseTest.php | 0 tests/{ => Unit}/Model/CreateCallResponseTest.php | 0 tests/{ => Unit}/Model/CreateCallTest.php | 0 tests/{ => Unit}/Model/CreateEndpointRequestBaseTest.php | 0 tests/{ => Unit}/Model/CreateEndpointResponseDataTest.php | 0 tests/{ => Unit}/Model/CreateEndpointResponseTest.php | 0 tests/{ => Unit}/Model/CreateMessageRequestErrorTest.php | 0 tests/{ => Unit}/Model/CreateMultiChannelMessageResponseTest.php | 0 tests/{ => Unit}/Model/CreateSyncLookupResponseDataTest.php | 0 tests/{ => Unit}/Model/CreateSyncLookupResponseTest.php | 0 tests/{ => Unit}/Model/CreateWebRtcConnectionRequestTest.php | 0 tests/{ => Unit}/Model/DeactivationEventEnumTest.php | 0 tests/{ => Unit}/Model/DeviceStatusEnumTest.php | 0 tests/{ => Unit}/Model/DeviceTest.php | 0 tests/{ => Unit}/Model/DisconnectCallbackTest.php | 0 tests/{ => Unit}/Model/DiversionTest.php | 0 tests/{ => Unit}/Model/DtmfCallbackTest.php | 0 tests/{ => Unit}/Model/EndpointDirectionEnumTest.php | 0 tests/{ => Unit}/Model/EndpointEventTest.php | 0 tests/{ => Unit}/Model/EndpointEventTypeEnumTest.php | 0 tests/{ => Unit}/Model/EndpointResponseTest.php | 0 tests/{ => Unit}/Model/EndpointStatusEnumTest.php | 0 tests/{ => Unit}/Model/EndpointTest.php | 0 tests/{ => Unit}/Model/EndpointTypeEnumTest.php | 0 tests/{ => Unit}/Model/EndpointsTest.php | 0 tests/{ => Unit}/Model/ErrorObjectTest.php | 0 tests/{ => Unit}/Model/ErrorSourceTest.php | 0 tests/{ => Unit}/Model/FailureWebhookTest.php | 0 tests/{ => Unit}/Model/FieldErrorTest.php | 0 tests/{ => Unit}/Model/FileFormatEnumTest.php | 0 tests/{ => Unit}/Model/GatherCallbackTest.php | 0 tests/{ => Unit}/Model/GetAsyncBulkLookupResponseDataTest.php | 0 tests/{ => Unit}/Model/GetAsyncBulkLookupResponseTest.php | 0 tests/{ => Unit}/Model/InProgressLookupStatusEnumTest.php | 0 tests/{ => Unit}/Model/InboundCallbackMessageTest.php | 0 tests/{ => Unit}/Model/InboundCallbackTest.php | 0 tests/{ => Unit}/Model/InboundCallbackTypeEnumTest.php | 0 tests/{ => Unit}/Model/InitiateCallbackTest.php | 0 tests/{ => Unit}/Model/LatestMessageDeliveryStatusEnumTest.php | 0 tests/{ => Unit}/Model/LineTypeEnumTest.php | 0 tests/{ => Unit}/Model/LinkSchemaTest.php | 0 tests/{ => Unit}/Model/LinkTest.php | 0 tests/{ => Unit}/Model/LinksObjectTest.php | 0 tests/{ => Unit}/Model/ListEndpointsResponseTest.php | 0 tests/{ => Unit}/Model/ListMessageDirectionEnumTest.php | 0 tests/{ => Unit}/Model/ListMessageItemTest.php | 0 tests/{ => Unit}/Model/LookupErrorResponseTest.php | 0 tests/{ => Unit}/Model/LookupErrorSchemaMetaTest.php | 0 tests/{ => Unit}/Model/LookupErrorSchemaTest.php | 0 tests/{ => Unit}/Model/LookupResultTest.php | 0 tests/{ => Unit}/Model/MachineDetectionCompleteCallbackTest.php | 0 tests/{ => Unit}/Model/MachineDetectionConfigurationTest.php | 0 tests/{ => Unit}/Model/MachineDetectionModeEnumTest.php | 0 tests/{ => Unit}/Model/MachineDetectionResultTest.php | 0 tests/{ => Unit}/Model/MediaTest.php | 0 tests/{ => Unit}/Model/MessageDirectionEnumTest.php | 0 tests/{ => Unit}/Model/MessageRequestTest.php | 0 tests/{ => Unit}/Model/MessageStatusEnumTest.php | 0 tests/{ => Unit}/Model/MessageTest.php | 0 tests/{ => Unit}/Model/MessageTypeEnumTest.php | 0 tests/{ => Unit}/Model/MessagesListTest.php | 0 tests/{ => Unit}/Model/MessagingCodeResponseTest.php | 0 tests/{ => Unit}/Model/MessagingRequestErrorTest.php | 0 tests/{ => Unit}/Model/MfaForbiddenRequestErrorTest.php | 0 tests/{ => Unit}/Model/MfaRequestErrorTest.php | 0 tests/{ => Unit}/Model/MfaUnauthorizedRequestErrorTest.php | 0 tests/{ => Unit}/Model/MmsMessageContentFileTest.php | 0 tests/{ => Unit}/Model/MmsMessageContentTest.php | 0 tests/{ => Unit}/Model/MultiChannelActionCalendarEventTest.php | 0 tests/{ => Unit}/Model/MultiChannelActionTest.php | 0 tests/{ => Unit}/Model/MultiChannelChannelListMMSObjectTest.php | 0 .../Model/MultiChannelChannelListMMSResponseObjectTest.php | 0 tests/{ => Unit}/Model/MultiChannelChannelListObjectBaseTest.php | 0 tests/{ => Unit}/Model/MultiChannelChannelListOwnerObjectTest.php | 0 .../Model/MultiChannelChannelListRBMObjectAllOfContentTest.php | 0 tests/{ => Unit}/Model/MultiChannelChannelListRBMObjectTest.php | 0 .../Model/MultiChannelChannelListRBMResponseObjectTest.php | 0 .../{ => Unit}/Model/MultiChannelChannelListRequestObjectTest.php | 0 .../Model/MultiChannelChannelListResponseObjectTest.php | 0 tests/{ => Unit}/Model/MultiChannelChannelListSMSObjectTest.php | 0 .../Model/MultiChannelChannelListSMSResponseObjectTest.php | 0 tests/{ => Unit}/Model/MultiChannelErrorTest.php | 0 tests/{ => Unit}/Model/MultiChannelMessageChannelEnumTest.php | 0 tests/{ => Unit}/Model/MultiChannelMessageContentTest.php | 0 tests/{ => Unit}/Model/MultiChannelMessageRequestTest.php | 0 tests/{ => Unit}/Model/MultiChannelMessageResponseDataTest.php | 0 tests/{ => Unit}/Model/OptInWorkflowTest.php | 0 tests/{ => Unit}/Model/PageInfoTest.php | 0 tests/{ => Unit}/Model/PageTest.php | 0 tests/{ => Unit}/Model/PriorityEnumTest.php | 0 tests/{ => Unit}/Model/ProductTypeEnumTest.php | 0 tests/{ => Unit}/Model/RbmActionBaseTest.php | 0 tests/{ => Unit}/Model/RbmActionDialTest.php | 0 tests/{ => Unit}/Model/RbmActionOpenUrlTest.php | 0 tests/{ => Unit}/Model/RbmActionTypeEnumTest.php | 0 tests/{ => Unit}/Model/RbmActionViewLocationTest.php | 0 tests/{ => Unit}/Model/RbmCardContentMediaTest.php | 0 tests/{ => Unit}/Model/RbmCardContentTest.php | 0 tests/{ => Unit}/Model/RbmLocationResponseTest.php | 0 tests/{ => Unit}/Model/RbmMediaHeightEnumTest.php | 0 tests/{ => Unit}/Model/RbmMessageCarouselCardTest.php | 0 tests/{ => Unit}/Model/RbmMessageContentFileTest.php | 0 tests/{ => Unit}/Model/RbmMessageContentRichCardTest.php | 0 tests/{ => Unit}/Model/RbmMessageContentTextTest.php | 0 tests/{ => Unit}/Model/RbmMessageMediaTest.php | 0 tests/{ => Unit}/Model/RbmOpenUrlEnumTest.php | 0 tests/{ => Unit}/Model/RbmStandaloneCardTest.php | 0 tests/{ => Unit}/Model/RbmSuggestionResponseTest.php | 0 tests/{ => Unit}/Model/RbmWebViewEnumTest.php | 0 tests/{ => Unit}/Model/RecordingAvailableCallbackTest.php | 0 tests/{ => Unit}/Model/RecordingCompleteCallbackTest.php | 0 tests/{ => Unit}/Model/RecordingStateEnumTest.php | 0 tests/{ => Unit}/Model/RecordingTranscriptionClipTest.php | 0 tests/{ => Unit}/Model/RecordingTranscriptionMetadataTest.php | 0 tests/{ => Unit}/Model/RecordingTranscriptionsTest.php | 0 tests/{ => Unit}/Model/RedirectCallbackTest.php | 0 tests/{ => Unit}/Model/RedirectMethodEnumTest.php | 0 tests/{ => Unit}/Model/SipConnectionMetadataTest.php | 0 tests/{ => Unit}/Model/SipCredentialsTest.php | 0 tests/{ => Unit}/Model/SmsMessageContentTest.php | 0 tests/{ => Unit}/Model/StandaloneCardOrientationEnumTest.php | 0 tests/{ => Unit}/Model/StatusCallbackMessageTest.php | 0 tests/{ => Unit}/Model/StatusCallbackTest.php | 0 tests/{ => Unit}/Model/StatusCallbackTypeEnumTest.php | 0 tests/{ => Unit}/Model/StirShakenTest.php | 0 tests/{ => Unit}/Model/SyncLookupRequestTest.php | 0 tests/{ => Unit}/Model/TelephoneNumberTest.php | 0 tests/{ => Unit}/Model/TfvBasicAuthenticationTest.php | 0 tests/{ => Unit}/Model/TfvCallbackStatusEnumTest.php | 0 tests/{ => Unit}/Model/TfvErrorTest.php | 0 tests/{ => Unit}/Model/TfvStatusEnumTest.php | 0 tests/{ => Unit}/Model/TfvStatusTest.php | 0 tests/{ => Unit}/Model/TfvSubmissionInfoTest.php | 0 tests/{ => Unit}/Model/TfvSubmissionWrapperTest.php | 0 tests/{ => Unit}/Model/ThumbnailAlignmentEnumTest.php | 0 tests/{ => Unit}/Model/TranscribeRecordingTest.php | 0 tests/{ => Unit}/Model/TranscriptionAvailableCallbackTest.php | 0 tests/{ => Unit}/Model/TranscriptionTest.php | 0 tests/{ => Unit}/Model/TransferAnswerCallbackTest.php | 0 tests/{ => Unit}/Model/TransferCompleteCallbackTest.php | 0 tests/{ => Unit}/Model/TransferDisconnectCallbackTest.php | 0 tests/{ => Unit}/Model/UpdateCallRecordingTest.php | 0 tests/{ => Unit}/Model/UpdateCallTest.php | 0 tests/{ => Unit}/Model/UpdateConferenceMemberTest.php | 0 tests/{ => Unit}/Model/UpdateConferenceTest.php | 0 tests/{ => Unit}/Model/VerificationDenialWebhookTest.php | 0 tests/{ => Unit}/Model/VerificationRequestTest.php | 0 tests/{ => Unit}/Model/VerificationUpdateRequestTest.php | 0 tests/{ => Unit}/Model/VerificationWebhookTest.php | 0 tests/{ => Unit}/Model/VerifyCodeRequestTest.php | 0 tests/{ => Unit}/Model/VerifyCodeResponseTest.php | 0 tests/{ => Unit}/Model/VoiceApiErrorTest.php | 0 tests/{ => Unit}/Model/VoiceCodeResponseTest.php | 0 .../Model/WebhookSubscriptionBasicAuthenticationTest.php | 0 tests/{ => Unit}/Model/WebhookSubscriptionErrorTest.php | 0 tests/{ => Unit}/Model/WebhookSubscriptionRequestSchemaTest.php | 0 tests/{ => Unit}/Model/WebhookSubscriptionTest.php | 0 tests/{ => Unit}/Model/WebhookSubscriptionTypeEnumTest.php | 0 tests/{ => Unit}/Model/WebhookSubscriptionsListBodyTest.php | 0 199 files changed, 0 insertions(+), 0 deletions(-) rename tests/{ => Unit}/Model/AccountStatisticsTest.php (100%) rename tests/{ => Unit}/Model/AdditionalDenialReasonTest.php (100%) rename tests/{ => Unit}/Model/AddressTest.php (100%) rename tests/{ => Unit}/Model/AnswerCallbackTest.php (100%) rename tests/{ => Unit}/Model/AsyncLookupRequestTest.php (100%) rename tests/{ => Unit}/Model/BlockedWebhookTest.php (100%) rename tests/{ => Unit}/Model/BridgeCompleteCallbackTest.php (100%) rename tests/{ => Unit}/Model/BridgeTargetCompleteCallbackTest.php (100%) rename tests/{ => Unit}/Model/BrtcErrorResponseTest.php (100%) rename tests/{ => Unit}/Model/BrtcErrorSourceTest.php (100%) rename tests/{ => Unit}/Model/BrtcErrorTest.php (100%) rename tests/{ => Unit}/Model/BrtcLinkTest.php (100%) rename tests/{ => Unit}/Model/BusinessEntityTypeEnumTest.php (100%) rename tests/{ => Unit}/Model/BusinessRegistrationTypeEnumTest.php (100%) rename tests/{ => Unit}/Model/CallDirectionEnumTest.php (100%) rename tests/{ => Unit}/Model/CallRecordingMetadataTest.php (100%) rename tests/{ => Unit}/Model/CallStateEnumTest.php (100%) rename tests/{ => Unit}/Model/CallStateTest.php (100%) rename tests/{ => Unit}/Model/CallTranscriptionDetectedLanguageEnumTest.php (100%) rename tests/{ => Unit}/Model/CallTranscriptionMetadataTest.php (100%) rename tests/{ => Unit}/Model/CallTranscriptionResponseTest.php (100%) rename tests/{ => Unit}/Model/CallTranscriptionTest.php (100%) rename tests/{ => Unit}/Model/CallTranscriptionTrackEnumTest.php (100%) rename tests/{ => Unit}/Model/CallbackMethodEnumTest.php (100%) rename tests/{ => Unit}/Model/CallbackTest.php (100%) rename tests/{ => Unit}/Model/CardWidthEnumTest.php (100%) rename tests/{ => Unit}/Model/CodeRequestTest.php (100%) rename tests/{ => Unit}/Model/CompletedLookupStatusEnumTest.php (100%) rename tests/{ => Unit}/Model/ConferenceCompletedCallbackTest.php (100%) rename tests/{ => Unit}/Model/ConferenceCreatedCallbackTest.php (100%) rename tests/{ => Unit}/Model/ConferenceMemberExitCallbackTest.php (100%) rename tests/{ => Unit}/Model/ConferenceMemberJoinCallbackTest.php (100%) rename tests/{ => Unit}/Model/ConferenceMemberTest.php (100%) rename tests/{ => Unit}/Model/ConferenceRecordingAvailableCallbackTest.php (100%) rename tests/{ => Unit}/Model/ConferenceRecordingMetadataTest.php (100%) rename tests/{ => Unit}/Model/ConferenceRedirectCallbackTest.php (100%) rename tests/{ => Unit}/Model/ConferenceStateEnumTest.php (100%) rename tests/{ => Unit}/Model/ConferenceTest.php (100%) rename tests/{ => Unit}/Model/ContactTest.php (100%) rename tests/{ => Unit}/Model/CreateAsyncBulkLookupResponseDataTest.php (100%) rename tests/{ => Unit}/Model/CreateAsyncBulkLookupResponseTest.php (100%) rename tests/{ => Unit}/Model/CreateCallResponseTest.php (100%) rename tests/{ => Unit}/Model/CreateCallTest.php (100%) rename tests/{ => Unit}/Model/CreateEndpointRequestBaseTest.php (100%) rename tests/{ => Unit}/Model/CreateEndpointResponseDataTest.php (100%) rename tests/{ => Unit}/Model/CreateEndpointResponseTest.php (100%) rename tests/{ => Unit}/Model/CreateMessageRequestErrorTest.php (100%) rename tests/{ => Unit}/Model/CreateMultiChannelMessageResponseTest.php (100%) rename tests/{ => Unit}/Model/CreateSyncLookupResponseDataTest.php (100%) rename tests/{ => Unit}/Model/CreateSyncLookupResponseTest.php (100%) rename tests/{ => Unit}/Model/CreateWebRtcConnectionRequestTest.php (100%) rename tests/{ => Unit}/Model/DeactivationEventEnumTest.php (100%) rename tests/{ => Unit}/Model/DeviceStatusEnumTest.php (100%) rename tests/{ => Unit}/Model/DeviceTest.php (100%) rename tests/{ => Unit}/Model/DisconnectCallbackTest.php (100%) rename tests/{ => Unit}/Model/DiversionTest.php (100%) rename tests/{ => Unit}/Model/DtmfCallbackTest.php (100%) rename tests/{ => Unit}/Model/EndpointDirectionEnumTest.php (100%) rename tests/{ => Unit}/Model/EndpointEventTest.php (100%) rename tests/{ => Unit}/Model/EndpointEventTypeEnumTest.php (100%) rename tests/{ => Unit}/Model/EndpointResponseTest.php (100%) rename tests/{ => Unit}/Model/EndpointStatusEnumTest.php (100%) rename tests/{ => Unit}/Model/EndpointTest.php (100%) rename tests/{ => Unit}/Model/EndpointTypeEnumTest.php (100%) rename tests/{ => Unit}/Model/EndpointsTest.php (100%) rename tests/{ => Unit}/Model/ErrorObjectTest.php (100%) rename tests/{ => Unit}/Model/ErrorSourceTest.php (100%) rename tests/{ => Unit}/Model/FailureWebhookTest.php (100%) rename tests/{ => Unit}/Model/FieldErrorTest.php (100%) rename tests/{ => Unit}/Model/FileFormatEnumTest.php (100%) rename tests/{ => Unit}/Model/GatherCallbackTest.php (100%) rename tests/{ => Unit}/Model/GetAsyncBulkLookupResponseDataTest.php (100%) rename tests/{ => Unit}/Model/GetAsyncBulkLookupResponseTest.php (100%) rename tests/{ => Unit}/Model/InProgressLookupStatusEnumTest.php (100%) rename tests/{ => Unit}/Model/InboundCallbackMessageTest.php (100%) rename tests/{ => Unit}/Model/InboundCallbackTest.php (100%) rename tests/{ => Unit}/Model/InboundCallbackTypeEnumTest.php (100%) rename tests/{ => Unit}/Model/InitiateCallbackTest.php (100%) rename tests/{ => Unit}/Model/LatestMessageDeliveryStatusEnumTest.php (100%) rename tests/{ => Unit}/Model/LineTypeEnumTest.php (100%) rename tests/{ => Unit}/Model/LinkSchemaTest.php (100%) rename tests/{ => Unit}/Model/LinkTest.php (100%) rename tests/{ => Unit}/Model/LinksObjectTest.php (100%) rename tests/{ => Unit}/Model/ListEndpointsResponseTest.php (100%) rename tests/{ => Unit}/Model/ListMessageDirectionEnumTest.php (100%) rename tests/{ => Unit}/Model/ListMessageItemTest.php (100%) rename tests/{ => Unit}/Model/LookupErrorResponseTest.php (100%) rename tests/{ => Unit}/Model/LookupErrorSchemaMetaTest.php (100%) rename tests/{ => Unit}/Model/LookupErrorSchemaTest.php (100%) rename tests/{ => Unit}/Model/LookupResultTest.php (100%) rename tests/{ => Unit}/Model/MachineDetectionCompleteCallbackTest.php (100%) rename tests/{ => Unit}/Model/MachineDetectionConfigurationTest.php (100%) rename tests/{ => Unit}/Model/MachineDetectionModeEnumTest.php (100%) rename tests/{ => Unit}/Model/MachineDetectionResultTest.php (100%) rename tests/{ => Unit}/Model/MediaTest.php (100%) rename tests/{ => Unit}/Model/MessageDirectionEnumTest.php (100%) rename tests/{ => Unit}/Model/MessageRequestTest.php (100%) rename tests/{ => Unit}/Model/MessageStatusEnumTest.php (100%) rename tests/{ => Unit}/Model/MessageTest.php (100%) rename tests/{ => Unit}/Model/MessageTypeEnumTest.php (100%) rename tests/{ => Unit}/Model/MessagesListTest.php (100%) rename tests/{ => Unit}/Model/MessagingCodeResponseTest.php (100%) rename tests/{ => Unit}/Model/MessagingRequestErrorTest.php (100%) rename tests/{ => Unit}/Model/MfaForbiddenRequestErrorTest.php (100%) rename tests/{ => Unit}/Model/MfaRequestErrorTest.php (100%) rename tests/{ => Unit}/Model/MfaUnauthorizedRequestErrorTest.php (100%) rename tests/{ => Unit}/Model/MmsMessageContentFileTest.php (100%) rename tests/{ => Unit}/Model/MmsMessageContentTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelActionCalendarEventTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelActionTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelChannelListMMSObjectTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelChannelListMMSResponseObjectTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelChannelListObjectBaseTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelChannelListOwnerObjectTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelChannelListRBMObjectTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelChannelListRBMResponseObjectTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelChannelListRequestObjectTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelChannelListResponseObjectTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelChannelListSMSObjectTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelChannelListSMSResponseObjectTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelErrorTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelMessageChannelEnumTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelMessageContentTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelMessageRequestTest.php (100%) rename tests/{ => Unit}/Model/MultiChannelMessageResponseDataTest.php (100%) rename tests/{ => Unit}/Model/OptInWorkflowTest.php (100%) rename tests/{ => Unit}/Model/PageInfoTest.php (100%) rename tests/{ => Unit}/Model/PageTest.php (100%) rename tests/{ => Unit}/Model/PriorityEnumTest.php (100%) rename tests/{ => Unit}/Model/ProductTypeEnumTest.php (100%) rename tests/{ => Unit}/Model/RbmActionBaseTest.php (100%) rename tests/{ => Unit}/Model/RbmActionDialTest.php (100%) rename tests/{ => Unit}/Model/RbmActionOpenUrlTest.php (100%) rename tests/{ => Unit}/Model/RbmActionTypeEnumTest.php (100%) rename tests/{ => Unit}/Model/RbmActionViewLocationTest.php (100%) rename tests/{ => Unit}/Model/RbmCardContentMediaTest.php (100%) rename tests/{ => Unit}/Model/RbmCardContentTest.php (100%) rename tests/{ => Unit}/Model/RbmLocationResponseTest.php (100%) rename tests/{ => Unit}/Model/RbmMediaHeightEnumTest.php (100%) rename tests/{ => Unit}/Model/RbmMessageCarouselCardTest.php (100%) rename tests/{ => Unit}/Model/RbmMessageContentFileTest.php (100%) rename tests/{ => Unit}/Model/RbmMessageContentRichCardTest.php (100%) rename tests/{ => Unit}/Model/RbmMessageContentTextTest.php (100%) rename tests/{ => Unit}/Model/RbmMessageMediaTest.php (100%) rename tests/{ => Unit}/Model/RbmOpenUrlEnumTest.php (100%) rename tests/{ => Unit}/Model/RbmStandaloneCardTest.php (100%) rename tests/{ => Unit}/Model/RbmSuggestionResponseTest.php (100%) rename tests/{ => Unit}/Model/RbmWebViewEnumTest.php (100%) rename tests/{ => Unit}/Model/RecordingAvailableCallbackTest.php (100%) rename tests/{ => Unit}/Model/RecordingCompleteCallbackTest.php (100%) rename tests/{ => Unit}/Model/RecordingStateEnumTest.php (100%) rename tests/{ => Unit}/Model/RecordingTranscriptionClipTest.php (100%) rename tests/{ => Unit}/Model/RecordingTranscriptionMetadataTest.php (100%) rename tests/{ => Unit}/Model/RecordingTranscriptionsTest.php (100%) rename tests/{ => Unit}/Model/RedirectCallbackTest.php (100%) rename tests/{ => Unit}/Model/RedirectMethodEnumTest.php (100%) rename tests/{ => Unit}/Model/SipConnectionMetadataTest.php (100%) rename tests/{ => Unit}/Model/SipCredentialsTest.php (100%) rename tests/{ => Unit}/Model/SmsMessageContentTest.php (100%) rename tests/{ => Unit}/Model/StandaloneCardOrientationEnumTest.php (100%) rename tests/{ => Unit}/Model/StatusCallbackMessageTest.php (100%) rename tests/{ => Unit}/Model/StatusCallbackTest.php (100%) rename tests/{ => Unit}/Model/StatusCallbackTypeEnumTest.php (100%) rename tests/{ => Unit}/Model/StirShakenTest.php (100%) rename tests/{ => Unit}/Model/SyncLookupRequestTest.php (100%) rename tests/{ => Unit}/Model/TelephoneNumberTest.php (100%) rename tests/{ => Unit}/Model/TfvBasicAuthenticationTest.php (100%) rename tests/{ => Unit}/Model/TfvCallbackStatusEnumTest.php (100%) rename tests/{ => Unit}/Model/TfvErrorTest.php (100%) rename tests/{ => Unit}/Model/TfvStatusEnumTest.php (100%) rename tests/{ => Unit}/Model/TfvStatusTest.php (100%) rename tests/{ => Unit}/Model/TfvSubmissionInfoTest.php (100%) rename tests/{ => Unit}/Model/TfvSubmissionWrapperTest.php (100%) rename tests/{ => Unit}/Model/ThumbnailAlignmentEnumTest.php (100%) rename tests/{ => Unit}/Model/TranscribeRecordingTest.php (100%) rename tests/{ => Unit}/Model/TranscriptionAvailableCallbackTest.php (100%) rename tests/{ => Unit}/Model/TranscriptionTest.php (100%) rename tests/{ => Unit}/Model/TransferAnswerCallbackTest.php (100%) rename tests/{ => Unit}/Model/TransferCompleteCallbackTest.php (100%) rename tests/{ => Unit}/Model/TransferDisconnectCallbackTest.php (100%) rename tests/{ => Unit}/Model/UpdateCallRecordingTest.php (100%) rename tests/{ => Unit}/Model/UpdateCallTest.php (100%) rename tests/{ => Unit}/Model/UpdateConferenceMemberTest.php (100%) rename tests/{ => Unit}/Model/UpdateConferenceTest.php (100%) rename tests/{ => Unit}/Model/VerificationDenialWebhookTest.php (100%) rename tests/{ => Unit}/Model/VerificationRequestTest.php (100%) rename tests/{ => Unit}/Model/VerificationUpdateRequestTest.php (100%) rename tests/{ => Unit}/Model/VerificationWebhookTest.php (100%) rename tests/{ => Unit}/Model/VerifyCodeRequestTest.php (100%) rename tests/{ => Unit}/Model/VerifyCodeResponseTest.php (100%) rename tests/{ => Unit}/Model/VoiceApiErrorTest.php (100%) rename tests/{ => Unit}/Model/VoiceCodeResponseTest.php (100%) rename tests/{ => Unit}/Model/WebhookSubscriptionBasicAuthenticationTest.php (100%) rename tests/{ => Unit}/Model/WebhookSubscriptionErrorTest.php (100%) rename tests/{ => Unit}/Model/WebhookSubscriptionRequestSchemaTest.php (100%) rename tests/{ => Unit}/Model/WebhookSubscriptionTest.php (100%) rename tests/{ => Unit}/Model/WebhookSubscriptionTypeEnumTest.php (100%) rename tests/{ => Unit}/Model/WebhookSubscriptionsListBodyTest.php (100%) diff --git a/tests/Model/AccountStatisticsTest.php b/tests/Unit/Model/AccountStatisticsTest.php similarity index 100% rename from tests/Model/AccountStatisticsTest.php rename to tests/Unit/Model/AccountStatisticsTest.php diff --git a/tests/Model/AdditionalDenialReasonTest.php b/tests/Unit/Model/AdditionalDenialReasonTest.php similarity index 100% rename from tests/Model/AdditionalDenialReasonTest.php rename to tests/Unit/Model/AdditionalDenialReasonTest.php diff --git a/tests/Model/AddressTest.php b/tests/Unit/Model/AddressTest.php similarity index 100% rename from tests/Model/AddressTest.php rename to tests/Unit/Model/AddressTest.php diff --git a/tests/Model/AnswerCallbackTest.php b/tests/Unit/Model/AnswerCallbackTest.php similarity index 100% rename from tests/Model/AnswerCallbackTest.php rename to tests/Unit/Model/AnswerCallbackTest.php diff --git a/tests/Model/AsyncLookupRequestTest.php b/tests/Unit/Model/AsyncLookupRequestTest.php similarity index 100% rename from tests/Model/AsyncLookupRequestTest.php rename to tests/Unit/Model/AsyncLookupRequestTest.php diff --git a/tests/Model/BlockedWebhookTest.php b/tests/Unit/Model/BlockedWebhookTest.php similarity index 100% rename from tests/Model/BlockedWebhookTest.php rename to tests/Unit/Model/BlockedWebhookTest.php diff --git a/tests/Model/BridgeCompleteCallbackTest.php b/tests/Unit/Model/BridgeCompleteCallbackTest.php similarity index 100% rename from tests/Model/BridgeCompleteCallbackTest.php rename to tests/Unit/Model/BridgeCompleteCallbackTest.php diff --git a/tests/Model/BridgeTargetCompleteCallbackTest.php b/tests/Unit/Model/BridgeTargetCompleteCallbackTest.php similarity index 100% rename from tests/Model/BridgeTargetCompleteCallbackTest.php rename to tests/Unit/Model/BridgeTargetCompleteCallbackTest.php diff --git a/tests/Model/BrtcErrorResponseTest.php b/tests/Unit/Model/BrtcErrorResponseTest.php similarity index 100% rename from tests/Model/BrtcErrorResponseTest.php rename to tests/Unit/Model/BrtcErrorResponseTest.php diff --git a/tests/Model/BrtcErrorSourceTest.php b/tests/Unit/Model/BrtcErrorSourceTest.php similarity index 100% rename from tests/Model/BrtcErrorSourceTest.php rename to tests/Unit/Model/BrtcErrorSourceTest.php diff --git a/tests/Model/BrtcErrorTest.php b/tests/Unit/Model/BrtcErrorTest.php similarity index 100% rename from tests/Model/BrtcErrorTest.php rename to tests/Unit/Model/BrtcErrorTest.php diff --git a/tests/Model/BrtcLinkTest.php b/tests/Unit/Model/BrtcLinkTest.php similarity index 100% rename from tests/Model/BrtcLinkTest.php rename to tests/Unit/Model/BrtcLinkTest.php diff --git a/tests/Model/BusinessEntityTypeEnumTest.php b/tests/Unit/Model/BusinessEntityTypeEnumTest.php similarity index 100% rename from tests/Model/BusinessEntityTypeEnumTest.php rename to tests/Unit/Model/BusinessEntityTypeEnumTest.php diff --git a/tests/Model/BusinessRegistrationTypeEnumTest.php b/tests/Unit/Model/BusinessRegistrationTypeEnumTest.php similarity index 100% rename from tests/Model/BusinessRegistrationTypeEnumTest.php rename to tests/Unit/Model/BusinessRegistrationTypeEnumTest.php diff --git a/tests/Model/CallDirectionEnumTest.php b/tests/Unit/Model/CallDirectionEnumTest.php similarity index 100% rename from tests/Model/CallDirectionEnumTest.php rename to tests/Unit/Model/CallDirectionEnumTest.php diff --git a/tests/Model/CallRecordingMetadataTest.php b/tests/Unit/Model/CallRecordingMetadataTest.php similarity index 100% rename from tests/Model/CallRecordingMetadataTest.php rename to tests/Unit/Model/CallRecordingMetadataTest.php diff --git a/tests/Model/CallStateEnumTest.php b/tests/Unit/Model/CallStateEnumTest.php similarity index 100% rename from tests/Model/CallStateEnumTest.php rename to tests/Unit/Model/CallStateEnumTest.php diff --git a/tests/Model/CallStateTest.php b/tests/Unit/Model/CallStateTest.php similarity index 100% rename from tests/Model/CallStateTest.php rename to tests/Unit/Model/CallStateTest.php diff --git a/tests/Model/CallTranscriptionDetectedLanguageEnumTest.php b/tests/Unit/Model/CallTranscriptionDetectedLanguageEnumTest.php similarity index 100% rename from tests/Model/CallTranscriptionDetectedLanguageEnumTest.php rename to tests/Unit/Model/CallTranscriptionDetectedLanguageEnumTest.php diff --git a/tests/Model/CallTranscriptionMetadataTest.php b/tests/Unit/Model/CallTranscriptionMetadataTest.php similarity index 100% rename from tests/Model/CallTranscriptionMetadataTest.php rename to tests/Unit/Model/CallTranscriptionMetadataTest.php diff --git a/tests/Model/CallTranscriptionResponseTest.php b/tests/Unit/Model/CallTranscriptionResponseTest.php similarity index 100% rename from tests/Model/CallTranscriptionResponseTest.php rename to tests/Unit/Model/CallTranscriptionResponseTest.php diff --git a/tests/Model/CallTranscriptionTest.php b/tests/Unit/Model/CallTranscriptionTest.php similarity index 100% rename from tests/Model/CallTranscriptionTest.php rename to tests/Unit/Model/CallTranscriptionTest.php diff --git a/tests/Model/CallTranscriptionTrackEnumTest.php b/tests/Unit/Model/CallTranscriptionTrackEnumTest.php similarity index 100% rename from tests/Model/CallTranscriptionTrackEnumTest.php rename to tests/Unit/Model/CallTranscriptionTrackEnumTest.php diff --git a/tests/Model/CallbackMethodEnumTest.php b/tests/Unit/Model/CallbackMethodEnumTest.php similarity index 100% rename from tests/Model/CallbackMethodEnumTest.php rename to tests/Unit/Model/CallbackMethodEnumTest.php diff --git a/tests/Model/CallbackTest.php b/tests/Unit/Model/CallbackTest.php similarity index 100% rename from tests/Model/CallbackTest.php rename to tests/Unit/Model/CallbackTest.php diff --git a/tests/Model/CardWidthEnumTest.php b/tests/Unit/Model/CardWidthEnumTest.php similarity index 100% rename from tests/Model/CardWidthEnumTest.php rename to tests/Unit/Model/CardWidthEnumTest.php diff --git a/tests/Model/CodeRequestTest.php b/tests/Unit/Model/CodeRequestTest.php similarity index 100% rename from tests/Model/CodeRequestTest.php rename to tests/Unit/Model/CodeRequestTest.php diff --git a/tests/Model/CompletedLookupStatusEnumTest.php b/tests/Unit/Model/CompletedLookupStatusEnumTest.php similarity index 100% rename from tests/Model/CompletedLookupStatusEnumTest.php rename to tests/Unit/Model/CompletedLookupStatusEnumTest.php diff --git a/tests/Model/ConferenceCompletedCallbackTest.php b/tests/Unit/Model/ConferenceCompletedCallbackTest.php similarity index 100% rename from tests/Model/ConferenceCompletedCallbackTest.php rename to tests/Unit/Model/ConferenceCompletedCallbackTest.php diff --git a/tests/Model/ConferenceCreatedCallbackTest.php b/tests/Unit/Model/ConferenceCreatedCallbackTest.php similarity index 100% rename from tests/Model/ConferenceCreatedCallbackTest.php rename to tests/Unit/Model/ConferenceCreatedCallbackTest.php diff --git a/tests/Model/ConferenceMemberExitCallbackTest.php b/tests/Unit/Model/ConferenceMemberExitCallbackTest.php similarity index 100% rename from tests/Model/ConferenceMemberExitCallbackTest.php rename to tests/Unit/Model/ConferenceMemberExitCallbackTest.php diff --git a/tests/Model/ConferenceMemberJoinCallbackTest.php b/tests/Unit/Model/ConferenceMemberJoinCallbackTest.php similarity index 100% rename from tests/Model/ConferenceMemberJoinCallbackTest.php rename to tests/Unit/Model/ConferenceMemberJoinCallbackTest.php diff --git a/tests/Model/ConferenceMemberTest.php b/tests/Unit/Model/ConferenceMemberTest.php similarity index 100% rename from tests/Model/ConferenceMemberTest.php rename to tests/Unit/Model/ConferenceMemberTest.php diff --git a/tests/Model/ConferenceRecordingAvailableCallbackTest.php b/tests/Unit/Model/ConferenceRecordingAvailableCallbackTest.php similarity index 100% rename from tests/Model/ConferenceRecordingAvailableCallbackTest.php rename to tests/Unit/Model/ConferenceRecordingAvailableCallbackTest.php diff --git a/tests/Model/ConferenceRecordingMetadataTest.php b/tests/Unit/Model/ConferenceRecordingMetadataTest.php similarity index 100% rename from tests/Model/ConferenceRecordingMetadataTest.php rename to tests/Unit/Model/ConferenceRecordingMetadataTest.php diff --git a/tests/Model/ConferenceRedirectCallbackTest.php b/tests/Unit/Model/ConferenceRedirectCallbackTest.php similarity index 100% rename from tests/Model/ConferenceRedirectCallbackTest.php rename to tests/Unit/Model/ConferenceRedirectCallbackTest.php diff --git a/tests/Model/ConferenceStateEnumTest.php b/tests/Unit/Model/ConferenceStateEnumTest.php similarity index 100% rename from tests/Model/ConferenceStateEnumTest.php rename to tests/Unit/Model/ConferenceStateEnumTest.php diff --git a/tests/Model/ConferenceTest.php b/tests/Unit/Model/ConferenceTest.php similarity index 100% rename from tests/Model/ConferenceTest.php rename to tests/Unit/Model/ConferenceTest.php diff --git a/tests/Model/ContactTest.php b/tests/Unit/Model/ContactTest.php similarity index 100% rename from tests/Model/ContactTest.php rename to tests/Unit/Model/ContactTest.php diff --git a/tests/Model/CreateAsyncBulkLookupResponseDataTest.php b/tests/Unit/Model/CreateAsyncBulkLookupResponseDataTest.php similarity index 100% rename from tests/Model/CreateAsyncBulkLookupResponseDataTest.php rename to tests/Unit/Model/CreateAsyncBulkLookupResponseDataTest.php diff --git a/tests/Model/CreateAsyncBulkLookupResponseTest.php b/tests/Unit/Model/CreateAsyncBulkLookupResponseTest.php similarity index 100% rename from tests/Model/CreateAsyncBulkLookupResponseTest.php rename to tests/Unit/Model/CreateAsyncBulkLookupResponseTest.php diff --git a/tests/Model/CreateCallResponseTest.php b/tests/Unit/Model/CreateCallResponseTest.php similarity index 100% rename from tests/Model/CreateCallResponseTest.php rename to tests/Unit/Model/CreateCallResponseTest.php diff --git a/tests/Model/CreateCallTest.php b/tests/Unit/Model/CreateCallTest.php similarity index 100% rename from tests/Model/CreateCallTest.php rename to tests/Unit/Model/CreateCallTest.php diff --git a/tests/Model/CreateEndpointRequestBaseTest.php b/tests/Unit/Model/CreateEndpointRequestBaseTest.php similarity index 100% rename from tests/Model/CreateEndpointRequestBaseTest.php rename to tests/Unit/Model/CreateEndpointRequestBaseTest.php diff --git a/tests/Model/CreateEndpointResponseDataTest.php b/tests/Unit/Model/CreateEndpointResponseDataTest.php similarity index 100% rename from tests/Model/CreateEndpointResponseDataTest.php rename to tests/Unit/Model/CreateEndpointResponseDataTest.php diff --git a/tests/Model/CreateEndpointResponseTest.php b/tests/Unit/Model/CreateEndpointResponseTest.php similarity index 100% rename from tests/Model/CreateEndpointResponseTest.php rename to tests/Unit/Model/CreateEndpointResponseTest.php diff --git a/tests/Model/CreateMessageRequestErrorTest.php b/tests/Unit/Model/CreateMessageRequestErrorTest.php similarity index 100% rename from tests/Model/CreateMessageRequestErrorTest.php rename to tests/Unit/Model/CreateMessageRequestErrorTest.php diff --git a/tests/Model/CreateMultiChannelMessageResponseTest.php b/tests/Unit/Model/CreateMultiChannelMessageResponseTest.php similarity index 100% rename from tests/Model/CreateMultiChannelMessageResponseTest.php rename to tests/Unit/Model/CreateMultiChannelMessageResponseTest.php diff --git a/tests/Model/CreateSyncLookupResponseDataTest.php b/tests/Unit/Model/CreateSyncLookupResponseDataTest.php similarity index 100% rename from tests/Model/CreateSyncLookupResponseDataTest.php rename to tests/Unit/Model/CreateSyncLookupResponseDataTest.php diff --git a/tests/Model/CreateSyncLookupResponseTest.php b/tests/Unit/Model/CreateSyncLookupResponseTest.php similarity index 100% rename from tests/Model/CreateSyncLookupResponseTest.php rename to tests/Unit/Model/CreateSyncLookupResponseTest.php diff --git a/tests/Model/CreateWebRtcConnectionRequestTest.php b/tests/Unit/Model/CreateWebRtcConnectionRequestTest.php similarity index 100% rename from tests/Model/CreateWebRtcConnectionRequestTest.php rename to tests/Unit/Model/CreateWebRtcConnectionRequestTest.php diff --git a/tests/Model/DeactivationEventEnumTest.php b/tests/Unit/Model/DeactivationEventEnumTest.php similarity index 100% rename from tests/Model/DeactivationEventEnumTest.php rename to tests/Unit/Model/DeactivationEventEnumTest.php diff --git a/tests/Model/DeviceStatusEnumTest.php b/tests/Unit/Model/DeviceStatusEnumTest.php similarity index 100% rename from tests/Model/DeviceStatusEnumTest.php rename to tests/Unit/Model/DeviceStatusEnumTest.php diff --git a/tests/Model/DeviceTest.php b/tests/Unit/Model/DeviceTest.php similarity index 100% rename from tests/Model/DeviceTest.php rename to tests/Unit/Model/DeviceTest.php diff --git a/tests/Model/DisconnectCallbackTest.php b/tests/Unit/Model/DisconnectCallbackTest.php similarity index 100% rename from tests/Model/DisconnectCallbackTest.php rename to tests/Unit/Model/DisconnectCallbackTest.php diff --git a/tests/Model/DiversionTest.php b/tests/Unit/Model/DiversionTest.php similarity index 100% rename from tests/Model/DiversionTest.php rename to tests/Unit/Model/DiversionTest.php diff --git a/tests/Model/DtmfCallbackTest.php b/tests/Unit/Model/DtmfCallbackTest.php similarity index 100% rename from tests/Model/DtmfCallbackTest.php rename to tests/Unit/Model/DtmfCallbackTest.php diff --git a/tests/Model/EndpointDirectionEnumTest.php b/tests/Unit/Model/EndpointDirectionEnumTest.php similarity index 100% rename from tests/Model/EndpointDirectionEnumTest.php rename to tests/Unit/Model/EndpointDirectionEnumTest.php diff --git a/tests/Model/EndpointEventTest.php b/tests/Unit/Model/EndpointEventTest.php similarity index 100% rename from tests/Model/EndpointEventTest.php rename to tests/Unit/Model/EndpointEventTest.php diff --git a/tests/Model/EndpointEventTypeEnumTest.php b/tests/Unit/Model/EndpointEventTypeEnumTest.php similarity index 100% rename from tests/Model/EndpointEventTypeEnumTest.php rename to tests/Unit/Model/EndpointEventTypeEnumTest.php diff --git a/tests/Model/EndpointResponseTest.php b/tests/Unit/Model/EndpointResponseTest.php similarity index 100% rename from tests/Model/EndpointResponseTest.php rename to tests/Unit/Model/EndpointResponseTest.php diff --git a/tests/Model/EndpointStatusEnumTest.php b/tests/Unit/Model/EndpointStatusEnumTest.php similarity index 100% rename from tests/Model/EndpointStatusEnumTest.php rename to tests/Unit/Model/EndpointStatusEnumTest.php diff --git a/tests/Model/EndpointTest.php b/tests/Unit/Model/EndpointTest.php similarity index 100% rename from tests/Model/EndpointTest.php rename to tests/Unit/Model/EndpointTest.php diff --git a/tests/Model/EndpointTypeEnumTest.php b/tests/Unit/Model/EndpointTypeEnumTest.php similarity index 100% rename from tests/Model/EndpointTypeEnumTest.php rename to tests/Unit/Model/EndpointTypeEnumTest.php diff --git a/tests/Model/EndpointsTest.php b/tests/Unit/Model/EndpointsTest.php similarity index 100% rename from tests/Model/EndpointsTest.php rename to tests/Unit/Model/EndpointsTest.php diff --git a/tests/Model/ErrorObjectTest.php b/tests/Unit/Model/ErrorObjectTest.php similarity index 100% rename from tests/Model/ErrorObjectTest.php rename to tests/Unit/Model/ErrorObjectTest.php diff --git a/tests/Model/ErrorSourceTest.php b/tests/Unit/Model/ErrorSourceTest.php similarity index 100% rename from tests/Model/ErrorSourceTest.php rename to tests/Unit/Model/ErrorSourceTest.php diff --git a/tests/Model/FailureWebhookTest.php b/tests/Unit/Model/FailureWebhookTest.php similarity index 100% rename from tests/Model/FailureWebhookTest.php rename to tests/Unit/Model/FailureWebhookTest.php diff --git a/tests/Model/FieldErrorTest.php b/tests/Unit/Model/FieldErrorTest.php similarity index 100% rename from tests/Model/FieldErrorTest.php rename to tests/Unit/Model/FieldErrorTest.php diff --git a/tests/Model/FileFormatEnumTest.php b/tests/Unit/Model/FileFormatEnumTest.php similarity index 100% rename from tests/Model/FileFormatEnumTest.php rename to tests/Unit/Model/FileFormatEnumTest.php diff --git a/tests/Model/GatherCallbackTest.php b/tests/Unit/Model/GatherCallbackTest.php similarity index 100% rename from tests/Model/GatherCallbackTest.php rename to tests/Unit/Model/GatherCallbackTest.php diff --git a/tests/Model/GetAsyncBulkLookupResponseDataTest.php b/tests/Unit/Model/GetAsyncBulkLookupResponseDataTest.php similarity index 100% rename from tests/Model/GetAsyncBulkLookupResponseDataTest.php rename to tests/Unit/Model/GetAsyncBulkLookupResponseDataTest.php diff --git a/tests/Model/GetAsyncBulkLookupResponseTest.php b/tests/Unit/Model/GetAsyncBulkLookupResponseTest.php similarity index 100% rename from tests/Model/GetAsyncBulkLookupResponseTest.php rename to tests/Unit/Model/GetAsyncBulkLookupResponseTest.php diff --git a/tests/Model/InProgressLookupStatusEnumTest.php b/tests/Unit/Model/InProgressLookupStatusEnumTest.php similarity index 100% rename from tests/Model/InProgressLookupStatusEnumTest.php rename to tests/Unit/Model/InProgressLookupStatusEnumTest.php diff --git a/tests/Model/InboundCallbackMessageTest.php b/tests/Unit/Model/InboundCallbackMessageTest.php similarity index 100% rename from tests/Model/InboundCallbackMessageTest.php rename to tests/Unit/Model/InboundCallbackMessageTest.php diff --git a/tests/Model/InboundCallbackTest.php b/tests/Unit/Model/InboundCallbackTest.php similarity index 100% rename from tests/Model/InboundCallbackTest.php rename to tests/Unit/Model/InboundCallbackTest.php diff --git a/tests/Model/InboundCallbackTypeEnumTest.php b/tests/Unit/Model/InboundCallbackTypeEnumTest.php similarity index 100% rename from tests/Model/InboundCallbackTypeEnumTest.php rename to tests/Unit/Model/InboundCallbackTypeEnumTest.php diff --git a/tests/Model/InitiateCallbackTest.php b/tests/Unit/Model/InitiateCallbackTest.php similarity index 100% rename from tests/Model/InitiateCallbackTest.php rename to tests/Unit/Model/InitiateCallbackTest.php diff --git a/tests/Model/LatestMessageDeliveryStatusEnumTest.php b/tests/Unit/Model/LatestMessageDeliveryStatusEnumTest.php similarity index 100% rename from tests/Model/LatestMessageDeliveryStatusEnumTest.php rename to tests/Unit/Model/LatestMessageDeliveryStatusEnumTest.php diff --git a/tests/Model/LineTypeEnumTest.php b/tests/Unit/Model/LineTypeEnumTest.php similarity index 100% rename from tests/Model/LineTypeEnumTest.php rename to tests/Unit/Model/LineTypeEnumTest.php diff --git a/tests/Model/LinkSchemaTest.php b/tests/Unit/Model/LinkSchemaTest.php similarity index 100% rename from tests/Model/LinkSchemaTest.php rename to tests/Unit/Model/LinkSchemaTest.php diff --git a/tests/Model/LinkTest.php b/tests/Unit/Model/LinkTest.php similarity index 100% rename from tests/Model/LinkTest.php rename to tests/Unit/Model/LinkTest.php diff --git a/tests/Model/LinksObjectTest.php b/tests/Unit/Model/LinksObjectTest.php similarity index 100% rename from tests/Model/LinksObjectTest.php rename to tests/Unit/Model/LinksObjectTest.php diff --git a/tests/Model/ListEndpointsResponseTest.php b/tests/Unit/Model/ListEndpointsResponseTest.php similarity index 100% rename from tests/Model/ListEndpointsResponseTest.php rename to tests/Unit/Model/ListEndpointsResponseTest.php diff --git a/tests/Model/ListMessageDirectionEnumTest.php b/tests/Unit/Model/ListMessageDirectionEnumTest.php similarity index 100% rename from tests/Model/ListMessageDirectionEnumTest.php rename to tests/Unit/Model/ListMessageDirectionEnumTest.php diff --git a/tests/Model/ListMessageItemTest.php b/tests/Unit/Model/ListMessageItemTest.php similarity index 100% rename from tests/Model/ListMessageItemTest.php rename to tests/Unit/Model/ListMessageItemTest.php diff --git a/tests/Model/LookupErrorResponseTest.php b/tests/Unit/Model/LookupErrorResponseTest.php similarity index 100% rename from tests/Model/LookupErrorResponseTest.php rename to tests/Unit/Model/LookupErrorResponseTest.php diff --git a/tests/Model/LookupErrorSchemaMetaTest.php b/tests/Unit/Model/LookupErrorSchemaMetaTest.php similarity index 100% rename from tests/Model/LookupErrorSchemaMetaTest.php rename to tests/Unit/Model/LookupErrorSchemaMetaTest.php diff --git a/tests/Model/LookupErrorSchemaTest.php b/tests/Unit/Model/LookupErrorSchemaTest.php similarity index 100% rename from tests/Model/LookupErrorSchemaTest.php rename to tests/Unit/Model/LookupErrorSchemaTest.php diff --git a/tests/Model/LookupResultTest.php b/tests/Unit/Model/LookupResultTest.php similarity index 100% rename from tests/Model/LookupResultTest.php rename to tests/Unit/Model/LookupResultTest.php diff --git a/tests/Model/MachineDetectionCompleteCallbackTest.php b/tests/Unit/Model/MachineDetectionCompleteCallbackTest.php similarity index 100% rename from tests/Model/MachineDetectionCompleteCallbackTest.php rename to tests/Unit/Model/MachineDetectionCompleteCallbackTest.php diff --git a/tests/Model/MachineDetectionConfigurationTest.php b/tests/Unit/Model/MachineDetectionConfigurationTest.php similarity index 100% rename from tests/Model/MachineDetectionConfigurationTest.php rename to tests/Unit/Model/MachineDetectionConfigurationTest.php diff --git a/tests/Model/MachineDetectionModeEnumTest.php b/tests/Unit/Model/MachineDetectionModeEnumTest.php similarity index 100% rename from tests/Model/MachineDetectionModeEnumTest.php rename to tests/Unit/Model/MachineDetectionModeEnumTest.php diff --git a/tests/Model/MachineDetectionResultTest.php b/tests/Unit/Model/MachineDetectionResultTest.php similarity index 100% rename from tests/Model/MachineDetectionResultTest.php rename to tests/Unit/Model/MachineDetectionResultTest.php diff --git a/tests/Model/MediaTest.php b/tests/Unit/Model/MediaTest.php similarity index 100% rename from tests/Model/MediaTest.php rename to tests/Unit/Model/MediaTest.php diff --git a/tests/Model/MessageDirectionEnumTest.php b/tests/Unit/Model/MessageDirectionEnumTest.php similarity index 100% rename from tests/Model/MessageDirectionEnumTest.php rename to tests/Unit/Model/MessageDirectionEnumTest.php diff --git a/tests/Model/MessageRequestTest.php b/tests/Unit/Model/MessageRequestTest.php similarity index 100% rename from tests/Model/MessageRequestTest.php rename to tests/Unit/Model/MessageRequestTest.php diff --git a/tests/Model/MessageStatusEnumTest.php b/tests/Unit/Model/MessageStatusEnumTest.php similarity index 100% rename from tests/Model/MessageStatusEnumTest.php rename to tests/Unit/Model/MessageStatusEnumTest.php diff --git a/tests/Model/MessageTest.php b/tests/Unit/Model/MessageTest.php similarity index 100% rename from tests/Model/MessageTest.php rename to tests/Unit/Model/MessageTest.php diff --git a/tests/Model/MessageTypeEnumTest.php b/tests/Unit/Model/MessageTypeEnumTest.php similarity index 100% rename from tests/Model/MessageTypeEnumTest.php rename to tests/Unit/Model/MessageTypeEnumTest.php diff --git a/tests/Model/MessagesListTest.php b/tests/Unit/Model/MessagesListTest.php similarity index 100% rename from tests/Model/MessagesListTest.php rename to tests/Unit/Model/MessagesListTest.php diff --git a/tests/Model/MessagingCodeResponseTest.php b/tests/Unit/Model/MessagingCodeResponseTest.php similarity index 100% rename from tests/Model/MessagingCodeResponseTest.php rename to tests/Unit/Model/MessagingCodeResponseTest.php diff --git a/tests/Model/MessagingRequestErrorTest.php b/tests/Unit/Model/MessagingRequestErrorTest.php similarity index 100% rename from tests/Model/MessagingRequestErrorTest.php rename to tests/Unit/Model/MessagingRequestErrorTest.php diff --git a/tests/Model/MfaForbiddenRequestErrorTest.php b/tests/Unit/Model/MfaForbiddenRequestErrorTest.php similarity index 100% rename from tests/Model/MfaForbiddenRequestErrorTest.php rename to tests/Unit/Model/MfaForbiddenRequestErrorTest.php diff --git a/tests/Model/MfaRequestErrorTest.php b/tests/Unit/Model/MfaRequestErrorTest.php similarity index 100% rename from tests/Model/MfaRequestErrorTest.php rename to tests/Unit/Model/MfaRequestErrorTest.php diff --git a/tests/Model/MfaUnauthorizedRequestErrorTest.php b/tests/Unit/Model/MfaUnauthorizedRequestErrorTest.php similarity index 100% rename from tests/Model/MfaUnauthorizedRequestErrorTest.php rename to tests/Unit/Model/MfaUnauthorizedRequestErrorTest.php diff --git a/tests/Model/MmsMessageContentFileTest.php b/tests/Unit/Model/MmsMessageContentFileTest.php similarity index 100% rename from tests/Model/MmsMessageContentFileTest.php rename to tests/Unit/Model/MmsMessageContentFileTest.php diff --git a/tests/Model/MmsMessageContentTest.php b/tests/Unit/Model/MmsMessageContentTest.php similarity index 100% rename from tests/Model/MmsMessageContentTest.php rename to tests/Unit/Model/MmsMessageContentTest.php diff --git a/tests/Model/MultiChannelActionCalendarEventTest.php b/tests/Unit/Model/MultiChannelActionCalendarEventTest.php similarity index 100% rename from tests/Model/MultiChannelActionCalendarEventTest.php rename to tests/Unit/Model/MultiChannelActionCalendarEventTest.php diff --git a/tests/Model/MultiChannelActionTest.php b/tests/Unit/Model/MultiChannelActionTest.php similarity index 100% rename from tests/Model/MultiChannelActionTest.php rename to tests/Unit/Model/MultiChannelActionTest.php diff --git a/tests/Model/MultiChannelChannelListMMSObjectTest.php b/tests/Unit/Model/MultiChannelChannelListMMSObjectTest.php similarity index 100% rename from tests/Model/MultiChannelChannelListMMSObjectTest.php rename to tests/Unit/Model/MultiChannelChannelListMMSObjectTest.php diff --git a/tests/Model/MultiChannelChannelListMMSResponseObjectTest.php b/tests/Unit/Model/MultiChannelChannelListMMSResponseObjectTest.php similarity index 100% rename from tests/Model/MultiChannelChannelListMMSResponseObjectTest.php rename to tests/Unit/Model/MultiChannelChannelListMMSResponseObjectTest.php diff --git a/tests/Model/MultiChannelChannelListObjectBaseTest.php b/tests/Unit/Model/MultiChannelChannelListObjectBaseTest.php similarity index 100% rename from tests/Model/MultiChannelChannelListObjectBaseTest.php rename to tests/Unit/Model/MultiChannelChannelListObjectBaseTest.php diff --git a/tests/Model/MultiChannelChannelListOwnerObjectTest.php b/tests/Unit/Model/MultiChannelChannelListOwnerObjectTest.php similarity index 100% rename from tests/Model/MultiChannelChannelListOwnerObjectTest.php rename to tests/Unit/Model/MultiChannelChannelListOwnerObjectTest.php diff --git a/tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php b/tests/Unit/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php similarity index 100% rename from tests/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php rename to tests/Unit/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php diff --git a/tests/Model/MultiChannelChannelListRBMObjectTest.php b/tests/Unit/Model/MultiChannelChannelListRBMObjectTest.php similarity index 100% rename from tests/Model/MultiChannelChannelListRBMObjectTest.php rename to tests/Unit/Model/MultiChannelChannelListRBMObjectTest.php diff --git a/tests/Model/MultiChannelChannelListRBMResponseObjectTest.php b/tests/Unit/Model/MultiChannelChannelListRBMResponseObjectTest.php similarity index 100% rename from tests/Model/MultiChannelChannelListRBMResponseObjectTest.php rename to tests/Unit/Model/MultiChannelChannelListRBMResponseObjectTest.php diff --git a/tests/Model/MultiChannelChannelListRequestObjectTest.php b/tests/Unit/Model/MultiChannelChannelListRequestObjectTest.php similarity index 100% rename from tests/Model/MultiChannelChannelListRequestObjectTest.php rename to tests/Unit/Model/MultiChannelChannelListRequestObjectTest.php diff --git a/tests/Model/MultiChannelChannelListResponseObjectTest.php b/tests/Unit/Model/MultiChannelChannelListResponseObjectTest.php similarity index 100% rename from tests/Model/MultiChannelChannelListResponseObjectTest.php rename to tests/Unit/Model/MultiChannelChannelListResponseObjectTest.php diff --git a/tests/Model/MultiChannelChannelListSMSObjectTest.php b/tests/Unit/Model/MultiChannelChannelListSMSObjectTest.php similarity index 100% rename from tests/Model/MultiChannelChannelListSMSObjectTest.php rename to tests/Unit/Model/MultiChannelChannelListSMSObjectTest.php diff --git a/tests/Model/MultiChannelChannelListSMSResponseObjectTest.php b/tests/Unit/Model/MultiChannelChannelListSMSResponseObjectTest.php similarity index 100% rename from tests/Model/MultiChannelChannelListSMSResponseObjectTest.php rename to tests/Unit/Model/MultiChannelChannelListSMSResponseObjectTest.php diff --git a/tests/Model/MultiChannelErrorTest.php b/tests/Unit/Model/MultiChannelErrorTest.php similarity index 100% rename from tests/Model/MultiChannelErrorTest.php rename to tests/Unit/Model/MultiChannelErrorTest.php diff --git a/tests/Model/MultiChannelMessageChannelEnumTest.php b/tests/Unit/Model/MultiChannelMessageChannelEnumTest.php similarity index 100% rename from tests/Model/MultiChannelMessageChannelEnumTest.php rename to tests/Unit/Model/MultiChannelMessageChannelEnumTest.php diff --git a/tests/Model/MultiChannelMessageContentTest.php b/tests/Unit/Model/MultiChannelMessageContentTest.php similarity index 100% rename from tests/Model/MultiChannelMessageContentTest.php rename to tests/Unit/Model/MultiChannelMessageContentTest.php diff --git a/tests/Model/MultiChannelMessageRequestTest.php b/tests/Unit/Model/MultiChannelMessageRequestTest.php similarity index 100% rename from tests/Model/MultiChannelMessageRequestTest.php rename to tests/Unit/Model/MultiChannelMessageRequestTest.php diff --git a/tests/Model/MultiChannelMessageResponseDataTest.php b/tests/Unit/Model/MultiChannelMessageResponseDataTest.php similarity index 100% rename from tests/Model/MultiChannelMessageResponseDataTest.php rename to tests/Unit/Model/MultiChannelMessageResponseDataTest.php diff --git a/tests/Model/OptInWorkflowTest.php b/tests/Unit/Model/OptInWorkflowTest.php similarity index 100% rename from tests/Model/OptInWorkflowTest.php rename to tests/Unit/Model/OptInWorkflowTest.php diff --git a/tests/Model/PageInfoTest.php b/tests/Unit/Model/PageInfoTest.php similarity index 100% rename from tests/Model/PageInfoTest.php rename to tests/Unit/Model/PageInfoTest.php diff --git a/tests/Model/PageTest.php b/tests/Unit/Model/PageTest.php similarity index 100% rename from tests/Model/PageTest.php rename to tests/Unit/Model/PageTest.php diff --git a/tests/Model/PriorityEnumTest.php b/tests/Unit/Model/PriorityEnumTest.php similarity index 100% rename from tests/Model/PriorityEnumTest.php rename to tests/Unit/Model/PriorityEnumTest.php diff --git a/tests/Model/ProductTypeEnumTest.php b/tests/Unit/Model/ProductTypeEnumTest.php similarity index 100% rename from tests/Model/ProductTypeEnumTest.php rename to tests/Unit/Model/ProductTypeEnumTest.php diff --git a/tests/Model/RbmActionBaseTest.php b/tests/Unit/Model/RbmActionBaseTest.php similarity index 100% rename from tests/Model/RbmActionBaseTest.php rename to tests/Unit/Model/RbmActionBaseTest.php diff --git a/tests/Model/RbmActionDialTest.php b/tests/Unit/Model/RbmActionDialTest.php similarity index 100% rename from tests/Model/RbmActionDialTest.php rename to tests/Unit/Model/RbmActionDialTest.php diff --git a/tests/Model/RbmActionOpenUrlTest.php b/tests/Unit/Model/RbmActionOpenUrlTest.php similarity index 100% rename from tests/Model/RbmActionOpenUrlTest.php rename to tests/Unit/Model/RbmActionOpenUrlTest.php diff --git a/tests/Model/RbmActionTypeEnumTest.php b/tests/Unit/Model/RbmActionTypeEnumTest.php similarity index 100% rename from tests/Model/RbmActionTypeEnumTest.php rename to tests/Unit/Model/RbmActionTypeEnumTest.php diff --git a/tests/Model/RbmActionViewLocationTest.php b/tests/Unit/Model/RbmActionViewLocationTest.php similarity index 100% rename from tests/Model/RbmActionViewLocationTest.php rename to tests/Unit/Model/RbmActionViewLocationTest.php diff --git a/tests/Model/RbmCardContentMediaTest.php b/tests/Unit/Model/RbmCardContentMediaTest.php similarity index 100% rename from tests/Model/RbmCardContentMediaTest.php rename to tests/Unit/Model/RbmCardContentMediaTest.php diff --git a/tests/Model/RbmCardContentTest.php b/tests/Unit/Model/RbmCardContentTest.php similarity index 100% rename from tests/Model/RbmCardContentTest.php rename to tests/Unit/Model/RbmCardContentTest.php diff --git a/tests/Model/RbmLocationResponseTest.php b/tests/Unit/Model/RbmLocationResponseTest.php similarity index 100% rename from tests/Model/RbmLocationResponseTest.php rename to tests/Unit/Model/RbmLocationResponseTest.php diff --git a/tests/Model/RbmMediaHeightEnumTest.php b/tests/Unit/Model/RbmMediaHeightEnumTest.php similarity index 100% rename from tests/Model/RbmMediaHeightEnumTest.php rename to tests/Unit/Model/RbmMediaHeightEnumTest.php diff --git a/tests/Model/RbmMessageCarouselCardTest.php b/tests/Unit/Model/RbmMessageCarouselCardTest.php similarity index 100% rename from tests/Model/RbmMessageCarouselCardTest.php rename to tests/Unit/Model/RbmMessageCarouselCardTest.php diff --git a/tests/Model/RbmMessageContentFileTest.php b/tests/Unit/Model/RbmMessageContentFileTest.php similarity index 100% rename from tests/Model/RbmMessageContentFileTest.php rename to tests/Unit/Model/RbmMessageContentFileTest.php diff --git a/tests/Model/RbmMessageContentRichCardTest.php b/tests/Unit/Model/RbmMessageContentRichCardTest.php similarity index 100% rename from tests/Model/RbmMessageContentRichCardTest.php rename to tests/Unit/Model/RbmMessageContentRichCardTest.php diff --git a/tests/Model/RbmMessageContentTextTest.php b/tests/Unit/Model/RbmMessageContentTextTest.php similarity index 100% rename from tests/Model/RbmMessageContentTextTest.php rename to tests/Unit/Model/RbmMessageContentTextTest.php diff --git a/tests/Model/RbmMessageMediaTest.php b/tests/Unit/Model/RbmMessageMediaTest.php similarity index 100% rename from tests/Model/RbmMessageMediaTest.php rename to tests/Unit/Model/RbmMessageMediaTest.php diff --git a/tests/Model/RbmOpenUrlEnumTest.php b/tests/Unit/Model/RbmOpenUrlEnumTest.php similarity index 100% rename from tests/Model/RbmOpenUrlEnumTest.php rename to tests/Unit/Model/RbmOpenUrlEnumTest.php diff --git a/tests/Model/RbmStandaloneCardTest.php b/tests/Unit/Model/RbmStandaloneCardTest.php similarity index 100% rename from tests/Model/RbmStandaloneCardTest.php rename to tests/Unit/Model/RbmStandaloneCardTest.php diff --git a/tests/Model/RbmSuggestionResponseTest.php b/tests/Unit/Model/RbmSuggestionResponseTest.php similarity index 100% rename from tests/Model/RbmSuggestionResponseTest.php rename to tests/Unit/Model/RbmSuggestionResponseTest.php diff --git a/tests/Model/RbmWebViewEnumTest.php b/tests/Unit/Model/RbmWebViewEnumTest.php similarity index 100% rename from tests/Model/RbmWebViewEnumTest.php rename to tests/Unit/Model/RbmWebViewEnumTest.php diff --git a/tests/Model/RecordingAvailableCallbackTest.php b/tests/Unit/Model/RecordingAvailableCallbackTest.php similarity index 100% rename from tests/Model/RecordingAvailableCallbackTest.php rename to tests/Unit/Model/RecordingAvailableCallbackTest.php diff --git a/tests/Model/RecordingCompleteCallbackTest.php b/tests/Unit/Model/RecordingCompleteCallbackTest.php similarity index 100% rename from tests/Model/RecordingCompleteCallbackTest.php rename to tests/Unit/Model/RecordingCompleteCallbackTest.php diff --git a/tests/Model/RecordingStateEnumTest.php b/tests/Unit/Model/RecordingStateEnumTest.php similarity index 100% rename from tests/Model/RecordingStateEnumTest.php rename to tests/Unit/Model/RecordingStateEnumTest.php diff --git a/tests/Model/RecordingTranscriptionClipTest.php b/tests/Unit/Model/RecordingTranscriptionClipTest.php similarity index 100% rename from tests/Model/RecordingTranscriptionClipTest.php rename to tests/Unit/Model/RecordingTranscriptionClipTest.php diff --git a/tests/Model/RecordingTranscriptionMetadataTest.php b/tests/Unit/Model/RecordingTranscriptionMetadataTest.php similarity index 100% rename from tests/Model/RecordingTranscriptionMetadataTest.php rename to tests/Unit/Model/RecordingTranscriptionMetadataTest.php diff --git a/tests/Model/RecordingTranscriptionsTest.php b/tests/Unit/Model/RecordingTranscriptionsTest.php similarity index 100% rename from tests/Model/RecordingTranscriptionsTest.php rename to tests/Unit/Model/RecordingTranscriptionsTest.php diff --git a/tests/Model/RedirectCallbackTest.php b/tests/Unit/Model/RedirectCallbackTest.php similarity index 100% rename from tests/Model/RedirectCallbackTest.php rename to tests/Unit/Model/RedirectCallbackTest.php diff --git a/tests/Model/RedirectMethodEnumTest.php b/tests/Unit/Model/RedirectMethodEnumTest.php similarity index 100% rename from tests/Model/RedirectMethodEnumTest.php rename to tests/Unit/Model/RedirectMethodEnumTest.php diff --git a/tests/Model/SipConnectionMetadataTest.php b/tests/Unit/Model/SipConnectionMetadataTest.php similarity index 100% rename from tests/Model/SipConnectionMetadataTest.php rename to tests/Unit/Model/SipConnectionMetadataTest.php diff --git a/tests/Model/SipCredentialsTest.php b/tests/Unit/Model/SipCredentialsTest.php similarity index 100% rename from tests/Model/SipCredentialsTest.php rename to tests/Unit/Model/SipCredentialsTest.php diff --git a/tests/Model/SmsMessageContentTest.php b/tests/Unit/Model/SmsMessageContentTest.php similarity index 100% rename from tests/Model/SmsMessageContentTest.php rename to tests/Unit/Model/SmsMessageContentTest.php diff --git a/tests/Model/StandaloneCardOrientationEnumTest.php b/tests/Unit/Model/StandaloneCardOrientationEnumTest.php similarity index 100% rename from tests/Model/StandaloneCardOrientationEnumTest.php rename to tests/Unit/Model/StandaloneCardOrientationEnumTest.php diff --git a/tests/Model/StatusCallbackMessageTest.php b/tests/Unit/Model/StatusCallbackMessageTest.php similarity index 100% rename from tests/Model/StatusCallbackMessageTest.php rename to tests/Unit/Model/StatusCallbackMessageTest.php diff --git a/tests/Model/StatusCallbackTest.php b/tests/Unit/Model/StatusCallbackTest.php similarity index 100% rename from tests/Model/StatusCallbackTest.php rename to tests/Unit/Model/StatusCallbackTest.php diff --git a/tests/Model/StatusCallbackTypeEnumTest.php b/tests/Unit/Model/StatusCallbackTypeEnumTest.php similarity index 100% rename from tests/Model/StatusCallbackTypeEnumTest.php rename to tests/Unit/Model/StatusCallbackTypeEnumTest.php diff --git a/tests/Model/StirShakenTest.php b/tests/Unit/Model/StirShakenTest.php similarity index 100% rename from tests/Model/StirShakenTest.php rename to tests/Unit/Model/StirShakenTest.php diff --git a/tests/Model/SyncLookupRequestTest.php b/tests/Unit/Model/SyncLookupRequestTest.php similarity index 100% rename from tests/Model/SyncLookupRequestTest.php rename to tests/Unit/Model/SyncLookupRequestTest.php diff --git a/tests/Model/TelephoneNumberTest.php b/tests/Unit/Model/TelephoneNumberTest.php similarity index 100% rename from tests/Model/TelephoneNumberTest.php rename to tests/Unit/Model/TelephoneNumberTest.php diff --git a/tests/Model/TfvBasicAuthenticationTest.php b/tests/Unit/Model/TfvBasicAuthenticationTest.php similarity index 100% rename from tests/Model/TfvBasicAuthenticationTest.php rename to tests/Unit/Model/TfvBasicAuthenticationTest.php diff --git a/tests/Model/TfvCallbackStatusEnumTest.php b/tests/Unit/Model/TfvCallbackStatusEnumTest.php similarity index 100% rename from tests/Model/TfvCallbackStatusEnumTest.php rename to tests/Unit/Model/TfvCallbackStatusEnumTest.php diff --git a/tests/Model/TfvErrorTest.php b/tests/Unit/Model/TfvErrorTest.php similarity index 100% rename from tests/Model/TfvErrorTest.php rename to tests/Unit/Model/TfvErrorTest.php diff --git a/tests/Model/TfvStatusEnumTest.php b/tests/Unit/Model/TfvStatusEnumTest.php similarity index 100% rename from tests/Model/TfvStatusEnumTest.php rename to tests/Unit/Model/TfvStatusEnumTest.php diff --git a/tests/Model/TfvStatusTest.php b/tests/Unit/Model/TfvStatusTest.php similarity index 100% rename from tests/Model/TfvStatusTest.php rename to tests/Unit/Model/TfvStatusTest.php diff --git a/tests/Model/TfvSubmissionInfoTest.php b/tests/Unit/Model/TfvSubmissionInfoTest.php similarity index 100% rename from tests/Model/TfvSubmissionInfoTest.php rename to tests/Unit/Model/TfvSubmissionInfoTest.php diff --git a/tests/Model/TfvSubmissionWrapperTest.php b/tests/Unit/Model/TfvSubmissionWrapperTest.php similarity index 100% rename from tests/Model/TfvSubmissionWrapperTest.php rename to tests/Unit/Model/TfvSubmissionWrapperTest.php diff --git a/tests/Model/ThumbnailAlignmentEnumTest.php b/tests/Unit/Model/ThumbnailAlignmentEnumTest.php similarity index 100% rename from tests/Model/ThumbnailAlignmentEnumTest.php rename to tests/Unit/Model/ThumbnailAlignmentEnumTest.php diff --git a/tests/Model/TranscribeRecordingTest.php b/tests/Unit/Model/TranscribeRecordingTest.php similarity index 100% rename from tests/Model/TranscribeRecordingTest.php rename to tests/Unit/Model/TranscribeRecordingTest.php diff --git a/tests/Model/TranscriptionAvailableCallbackTest.php b/tests/Unit/Model/TranscriptionAvailableCallbackTest.php similarity index 100% rename from tests/Model/TranscriptionAvailableCallbackTest.php rename to tests/Unit/Model/TranscriptionAvailableCallbackTest.php diff --git a/tests/Model/TranscriptionTest.php b/tests/Unit/Model/TranscriptionTest.php similarity index 100% rename from tests/Model/TranscriptionTest.php rename to tests/Unit/Model/TranscriptionTest.php diff --git a/tests/Model/TransferAnswerCallbackTest.php b/tests/Unit/Model/TransferAnswerCallbackTest.php similarity index 100% rename from tests/Model/TransferAnswerCallbackTest.php rename to tests/Unit/Model/TransferAnswerCallbackTest.php diff --git a/tests/Model/TransferCompleteCallbackTest.php b/tests/Unit/Model/TransferCompleteCallbackTest.php similarity index 100% rename from tests/Model/TransferCompleteCallbackTest.php rename to tests/Unit/Model/TransferCompleteCallbackTest.php diff --git a/tests/Model/TransferDisconnectCallbackTest.php b/tests/Unit/Model/TransferDisconnectCallbackTest.php similarity index 100% rename from tests/Model/TransferDisconnectCallbackTest.php rename to tests/Unit/Model/TransferDisconnectCallbackTest.php diff --git a/tests/Model/UpdateCallRecordingTest.php b/tests/Unit/Model/UpdateCallRecordingTest.php similarity index 100% rename from tests/Model/UpdateCallRecordingTest.php rename to tests/Unit/Model/UpdateCallRecordingTest.php diff --git a/tests/Model/UpdateCallTest.php b/tests/Unit/Model/UpdateCallTest.php similarity index 100% rename from tests/Model/UpdateCallTest.php rename to tests/Unit/Model/UpdateCallTest.php diff --git a/tests/Model/UpdateConferenceMemberTest.php b/tests/Unit/Model/UpdateConferenceMemberTest.php similarity index 100% rename from tests/Model/UpdateConferenceMemberTest.php rename to tests/Unit/Model/UpdateConferenceMemberTest.php diff --git a/tests/Model/UpdateConferenceTest.php b/tests/Unit/Model/UpdateConferenceTest.php similarity index 100% rename from tests/Model/UpdateConferenceTest.php rename to tests/Unit/Model/UpdateConferenceTest.php diff --git a/tests/Model/VerificationDenialWebhookTest.php b/tests/Unit/Model/VerificationDenialWebhookTest.php similarity index 100% rename from tests/Model/VerificationDenialWebhookTest.php rename to tests/Unit/Model/VerificationDenialWebhookTest.php diff --git a/tests/Model/VerificationRequestTest.php b/tests/Unit/Model/VerificationRequestTest.php similarity index 100% rename from tests/Model/VerificationRequestTest.php rename to tests/Unit/Model/VerificationRequestTest.php diff --git a/tests/Model/VerificationUpdateRequestTest.php b/tests/Unit/Model/VerificationUpdateRequestTest.php similarity index 100% rename from tests/Model/VerificationUpdateRequestTest.php rename to tests/Unit/Model/VerificationUpdateRequestTest.php diff --git a/tests/Model/VerificationWebhookTest.php b/tests/Unit/Model/VerificationWebhookTest.php similarity index 100% rename from tests/Model/VerificationWebhookTest.php rename to tests/Unit/Model/VerificationWebhookTest.php diff --git a/tests/Model/VerifyCodeRequestTest.php b/tests/Unit/Model/VerifyCodeRequestTest.php similarity index 100% rename from tests/Model/VerifyCodeRequestTest.php rename to tests/Unit/Model/VerifyCodeRequestTest.php diff --git a/tests/Model/VerifyCodeResponseTest.php b/tests/Unit/Model/VerifyCodeResponseTest.php similarity index 100% rename from tests/Model/VerifyCodeResponseTest.php rename to tests/Unit/Model/VerifyCodeResponseTest.php diff --git a/tests/Model/VoiceApiErrorTest.php b/tests/Unit/Model/VoiceApiErrorTest.php similarity index 100% rename from tests/Model/VoiceApiErrorTest.php rename to tests/Unit/Model/VoiceApiErrorTest.php diff --git a/tests/Model/VoiceCodeResponseTest.php b/tests/Unit/Model/VoiceCodeResponseTest.php similarity index 100% rename from tests/Model/VoiceCodeResponseTest.php rename to tests/Unit/Model/VoiceCodeResponseTest.php diff --git a/tests/Model/WebhookSubscriptionBasicAuthenticationTest.php b/tests/Unit/Model/WebhookSubscriptionBasicAuthenticationTest.php similarity index 100% rename from tests/Model/WebhookSubscriptionBasicAuthenticationTest.php rename to tests/Unit/Model/WebhookSubscriptionBasicAuthenticationTest.php diff --git a/tests/Model/WebhookSubscriptionErrorTest.php b/tests/Unit/Model/WebhookSubscriptionErrorTest.php similarity index 100% rename from tests/Model/WebhookSubscriptionErrorTest.php rename to tests/Unit/Model/WebhookSubscriptionErrorTest.php diff --git a/tests/Model/WebhookSubscriptionRequestSchemaTest.php b/tests/Unit/Model/WebhookSubscriptionRequestSchemaTest.php similarity index 100% rename from tests/Model/WebhookSubscriptionRequestSchemaTest.php rename to tests/Unit/Model/WebhookSubscriptionRequestSchemaTest.php diff --git a/tests/Model/WebhookSubscriptionTest.php b/tests/Unit/Model/WebhookSubscriptionTest.php similarity index 100% rename from tests/Model/WebhookSubscriptionTest.php rename to tests/Unit/Model/WebhookSubscriptionTest.php diff --git a/tests/Model/WebhookSubscriptionTypeEnumTest.php b/tests/Unit/Model/WebhookSubscriptionTypeEnumTest.php similarity index 100% rename from tests/Model/WebhookSubscriptionTypeEnumTest.php rename to tests/Unit/Model/WebhookSubscriptionTypeEnumTest.php diff --git a/tests/Model/WebhookSubscriptionsListBodyTest.php b/tests/Unit/Model/WebhookSubscriptionsListBodyTest.php similarity index 100% rename from tests/Model/WebhookSubscriptionsListBodyTest.php rename to tests/Unit/Model/WebhookSubscriptionsListBodyTest.php From aa910cac07746a651266918f48904589134e2703 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 18 Aug 2026 11:47:39 -0400 Subject: [PATCH 27/53] update namespaces --- tests/Unit/Model/AccountStatisticsTest.php | 2 +- tests/Unit/Model/AdditionalDenialReasonTest.php | 2 +- tests/Unit/Model/AddressTest.php | 2 +- tests/Unit/Model/AnswerCallbackTest.php | 2 +- tests/Unit/Model/AsyncLookupRequestTest.php | 2 +- tests/Unit/Model/BlockedWebhookTest.php | 2 +- tests/Unit/Model/BridgeCompleteCallbackTest.php | 2 +- tests/Unit/Model/BridgeTargetCompleteCallbackTest.php | 2 +- tests/Unit/Model/BrtcErrorResponseTest.php | 2 +- tests/Unit/Model/BrtcErrorSourceTest.php | 2 +- tests/Unit/Model/BrtcErrorTest.php | 2 +- tests/Unit/Model/BrtcLinkTest.php | 2 +- tests/Unit/Model/BusinessEntityTypeEnumTest.php | 2 +- tests/Unit/Model/BusinessRegistrationTypeEnumTest.php | 2 +- tests/Unit/Model/CallDirectionEnumTest.php | 2 +- tests/Unit/Model/CallRecordingMetadataTest.php | 2 +- tests/Unit/Model/CallStateEnumTest.php | 2 +- tests/Unit/Model/CallStateTest.php | 2 +- tests/Unit/Model/CallTranscriptionDetectedLanguageEnumTest.php | 2 +- tests/Unit/Model/CallTranscriptionMetadataTest.php | 2 +- tests/Unit/Model/CallTranscriptionResponseTest.php | 2 +- tests/Unit/Model/CallTranscriptionTest.php | 2 +- tests/Unit/Model/CallTranscriptionTrackEnumTest.php | 2 +- tests/Unit/Model/CallbackMethodEnumTest.php | 2 +- tests/Unit/Model/CallbackTest.php | 2 +- tests/Unit/Model/CardWidthEnumTest.php | 2 +- tests/Unit/Model/CodeRequestTest.php | 2 +- tests/Unit/Model/CompletedLookupStatusEnumTest.php | 2 +- tests/Unit/Model/ConferenceCompletedCallbackTest.php | 2 +- tests/Unit/Model/ConferenceCreatedCallbackTest.php | 2 +- tests/Unit/Model/ConferenceMemberExitCallbackTest.php | 2 +- tests/Unit/Model/ConferenceMemberJoinCallbackTest.php | 2 +- tests/Unit/Model/ConferenceMemberTest.php | 2 +- tests/Unit/Model/ConferenceRecordingAvailableCallbackTest.php | 2 +- tests/Unit/Model/ConferenceRecordingMetadataTest.php | 2 +- tests/Unit/Model/ConferenceRedirectCallbackTest.php | 2 +- tests/Unit/Model/ConferenceStateEnumTest.php | 2 +- tests/Unit/Model/ConferenceTest.php | 2 +- tests/Unit/Model/ContactTest.php | 2 +- tests/Unit/Model/CreateAsyncBulkLookupResponseDataTest.php | 2 +- tests/Unit/Model/CreateAsyncBulkLookupResponseTest.php | 2 +- tests/Unit/Model/CreateCallResponseTest.php | 2 +- tests/Unit/Model/CreateCallTest.php | 2 +- tests/Unit/Model/CreateEndpointRequestBaseTest.php | 2 +- tests/Unit/Model/CreateEndpointResponseDataTest.php | 2 +- tests/Unit/Model/CreateEndpointResponseTest.php | 2 +- tests/Unit/Model/CreateMessageRequestErrorTest.php | 2 +- tests/Unit/Model/CreateMultiChannelMessageResponseTest.php | 2 +- tests/Unit/Model/CreateSyncLookupResponseDataTest.php | 2 +- tests/Unit/Model/CreateSyncLookupResponseTest.php | 2 +- tests/Unit/Model/CreateWebRtcConnectionRequestTest.php | 2 +- tests/Unit/Model/DeactivationEventEnumTest.php | 2 +- tests/Unit/Model/DeviceStatusEnumTest.php | 2 +- tests/Unit/Model/DeviceTest.php | 2 +- tests/Unit/Model/DisconnectCallbackTest.php | 2 +- tests/Unit/Model/DiversionTest.php | 2 +- tests/Unit/Model/DtmfCallbackTest.php | 2 +- tests/Unit/Model/EndpointDirectionEnumTest.php | 2 +- tests/Unit/Model/EndpointEventTest.php | 2 +- tests/Unit/Model/EndpointEventTypeEnumTest.php | 2 +- tests/Unit/Model/EndpointResponseTest.php | 2 +- tests/Unit/Model/EndpointStatusEnumTest.php | 2 +- tests/Unit/Model/EndpointTest.php | 2 +- tests/Unit/Model/EndpointTypeEnumTest.php | 2 +- tests/Unit/Model/EndpointsTest.php | 2 +- tests/Unit/Model/ErrorObjectTest.php | 2 +- tests/Unit/Model/ErrorSourceTest.php | 2 +- tests/Unit/Model/FailureWebhookTest.php | 2 +- tests/Unit/Model/FieldErrorTest.php | 2 +- tests/Unit/Model/FileFormatEnumTest.php | 2 +- tests/Unit/Model/GatherCallbackTest.php | 2 +- tests/Unit/Model/GetAsyncBulkLookupResponseDataTest.php | 2 +- tests/Unit/Model/GetAsyncBulkLookupResponseTest.php | 2 +- tests/Unit/Model/InProgressLookupStatusEnumTest.php | 2 +- tests/Unit/Model/InboundCallbackMessageTest.php | 2 +- tests/Unit/Model/InboundCallbackTest.php | 2 +- tests/Unit/Model/InboundCallbackTypeEnumTest.php | 2 +- tests/Unit/Model/InitiateCallbackTest.php | 2 +- tests/Unit/Model/LatestMessageDeliveryStatusEnumTest.php | 2 +- tests/Unit/Model/LineTypeEnumTest.php | 2 +- tests/Unit/Model/LinkSchemaTest.php | 2 +- tests/Unit/Model/LinkTest.php | 2 +- tests/Unit/Model/LinksObjectTest.php | 2 +- tests/Unit/Model/ListEndpointsResponseTest.php | 2 +- tests/Unit/Model/ListMessageDirectionEnumTest.php | 2 +- tests/Unit/Model/ListMessageItemTest.php | 2 +- tests/Unit/Model/LookupErrorResponseTest.php | 2 +- tests/Unit/Model/LookupErrorSchemaMetaTest.php | 2 +- tests/Unit/Model/LookupErrorSchemaTest.php | 2 +- tests/Unit/Model/LookupResultTest.php | 2 +- tests/Unit/Model/MachineDetectionCompleteCallbackTest.php | 2 +- tests/Unit/Model/MachineDetectionConfigurationTest.php | 2 +- tests/Unit/Model/MachineDetectionModeEnumTest.php | 2 +- tests/Unit/Model/MachineDetectionResultTest.php | 2 +- tests/Unit/Model/MediaTest.php | 2 +- tests/Unit/Model/MessageDirectionEnumTest.php | 2 +- tests/Unit/Model/MessageRequestTest.php | 2 +- tests/Unit/Model/MessageStatusEnumTest.php | 2 +- tests/Unit/Model/MessageTest.php | 2 +- tests/Unit/Model/MessageTypeEnumTest.php | 2 +- tests/Unit/Model/MessagesListTest.php | 2 +- tests/Unit/Model/MessagingCodeResponseTest.php | 2 +- tests/Unit/Model/MessagingRequestErrorTest.php | 2 +- tests/Unit/Model/MfaForbiddenRequestErrorTest.php | 2 +- tests/Unit/Model/MfaRequestErrorTest.php | 2 +- tests/Unit/Model/MfaUnauthorizedRequestErrorTest.php | 2 +- tests/Unit/Model/MmsMessageContentFileTest.php | 2 +- tests/Unit/Model/MmsMessageContentTest.php | 2 +- tests/Unit/Model/MultiChannelActionCalendarEventTest.php | 2 +- tests/Unit/Model/MultiChannelActionTest.php | 2 +- tests/Unit/Model/MultiChannelChannelListMMSObjectTest.php | 2 +- .../Unit/Model/MultiChannelChannelListMMSResponseObjectTest.php | 2 +- tests/Unit/Model/MultiChannelChannelListObjectBaseTest.php | 2 +- tests/Unit/Model/MultiChannelChannelListOwnerObjectTest.php | 2 +- .../Model/MultiChannelChannelListRBMObjectAllOfContentTest.php | 2 +- tests/Unit/Model/MultiChannelChannelListRBMObjectTest.php | 2 +- .../Unit/Model/MultiChannelChannelListRBMResponseObjectTest.php | 2 +- tests/Unit/Model/MultiChannelChannelListRequestObjectTest.php | 2 +- tests/Unit/Model/MultiChannelChannelListResponseObjectTest.php | 2 +- tests/Unit/Model/MultiChannelChannelListSMSObjectTest.php | 2 +- .../Unit/Model/MultiChannelChannelListSMSResponseObjectTest.php | 2 +- tests/Unit/Model/MultiChannelErrorTest.php | 2 +- tests/Unit/Model/MultiChannelMessageChannelEnumTest.php | 2 +- tests/Unit/Model/MultiChannelMessageContentTest.php | 2 +- tests/Unit/Model/MultiChannelMessageRequestTest.php | 2 +- tests/Unit/Model/MultiChannelMessageResponseDataTest.php | 2 +- tests/Unit/Model/OptInWorkflowTest.php | 2 +- tests/Unit/Model/PageInfoTest.php | 2 +- tests/Unit/Model/PageTest.php | 2 +- tests/Unit/Model/PriorityEnumTest.php | 2 +- tests/Unit/Model/ProductTypeEnumTest.php | 2 +- tests/Unit/Model/RbmActionBaseTest.php | 2 +- tests/Unit/Model/RbmActionDialTest.php | 2 +- tests/Unit/Model/RbmActionOpenUrlTest.php | 2 +- tests/Unit/Model/RbmActionTypeEnumTest.php | 2 +- tests/Unit/Model/RbmActionViewLocationTest.php | 2 +- tests/Unit/Model/RbmCardContentMediaTest.php | 2 +- tests/Unit/Model/RbmCardContentTest.php | 2 +- tests/Unit/Model/RbmLocationResponseTest.php | 2 +- tests/Unit/Model/RbmMediaHeightEnumTest.php | 2 +- tests/Unit/Model/RbmMessageCarouselCardTest.php | 2 +- tests/Unit/Model/RbmMessageContentFileTest.php | 2 +- tests/Unit/Model/RbmMessageContentRichCardTest.php | 2 +- tests/Unit/Model/RbmMessageContentTextTest.php | 2 +- tests/Unit/Model/RbmMessageMediaTest.php | 2 +- tests/Unit/Model/RbmOpenUrlEnumTest.php | 2 +- tests/Unit/Model/RbmStandaloneCardTest.php | 2 +- tests/Unit/Model/RbmSuggestionResponseTest.php | 2 +- tests/Unit/Model/RbmWebViewEnumTest.php | 2 +- tests/Unit/Model/RecordingAvailableCallbackTest.php | 2 +- tests/Unit/Model/RecordingCompleteCallbackTest.php | 2 +- tests/Unit/Model/RecordingStateEnumTest.php | 2 +- tests/Unit/Model/RecordingTranscriptionClipTest.php | 2 +- tests/Unit/Model/RecordingTranscriptionMetadataTest.php | 2 +- tests/Unit/Model/RecordingTranscriptionsTest.php | 2 +- tests/Unit/Model/RedirectCallbackTest.php | 2 +- tests/Unit/Model/RedirectMethodEnumTest.php | 2 +- tests/Unit/Model/SipConnectionMetadataTest.php | 2 +- tests/Unit/Model/SipCredentialsTest.php | 2 +- tests/Unit/Model/SmsMessageContentTest.php | 2 +- tests/Unit/Model/StandaloneCardOrientationEnumTest.php | 2 +- tests/Unit/Model/StatusCallbackMessageTest.php | 2 +- tests/Unit/Model/StatusCallbackTest.php | 2 +- tests/Unit/Model/StatusCallbackTypeEnumTest.php | 2 +- tests/Unit/Model/StirShakenTest.php | 2 +- tests/Unit/Model/SyncLookupRequestTest.php | 2 +- tests/Unit/Model/TelephoneNumberTest.php | 2 +- tests/Unit/Model/TfvBasicAuthenticationTest.php | 2 +- tests/Unit/Model/TfvCallbackStatusEnumTest.php | 2 +- tests/Unit/Model/TfvErrorTest.php | 2 +- tests/Unit/Model/TfvStatusEnumTest.php | 2 +- tests/Unit/Model/TfvStatusTest.php | 2 +- tests/Unit/Model/TfvSubmissionInfoTest.php | 2 +- tests/Unit/Model/TfvSubmissionWrapperTest.php | 2 +- tests/Unit/Model/ThumbnailAlignmentEnumTest.php | 2 +- tests/Unit/Model/TranscribeRecordingTest.php | 2 +- tests/Unit/Model/TranscriptionAvailableCallbackTest.php | 2 +- tests/Unit/Model/TranscriptionTest.php | 2 +- tests/Unit/Model/TransferAnswerCallbackTest.php | 2 +- tests/Unit/Model/TransferCompleteCallbackTest.php | 2 +- tests/Unit/Model/TransferDisconnectCallbackTest.php | 2 +- tests/Unit/Model/UpdateCallRecordingTest.php | 2 +- tests/Unit/Model/UpdateCallTest.php | 2 +- tests/Unit/Model/UpdateConferenceMemberTest.php | 2 +- tests/Unit/Model/UpdateConferenceTest.php | 2 +- tests/Unit/Model/VerificationDenialWebhookTest.php | 2 +- tests/Unit/Model/VerificationRequestTest.php | 2 +- tests/Unit/Model/VerificationUpdateRequestTest.php | 2 +- tests/Unit/Model/VerificationWebhookTest.php | 2 +- tests/Unit/Model/VerifyCodeRequestTest.php | 2 +- tests/Unit/Model/VerifyCodeResponseTest.php | 2 +- tests/Unit/Model/VoiceApiErrorTest.php | 2 +- tests/Unit/Model/VoiceCodeResponseTest.php | 2 +- tests/Unit/Model/WebhookSubscriptionBasicAuthenticationTest.php | 2 +- tests/Unit/Model/WebhookSubscriptionErrorTest.php | 2 +- tests/Unit/Model/WebhookSubscriptionRequestSchemaTest.php | 2 +- tests/Unit/Model/WebhookSubscriptionTest.php | 2 +- tests/Unit/Model/WebhookSubscriptionTypeEnumTest.php | 2 +- tests/Unit/Model/WebhookSubscriptionsListBodyTest.php | 2 +- 199 files changed, 199 insertions(+), 199 deletions(-) diff --git a/tests/Unit/Model/AccountStatisticsTest.php b/tests/Unit/Model/AccountStatisticsTest.php index 0d8083ff..210cf883 100644 --- a/tests/Unit/Model/AccountStatisticsTest.php +++ b/tests/Unit/Model/AccountStatisticsTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/AdditionalDenialReasonTest.php b/tests/Unit/Model/AdditionalDenialReasonTest.php index 49190931..2c22c4be 100644 --- a/tests/Unit/Model/AdditionalDenialReasonTest.php +++ b/tests/Unit/Model/AdditionalDenialReasonTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/AddressTest.php b/tests/Unit/Model/AddressTest.php index 2183d3b4..ffedb829 100644 --- a/tests/Unit/Model/AddressTest.php +++ b/tests/Unit/Model/AddressTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/AnswerCallbackTest.php b/tests/Unit/Model/AnswerCallbackTest.php index accf41b9..79f3e09a 100644 --- a/tests/Unit/Model/AnswerCallbackTest.php +++ b/tests/Unit/Model/AnswerCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/AsyncLookupRequestTest.php b/tests/Unit/Model/AsyncLookupRequestTest.php index 60f6af72..66ebf719 100644 --- a/tests/Unit/Model/AsyncLookupRequestTest.php +++ b/tests/Unit/Model/AsyncLookupRequestTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/BlockedWebhookTest.php b/tests/Unit/Model/BlockedWebhookTest.php index f346c45d..abb3d015 100644 --- a/tests/Unit/Model/BlockedWebhookTest.php +++ b/tests/Unit/Model/BlockedWebhookTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/BridgeCompleteCallbackTest.php b/tests/Unit/Model/BridgeCompleteCallbackTest.php index 4e0747d2..dc15b8c1 100644 --- a/tests/Unit/Model/BridgeCompleteCallbackTest.php +++ b/tests/Unit/Model/BridgeCompleteCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/BridgeTargetCompleteCallbackTest.php b/tests/Unit/Model/BridgeTargetCompleteCallbackTest.php index 31dca6d1..68b86179 100644 --- a/tests/Unit/Model/BridgeTargetCompleteCallbackTest.php +++ b/tests/Unit/Model/BridgeTargetCompleteCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/BrtcErrorResponseTest.php b/tests/Unit/Model/BrtcErrorResponseTest.php index 1aa1b348..30d68d43 100644 --- a/tests/Unit/Model/BrtcErrorResponseTest.php +++ b/tests/Unit/Model/BrtcErrorResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/BrtcErrorSourceTest.php b/tests/Unit/Model/BrtcErrorSourceTest.php index 1f530208..0e4c17d9 100644 --- a/tests/Unit/Model/BrtcErrorSourceTest.php +++ b/tests/Unit/Model/BrtcErrorSourceTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/BrtcErrorTest.php b/tests/Unit/Model/BrtcErrorTest.php index 0f952468..ec365703 100644 --- a/tests/Unit/Model/BrtcErrorTest.php +++ b/tests/Unit/Model/BrtcErrorTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/BrtcLinkTest.php b/tests/Unit/Model/BrtcLinkTest.php index fc57e83a..01d827aa 100644 --- a/tests/Unit/Model/BrtcLinkTest.php +++ b/tests/Unit/Model/BrtcLinkTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/BusinessEntityTypeEnumTest.php b/tests/Unit/Model/BusinessEntityTypeEnumTest.php index 04dfad79..f7ab11dd 100644 --- a/tests/Unit/Model/BusinessEntityTypeEnumTest.php +++ b/tests/Unit/Model/BusinessEntityTypeEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/BusinessRegistrationTypeEnumTest.php b/tests/Unit/Model/BusinessRegistrationTypeEnumTest.php index 6e5ee134..09cb2aa8 100644 --- a/tests/Unit/Model/BusinessRegistrationTypeEnumTest.php +++ b/tests/Unit/Model/BusinessRegistrationTypeEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CallDirectionEnumTest.php b/tests/Unit/Model/CallDirectionEnumTest.php index 24baa516..b8ddc0e4 100644 --- a/tests/Unit/Model/CallDirectionEnumTest.php +++ b/tests/Unit/Model/CallDirectionEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CallRecordingMetadataTest.php b/tests/Unit/Model/CallRecordingMetadataTest.php index e2cc61e5..8ed2dd7b 100644 --- a/tests/Unit/Model/CallRecordingMetadataTest.php +++ b/tests/Unit/Model/CallRecordingMetadataTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CallStateEnumTest.php b/tests/Unit/Model/CallStateEnumTest.php index 48b75f84..bf3f5745 100644 --- a/tests/Unit/Model/CallStateEnumTest.php +++ b/tests/Unit/Model/CallStateEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CallStateTest.php b/tests/Unit/Model/CallStateTest.php index 315e5570..36d5c1fa 100644 --- a/tests/Unit/Model/CallStateTest.php +++ b/tests/Unit/Model/CallStateTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CallTranscriptionDetectedLanguageEnumTest.php b/tests/Unit/Model/CallTranscriptionDetectedLanguageEnumTest.php index 02b90509..9fab0e83 100644 --- a/tests/Unit/Model/CallTranscriptionDetectedLanguageEnumTest.php +++ b/tests/Unit/Model/CallTranscriptionDetectedLanguageEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CallTranscriptionMetadataTest.php b/tests/Unit/Model/CallTranscriptionMetadataTest.php index 0ad2c57d..b524a16c 100644 --- a/tests/Unit/Model/CallTranscriptionMetadataTest.php +++ b/tests/Unit/Model/CallTranscriptionMetadataTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CallTranscriptionResponseTest.php b/tests/Unit/Model/CallTranscriptionResponseTest.php index 91054401..71630afb 100644 --- a/tests/Unit/Model/CallTranscriptionResponseTest.php +++ b/tests/Unit/Model/CallTranscriptionResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CallTranscriptionTest.php b/tests/Unit/Model/CallTranscriptionTest.php index 9bde7155..ead1e65f 100644 --- a/tests/Unit/Model/CallTranscriptionTest.php +++ b/tests/Unit/Model/CallTranscriptionTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CallTranscriptionTrackEnumTest.php b/tests/Unit/Model/CallTranscriptionTrackEnumTest.php index 0d1e17ec..e3947dfb 100644 --- a/tests/Unit/Model/CallTranscriptionTrackEnumTest.php +++ b/tests/Unit/Model/CallTranscriptionTrackEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CallbackMethodEnumTest.php b/tests/Unit/Model/CallbackMethodEnumTest.php index e1f9bdbb..f4769f4e 100644 --- a/tests/Unit/Model/CallbackMethodEnumTest.php +++ b/tests/Unit/Model/CallbackMethodEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CallbackTest.php b/tests/Unit/Model/CallbackTest.php index ec514806..3880bdf3 100644 --- a/tests/Unit/Model/CallbackTest.php +++ b/tests/Unit/Model/CallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CardWidthEnumTest.php b/tests/Unit/Model/CardWidthEnumTest.php index 04ec5ac2..47775386 100644 --- a/tests/Unit/Model/CardWidthEnumTest.php +++ b/tests/Unit/Model/CardWidthEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CodeRequestTest.php b/tests/Unit/Model/CodeRequestTest.php index decf204a..ab9f9683 100644 --- a/tests/Unit/Model/CodeRequestTest.php +++ b/tests/Unit/Model/CodeRequestTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CompletedLookupStatusEnumTest.php b/tests/Unit/Model/CompletedLookupStatusEnumTest.php index e9940592..7884bb27 100644 --- a/tests/Unit/Model/CompletedLookupStatusEnumTest.php +++ b/tests/Unit/Model/CompletedLookupStatusEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ConferenceCompletedCallbackTest.php b/tests/Unit/Model/ConferenceCompletedCallbackTest.php index 1aba3e62..b48338bc 100644 --- a/tests/Unit/Model/ConferenceCompletedCallbackTest.php +++ b/tests/Unit/Model/ConferenceCompletedCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ConferenceCreatedCallbackTest.php b/tests/Unit/Model/ConferenceCreatedCallbackTest.php index ae9903ab..0364ca7b 100644 --- a/tests/Unit/Model/ConferenceCreatedCallbackTest.php +++ b/tests/Unit/Model/ConferenceCreatedCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ConferenceMemberExitCallbackTest.php b/tests/Unit/Model/ConferenceMemberExitCallbackTest.php index 8725f4b0..cd06fcec 100644 --- a/tests/Unit/Model/ConferenceMemberExitCallbackTest.php +++ b/tests/Unit/Model/ConferenceMemberExitCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ConferenceMemberJoinCallbackTest.php b/tests/Unit/Model/ConferenceMemberJoinCallbackTest.php index 609d4ebc..7a6016e5 100644 --- a/tests/Unit/Model/ConferenceMemberJoinCallbackTest.php +++ b/tests/Unit/Model/ConferenceMemberJoinCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ConferenceMemberTest.php b/tests/Unit/Model/ConferenceMemberTest.php index 9aa66c4f..262bc9cf 100644 --- a/tests/Unit/Model/ConferenceMemberTest.php +++ b/tests/Unit/Model/ConferenceMemberTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ConferenceRecordingAvailableCallbackTest.php b/tests/Unit/Model/ConferenceRecordingAvailableCallbackTest.php index e025376c..3540489e 100644 --- a/tests/Unit/Model/ConferenceRecordingAvailableCallbackTest.php +++ b/tests/Unit/Model/ConferenceRecordingAvailableCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ConferenceRecordingMetadataTest.php b/tests/Unit/Model/ConferenceRecordingMetadataTest.php index a1c10281..42a019f2 100644 --- a/tests/Unit/Model/ConferenceRecordingMetadataTest.php +++ b/tests/Unit/Model/ConferenceRecordingMetadataTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ConferenceRedirectCallbackTest.php b/tests/Unit/Model/ConferenceRedirectCallbackTest.php index e5c49cff..0966a60a 100644 --- a/tests/Unit/Model/ConferenceRedirectCallbackTest.php +++ b/tests/Unit/Model/ConferenceRedirectCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ConferenceStateEnumTest.php b/tests/Unit/Model/ConferenceStateEnumTest.php index 68dbca33..7874668f 100644 --- a/tests/Unit/Model/ConferenceStateEnumTest.php +++ b/tests/Unit/Model/ConferenceStateEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ConferenceTest.php b/tests/Unit/Model/ConferenceTest.php index fd76e822..0d13610b 100644 --- a/tests/Unit/Model/ConferenceTest.php +++ b/tests/Unit/Model/ConferenceTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ContactTest.php b/tests/Unit/Model/ContactTest.php index 7706dca3..abcf781f 100644 --- a/tests/Unit/Model/ContactTest.php +++ b/tests/Unit/Model/ContactTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CreateAsyncBulkLookupResponseDataTest.php b/tests/Unit/Model/CreateAsyncBulkLookupResponseDataTest.php index 2866b700..0e6f6aca 100644 --- a/tests/Unit/Model/CreateAsyncBulkLookupResponseDataTest.php +++ b/tests/Unit/Model/CreateAsyncBulkLookupResponseDataTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CreateAsyncBulkLookupResponseTest.php b/tests/Unit/Model/CreateAsyncBulkLookupResponseTest.php index befa7dd6..3ff9ae49 100644 --- a/tests/Unit/Model/CreateAsyncBulkLookupResponseTest.php +++ b/tests/Unit/Model/CreateAsyncBulkLookupResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CreateCallResponseTest.php b/tests/Unit/Model/CreateCallResponseTest.php index f3a2ff99..13659d2a 100644 --- a/tests/Unit/Model/CreateCallResponseTest.php +++ b/tests/Unit/Model/CreateCallResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CreateCallTest.php b/tests/Unit/Model/CreateCallTest.php index 7408353a..bab49387 100644 --- a/tests/Unit/Model/CreateCallTest.php +++ b/tests/Unit/Model/CreateCallTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CreateEndpointRequestBaseTest.php b/tests/Unit/Model/CreateEndpointRequestBaseTest.php index 3ceb0f58..b10942ea 100644 --- a/tests/Unit/Model/CreateEndpointRequestBaseTest.php +++ b/tests/Unit/Model/CreateEndpointRequestBaseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CreateEndpointResponseDataTest.php b/tests/Unit/Model/CreateEndpointResponseDataTest.php index e07ed9d6..dc1cba79 100644 --- a/tests/Unit/Model/CreateEndpointResponseDataTest.php +++ b/tests/Unit/Model/CreateEndpointResponseDataTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CreateEndpointResponseTest.php b/tests/Unit/Model/CreateEndpointResponseTest.php index 728273a7..502b4407 100644 --- a/tests/Unit/Model/CreateEndpointResponseTest.php +++ b/tests/Unit/Model/CreateEndpointResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CreateMessageRequestErrorTest.php b/tests/Unit/Model/CreateMessageRequestErrorTest.php index b9948ce7..f8307a0c 100644 --- a/tests/Unit/Model/CreateMessageRequestErrorTest.php +++ b/tests/Unit/Model/CreateMessageRequestErrorTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CreateMultiChannelMessageResponseTest.php b/tests/Unit/Model/CreateMultiChannelMessageResponseTest.php index 3b8d788c..0decfdde 100644 --- a/tests/Unit/Model/CreateMultiChannelMessageResponseTest.php +++ b/tests/Unit/Model/CreateMultiChannelMessageResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CreateSyncLookupResponseDataTest.php b/tests/Unit/Model/CreateSyncLookupResponseDataTest.php index e4cd6619..acbb55e6 100644 --- a/tests/Unit/Model/CreateSyncLookupResponseDataTest.php +++ b/tests/Unit/Model/CreateSyncLookupResponseDataTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CreateSyncLookupResponseTest.php b/tests/Unit/Model/CreateSyncLookupResponseTest.php index d7e1a35b..6edb323b 100644 --- a/tests/Unit/Model/CreateSyncLookupResponseTest.php +++ b/tests/Unit/Model/CreateSyncLookupResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/CreateWebRtcConnectionRequestTest.php b/tests/Unit/Model/CreateWebRtcConnectionRequestTest.php index c8387bcf..7a4443fa 100644 --- a/tests/Unit/Model/CreateWebRtcConnectionRequestTest.php +++ b/tests/Unit/Model/CreateWebRtcConnectionRequestTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/DeactivationEventEnumTest.php b/tests/Unit/Model/DeactivationEventEnumTest.php index 2790b4bf..70fc36e2 100644 --- a/tests/Unit/Model/DeactivationEventEnumTest.php +++ b/tests/Unit/Model/DeactivationEventEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/DeviceStatusEnumTest.php b/tests/Unit/Model/DeviceStatusEnumTest.php index a1eef865..41102a76 100644 --- a/tests/Unit/Model/DeviceStatusEnumTest.php +++ b/tests/Unit/Model/DeviceStatusEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/DeviceTest.php b/tests/Unit/Model/DeviceTest.php index 0ed36e1e..9554947b 100644 --- a/tests/Unit/Model/DeviceTest.php +++ b/tests/Unit/Model/DeviceTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/DisconnectCallbackTest.php b/tests/Unit/Model/DisconnectCallbackTest.php index 5a81cfa8..ca6f196e 100644 --- a/tests/Unit/Model/DisconnectCallbackTest.php +++ b/tests/Unit/Model/DisconnectCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/DiversionTest.php b/tests/Unit/Model/DiversionTest.php index d8ca0632..8712a87b 100644 --- a/tests/Unit/Model/DiversionTest.php +++ b/tests/Unit/Model/DiversionTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/DtmfCallbackTest.php b/tests/Unit/Model/DtmfCallbackTest.php index b27ad1aa..cf940a9f 100644 --- a/tests/Unit/Model/DtmfCallbackTest.php +++ b/tests/Unit/Model/DtmfCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/EndpointDirectionEnumTest.php b/tests/Unit/Model/EndpointDirectionEnumTest.php index 6899a66e..49c68d35 100644 --- a/tests/Unit/Model/EndpointDirectionEnumTest.php +++ b/tests/Unit/Model/EndpointDirectionEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/EndpointEventTest.php b/tests/Unit/Model/EndpointEventTest.php index 8d079186..5958cd62 100644 --- a/tests/Unit/Model/EndpointEventTest.php +++ b/tests/Unit/Model/EndpointEventTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/EndpointEventTypeEnumTest.php b/tests/Unit/Model/EndpointEventTypeEnumTest.php index 84824ea4..db3417ab 100644 --- a/tests/Unit/Model/EndpointEventTypeEnumTest.php +++ b/tests/Unit/Model/EndpointEventTypeEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/EndpointResponseTest.php b/tests/Unit/Model/EndpointResponseTest.php index 337db3aa..ba975dee 100644 --- a/tests/Unit/Model/EndpointResponseTest.php +++ b/tests/Unit/Model/EndpointResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/EndpointStatusEnumTest.php b/tests/Unit/Model/EndpointStatusEnumTest.php index b85fb4b1..3bd7f140 100644 --- a/tests/Unit/Model/EndpointStatusEnumTest.php +++ b/tests/Unit/Model/EndpointStatusEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/EndpointTest.php b/tests/Unit/Model/EndpointTest.php index bd5f5b8a..a0a92868 100644 --- a/tests/Unit/Model/EndpointTest.php +++ b/tests/Unit/Model/EndpointTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/EndpointTypeEnumTest.php b/tests/Unit/Model/EndpointTypeEnumTest.php index 880eb720..6ac51835 100644 --- a/tests/Unit/Model/EndpointTypeEnumTest.php +++ b/tests/Unit/Model/EndpointTypeEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/EndpointsTest.php b/tests/Unit/Model/EndpointsTest.php index 1d2afb5d..704725fb 100644 --- a/tests/Unit/Model/EndpointsTest.php +++ b/tests/Unit/Model/EndpointsTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ErrorObjectTest.php b/tests/Unit/Model/ErrorObjectTest.php index 4a89a8b1..d884dfee 100644 --- a/tests/Unit/Model/ErrorObjectTest.php +++ b/tests/Unit/Model/ErrorObjectTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ErrorSourceTest.php b/tests/Unit/Model/ErrorSourceTest.php index 198ede5d..310f4fc3 100644 --- a/tests/Unit/Model/ErrorSourceTest.php +++ b/tests/Unit/Model/ErrorSourceTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/FailureWebhookTest.php b/tests/Unit/Model/FailureWebhookTest.php index 786b4f5e..3e8a346b 100644 --- a/tests/Unit/Model/FailureWebhookTest.php +++ b/tests/Unit/Model/FailureWebhookTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/FieldErrorTest.php b/tests/Unit/Model/FieldErrorTest.php index 55b4572a..0b5c8095 100644 --- a/tests/Unit/Model/FieldErrorTest.php +++ b/tests/Unit/Model/FieldErrorTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/FileFormatEnumTest.php b/tests/Unit/Model/FileFormatEnumTest.php index c8d2b25c..3cd85714 100644 --- a/tests/Unit/Model/FileFormatEnumTest.php +++ b/tests/Unit/Model/FileFormatEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/GatherCallbackTest.php b/tests/Unit/Model/GatherCallbackTest.php index 21e85959..26c613c9 100644 --- a/tests/Unit/Model/GatherCallbackTest.php +++ b/tests/Unit/Model/GatherCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/GetAsyncBulkLookupResponseDataTest.php b/tests/Unit/Model/GetAsyncBulkLookupResponseDataTest.php index bee5fb6a..6251e873 100644 --- a/tests/Unit/Model/GetAsyncBulkLookupResponseDataTest.php +++ b/tests/Unit/Model/GetAsyncBulkLookupResponseDataTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/GetAsyncBulkLookupResponseTest.php b/tests/Unit/Model/GetAsyncBulkLookupResponseTest.php index 9284cba7..e536672b 100644 --- a/tests/Unit/Model/GetAsyncBulkLookupResponseTest.php +++ b/tests/Unit/Model/GetAsyncBulkLookupResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/InProgressLookupStatusEnumTest.php b/tests/Unit/Model/InProgressLookupStatusEnumTest.php index 7a82bffe..557da236 100644 --- a/tests/Unit/Model/InProgressLookupStatusEnumTest.php +++ b/tests/Unit/Model/InProgressLookupStatusEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/InboundCallbackMessageTest.php b/tests/Unit/Model/InboundCallbackMessageTest.php index f9ed6084..02d25784 100644 --- a/tests/Unit/Model/InboundCallbackMessageTest.php +++ b/tests/Unit/Model/InboundCallbackMessageTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/InboundCallbackTest.php b/tests/Unit/Model/InboundCallbackTest.php index e4e757e9..76c9f38d 100644 --- a/tests/Unit/Model/InboundCallbackTest.php +++ b/tests/Unit/Model/InboundCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/InboundCallbackTypeEnumTest.php b/tests/Unit/Model/InboundCallbackTypeEnumTest.php index 98fa5e85..8c6584ea 100644 --- a/tests/Unit/Model/InboundCallbackTypeEnumTest.php +++ b/tests/Unit/Model/InboundCallbackTypeEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/InitiateCallbackTest.php b/tests/Unit/Model/InitiateCallbackTest.php index 30e05dca..495271b9 100644 --- a/tests/Unit/Model/InitiateCallbackTest.php +++ b/tests/Unit/Model/InitiateCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/LatestMessageDeliveryStatusEnumTest.php b/tests/Unit/Model/LatestMessageDeliveryStatusEnumTest.php index d9eafc4d..75bf33fd 100644 --- a/tests/Unit/Model/LatestMessageDeliveryStatusEnumTest.php +++ b/tests/Unit/Model/LatestMessageDeliveryStatusEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/LineTypeEnumTest.php b/tests/Unit/Model/LineTypeEnumTest.php index eea3a96a..f9d7e14c 100644 --- a/tests/Unit/Model/LineTypeEnumTest.php +++ b/tests/Unit/Model/LineTypeEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/LinkSchemaTest.php b/tests/Unit/Model/LinkSchemaTest.php index 33c0c54b..45af0232 100644 --- a/tests/Unit/Model/LinkSchemaTest.php +++ b/tests/Unit/Model/LinkSchemaTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/LinkTest.php b/tests/Unit/Model/LinkTest.php index b1bc9d0e..fa5ec2d4 100644 --- a/tests/Unit/Model/LinkTest.php +++ b/tests/Unit/Model/LinkTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/LinksObjectTest.php b/tests/Unit/Model/LinksObjectTest.php index 1ba27bf8..62d81394 100644 --- a/tests/Unit/Model/LinksObjectTest.php +++ b/tests/Unit/Model/LinksObjectTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ListEndpointsResponseTest.php b/tests/Unit/Model/ListEndpointsResponseTest.php index 197bc159..0178c85e 100644 --- a/tests/Unit/Model/ListEndpointsResponseTest.php +++ b/tests/Unit/Model/ListEndpointsResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ListMessageDirectionEnumTest.php b/tests/Unit/Model/ListMessageDirectionEnumTest.php index 0c16847c..76ae7ac3 100644 --- a/tests/Unit/Model/ListMessageDirectionEnumTest.php +++ b/tests/Unit/Model/ListMessageDirectionEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ListMessageItemTest.php b/tests/Unit/Model/ListMessageItemTest.php index c2c7286c..07b3b2bd 100644 --- a/tests/Unit/Model/ListMessageItemTest.php +++ b/tests/Unit/Model/ListMessageItemTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/LookupErrorResponseTest.php b/tests/Unit/Model/LookupErrorResponseTest.php index 97b92b15..98ccc911 100644 --- a/tests/Unit/Model/LookupErrorResponseTest.php +++ b/tests/Unit/Model/LookupErrorResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/LookupErrorSchemaMetaTest.php b/tests/Unit/Model/LookupErrorSchemaMetaTest.php index ab9ff69e..c878e1eb 100644 --- a/tests/Unit/Model/LookupErrorSchemaMetaTest.php +++ b/tests/Unit/Model/LookupErrorSchemaMetaTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/LookupErrorSchemaTest.php b/tests/Unit/Model/LookupErrorSchemaTest.php index c5c49b07..dad03354 100644 --- a/tests/Unit/Model/LookupErrorSchemaTest.php +++ b/tests/Unit/Model/LookupErrorSchemaTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/LookupResultTest.php b/tests/Unit/Model/LookupResultTest.php index d78364f6..3065feec 100644 --- a/tests/Unit/Model/LookupResultTest.php +++ b/tests/Unit/Model/LookupResultTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MachineDetectionCompleteCallbackTest.php b/tests/Unit/Model/MachineDetectionCompleteCallbackTest.php index f368c4dd..8ab9778f 100644 --- a/tests/Unit/Model/MachineDetectionCompleteCallbackTest.php +++ b/tests/Unit/Model/MachineDetectionCompleteCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MachineDetectionConfigurationTest.php b/tests/Unit/Model/MachineDetectionConfigurationTest.php index 22dd9221..fb5e9653 100644 --- a/tests/Unit/Model/MachineDetectionConfigurationTest.php +++ b/tests/Unit/Model/MachineDetectionConfigurationTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MachineDetectionModeEnumTest.php b/tests/Unit/Model/MachineDetectionModeEnumTest.php index c0fbc2a0..a5d9b520 100644 --- a/tests/Unit/Model/MachineDetectionModeEnumTest.php +++ b/tests/Unit/Model/MachineDetectionModeEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MachineDetectionResultTest.php b/tests/Unit/Model/MachineDetectionResultTest.php index a588ab99..767307a0 100644 --- a/tests/Unit/Model/MachineDetectionResultTest.php +++ b/tests/Unit/Model/MachineDetectionResultTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MediaTest.php b/tests/Unit/Model/MediaTest.php index 68a11dca..3ab0c18f 100644 --- a/tests/Unit/Model/MediaTest.php +++ b/tests/Unit/Model/MediaTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MessageDirectionEnumTest.php b/tests/Unit/Model/MessageDirectionEnumTest.php index c5445b5d..b008a2bc 100644 --- a/tests/Unit/Model/MessageDirectionEnumTest.php +++ b/tests/Unit/Model/MessageDirectionEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MessageRequestTest.php b/tests/Unit/Model/MessageRequestTest.php index 6bbe8172..ffb49dca 100644 --- a/tests/Unit/Model/MessageRequestTest.php +++ b/tests/Unit/Model/MessageRequestTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MessageStatusEnumTest.php b/tests/Unit/Model/MessageStatusEnumTest.php index 2aa606d0..e881e0f3 100644 --- a/tests/Unit/Model/MessageStatusEnumTest.php +++ b/tests/Unit/Model/MessageStatusEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MessageTest.php b/tests/Unit/Model/MessageTest.php index 2ca74864..0178ea87 100644 --- a/tests/Unit/Model/MessageTest.php +++ b/tests/Unit/Model/MessageTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MessageTypeEnumTest.php b/tests/Unit/Model/MessageTypeEnumTest.php index b4985f4e..7ef3d2d4 100644 --- a/tests/Unit/Model/MessageTypeEnumTest.php +++ b/tests/Unit/Model/MessageTypeEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MessagesListTest.php b/tests/Unit/Model/MessagesListTest.php index 428326be..d6832f57 100644 --- a/tests/Unit/Model/MessagesListTest.php +++ b/tests/Unit/Model/MessagesListTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MessagingCodeResponseTest.php b/tests/Unit/Model/MessagingCodeResponseTest.php index bec9a73e..946dac32 100644 --- a/tests/Unit/Model/MessagingCodeResponseTest.php +++ b/tests/Unit/Model/MessagingCodeResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MessagingRequestErrorTest.php b/tests/Unit/Model/MessagingRequestErrorTest.php index a399309c..4e682e56 100644 --- a/tests/Unit/Model/MessagingRequestErrorTest.php +++ b/tests/Unit/Model/MessagingRequestErrorTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MfaForbiddenRequestErrorTest.php b/tests/Unit/Model/MfaForbiddenRequestErrorTest.php index 6d357668..259e4738 100644 --- a/tests/Unit/Model/MfaForbiddenRequestErrorTest.php +++ b/tests/Unit/Model/MfaForbiddenRequestErrorTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MfaRequestErrorTest.php b/tests/Unit/Model/MfaRequestErrorTest.php index b95f2935..889f3dc8 100644 --- a/tests/Unit/Model/MfaRequestErrorTest.php +++ b/tests/Unit/Model/MfaRequestErrorTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MfaUnauthorizedRequestErrorTest.php b/tests/Unit/Model/MfaUnauthorizedRequestErrorTest.php index 6ba75398..257ca9c6 100644 --- a/tests/Unit/Model/MfaUnauthorizedRequestErrorTest.php +++ b/tests/Unit/Model/MfaUnauthorizedRequestErrorTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MmsMessageContentFileTest.php b/tests/Unit/Model/MmsMessageContentFileTest.php index eb171799..9aa156cf 100644 --- a/tests/Unit/Model/MmsMessageContentFileTest.php +++ b/tests/Unit/Model/MmsMessageContentFileTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MmsMessageContentTest.php b/tests/Unit/Model/MmsMessageContentTest.php index a8b514dc..a133d73e 100644 --- a/tests/Unit/Model/MmsMessageContentTest.php +++ b/tests/Unit/Model/MmsMessageContentTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelActionCalendarEventTest.php b/tests/Unit/Model/MultiChannelActionCalendarEventTest.php index 8f31d8aa..7cae5a20 100644 --- a/tests/Unit/Model/MultiChannelActionCalendarEventTest.php +++ b/tests/Unit/Model/MultiChannelActionCalendarEventTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelActionTest.php b/tests/Unit/Model/MultiChannelActionTest.php index f48bf91f..a2e1cec9 100644 --- a/tests/Unit/Model/MultiChannelActionTest.php +++ b/tests/Unit/Model/MultiChannelActionTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelChannelListMMSObjectTest.php b/tests/Unit/Model/MultiChannelChannelListMMSObjectTest.php index 39c8a400..b85d1604 100644 --- a/tests/Unit/Model/MultiChannelChannelListMMSObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListMMSObjectTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelChannelListMMSResponseObjectTest.php b/tests/Unit/Model/MultiChannelChannelListMMSResponseObjectTest.php index 562e1498..d829d21a 100644 --- a/tests/Unit/Model/MultiChannelChannelListMMSResponseObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListMMSResponseObjectTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelChannelListObjectBaseTest.php b/tests/Unit/Model/MultiChannelChannelListObjectBaseTest.php index 2dbdb474..c6e1fc10 100644 --- a/tests/Unit/Model/MultiChannelChannelListObjectBaseTest.php +++ b/tests/Unit/Model/MultiChannelChannelListObjectBaseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelChannelListOwnerObjectTest.php b/tests/Unit/Model/MultiChannelChannelListOwnerObjectTest.php index 0848aabc..d262980d 100644 --- a/tests/Unit/Model/MultiChannelChannelListOwnerObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListOwnerObjectTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php b/tests/Unit/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php index 3d6365f9..b61b965d 100644 --- a/tests/Unit/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php +++ b/tests/Unit/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelChannelListRBMObjectTest.php b/tests/Unit/Model/MultiChannelChannelListRBMObjectTest.php index 7556d969..9db4ef3f 100644 --- a/tests/Unit/Model/MultiChannelChannelListRBMObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListRBMObjectTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelChannelListRBMResponseObjectTest.php b/tests/Unit/Model/MultiChannelChannelListRBMResponseObjectTest.php index 654781c9..5f878a15 100644 --- a/tests/Unit/Model/MultiChannelChannelListRBMResponseObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListRBMResponseObjectTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelChannelListRequestObjectTest.php b/tests/Unit/Model/MultiChannelChannelListRequestObjectTest.php index 6770ee56..eb47d167 100644 --- a/tests/Unit/Model/MultiChannelChannelListRequestObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListRequestObjectTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelChannelListResponseObjectTest.php b/tests/Unit/Model/MultiChannelChannelListResponseObjectTest.php index 2b7ee6dd..795fedbe 100644 --- a/tests/Unit/Model/MultiChannelChannelListResponseObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListResponseObjectTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelChannelListSMSObjectTest.php b/tests/Unit/Model/MultiChannelChannelListSMSObjectTest.php index b7f24ba3..c490bd5f 100644 --- a/tests/Unit/Model/MultiChannelChannelListSMSObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListSMSObjectTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelChannelListSMSResponseObjectTest.php b/tests/Unit/Model/MultiChannelChannelListSMSResponseObjectTest.php index 1ab7eff3..40f5ffec 100644 --- a/tests/Unit/Model/MultiChannelChannelListSMSResponseObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListSMSResponseObjectTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelErrorTest.php b/tests/Unit/Model/MultiChannelErrorTest.php index 7a04fc0b..bd8cae13 100644 --- a/tests/Unit/Model/MultiChannelErrorTest.php +++ b/tests/Unit/Model/MultiChannelErrorTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelMessageChannelEnumTest.php b/tests/Unit/Model/MultiChannelMessageChannelEnumTest.php index 188ee632..26baae17 100644 --- a/tests/Unit/Model/MultiChannelMessageChannelEnumTest.php +++ b/tests/Unit/Model/MultiChannelMessageChannelEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelMessageContentTest.php b/tests/Unit/Model/MultiChannelMessageContentTest.php index 168fcd37..6cd1c2a3 100644 --- a/tests/Unit/Model/MultiChannelMessageContentTest.php +++ b/tests/Unit/Model/MultiChannelMessageContentTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelMessageRequestTest.php b/tests/Unit/Model/MultiChannelMessageRequestTest.php index 5e359909..767784b5 100644 --- a/tests/Unit/Model/MultiChannelMessageRequestTest.php +++ b/tests/Unit/Model/MultiChannelMessageRequestTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/MultiChannelMessageResponseDataTest.php b/tests/Unit/Model/MultiChannelMessageResponseDataTest.php index 1ab0bb9d..caf34143 100644 --- a/tests/Unit/Model/MultiChannelMessageResponseDataTest.php +++ b/tests/Unit/Model/MultiChannelMessageResponseDataTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/OptInWorkflowTest.php b/tests/Unit/Model/OptInWorkflowTest.php index 7b9c8977..e2caf1ae 100644 --- a/tests/Unit/Model/OptInWorkflowTest.php +++ b/tests/Unit/Model/OptInWorkflowTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/PageInfoTest.php b/tests/Unit/Model/PageInfoTest.php index adf682f7..95892d96 100644 --- a/tests/Unit/Model/PageInfoTest.php +++ b/tests/Unit/Model/PageInfoTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/PageTest.php b/tests/Unit/Model/PageTest.php index 186cb7ca..fbe6bf3c 100644 --- a/tests/Unit/Model/PageTest.php +++ b/tests/Unit/Model/PageTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/PriorityEnumTest.php b/tests/Unit/Model/PriorityEnumTest.php index b81b84a7..523fbf95 100644 --- a/tests/Unit/Model/PriorityEnumTest.php +++ b/tests/Unit/Model/PriorityEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ProductTypeEnumTest.php b/tests/Unit/Model/ProductTypeEnumTest.php index 5f833f3c..06d94c03 100644 --- a/tests/Unit/Model/ProductTypeEnumTest.php +++ b/tests/Unit/Model/ProductTypeEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmActionBaseTest.php b/tests/Unit/Model/RbmActionBaseTest.php index 99a9c956..ac593ec2 100644 --- a/tests/Unit/Model/RbmActionBaseTest.php +++ b/tests/Unit/Model/RbmActionBaseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmActionDialTest.php b/tests/Unit/Model/RbmActionDialTest.php index 1c246427..c13aec0f 100644 --- a/tests/Unit/Model/RbmActionDialTest.php +++ b/tests/Unit/Model/RbmActionDialTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmActionOpenUrlTest.php b/tests/Unit/Model/RbmActionOpenUrlTest.php index 991ae62e..e549a142 100644 --- a/tests/Unit/Model/RbmActionOpenUrlTest.php +++ b/tests/Unit/Model/RbmActionOpenUrlTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmActionTypeEnumTest.php b/tests/Unit/Model/RbmActionTypeEnumTest.php index 81a0103e..11a22af6 100644 --- a/tests/Unit/Model/RbmActionTypeEnumTest.php +++ b/tests/Unit/Model/RbmActionTypeEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmActionViewLocationTest.php b/tests/Unit/Model/RbmActionViewLocationTest.php index 367ff2eb..21100666 100644 --- a/tests/Unit/Model/RbmActionViewLocationTest.php +++ b/tests/Unit/Model/RbmActionViewLocationTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmCardContentMediaTest.php b/tests/Unit/Model/RbmCardContentMediaTest.php index 35fde68c..22f17ada 100644 --- a/tests/Unit/Model/RbmCardContentMediaTest.php +++ b/tests/Unit/Model/RbmCardContentMediaTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmCardContentTest.php b/tests/Unit/Model/RbmCardContentTest.php index 6a082d5a..d0a3ba02 100644 --- a/tests/Unit/Model/RbmCardContentTest.php +++ b/tests/Unit/Model/RbmCardContentTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmLocationResponseTest.php b/tests/Unit/Model/RbmLocationResponseTest.php index af426703..74e6f858 100644 --- a/tests/Unit/Model/RbmLocationResponseTest.php +++ b/tests/Unit/Model/RbmLocationResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmMediaHeightEnumTest.php b/tests/Unit/Model/RbmMediaHeightEnumTest.php index a5f1646a..c286ca7c 100644 --- a/tests/Unit/Model/RbmMediaHeightEnumTest.php +++ b/tests/Unit/Model/RbmMediaHeightEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmMessageCarouselCardTest.php b/tests/Unit/Model/RbmMessageCarouselCardTest.php index 8a966b3c..094d2ff4 100644 --- a/tests/Unit/Model/RbmMessageCarouselCardTest.php +++ b/tests/Unit/Model/RbmMessageCarouselCardTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmMessageContentFileTest.php b/tests/Unit/Model/RbmMessageContentFileTest.php index 35d75ec9..360e0643 100644 --- a/tests/Unit/Model/RbmMessageContentFileTest.php +++ b/tests/Unit/Model/RbmMessageContentFileTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmMessageContentRichCardTest.php b/tests/Unit/Model/RbmMessageContentRichCardTest.php index 98a9e2a6..efb0de9f 100644 --- a/tests/Unit/Model/RbmMessageContentRichCardTest.php +++ b/tests/Unit/Model/RbmMessageContentRichCardTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmMessageContentTextTest.php b/tests/Unit/Model/RbmMessageContentTextTest.php index 99127c22..24670a35 100644 --- a/tests/Unit/Model/RbmMessageContentTextTest.php +++ b/tests/Unit/Model/RbmMessageContentTextTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmMessageMediaTest.php b/tests/Unit/Model/RbmMessageMediaTest.php index b802c19a..5befa055 100644 --- a/tests/Unit/Model/RbmMessageMediaTest.php +++ b/tests/Unit/Model/RbmMessageMediaTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmOpenUrlEnumTest.php b/tests/Unit/Model/RbmOpenUrlEnumTest.php index 8a303126..3e5635c4 100644 --- a/tests/Unit/Model/RbmOpenUrlEnumTest.php +++ b/tests/Unit/Model/RbmOpenUrlEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmStandaloneCardTest.php b/tests/Unit/Model/RbmStandaloneCardTest.php index 2f59cbb9..f24252fd 100644 --- a/tests/Unit/Model/RbmStandaloneCardTest.php +++ b/tests/Unit/Model/RbmStandaloneCardTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmSuggestionResponseTest.php b/tests/Unit/Model/RbmSuggestionResponseTest.php index f1b63d5c..f48a71e9 100644 --- a/tests/Unit/Model/RbmSuggestionResponseTest.php +++ b/tests/Unit/Model/RbmSuggestionResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RbmWebViewEnumTest.php b/tests/Unit/Model/RbmWebViewEnumTest.php index c07899eb..a7f75fbd 100644 --- a/tests/Unit/Model/RbmWebViewEnumTest.php +++ b/tests/Unit/Model/RbmWebViewEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RecordingAvailableCallbackTest.php b/tests/Unit/Model/RecordingAvailableCallbackTest.php index 0d9f45dd..b54b0f3a 100644 --- a/tests/Unit/Model/RecordingAvailableCallbackTest.php +++ b/tests/Unit/Model/RecordingAvailableCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RecordingCompleteCallbackTest.php b/tests/Unit/Model/RecordingCompleteCallbackTest.php index 139009a5..74b4fe89 100644 --- a/tests/Unit/Model/RecordingCompleteCallbackTest.php +++ b/tests/Unit/Model/RecordingCompleteCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RecordingStateEnumTest.php b/tests/Unit/Model/RecordingStateEnumTest.php index c41d7f65..6ff19e04 100644 --- a/tests/Unit/Model/RecordingStateEnumTest.php +++ b/tests/Unit/Model/RecordingStateEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RecordingTranscriptionClipTest.php b/tests/Unit/Model/RecordingTranscriptionClipTest.php index 2c361ddc..da9aab47 100644 --- a/tests/Unit/Model/RecordingTranscriptionClipTest.php +++ b/tests/Unit/Model/RecordingTranscriptionClipTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RecordingTranscriptionMetadataTest.php b/tests/Unit/Model/RecordingTranscriptionMetadataTest.php index 85e8ac1c..56c8b2cc 100644 --- a/tests/Unit/Model/RecordingTranscriptionMetadataTest.php +++ b/tests/Unit/Model/RecordingTranscriptionMetadataTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RecordingTranscriptionsTest.php b/tests/Unit/Model/RecordingTranscriptionsTest.php index e5c89085..e932f8d6 100644 --- a/tests/Unit/Model/RecordingTranscriptionsTest.php +++ b/tests/Unit/Model/RecordingTranscriptionsTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RedirectCallbackTest.php b/tests/Unit/Model/RedirectCallbackTest.php index badd345e..b7105f85 100644 --- a/tests/Unit/Model/RedirectCallbackTest.php +++ b/tests/Unit/Model/RedirectCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/RedirectMethodEnumTest.php b/tests/Unit/Model/RedirectMethodEnumTest.php index ded4df05..e87339fd 100644 --- a/tests/Unit/Model/RedirectMethodEnumTest.php +++ b/tests/Unit/Model/RedirectMethodEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/SipConnectionMetadataTest.php b/tests/Unit/Model/SipConnectionMetadataTest.php index c8c6567c..7405b082 100644 --- a/tests/Unit/Model/SipConnectionMetadataTest.php +++ b/tests/Unit/Model/SipConnectionMetadataTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/SipCredentialsTest.php b/tests/Unit/Model/SipCredentialsTest.php index 3df44cf8..9cf37210 100644 --- a/tests/Unit/Model/SipCredentialsTest.php +++ b/tests/Unit/Model/SipCredentialsTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/SmsMessageContentTest.php b/tests/Unit/Model/SmsMessageContentTest.php index e4584c50..5056df56 100644 --- a/tests/Unit/Model/SmsMessageContentTest.php +++ b/tests/Unit/Model/SmsMessageContentTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/StandaloneCardOrientationEnumTest.php b/tests/Unit/Model/StandaloneCardOrientationEnumTest.php index 60dc077f..c8e6e846 100644 --- a/tests/Unit/Model/StandaloneCardOrientationEnumTest.php +++ b/tests/Unit/Model/StandaloneCardOrientationEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/StatusCallbackMessageTest.php b/tests/Unit/Model/StatusCallbackMessageTest.php index a3fb228b..3c385f14 100644 --- a/tests/Unit/Model/StatusCallbackMessageTest.php +++ b/tests/Unit/Model/StatusCallbackMessageTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/StatusCallbackTest.php b/tests/Unit/Model/StatusCallbackTest.php index 45e3cb80..5b0ba685 100644 --- a/tests/Unit/Model/StatusCallbackTest.php +++ b/tests/Unit/Model/StatusCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/StatusCallbackTypeEnumTest.php b/tests/Unit/Model/StatusCallbackTypeEnumTest.php index cf8a7e15..c2751b77 100644 --- a/tests/Unit/Model/StatusCallbackTypeEnumTest.php +++ b/tests/Unit/Model/StatusCallbackTypeEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/StirShakenTest.php b/tests/Unit/Model/StirShakenTest.php index 4191e302..f26b1dfa 100644 --- a/tests/Unit/Model/StirShakenTest.php +++ b/tests/Unit/Model/StirShakenTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/SyncLookupRequestTest.php b/tests/Unit/Model/SyncLookupRequestTest.php index de3ad612..2a8e90d8 100644 --- a/tests/Unit/Model/SyncLookupRequestTest.php +++ b/tests/Unit/Model/SyncLookupRequestTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TelephoneNumberTest.php b/tests/Unit/Model/TelephoneNumberTest.php index fe8c9c1b..88d8527c 100644 --- a/tests/Unit/Model/TelephoneNumberTest.php +++ b/tests/Unit/Model/TelephoneNumberTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TfvBasicAuthenticationTest.php b/tests/Unit/Model/TfvBasicAuthenticationTest.php index 07c150be..260af420 100644 --- a/tests/Unit/Model/TfvBasicAuthenticationTest.php +++ b/tests/Unit/Model/TfvBasicAuthenticationTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TfvCallbackStatusEnumTest.php b/tests/Unit/Model/TfvCallbackStatusEnumTest.php index 97aa42fb..8a1552ac 100644 --- a/tests/Unit/Model/TfvCallbackStatusEnumTest.php +++ b/tests/Unit/Model/TfvCallbackStatusEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TfvErrorTest.php b/tests/Unit/Model/TfvErrorTest.php index 47002416..02d1fb48 100644 --- a/tests/Unit/Model/TfvErrorTest.php +++ b/tests/Unit/Model/TfvErrorTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TfvStatusEnumTest.php b/tests/Unit/Model/TfvStatusEnumTest.php index aed6a4d4..74e1e6a6 100644 --- a/tests/Unit/Model/TfvStatusEnumTest.php +++ b/tests/Unit/Model/TfvStatusEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TfvStatusTest.php b/tests/Unit/Model/TfvStatusTest.php index 96f966ab..2c51b0c3 100644 --- a/tests/Unit/Model/TfvStatusTest.php +++ b/tests/Unit/Model/TfvStatusTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TfvSubmissionInfoTest.php b/tests/Unit/Model/TfvSubmissionInfoTest.php index 5c70bacd..382f9199 100644 --- a/tests/Unit/Model/TfvSubmissionInfoTest.php +++ b/tests/Unit/Model/TfvSubmissionInfoTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TfvSubmissionWrapperTest.php b/tests/Unit/Model/TfvSubmissionWrapperTest.php index a99103dd..9c3dd006 100644 --- a/tests/Unit/Model/TfvSubmissionWrapperTest.php +++ b/tests/Unit/Model/TfvSubmissionWrapperTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/ThumbnailAlignmentEnumTest.php b/tests/Unit/Model/ThumbnailAlignmentEnumTest.php index 6c6584d3..d67c63d8 100644 --- a/tests/Unit/Model/ThumbnailAlignmentEnumTest.php +++ b/tests/Unit/Model/ThumbnailAlignmentEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TranscribeRecordingTest.php b/tests/Unit/Model/TranscribeRecordingTest.php index 7d90e84a..73c24367 100644 --- a/tests/Unit/Model/TranscribeRecordingTest.php +++ b/tests/Unit/Model/TranscribeRecordingTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TranscriptionAvailableCallbackTest.php b/tests/Unit/Model/TranscriptionAvailableCallbackTest.php index 9460e772..dd4893ef 100644 --- a/tests/Unit/Model/TranscriptionAvailableCallbackTest.php +++ b/tests/Unit/Model/TranscriptionAvailableCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TranscriptionTest.php b/tests/Unit/Model/TranscriptionTest.php index 05838711..33b6b385 100644 --- a/tests/Unit/Model/TranscriptionTest.php +++ b/tests/Unit/Model/TranscriptionTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TransferAnswerCallbackTest.php b/tests/Unit/Model/TransferAnswerCallbackTest.php index b7463378..1c93a43e 100644 --- a/tests/Unit/Model/TransferAnswerCallbackTest.php +++ b/tests/Unit/Model/TransferAnswerCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TransferCompleteCallbackTest.php b/tests/Unit/Model/TransferCompleteCallbackTest.php index 7efd005f..7e534aec 100644 --- a/tests/Unit/Model/TransferCompleteCallbackTest.php +++ b/tests/Unit/Model/TransferCompleteCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/TransferDisconnectCallbackTest.php b/tests/Unit/Model/TransferDisconnectCallbackTest.php index 445d7ec6..5303fc3c 100644 --- a/tests/Unit/Model/TransferDisconnectCallbackTest.php +++ b/tests/Unit/Model/TransferDisconnectCallbackTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/UpdateCallRecordingTest.php b/tests/Unit/Model/UpdateCallRecordingTest.php index bcebd4cc..f895a9cf 100644 --- a/tests/Unit/Model/UpdateCallRecordingTest.php +++ b/tests/Unit/Model/UpdateCallRecordingTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/UpdateCallTest.php b/tests/Unit/Model/UpdateCallTest.php index be0e9b2c..dd45a911 100644 --- a/tests/Unit/Model/UpdateCallTest.php +++ b/tests/Unit/Model/UpdateCallTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/UpdateConferenceMemberTest.php b/tests/Unit/Model/UpdateConferenceMemberTest.php index 18452de5..a48a7fe7 100644 --- a/tests/Unit/Model/UpdateConferenceMemberTest.php +++ b/tests/Unit/Model/UpdateConferenceMemberTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/UpdateConferenceTest.php b/tests/Unit/Model/UpdateConferenceTest.php index 57393dc0..201108bb 100644 --- a/tests/Unit/Model/UpdateConferenceTest.php +++ b/tests/Unit/Model/UpdateConferenceTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/VerificationDenialWebhookTest.php b/tests/Unit/Model/VerificationDenialWebhookTest.php index 37fdead3..1f1dfd61 100644 --- a/tests/Unit/Model/VerificationDenialWebhookTest.php +++ b/tests/Unit/Model/VerificationDenialWebhookTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/VerificationRequestTest.php b/tests/Unit/Model/VerificationRequestTest.php index 1596f25f..593fe239 100644 --- a/tests/Unit/Model/VerificationRequestTest.php +++ b/tests/Unit/Model/VerificationRequestTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/VerificationUpdateRequestTest.php b/tests/Unit/Model/VerificationUpdateRequestTest.php index 7a0508ba..98d1501d 100644 --- a/tests/Unit/Model/VerificationUpdateRequestTest.php +++ b/tests/Unit/Model/VerificationUpdateRequestTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/VerificationWebhookTest.php b/tests/Unit/Model/VerificationWebhookTest.php index 606ab85a..be55be82 100644 --- a/tests/Unit/Model/VerificationWebhookTest.php +++ b/tests/Unit/Model/VerificationWebhookTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/VerifyCodeRequestTest.php b/tests/Unit/Model/VerifyCodeRequestTest.php index ce21d20f..48171a12 100644 --- a/tests/Unit/Model/VerifyCodeRequestTest.php +++ b/tests/Unit/Model/VerifyCodeRequestTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/VerifyCodeResponseTest.php b/tests/Unit/Model/VerifyCodeResponseTest.php index f907089a..7faad122 100644 --- a/tests/Unit/Model/VerifyCodeResponseTest.php +++ b/tests/Unit/Model/VerifyCodeResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/VoiceApiErrorTest.php b/tests/Unit/Model/VoiceApiErrorTest.php index 6e6b58a6..4e72f126 100644 --- a/tests/Unit/Model/VoiceApiErrorTest.php +++ b/tests/Unit/Model/VoiceApiErrorTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/VoiceCodeResponseTest.php b/tests/Unit/Model/VoiceCodeResponseTest.php index e6f377e3..ad5346f6 100644 --- a/tests/Unit/Model/VoiceCodeResponseTest.php +++ b/tests/Unit/Model/VoiceCodeResponseTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/WebhookSubscriptionBasicAuthenticationTest.php b/tests/Unit/Model/WebhookSubscriptionBasicAuthenticationTest.php index d4cce9ea..d585ccb0 100644 --- a/tests/Unit/Model/WebhookSubscriptionBasicAuthenticationTest.php +++ b/tests/Unit/Model/WebhookSubscriptionBasicAuthenticationTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/WebhookSubscriptionErrorTest.php b/tests/Unit/Model/WebhookSubscriptionErrorTest.php index 84ca0ed4..d7379cac 100644 --- a/tests/Unit/Model/WebhookSubscriptionErrorTest.php +++ b/tests/Unit/Model/WebhookSubscriptionErrorTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/WebhookSubscriptionRequestSchemaTest.php b/tests/Unit/Model/WebhookSubscriptionRequestSchemaTest.php index 7c26c898..5f0a2017 100644 --- a/tests/Unit/Model/WebhookSubscriptionRequestSchemaTest.php +++ b/tests/Unit/Model/WebhookSubscriptionRequestSchemaTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/WebhookSubscriptionTest.php b/tests/Unit/Model/WebhookSubscriptionTest.php index bfeace71..bb96d931 100644 --- a/tests/Unit/Model/WebhookSubscriptionTest.php +++ b/tests/Unit/Model/WebhookSubscriptionTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/WebhookSubscriptionTypeEnumTest.php b/tests/Unit/Model/WebhookSubscriptionTypeEnumTest.php index aad615ea..8a3612c0 100644 --- a/tests/Unit/Model/WebhookSubscriptionTypeEnumTest.php +++ b/tests/Unit/Model/WebhookSubscriptionTypeEnumTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Model/WebhookSubscriptionsListBodyTest.php b/tests/Unit/Model/WebhookSubscriptionsListBodyTest.php index 8fa53776..72cc52c8 100644 --- a/tests/Unit/Model/WebhookSubscriptionsListBodyTest.php +++ b/tests/Unit/Model/WebhookSubscriptionsListBodyTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the model. */ -namespace Bandwidth\Test\Model; +namespace Bandwidth\Test\Unit\Model; use PHPUnit\Framework\TestCase; From 2b639014938014d77710a2a3a598fa4ea5f0a572 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 19 Aug 2026 16:47:17 -0400 Subject: [PATCH 28/53] api unit tests --- tests/Unit/Api/CallsApiTest.php | 282 +++++------- tests/Unit/Api/ConferencesApiTest.php | 283 +++++++----- tests/Unit/Api/EndpointsApiTest.php | 111 +++-- tests/Unit/Api/MFAApiTest.php | 62 +-- tests/Unit/Api/MediaApiTest.php | 90 ++-- tests/Unit/Api/MessagesApiTest.php | 118 +++-- tests/Unit/Api/MultiChannelApiTest.php | 433 +----------------- tests/Unit/Api/PhoneNumberLookupApiTest.php | 156 ++++--- tests/Unit/Api/RecordingsApiTest.php | 348 +++++++++----- tests/Unit/Api/StatisticsApiTest.php | 12 +- .../Unit/Api/TollFreeVerificationApiTest.php | 215 ++++++++- tests/Unit/Api/TranscriptionsApiTest.php | 140 +++--- 12 files changed, 1122 insertions(+), 1128 deletions(-) diff --git a/tests/Unit/Api/CallsApiTest.php b/tests/Unit/Api/CallsApiTest.php index 2be97e7f..fc233d03 100644 --- a/tests/Unit/Api/CallsApiTest.php +++ b/tests/Unit/Api/CallsApiTest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -38,7 +38,6 @@ use Bandwidth\Model\MachineDetectionConfiguration; use Bandwidth\Model\MachineDetectionModeEnum; use Bandwidth\Model\UpdateCall; -use Bandwidth\Test\Utils\CallCleanup; use PHPUnit\Framework\TestCase; @@ -51,7 +50,6 @@ */ class CallsApiTest extends TestCase { - private const TEST_SLEEP = 6; private static CallsApi $apiInstance; private static string $account_id; @@ -59,15 +57,14 @@ class CallsApiTest extends TestCase private static string $user_number; private static string $voice_application_id; - /** @var string[] */ - private static array $call_id_list = []; - - private static CreateCall $create_call_body; - private static CreateCall $create_manteca_call_body; - private static UpdateCall $update_manteca_call_body; - private static UpdateCall $complete_manteca_call_body; - - private static string $test_xml_body = 'This is a test bxml response'; + private static string $call_id = 'c-1234'; + private static string $display_name = 'PHP SDK'; + private static CallbackMethodEnum $answer_method = CallbackMethodEnum::POST; + private static string $answer_url; + private static CallbackMethodEnum $disconnect_method = CallbackMethodEnum::GET; + private static string $disconnect_url; + private static float $call_timeout = 30.0; + private static float $callback_timeout = 15.0; /** * Setup before running any test cases @@ -75,8 +72,9 @@ class CallsApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setClientId(getenv("BW_CLIENT_ID")) - ->setClientSecret(getenv("BW_CLIENT_SECRET")); + ->setAccessToken("abcd1234") + ->setIgnoreOperationHosts(true) + ->setHost("http://127.0.0.1:4010"); self::$apiInstance = new CallsApi(config: $config); @@ -84,101 +82,107 @@ public static function setUpBeforeClass(): void self::$bw_number = getenv("BW_NUMBER"); self::$user_number = getenv("USER_NUMBER"); self::$voice_application_id = getenv("BW_VOICE_APPLICATION_ID"); + self::$answer_url = getenv("BASE_CALLBACK_URL"); + self::$disconnect_url = getenv("BASE_CALLBACK_URL"); + } - $answer_url = getenv("BASE_CALLBACK_URL"); - $manteca_base_url = getenv("MANTECA_BASE_URL"); - $manteca_answer_url = "{$manteca_base_url}/bxml/pause"; - $fallback_url = "https://www.myFallbackServer.com/webhooks/answer"; - $disconnect_url = "https://myServer.com/bandwidth/webhooks/disconnectUrl"; - $machine_detection_url = "https://myServer.com/bandwidth/webhooks/machineDetectionComplete"; - $machine_detection_complete_url = "https://myFallbackServer.com/bandwidth/webhooks/machineDetectionComplete"; - + /** + * Test case for createCall + * + * Create Call. + * + */ + public function testCreateCall() + { $machine_detection = new MachineDetectionConfiguration([ 'mode' => MachineDetectionModeEnum::ASYNC, - 'detection_timeout' => 15.0, - 'silence_timeout' => 10.0, - 'speech_threshold' => 10.0, + 'detection_timeout' => 5.0, + 'silence_timeout' => 5.0, + 'speech_threshold' => 5.0, 'speech_end_threshold' => 5.0, - 'machine_speech_end_threshold' => 5.0, - 'delay_result' => false, - 'callback_url' => $machine_detection_url, - 'callback_method' => CallbackMethodEnum::POST, - 'username' => 'mySecretUsername', - 'password' => 'mySecretPassword1!', - 'fallback_url' => $machine_detection_complete_url, - 'fallback_method' => CallbackMethodEnum::POST, - 'fallback_username' => 'mySecretUsername', - 'fallback_password' => 'mySecretPassword1!' + 'delay_result' => true, + 'callback_url' => self::$answer_url, + 'callback_method' => CallbackMethodEnum::POST ]); - self::$create_call_body = new CreateCall([ + $create_call = new CreateCall([ + 'application_id' => self::$voice_application_id, 'to' => self::$user_number, 'from' => self::$bw_number, - 'application_id' => self::$voice_application_id, - 'answer_url' => $answer_url, - 'answer_method' => CallbackMethodEnum::POST, - 'username' => 'mySecretUsername', - 'password' => 'mySecretPassword1!', - 'answer_fallback_url' => $fallback_url, - 'answer_fallback_method' => CallbackMethodEnum::POST, - 'fallback_username' => 'mySecretUsername', - 'fallback_password' => 'mySecretPassword1!', - 'disconnect_url' => $disconnect_url, - 'disconnect_method' => CallbackMethodEnum::POST, - 'call_timeout' => 30.0, - 'callback_timeout' => 15.0, - 'machine_detection' => $machine_detection, - 'priority' => 5, 'privacy' => false, - 'tag' => 'tag_example' - ]); - - self::$create_manteca_call_body = new CreateCall([ - 'from' => getenv("MANTECA_ACTIVE_NUMBER"), - 'to' => getenv("MANTECA_IDLE_NUMBER"), - 'application_id' => getenv("MANTECA_APPLICATION_ID"), - 'answer_url' => $manteca_answer_url - ]); - - self::$update_manteca_call_body = new UpdateCall([ - 'state' => CallStateEnum::ACTIVE, - 'redirect_url' => $manteca_answer_url + 'display_name' => self::$display_name, + 'answer_url' => self::$answer_url, + 'answer_method' => self::$answer_method, + 'disconnect_url' => self::$disconnect_url, + 'disconnect_method' => self::$disconnect_method, + 'machine_detection' => $machine_detection, + 'call_timeout' => self::$call_timeout, + 'callback_timeout' => self::$callback_timeout ]); - self::$complete_manteca_call_body = new UpdateCall([ - 'state' => CallStateEnum::COMPLETED - ]); - } + [$data, $status_code] = self::$apiInstance->createCallWithHttpInfo( + self::$account_id, + $create_call + ); - /** - * Ensure that all calls collected during the suite have been hung up - */ - public static function tearDownAfterClass(): void - { - CallCleanup::cleanup(self::$apiInstance, self::$account_id, self::$call_id_list); + $this->assertEquals(201, $status_code); + $this->assertInstanceOf(CreateCallResponse::class, $data); + $this->assertEquals(36, \strlen($data->getApplicationId())); + $this->assertEquals(7, \strlen($data->getAccountId())); + $this->assertEquals(47, \strlen($data->getCallId())); + $this->assertEquals(12, \strlen($data->getTo())); + $this->assertEquals(12, \strlen($data->getFrom())); + $this->assertInstanceOf(\DateTime::class, $data->getEnqueuedTime()); + $this->assertIsString($data->getCallUrl()); + $this->assertIsFloat($data->getCallTimeout()); + $this->assertIsFloat($data->getCallbackTimeout()); + $this->assertIsString($data->getTag()); + $this->assertInstanceOf(CallbackMethodEnum::class, $data->getAnswerMethod()); + $this->assertIsString($data->getAnswerUrl()); + $this->assertInstanceOf(CallbackMethodEnum::class, $data->getAnswerFallbackMethod()); + $this->assertIsString($data->getAnswerFallbackUrl()); + $this->assertInstanceOf(CallbackMethodEnum::class, $data->getDisconnectMethod()); + $this->assertIsString($data->getDisconnectUrl()); + $this->assertIsString($data->getUsername()); + $this->assertIsString($data->getPassword()); + $this->assertIsString($data->getFallbackUsername()); + $this->assertIsString($data->getFallbackPassword()); + $this->assertIsInt($data->getPriority()); } /** - * Test case for createCall + * Test case for getCallState * - * Create Call. + * Get Call State Information. * */ - public function testCreateCall() + public function testGetCallState() { - [$data, $status_code] = self::$apiInstance->createCallWithHttpInfo( + [$data, $status_code] = self::$apiInstance->getCallStateWithHttpInfo( self::$account_id, - self::$create_call_body + self::$call_id ); - self::$call_id_list[] = $data->getCallId(); - $this->assertEquals(201, $status_code); - $this->assertInstanceOf(CreateCallResponse::class, $data); - $this->assertIsString($data->getCallId()); - $this->assertEquals(self::$account_id, $data->getAccountId()); - $this->assertEquals(self::$voice_application_id, $data->getApplicationId()); - $this->assertEquals(self::$user_number, $data->getTo()); - $this->assertEquals(self::$bw_number, $data->getFrom()); + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(CallState::class, $data); + $this->assertEquals(36, \strlen($data->getApplicationId())); + $this->assertEquals(7, \strlen($data->getAccountId())); + $this->assertEquals(47, \strlen($data->getCallId())); + $this->assertEquals(47, \strlen($data->getParentCallId())); + $this->assertEquals(12, \strlen($data->getTo())); + $this->assertEquals(12, \strlen($data->getFrom())); + $this->assertInstanceOf(CallDirectionEnum::class, $data->getDirection()); + $this->assertIsString($data->getState()); + $this->assertIsArray($data->getStirShaken()); + $this->assertIsString($data->getIdentity()); + $this->assertInstanceOf(\DateTime::class, $data->getEnqueuedTime()); + $this->assertInstanceOf(\DateTime::class, $data->getStartTime()); + $this->assertInstanceOf(\DateTime::class, $data->getAnswerTime()); + $this->assertInstanceOf(\DateTime::class, $data->getEndTime()); + $this->assertIsString($data->getDisconnectCause()); + $this->assertArrayHasKey('error_message', CallState::attributeMap()); + $this->assertArrayHasKey('error_id', CallState::attributeMap()); + $this->assertInstanceOf(\DateTime::class, $data->getLastUpdate()); } /** @@ -196,35 +200,25 @@ public function testListCalls() ); $this->assertEquals(200, $status_code); - $this->assertIsArray($data); $this->assertInstanceOf(CallState::class, $data[0]); - $this->assertIsString($data[0]->getAccountId()); - $this->assertIsString($data[0]->getApplicationId()); - $this->assertIsString($data[0]->getCallId()); - $this->assertIsString($data[0]->getState()); + $this->assertEquals(36, \strlen($data[0]->getApplicationId())); + $this->assertEquals(7, \strlen($data[0]->getAccountId())); + $this->assertEquals(47, \strlen($data[0]->getCallId())); + $this->assertEquals(47, \strlen($data[0]->getParentCallId())); + $this->assertEquals(12, \strlen($data[0]->getTo())); + $this->assertEquals(12, \strlen($data[0]->getFrom())); $this->assertInstanceOf(CallDirectionEnum::class, $data[0]->getDirection()); + $this->assertIsString($data[0]->getState()); + $this->assertIsArray($data[0]->getStirShaken()); + $this->assertIsString($data[0]->getIdentity()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getEnqueuedTime()); $this->assertInstanceOf(\DateTime::class, $data[0]->getStartTime()); - } - - /** - * Test case for getCallState - * - * Get Call State Information. - * - */ - public function testGetCallState() - { - sleep(40); - [$data, $status_code] = self::$apiInstance->getCallStateWithHttpInfo( - self::$account_id, - self::$call_id_list[0] - ); - - $this->assertEquals(200, $status_code); - $this->assertInstanceOf(CallState::class, $data); - $this->assertIsString($data->getCallId()); - $this->assertIsString($data->getState()); - $this->assertEquals(CallDirectionEnum::OUTBOUND, $data->getDirection()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getAnswerTime()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getEndTime()); + $this->assertIsString($data[0]->getDisconnectCause()); + $this->assertArrayHasKey('error_message', CallState::attributeMap()); + $this->assertArrayHasKey('error_id', CallState::attributeMap()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getLastUpdate()); } /** @@ -235,35 +229,17 @@ public function testGetCallState() */ public function testUpdateCall() { - // Create call - sleep(self::TEST_SLEEP); - [$create_data, $create_status_code] = self::$apiInstance->createCallWithHttpInfo( - self::$account_id, - self::$create_manteca_call_body - ); - self::$call_id_list[] = $create_data->getCallId(); - - $this->assertEquals(201, $create_status_code); - - // Redirect call to a different url - sleep(self::TEST_SLEEP); - [, $update_status_code] = self::$apiInstance->updateCallWithHttpInfo( - self::$account_id, - $create_data->getCallId(), - self::$update_manteca_call_body - ); - - $this->assertEquals(200, $update_status_code); + $update_call = new UpdateCall([ + 'state' => CallStateEnum::ACTIVE + ]); - // Complete call - sleep(self::TEST_SLEEP); - [, $complete_status_code] = self::$apiInstance->updateCallWithHttpInfo( + [, $status_code] = self::$apiInstance->updateCallWithHttpInfo( self::$account_id, - $create_data->getCallId(), - self::$complete_manteca_call_body + self::$call_id, + $update_call ); - $this->assertEquals(200, $complete_status_code); + $this->assertEquals(200, $status_code); } /** @@ -274,34 +250,14 @@ public function testUpdateCall() */ public function testUpdateCallBxml() { - // Create call - sleep(self::TEST_SLEEP); - [$create_data, $create_status_code] = self::$apiInstance->createCallWithHttpInfo( - self::$account_id, - self::$create_manteca_call_body - ); - self::$call_id_list[] = $create_data->getCallId(); - - $this->assertEquals(201, $create_status_code); - - // Update call with BXML - sleep(self::TEST_SLEEP); - [, $update_status_code] = self::$apiInstance->updateCallBxmlWithHttpInfo( - self::$account_id, - $create_data->getCallId(), - self::$test_xml_body - ); - - $this->assertEquals(204, $update_status_code); + $update_call_bxml = ''; - // Complete call - sleep(self::TEST_SLEEP); - [, $complete_status_code] = self::$apiInstance->updateCallWithHttpInfo( + [, $status_code] = self::$apiInstance->updateCallBxmlWithHttpInfo( self::$account_id, - $create_data->getCallId(), - self::$complete_manteca_call_body + self::$call_id, + $update_call_bxml ); - $this->assertEquals(200, $complete_status_code); + $this->assertEquals(204, $status_code); } } diff --git a/tests/Unit/Api/ConferencesApiTest.php b/tests/Unit/Api/ConferencesApiTest.php index 5ac711a6..09450ab8 100644 --- a/tests/Unit/Api/ConferencesApiTest.php +++ b/tests/Unit/Api/ConferencesApiTest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -28,19 +28,16 @@ namespace Bandwidth\Test\Unit\Api; use Bandwidth\Configuration; -use Bandwidth\Api\CallsApi; use Bandwidth\Api\ConferencesApi; +use Bandwidth\Model\CallbackMethodEnum; use Bandwidth\Model\Conference; use Bandwidth\Model\ConferenceMember; use Bandwidth\Model\ConferenceRecordingMetadata; use Bandwidth\Model\ConferenceStateEnum; -use Bandwidth\Model\CreateCall; use Bandwidth\Model\FileFormatEnum; use Bandwidth\Model\RedirectMethodEnum; use Bandwidth\Model\UpdateConference; use Bandwidth\Model\UpdateConferenceMember; -use Bandwidth\Test\Utils\CallCleanup; -use Bandwidth\Test\Utils\Manteca; use PHPUnit\Framework\TestCase; @@ -53,19 +50,14 @@ */ class ConferencesApiTest extends TestCase { - private const TEST_SLEEP = 6; - private const MAX_RETRIES = 60; - private static CallsApi $callsApi; - private static ConferencesApi $conferencesApi; + private static ConferencesApi $apiInstance; private static string $account_id; - private static string $test_id; - private static string $call_id; - private static string $conference_id; - private static string $answer_url; - private static string $conference_redirect_url; - private static string $update_recording_bxml = 'This should be a conference recording.'; + private static string $call_id = 'c-1234'; + private static string $conference_id = 'c-4321'; + private static string $recording_id = 'r-1234'; + private static string $callback_url; /** * Setup before running any test cases @@ -73,165 +65,234 @@ class ConferencesApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setClientId(getenv("BW_CLIENT_ID")) - ->setClientSecret(getenv("BW_CLIENT_SECRET")); + ->setAccessToken("abcd1234") + ->setIgnoreOperationHosts(true) + ->setHost("http://127.0.0.1:4010"); - self::$callsApi = new CallsApi(config: $config); - self::$conferencesApi = new ConferencesApi(config: $config); + self::$apiInstance = new ConferencesApi(config: $config); self::$account_id = getenv("BW_ACCOUNT_ID"); - - $manteca_base_url = getenv("MANTECA_BASE_URL"); - self::$answer_url = "{$manteca_base_url}/bxml/joinConferencePause"; - self::$conference_redirect_url = "{$manteca_base_url}/bxml/pause"; + self::$callback_url = getenv("BASE_CALLBACK_URL"); } /** - * Ensure the conference call is hung up after the suite + * Test case for downloadConferenceRecording + * + * Download Conference Recording. + * */ - public static function tearDownAfterClass(): void + public function testDownloadConferenceRecording() { - CallCleanup::cleanup(self::$callsApi, self::$account_id, [self::$call_id]); + self::markTestSkipped("Can't set the correct Accept header for Prism"); + + [$data, $status_code] = self::$apiInstance->downloadConferenceRecordingWithHttpInfo( + self::$account_id, + self::$conference_id, + self::$recording_id + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(\SplFileObject::class, $data); } /** - * Test case for createCall, listConferences, getConference + * Test case for getConference * - * Create a conference call and fetch the resulting conference. + * Get Conference Information. * */ - public function testCreateAndFetchConference() + public function testGetConference() { - $os = getenv("OPERATING_SYSTEM"); - $language = "PHP" . phpversion(); - self::$test_id = Manteca::createTest($os, $language, "conference"); - - $conference_call_body = new CreateCall([ - 'to' => getenv("MANTECA_IDLE_NUMBER"), - 'from' => getenv("MANTECA_ACTIVE_NUMBER"), - 'application_id' => getenv("MANTECA_APPLICATION_ID"), - 'answer_url' => self::$answer_url, - 'tag' => self::$test_id - ]); - - [$create_data, $create_status_code] = self::$callsApi->createCallWithHttpInfo( + [$data, $status_code] = self::$apiInstance->getConferenceWithHttpInfo( self::$account_id, - $conference_call_body + self::$conference_id ); - $this->assertEquals(201, $create_status_code); - self::$call_id = $create_data->getCallId(); - - sleep(self::TEST_SLEEP); + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(Conference::class, $data); + $this->assertEquals(50, \strlen($data->getId())); + $this->assertIsString($data->getName()); + $this->assertInstanceOf(\DateTime::class, $data->getCreatedTime()); + $this->assertInstanceOf(\DateTime::class, $data->getCompletedTime()); + $this->assertIsString($data->getConferenceEventUrl()); + $this->assertInstanceOf(CallbackMethodEnum::class, $data->getConferenceEventMethod()); + $this->assertIsString($data->getTag()); + } - [$list_data, $list_status_code] = self::$conferencesApi->listConferencesWithHttpInfo( + /** + * Test case for getConferenceMember + * + * Get Conference Member. + * + */ + public function testGetConferenceMember() + { + [$data, $status_code] = self::$apiInstance->getConferenceMemberWithHttpInfo( self::$account_id, - name: self::$test_id + self::$conference_id, + self::$call_id ); - $this->assertEquals(200, $list_status_code); - self::$conference_id = $list_data[0]->getId(); + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(ConferenceMember::class, $data); + $this->assertEquals(47, \strlen($data->getCallId())); + $this->assertEquals(50, \strlen($data->getConferenceId())); + $this->assertIsString($data->getMemberUrl()); + $this->assertIsBool($data->getMute()); + $this->assertIsBool($data->getHold()); + $this->assertIsArray($data->getCallIdsToCoach()); + } - [$get_data, $get_status_code] = self::$conferencesApi->getConferenceWithHttpInfo( + /** + * Test case for getConferenceRecording + * + * Get Conference Recording Information. + * + */ + public function testGetConferenceRecording() + { + [$data, $status_code] = self::$apiInstance->getConferenceRecordingWithHttpInfo( self::$account_id, - self::$conference_id + self::$conference_id, + self::$recording_id ); - $this->assertEquals(200, $get_status_code); - $this->assertInstanceOf(Conference::class, $get_data); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(ConferenceRecordingMetadata::class, $data); + $this->assertEquals(7, \strlen($data->getAccountId())); + $this->assertEquals(50, \strlen($data->getConferenceId())); + $this->assertIsString($data->getName()); + $this->assertEquals(47, \strlen($data->getRecordingId())); + $this->assertIsString($data->getDuration()); + $this->assertIsInt($data->getChannels()); + $this->assertInstanceOf(\DateTime::class, $data->getStartTime()); + $this->assertInstanceOf(\DateTime::class, $data->getEndTime()); + $this->assertInstanceOf(FileFormatEnum::class, $data->getFileFormat()); + $this->assertIsString($data->getStatus()); + $this->assertIsString($data->getMediaUrl()); } /** - * Test case for getConferenceMember, updateConferenceMember, updateConference, updateConferenceBxml + * Test case for listConferenceRecordings * - * Fetch and update a conference member and the conference. + * Get Conference Recordings. * */ - public function testConferenceAndMembers() + public function testListConferenceRecordings() { - [$member_data, $member_status_code] = self::$conferencesApi->getConferenceMemberWithHttpInfo( + [$data, $status_code] = self::$apiInstance->listConferenceRecordingsWithHttpInfo( self::$account_id, - self::$conference_id, - self::$call_id + self::$conference_id ); - $this->assertEquals(200, $member_status_code); - $this->assertInstanceOf(ConferenceMember::class, $member_data); - $update_member = new UpdateConferenceMember(['mute' => false]); - [, $update_member_status_code] = self::$conferencesApi->updateConferenceMemberWithHttpInfo( + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(ConferenceRecordingMetadata::class, $data[0]); + $this->assertEquals(7, \strlen($data[0]->getAccountId())); + $this->assertEquals(50, \strlen($data[0]->getConferenceId())); + $this->assertIsString($data[0]->getName()); + $this->assertEquals(47, \strlen($data[0]->getRecordingId())); + $this->assertIsString($data[0]->getDuration()); + $this->assertIsInt($data[0]->getChannels()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getStartTime()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getEndTime()); + $this->assertInstanceOf(FileFormatEnum::class, $data[0]->getFileFormat()); + $this->assertIsString($data[0]->getStatus()); + $this->assertIsString($data[0]->getMediaUrl()); + } + + /** + * Test case for listConferences + * + * Get Conferences. + * + */ + public function testListConferences() + { + [$data, $status_code] = self::$apiInstance->listConferencesWithHttpInfo( self::$account_id, - self::$conference_id, - self::$call_id, - $update_member + name: self::$conference_id ); - $this->assertEquals(204, $update_member_status_code); + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(Conference::class, $data[0]); + $this->assertEquals(50, \strlen($data[0]->getId())); + $this->assertIsString($data[0]->getName()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getCreatedTime()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getCompletedTime()); + $this->assertIsString($data[0]->getConferenceEventUrl()); + $this->assertInstanceOf(CallbackMethodEnum::class, $data[0]->getConferenceEventMethod()); + $this->assertIsString($data[0]->getTag()); + } + + /** + * Test case for updateConference + * + * Update Conference. + * + */ + public function testUpdateConference() + { $update_conference = new UpdateConference([ 'status' => ConferenceStateEnum::ACTIVE, - 'redirect_url' => self::$conference_redirect_url, + 'redirect_url' => self::$callback_url, 'redirect_method' => RedirectMethodEnum::POST, - 'username' => 'myUsername', - 'password' => 'myPassword1!', - 'redirect_fallback_url' => self::$conference_redirect_url, + 'username' => 'username', + 'password' => 'password', + 'redirect_fallback_url' => self::$callback_url, 'redirect_fallback_method' => RedirectMethodEnum::POST, - 'fallback_username' => 'myUsername', - 'fallback_password' => 'myPassword1!' + 'fallback_username' => 'username', + 'fallback_password' => 'password' ]); - [, $update_conference_status_code] = self::$conferencesApi->updateConferenceWithHttpInfo( + + [, $status_code] = self::$apiInstance->updateConferenceWithHttpInfo( self::$account_id, self::$conference_id, $update_conference ); - $this->assertEquals(204, $update_conference_status_code); - [, $update_bxml_status_code] = self::$conferencesApi->updateConferenceBxmlWithHttpInfo( - self::$account_id, - self::$conference_id, - self::$update_recording_bxml - ); - $this->assertEquals(204, $update_bxml_status_code); + $this->assertEquals(204, $status_code); } /** - * Test case for listConferenceRecordings, getConferenceRecording, downloadConferenceRecording + * Test case for updateConferenceBxml * - * Validate conference recordings. + * Update Conference BXML. * */ - public function testConferenceRecordings() + public function testUpdateConferenceBxml() { - self::markTestSkipped('issues with PV API, can re-enable after fixed'); - - // Poll Manteca until the conference call has been recorded - $recording_status = false; - for ($i = 0; $i < self::MAX_RETRIES && !$recording_status; $i++) { - sleep(self::TEST_SLEEP); - $recording_status = Manteca::getStatus(self::$test_id)['callRecorded'] ?? false; - } - $this->assertTrue($recording_status); + $update_conference_bxml = ''; - [$list_data, $list_status_code] = self::$conferencesApi->listConferenceRecordingsWithHttpInfo( + [, $status_code] = self::$apiInstance->updateConferenceBxmlWithHttpInfo( self::$account_id, - self::$conference_id + self::$conference_id, + $update_conference_bxml ); - $this->assertEquals(200, $list_status_code); - $conference_recording = $list_data[0]; - $this->assertInstanceOf(ConferenceRecordingMetadata::class, $conference_recording); + $this->assertEquals(204, $status_code); + } - [$recording_data, $recording_status_code] = self::$conferencesApi->getConferenceRecordingWithHttpInfo( - self::$account_id, - self::$conference_id, - $conference_recording->getRecordingId() - ); - $this->assertEquals(200, $recording_status_code); - $this->assertEquals('complete', $recording_data->getStatus()); - $this->assertEquals(FileFormatEnum::WAV, $recording_data->getFileFormat()); + /** + * Test case for updateConferenceMember + * + * Update Conference Member. + * + */ + public function testUpdateConferenceMember() + { + $update_conference_member = new UpdateConferenceMember([ + 'mute' => true, + 'hold' => true, + 'call_ids_to_coach' => [] + ]); - [, $download_status_code] = self::$conferencesApi->downloadConferenceRecordingWithHttpInfo( + [, $status_code] = self::$apiInstance->updateConferenceMemberWithHttpInfo( self::$account_id, self::$conference_id, - $conference_recording->getRecordingId() + self::$call_id, + $update_conference_member ); - $this->assertEquals(200, $download_status_code); + + $this->assertEquals(204, $status_code); } } diff --git a/tests/Unit/Api/EndpointsApiTest.php b/tests/Unit/Api/EndpointsApiTest.php index f3cabec2..abb5fcdd 100644 --- a/tests/Unit/Api/EndpointsApiTest.php +++ b/tests/Unit/Api/EndpointsApiTest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -29,13 +29,13 @@ use Bandwidth\Configuration; use Bandwidth\Api\EndpointsApi; -use Bandwidth\Model\CreateWebRtcConnectionRequest; use Bandwidth\Model\CreateEndpointResponse; use Bandwidth\Model\CreateEndpointResponseData; +use Bandwidth\Model\CreateWebRtcConnectionRequest; use Bandwidth\Model\Endpoint; +use Bandwidth\Model\EndpointDirectionEnum; use Bandwidth\Model\EndpointResponse; use Bandwidth\Model\Endpoints; -use Bandwidth\Model\EndpointDirectionEnum; use Bandwidth\Model\EndpointStatusEnum; use Bandwidth\Model\EndpointTypeEnum; use Bandwidth\Model\ListEndpointsResponse; @@ -52,10 +52,12 @@ */ class EndpointsApiTest extends TestCase { + private static EndpointsApi $apiInstance; private static string $account_id; - private static string $endpoint_id; - private static string $endpoint_tag; + + private static string $endpoint_id = 'test-endpoint-id'; + private static string $bxml = 'Hello'; /** * Setup before running any test cases @@ -63,14 +65,13 @@ class EndpointsApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setClientId(getenv("BW_CLIENT_ID")) - ->setClientSecret(getenv("BW_CLIENT_SECRET")); + ->setAccessToken("abcd1234") + ->setIgnoreOperationHosts(true) + ->setHost("http://127.0.0.1:4010"); self::$apiInstance = new EndpointsApi(config: $config); self::$account_id = getenv("BW_ACCOUNT_ID"); - - self::$endpoint_tag = 'php-smoke-' . uniqid(); } /** @@ -81,53 +82,45 @@ public static function setUpBeforeClass(): void */ public function testCreateEndpoint() { - $body = new CreateWebRtcConnectionRequest([ + $endpoint_body = new CreateWebRtcConnectionRequest([ 'type' => EndpointTypeEnum::WEBRTC, - 'direction' => EndpointDirectionEnum::BIDIRECTIONAL, - 'tag' => self::$endpoint_tag + 'direction' => EndpointDirectionEnum::BIDIRECTIONAL ]); - [$data, $status_code] = self::$apiInstance->createEndpointWithHttpInfo(self::$account_id, $body); + [$data, $status_code] = self::$apiInstance->createEndpointWithHttpInfo( + self::$account_id, + $endpoint_body + ); $this->assertEquals(201, $status_code); $this->assertInstanceOf(CreateEndpointResponse::class, $data); + $this->assertIsArray($data->getLinks()); $this->assertInstanceOf(CreateEndpointResponseData::class, $data->getData()); $this->assertIsString($data->getData()->getEndpointId()); $this->assertIsString($data->getData()->getToken()); - $this->assertEquals(EndpointTypeEnum::WEBRTC, $data->getData()->getType()); + $this->assertInstanceOf(EndpointTypeEnum::class, $data->getData()->getType()); $this->assertInstanceOf(EndpointStatusEnum::class, $data->getData()->getStatus()); $this->assertInstanceOf(\DateTime::class, $data->getData()->getCreationTimestamp()); $this->assertInstanceOf(\DateTime::class, $data->getData()->getExpirationTimestamp()); - $this->assertEquals(self::$endpoint_tag, $data->getData()->getTag()); + $this->assertIsString($data->getData()->getTag()); + $this->assertIsArray($data->getData()->getDevices()); $this->assertIsArray($data->getErrors()); - - self::$endpoint_id = $data->getData()->getEndpointId(); } /** - * Test case for listEndpoints + * Test case for deleteEndpoint * - * List Endpoints. + * Delete Endpoint. * */ - public function testListEndpoints() + public function testDeleteEndpoint() { - [$data, $status_code] = self::$apiInstance->listEndpointsWithHttpInfo(self::$account_id); - - $this->assertEquals(200, $status_code); - $this->assertInstanceOf(ListEndpointsResponse::class, $data); - $this->assertIsArray($data->getLinks()); - $this->assertInstanceOf(Page::class, $data->getPage()); - $this->assertIsArray($data->getData()); - $this->assertIsArray($data->getErrors()); + [, $status_code] = self::$apiInstance->deleteEndpointWithHttpInfo( + self::$account_id, + self::$endpoint_id + ); - $first_endpoint = $data->getData()[0]; - $this->assertInstanceOf(Endpoints::class, $first_endpoint); - $this->assertIsString($first_endpoint->getEndpointId()); - $this->assertInstanceOf(EndpointTypeEnum::class, $first_endpoint->getType()); - $this->assertInstanceOf(EndpointStatusEnum::class, $first_endpoint->getStatus()); - $this->assertInstanceOf(\DateTime::class, $first_endpoint->getCreationTimestamp()); - $this->assertInstanceOf(\DateTime::class, $first_endpoint->getExpirationTimestamp()); + $this->assertEquals(204, $status_code); } /** @@ -138,31 +131,50 @@ public function testListEndpoints() */ public function testGetEndpoint() { - [$data, $status_code] = self::$apiInstance->getEndpointWithHttpInfo(self::$account_id, self::$endpoint_id); + [$data, $status_code] = self::$apiInstance->getEndpointWithHttpInfo( + self::$account_id, + self::$endpoint_id + ); $this->assertEquals(200, $status_code); $this->assertInstanceOf(EndpointResponse::class, $data); - $this->assertIsArray($data->getErrors()); + $this->assertIsArray($data->getLinks()); $this->assertInstanceOf(Endpoint::class, $data->getData()); - $this->assertEquals(self::$endpoint_id, $data->getData()->getEndpointId()); - $this->assertEquals(EndpointTypeEnum::WEBRTC, $data->getData()->getType()); + $this->assertIsString($data->getData()->getEndpointId()); + $this->assertInstanceOf(EndpointTypeEnum::class, $data->getData()->getType()); $this->assertInstanceOf(EndpointStatusEnum::class, $data->getData()->getStatus()); $this->assertInstanceOf(\DateTime::class, $data->getData()->getCreationTimestamp()); $this->assertInstanceOf(\DateTime::class, $data->getData()->getExpirationTimestamp()); - $this->assertEquals(self::$endpoint_tag, $data->getData()->getTag()); + $this->assertIsString($data->getData()->getTag()); + $this->assertIsArray($data->getData()->getDevices()); + $this->assertIsArray($data->getErrors()); } /** - * Test case for deleteEndpoint + * Test case for listEndpoints * - * Delete Endpoint. + * List Endpoints. * */ - public function testDeleteEndpoint() + public function testListEndpoints() { - [, $status_code] = self::$apiInstance->deleteEndpointWithHttpInfo(self::$account_id, self::$endpoint_id); + [$data, $status_code] = self::$apiInstance->listEndpointsWithHttpInfo( + self::$account_id + ); - $this->assertEquals(204, $status_code); + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(ListEndpointsResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertIsArray($data->getData()); + $this->assertInstanceOf(Endpoints::class, $data->getData()[0]); + $this->assertIsString($data->getData()[0]->getEndpointId()); + $this->assertInstanceOf(EndpointTypeEnum::class, $data->getData()[0]->getType()); + $this->assertInstanceOf(EndpointStatusEnum::class, $data->getData()[0]->getStatus()); + $this->assertInstanceOf(\DateTime::class, $data->getData()[0]->getCreationTimestamp()); + $this->assertInstanceOf(\DateTime::class, $data->getData()[0]->getExpirationTimestamp()); + $this->assertIsString($data->getData()[0]->getTag()); + $this->assertInstanceOf(Page::class, $data->getPage()); + $this->assertIsArray($data->getErrors()); } /** @@ -173,7 +185,12 @@ public function testDeleteEndpoint() */ public function testUpdateEndpointBxml() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [, $status_code] = self::$apiInstance->updateEndpointBxmlWithHttpInfo( + self::$account_id, + self::$endpoint_id, + self::$bxml + ); + + $this->assertEquals(204, $status_code); } } diff --git a/tests/Unit/Api/MFAApiTest.php b/tests/Unit/Api/MFAApiTest.php index 3623fec6..60c41ca1 100644 --- a/tests/Unit/Api/MFAApiTest.php +++ b/tests/Unit/Api/MFAApiTest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -46,12 +46,16 @@ */ class MFAApiTest extends TestCase { + private static MFAApi $apiInstance; private static string $account_id; private static string $bw_number; private static string $user_number; - private static string $bw_messaging_application_id; - private static string $bw_voice_application_id; + private static string $messaging_application_id; + private static string $voice_application_id; + + private static string $message = 'Your temporary {NAME} {SCOPE} code is {CODE}'; + private static int $digits = 6; /** * Setup before running any test cases @@ -59,16 +63,17 @@ class MFAApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setUsername(getenv("BW_USERNAME")) - ->setPassword(getenv("BW_PASSWORD")); + ->setAccessToken("abcd1234") + ->setIgnoreOperationHosts(true) + ->setHost("http://127.0.0.1:4010"); self::$apiInstance = new MFAApi(config: $config); self::$account_id = getenv("BW_ACCOUNT_ID"); self::$bw_number = getenv("BW_NUMBER"); self::$user_number = getenv("USER_NUMBER"); - self::$bw_messaging_application_id = getenv("BW_MESSAGING_APPLICATION_ID"); - self::$bw_voice_application_id = getenv("BW_VOICE_APPLICATION_ID"); + self::$messaging_application_id = getenv("BW_MESSAGING_APPLICATION_ID"); + self::$voice_application_id = getenv("BW_VOICE_APPLICATION_ID"); } /** @@ -79,23 +84,22 @@ public static function setUpBeforeClass(): void */ public function testGenerateMessagingCode() { - $request = new CodeRequest([ + $code_request = new CodeRequest([ 'to' => self::$user_number, 'from' => self::$bw_number, - 'application_id' => self::$bw_messaging_application_id, - 'scope' => 'scope', - 'message' => 'Your temporary {NAME} {SCOPE} code is {CODE}', - 'digits' => 6 + 'application_id' => self::$messaging_application_id, + 'message' => self::$message, + 'digits' => self::$digits ]); [$data, $status_code] = self::$apiInstance->generateMessagingCodeWithHttpInfo( self::$account_id, - $request + $code_request ); $this->assertEquals(200, $status_code); $this->assertInstanceOf(MessagingCodeResponse::class, $data); - $this->assertIsString($data->getMessageId()); + $this->assertEquals(29, \strlen($data->getMessageId())); } /** @@ -106,23 +110,22 @@ public function testGenerateMessagingCode() */ public function testGenerateVoiceCode() { - $request = new CodeRequest([ + $code_request = new CodeRequest([ 'to' => self::$user_number, 'from' => self::$bw_number, - 'application_id' => self::$bw_voice_application_id, - 'scope' => 'scope', - 'message' => 'Your temporary {NAME} {SCOPE} code is {CODE}', - 'digits' => 6 + 'application_id' => self::$voice_application_id, + 'message' => self::$message, + 'digits' => self::$digits ]); [$data, $status_code] = self::$apiInstance->generateVoiceCodeWithHttpInfo( self::$account_id, - $request + $code_request ); $this->assertEquals(200, $status_code); $this->assertInstanceOf(VoiceCodeResponse::class, $data); - $this->assertIsString($data->getCallId()); + $this->assertEquals(47, \strlen($data->getCallId())); } /** @@ -133,23 +136,20 @@ public function testGenerateVoiceCode() */ public function testVerifyCode() { - // Use a random TN to avoid rate limiting - $random_tn = '+1' . (string) rand(1111111111, 9999999999); - - $request = new VerifyCodeRequest([ - 'to' => $random_tn, - 'scope' => '2FA', - 'expiration_time_in_minutes' => 3, - 'code' => '123456' + $verify_code_request = new VerifyCodeRequest([ + 'to' => self::$user_number, + 'scope' => 'login', + 'expiration_time_in_minutes' => 3.0, + 'code' => '12345' ]); [$data, $status_code] = self::$apiInstance->verifyCodeWithHttpInfo( self::$account_id, - $request + $verify_code_request ); $this->assertEquals(200, $status_code); $this->assertInstanceOf(VerifyCodeResponse::class, $data); - $this->assertFalse($data->getValid()); + $this->assertIsBool($data->getValid()); } } diff --git a/tests/Unit/Api/MediaApiTest.php b/tests/Unit/Api/MediaApiTest.php index d066c1b9..0e9c1f9c 100644 --- a/tests/Unit/Api/MediaApiTest.php +++ b/tests/Unit/Api/MediaApiTest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -27,11 +27,10 @@ namespace Bandwidth\Test\Unit\Api; -use SplFileObject; -use Bandwidth\ApiException; use Bandwidth\Configuration; use Bandwidth\Api\MediaApi; use Bandwidth\Model\Media; +use SplFileObject; use PHPUnit\Framework\TestCase; @@ -44,10 +43,11 @@ */ class MediaApiTest extends TestCase { + private static MediaApi $apiInstance; private static string $account_id; - private static string $media_name; - private static string $media_data; + + private static string $media_name = 'php_binary_media'; private static SplFileObject $media_file; /** @@ -56,57 +56,35 @@ class MediaApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setUsername(getenv("BW_USERNAME")) - ->setPassword(getenv("BW_PASSWORD")); + ->setAccessToken("abcd1234") + ->setIgnoreOperationHosts(true) + ->setHost("http://127.0.0.1:4010"); self::$apiInstance = new MediaApi(config: $config); self::$account_id = getenv("BW_ACCOUNT_ID"); - self::$media_name = "php_binary_media" . uniqid() . ".txt"; - self::$media_data = "123456"; $path = tempnam(sys_get_temp_dir(), 'bw_media_'); - file_put_contents($path, self::$media_data); + file_put_contents($path, "123456"); self::$media_file = new SplFileObject($path, 'rb'); } /** - * Test case for uploadMedia + * Test case for deleteMedia * - * Upload Media. + * Delete Media. * */ - public function testUploadMedia() + public function testDeleteMedia() { - [, $status_code] = self::$apiInstance->uploadMediaWithHttpInfo( + [, $status_code] = self::$apiInstance->deleteMediaWithHttpInfo( self::$account_id, - self::$media_name, - self::$media_file, - contentType: 'text/plain' + self::$media_name ); $this->assertEquals(204, $status_code); } - /** - * Test case for listMedia - * - * List Media. - * - */ - public function testListMedia() - { - [$data, $status_code] = self::$apiInstance->listMediaWithHttpInfo( - self::$account_id - ); - - $this->assertEquals(200, $status_code); - $this->assertIsArray($data); - $this->assertInstanceOf(Media::class, $data[0]); - $this->assertIsString($data[0]->getContent()); - $this->assertGreaterThan(0, $data[0]->getContentLength()); - } - /** * Test case for getMedia * @@ -115,6 +93,8 @@ public function testListMedia() */ public function testGetMedia() { + self::markTestSkipped("Can't set the correct Accept header for Prism"); + [$data, $status_code] = self::$apiInstance->getMediaWithHttpInfo( self::$account_id, self::$media_name @@ -122,39 +102,45 @@ public function testGetMedia() $this->assertEquals(200, $status_code); $this->assertInstanceOf(SplFileObject::class, $data); - $this->assertEquals(self::$media_data, file_get_contents($data->getRealPath())); } /** - * Test case for deleteMedia + * Test case for listMedia * - * Delete Media. + * List Media. * */ - public function testDeleteMedia() + public function testListMedia() { - [, $status_code] = self::$apiInstance->deleteMediaWithHttpInfo( - account_id: self::$account_id, - media_id: self::$media_name + [$data, $status_code] = self::$apiInstance->listMediaWithHttpInfo( + self::$account_id ); - $this->assertEquals(204, $status_code); + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(Media::class, $data[0]); + $this->assertIsString($data[0]->getContent()); + $this->assertIsInt($data[0]->getContentLength()); + $this->assertIsString($data[0]->getMediaName()); } /** - * Test case HTTP 404 + * Test case for uploadMedia * - * Get Media 404 + * Upload Media. * */ - public function testGetMedia404() + public function testUploadMedia() { - $this->expectException(ApiException::class); - $this->expectExceptionCode(404); + self::markTestSkipped("Can't set the correct Content-Type and Accept headers for Prism"); - self::$apiInstance->getMediaWithHttpInfo( - account_id: self::$account_id, - media_id: 'non_existent_media' + [, $status_code] = self::$apiInstance->uploadMediaWithHttpInfo( + self::$account_id, + self::$media_name, + self::$media_file, + content_type: 'image/jpeg', + cache_control: 'no-cache' ); + + $this->assertEquals(204, $status_code); } } diff --git a/tests/Unit/Api/MessagesApiTest.php b/tests/Unit/Api/MessagesApiTest.php index df8fe9d1..693bee7a 100644 --- a/tests/Unit/Api/MessagesApiTest.php +++ b/tests/Unit/Api/MessagesApiTest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -29,12 +29,16 @@ use Bandwidth\Configuration; use Bandwidth\Api\MessagesApi; -use Bandwidth\Model\PriorityEnum; -use Bandwidth\Model\MessageRequest; -use Bandwidth\Model\Message; use Bandwidth\Model\ListMessageDirectionEnum; -use Bandwidth\Model\MessagesList; use Bandwidth\Model\ListMessageItem; +use Bandwidth\Model\Message; +use Bandwidth\Model\MessageDirectionEnum; +use Bandwidth\Model\MessageRequest; +use Bandwidth\Model\MessageStatusEnum; +use Bandwidth\Model\MessagesList; +use Bandwidth\Model\MessageTypeEnum; +use Bandwidth\Model\PageInfo; +use Bandwidth\Model\PriorityEnum; use PHPUnit\Framework\TestCase; @@ -47,9 +51,15 @@ */ class MessagesApiTest extends TestCase { + private static MessagesApi $apiInstance; private static string $account_id; private static string $bw_number; + private static string $messaging_application_id; + + private static string $message_text = 'PHP SDK Test Message'; + private static PriorityEnum $message_priority = PriorityEnum::HIGH; + private static \DateTime $expiration; /** * Setup before running any test cases @@ -57,13 +67,18 @@ class MessagesApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setUsername(getenv("BW_USERNAME")) - ->setPassword(getenv("BW_PASSWORD")); + ->setAccessToken("abcd1234") + ->setIgnoreOperationHosts(true) + ->setHost("http://127.0.0.1:4010"); self::$apiInstance = new MessagesApi(config: $config); self::$account_id = getenv("BW_ACCOUNT_ID"); self::$bw_number = getenv("BW_NUMBER"); + self::$messaging_application_id = getenv("BW_MESSAGING_APPLICATION_ID"); + + self::$expiration = (new \DateTime('@' . strtotime('+1 day'))) + ->setTimezone(new \DateTimeZone('UTC')); } /** @@ -74,35 +89,37 @@ public static function setUpBeforeClass(): void */ public function testCreateMessage() { - $application_id = getenv("BW_MESSAGING_APPLICATION_ID"); - $to_number = getenv("USER_NUMBER"); - $from_number = self::$bw_number; - $text = 'python integration'; - $media = ['https://cdn2.thecatapi.com/images/MTY3ODIyMQ.jpg']; - $tag = 'python integration tag'; - $priority = PriorityEnum::_DEFAULT; - - # Message Request - $messageRequest = new MessageRequest([ - 'application_id' => $application_id, - 'to' => [$to_number], - 'from' => $from_number, - 'text' => $text, - 'media' => $media, - 'tag' => $tag, - 'priority' => $priority, + $message_request = new MessageRequest([ + 'application_id' => self::$messaging_application_id, + 'from' => self::$bw_number, + 'to' => [self::$bw_number], + 'text' => self::$message_text, + 'priority' => self::$message_priority, + 'expiration' => self::$expiration ]); - [$data, $status_code] = self::$apiInstance->createMessageWithHttpInfo(self::$account_id, $messageRequest); + [$data, $status_code] = self::$apiInstance->createMessageWithHttpInfo( + self::$account_id, + $message_request + ); + $this->assertEquals(202, $status_code); $this->assertInstanceOf(Message::class, $data); $this->assertEquals(29, \strlen($data->getId())); - $this->assertEquals($from_number, $data->getOwner()); - $this->assertEquals([$to_number], $data->getTo()); - $this->assertEquals($from_number, $data->getFrom()); - $this->assertEquals($text, $data->getText()); - $this->assertEquals($tag, $data->getTag()); - $this->assertEquals($priority, $data->getPriority()); + $this->assertEquals(12, \strlen($data->getOwner())); + $this->assertEquals(36, \strlen($data->getApplicationId())); + $this->assertInstanceOf(\DateTime::class, $data->getTime()); + $this->assertIsInt($data->getSegmentCount()); + $this->assertInstanceOf(MessageDirectionEnum::class, $data->getDirection()); + $this->assertIsArray($data->getTo()); + $this->assertEquals(12, \strlen($data->getTo()[0])); + $this->assertEquals(12, \strlen($data->getFrom())); + $this->assertIsArray($data->getMedia()); + $this->assertIsString($data->getMedia()[0]); + $this->assertIsString($data->getText()); + $this->assertIsString($data->getTag()); + $this->assertInstanceOf(PriorityEnum::class, $data->getPriority()); + $this->assertInstanceOf(\DateTime::class, $data->getExpiration()); } /** @@ -113,21 +130,42 @@ public function testCreateMessage() */ public function testListMessages() { - $list_message_direction = ListMessageDirectionEnum::OUTBOUND; - $calling_number_country_a3 = 'USA'; - [$data, $status_code] = self::$apiInstance->listMessagesWithHttpInfo( - account_id: self::$account_id, - message_direction: $list_message_direction, - calling_number_country_a3: $calling_number_country_a3 + self::$account_id ); $this->assertEquals(200, $status_code); $this->assertInstanceOf(MessagesList::class, $data); + $this->assertIsInt($data->getTotalCount()); + $this->assertInstanceOf(PageInfo::class, $data->getPageInfo()); + $this->assertIsString($data->getPageInfo()->getPrevPage()); + $this->assertIsString($data->getPageInfo()->getNextPage()); + $this->assertIsString($data->getPageInfo()->getPrevPageToken()); + $this->assertIsString($data->getPageInfo()->getNextPageToken()); + $this->assertIsArray($data->getMessages()); $this->assertInstanceOf(ListMessageItem::class, $data->getMessages()[0]); - $this->assertEquals(self::$account_id, $data->getMessages()[0]->getAccountId()); $this->assertEquals(29, \strlen($data->getMessages()[0]->getMessageId())); - $this->assertEquals($list_message_direction, $data->getMessages()[0]->getMessageDirection()); - $this->assertEquals($calling_number_country_a3, $data->getMessages()[0]->getCallingNumberCountryA3()); + $this->assertEquals(7, \strlen($data->getMessages()[0]->getAccountId())); + $this->assertEquals(12, \strlen($data->getMessages()[0]->getSourceTn())); + $this->assertEquals(12, \strlen($data->getMessages()[0]->getDestinationTn())); + $this->assertInstanceOf(MessageStatusEnum::class, $data->getMessages()[0]->getMessageStatus()); + $this->assertInstanceOf(ListMessageDirectionEnum::class, $data->getMessages()[0]->getMessageDirection()); + $this->assertInstanceOf(MessageTypeEnum::class, $data->getMessages()[0]->getMessageType()); + $this->assertIsInt($data->getMessages()[0]->getSegmentCount()); + $this->assertIsInt($data->getMessages()[0]->getErrorCode()); + $this->assertInstanceOf(\DateTime::class, $data->getMessages()[0]->getReceiveTime()); + $this->assertIsString($data->getMessages()[0]->getCarrierName()); + $this->assertIsInt($data->getMessages()[0]->getMessageSize()); + $this->assertIsInt($data->getMessages()[0]->getMessageLength()); + $this->assertIsInt($data->getMessages()[0]->getAttachmentCount()); + $this->assertIsInt($data->getMessages()[0]->getRecipientCount()); + $this->assertIsString($data->getMessages()[0]->getCampaignClass()); + $this->assertIsString($data->getMessages()[0]->getCampaignId()); + $this->assertIsInt($data->getMessages()[0]->getBwLatency()); + $this->assertIsInt($data->getMessages()[0]->getCarrierLatency()); + $this->assertIsString($data->getMessages()[0]->getCallingNumberCountryA3()); + $this->assertIsString($data->getMessages()[0]->getCalledNumberCountryA3()); + $this->assertIsString($data->getMessages()[0]->getProduct()); + $this->assertIsString($data->getMessages()[0]->getLocation()); } } diff --git a/tests/Unit/Api/MultiChannelApiTest.php b/tests/Unit/Api/MultiChannelApiTest.php index cdc52d9d..d475512f 100644 --- a/tests/Unit/Api/MultiChannelApiTest.php +++ b/tests/Unit/Api/MultiChannelApiTest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -30,32 +30,13 @@ use Bandwidth\Configuration; use Bandwidth\Api\MultiChannelApi; use Bandwidth\Model\CreateMultiChannelMessageResponse; -use Bandwidth\Model\CardWidthEnum; use Bandwidth\Model\MessageDirectionEnum; -use Bandwidth\Model\MmsMessageContent; -use Bandwidth\Model\MmsMessageContentFile; -use Bandwidth\Model\MultiChannelChannelListMMSObject; -use Bandwidth\Model\MultiChannelChannelListMMSResponseObject; -use Bandwidth\Model\MultiChannelChannelListRBMObject; -use Bandwidth\Model\MultiChannelChannelListRBMResponseObject; use Bandwidth\Model\MultiChannelChannelListSMSObject; -use Bandwidth\Model\MultiChannelChannelListSMSResponseObject; use Bandwidth\Model\MultiChannelMessageChannelEnum; +use Bandwidth\Model\MultiChannelMessageRequest; +use Bandwidth\Model\MultiChannelMessageResponseData; use Bandwidth\Model\PriorityEnum; -use Bandwidth\Model\RbmActionDial; -use Bandwidth\Model\RbmActionTypeEnum; -use Bandwidth\Model\RbmCardContent; -use Bandwidth\Model\RbmCardContentMedia; -use Bandwidth\Model\RbmMediaHeightEnum; -use Bandwidth\Model\RbmMessageCarouselCard; -use Bandwidth\Model\RbmMessageContentFile; -use Bandwidth\Model\RbmMessageContentText; -use Bandwidth\Model\RbmMessageMedia; -use Bandwidth\Model\RbmStandaloneCard; -use Bandwidth\Model\StandaloneCardOrientationEnum; -use Bandwidth\Model\ThumbnailAlignmentEnum; use Bandwidth\Model\SmsMessageContent; -use Bandwidth\Model\MultiChannelMessageRequest; use PHPUnit\Framework\TestCase; @@ -68,11 +49,12 @@ */ class MultiChannelApiTest extends TestCase { + private static MultiChannelApi $apiInstance; private static string $account_id; private static string $bw_number; private static string $user_number; - private static string $bw_messaging_application_id; + private static string $messaging_application_id; private static \DateTime $expiration; /** @@ -81,380 +63,39 @@ class MultiChannelApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setUsername(getenv("BW_USERNAME")) - ->setPassword(getenv("BW_PASSWORD")); + ->setAccessToken("abcd1234") + ->setIgnoreOperationHosts(true) + ->setHost("http://127.0.0.1:4010"); self::$apiInstance = new MultiChannelApi(config: $config); self::$account_id = getenv("BW_ACCOUNT_ID"); - self::$expiration = (new \DateTime('@' . strtotime('+1 minute'))) - ->setTimezone(new \DateTimeZone('UTC')); self::$bw_number = getenv("BW_NUMBER"); self::$user_number = getenv("USER_NUMBER"); - self::$bw_messaging_application_id = getenv("BW_MESSAGING_APPLICATION_ID"); + self::$messaging_application_id = getenv("BW_MESSAGING_APPLICATION_ID"); + + self::$expiration = (new \DateTime('@' . strtotime('+1 minute'))) + ->setTimezone(new \DateTimeZone('UTC')); } /** * Test case for createMultiChannelMessage * - * Create Multi-Channel SMS Message. + * Create Multi-Channel Message. * */ - public function testCreateMultiChannelSMSMessage() + public function testCreateMultiChannelMessage() { - $content = new SmsMessageContent(['text' => 'Hello World']); - $channel_list_object = new MultiChannelChannelListSMSObject([ 'from' => self::$bw_number, - 'application_id' => self::$bw_messaging_application_id, + 'application_id' => self::$messaging_application_id, 'channel' => MultiChannelMessageChannelEnum::SMS, - 'content' => $content - ]); - - $multi_channel_message_request = new MultiChannelMessageRequest([ - 'to' => self::$user_number, - 'tag' => "tag", - 'priority' => PriorityEnum::HIGH, - 'expiration' => self::$expiration, - 'channel_list' => [$channel_list_object] - ]); - - [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( - self::$account_id, - $multi_channel_message_request - ); - - $this->assertEquals(202, $status_code); - $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); - $this->assertIsArray($data->getLinks()); - $this->assertIsArray($data->getErrors()); - $this->assertIsString($data->getData()->getId()); - $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); - $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); - $this->assertEquals([self::$user_number], $data->getData()->getTo()); - $this->assertEquals("tag", $data->getData()->getTag()); - $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); - $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); - $this->assertIsArray($data->getData()->getChannelList()); - $this->assertInstanceOf(MultiChannelChannelListSMSResponseObject::class, $data->getData()->getChannelList()[0]); - $this->assertEquals(MultiChannelMessageChannelEnum::SMS, $data->getData()->getChannelList()[0]->getChannel()); - $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); - $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); - $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); - $this->assertInstanceOf(SmsMessageContent::class, $data->getData()->getChannelList()[0]->getContent()); - $this->assertIsString($data->getData()->getChannelList()[0]->getContent()->getText()); - } - - /** - * Test case for createMultiChannelMessage - * - * Create Multi-Channel MMS Message. - * - */ - public function testCreateMultiChannelMMSMessage() - { - $content = new MmsMessageContent([ - 'text' => 'Hello World!', - 'media' => [ - new MmsMessageContentFile(['file_url' => 'https://www.example.com/image.png']) - ] - ]); - - $channel_list_object = new MultiChannelChannelListMMSObject([ - 'from' => self::$bw_number, - 'application_id' => self::$bw_messaging_application_id, - 'channel' => MultiChannelMessageChannelEnum::MMS, - 'content' => $content - ]); - - $multi_channel_message_request = new MultiChannelMessageRequest([ - 'to' => self::$user_number, - 'tag' => "tag", - 'priority' => PriorityEnum::HIGH, - 'expiration' => self::$expiration, - 'channel_list' => [$channel_list_object] - ]); - - [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( - self::$account_id, - $multi_channel_message_request - ); - - $this->assertEquals(202, $status_code); - $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); - $this->assertIsArray($data->getLinks()); - $this->assertIsArray($data->getErrors()); - $this->assertIsString($data->getData()->getId()); - $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); - $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); - $this->assertEquals([self::$user_number], $data->getData()->getTo()); - $this->assertEquals("tag", $data->getData()->getTag()); - $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); - $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); - $this->assertIsArray($data->getData()->getChannelList()); - $this->assertInstanceOf(MultiChannelChannelListMMSResponseObject::class, $data->getData()->getChannelList()[0]); - $this->assertEquals(MultiChannelMessageChannelEnum::MMS, $data->getData()->getChannelList()[0]->getChannel()); - $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); - $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); - $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); - $this->assertInstanceOf(MmsMessageContent::class, $data->getData()->getChannelList()[0]->getContent()); - $this->assertIsString($data->getData()->getChannelList()[0]->getContent()->getText()); - $this->assertIsArray($data->getData()->getChannelList()[0]->getContent()->getMedia()); - $this->assertInstanceOf(MmsMessageContentFile::class, $data->getData()->getChannelList()[0]->getContent()->getMedia()[0]); - $this->assertIsString($data->getData()->getChannelList()[0]->getContent()->getMedia()[0]->getFileUrl()); - } - - /** - * Test case for createMultiChannelMessage - * - * Create Multi-Channel RMB Text Message. - * - */ - public function testCreateMultiChannelRMBTextMessage() - { - $content = new RbmMessageContentText([ - 'text' => 'Hello World!', - 'suggestions' => [ - new RbmActionDial([ - 'type' => RbmActionTypeEnum::DIAL_PHONE, - 'text' => 'Call Us', - 'postback_data' => base64_encode('postback data'), - 'phone_number' => self::$bw_number - ]) - ] - ]); - - $channel_list_object = new MultiChannelChannelListRBMObject([ - 'from' => self::$bw_number, - 'application_id' => self::$bw_messaging_application_id, - 'channel' => MultiChannelMessageChannelEnum::RBM, - 'content' => $content - ]); - - $multi_channel_message_request = new MultiChannelMessageRequest([ - 'to' => self::$user_number, - 'tag' => "tag", - 'priority' => PriorityEnum::HIGH, - 'expiration' => self::$expiration, - 'channel_list' => [$channel_list_object] - ]); - - [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( - self::$account_id, - $multi_channel_message_request - ); - - $this->assertEquals(202, $status_code); - $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); - $this->assertIsArray($data->getLinks()); - $this->assertIsArray($data->getErrors()); - $this->assertIsString($data->getData()->getId()); - $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); - $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); - $this->assertEquals([self::$user_number], $data->getData()->getTo()); - $this->assertEquals("tag", $data->getData()->getTag()); - $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); - $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); - $this->assertIsArray($data->getData()->getChannelList()); - $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, $data->getData()->getChannelList()[0]); - $this->assertEquals(MultiChannelMessageChannelEnum::RBM, $data->getData()->getChannelList()[0]->getChannel()); - $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); - $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); - $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); - $this->assertInstanceOf(RbmMessageContentText::class, $data->getData()->getChannelList()[0]->getContent()); - $rbm_content = $data->getData()->getChannelList()[0]->getContent(); - $this->assertIsString($rbm_content->getText()); - $this->assertIsArray($rbm_content->getSuggestions()); - $this->assertInstanceOf(RbmActionDial::class, $rbm_content->getSuggestions()[0]); - $rbm_action_dial = $rbm_content->getSuggestions()[0]; - $this->assertEquals(RbmActionTypeEnum::DIAL_PHONE, $rbm_action_dial->getType()); - $this->assertIsString($rbm_action_dial->getText()); - $this->assertIsString($rbm_action_dial->getPostbackData()); - $this->assertIsString($rbm_action_dial->getPhoneNumber()); - } - - /** - * Test case for createMultiChannelMessage - * - * Create Multi-Channel RBM Media Message. - * - */ - public function testCreateMultiChannelRBMMediaMessage() - { - $content = new RbmMessageMedia([ - 'media' => [ - new RbmMessageContentFile([ - 'file_url' => 'https://www.example.com/image1.png', - 'thumbnail_url' => 'https://www.example.com/thumbnail' - ]) - ], - 'suggestions' => [ - new RbmActionDial([ - 'type' => RbmActionTypeEnum::DIAL_PHONE, - 'text' => 'Call Us', - 'postback_data' => base64_encode('postback data'), - 'phone_number' => self::$bw_number - ]) - ] - ]); - - $channel_list_object = new MultiChannelChannelListRBMObject([ - 'from' => self::$bw_number, - 'application_id' => self::$bw_messaging_application_id, - 'channel' => MultiChannelMessageChannelEnum::RBM, - 'content' => $content - ]); - - $multi_channel_message_request = new MultiChannelMessageRequest([ - 'to' => self::$user_number, - 'tag' => "tag", - 'priority' => PriorityEnum::HIGH, - 'expiration' => self::$expiration, - 'channel_list' => [$channel_list_object] - ]); - - [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( - self::$account_id, - $multi_channel_message_request - ); - - $this->assertEquals(202, $status_code); - $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); - $this->assertIsArray($data->getLinks()); - $this->assertIsArray($data->getErrors()); - $this->assertIsString($data->getData()->getId()); - $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); - $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); - $this->assertEquals([self::$user_number], $data->getData()->getTo()); - $this->assertEquals("tag", $data->getData()->getTag()); - $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); - $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); - $this->assertIsArray($data->getData()->getChannelList()); - $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, $data->getData()->getChannelList()[0]); - $this->assertEquals(MultiChannelMessageChannelEnum::RBM, $data->getData()->getChannelList()[0]->getChannel()); - $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); - $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); - $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); - $this->assertInstanceOf(RbmMessageMedia::class, $data->getData()->getChannelList()[0]->getContent()); - $rbm_content = $data->getData()->getChannelList()[0]->getContent(); - $this->assertIsArray($rbm_content->getMedia()); - $this->assertInstanceOf(RbmMessageContentFile::class, $rbm_content->getMedia()[0]); - $this->assertIsString($rbm_content->getMedia()[0]->getFileUrl()); - $this->assertIsString($rbm_content->getMedia()[0]->getThumbnailUrl()); - $this->assertIsArray($rbm_content->getSuggestions()); - $this->assertInstanceOf(RbmActionDial::class, $rbm_content->getSuggestions()[0]); - $rbm_action_dial = $rbm_content->getSuggestions()[0]; - $this->assertEquals(RbmActionTypeEnum::DIAL_PHONE, $rbm_action_dial->getType()); - $this->assertIsString($rbm_action_dial->getText()); - $this->assertIsString($rbm_action_dial->getPostbackData()); - $this->assertIsString($rbm_action_dial->getPhoneNumber()); - } - - /** - * Test case for createMultiChannelMessage - * - * Create Multi-Channel RBM Rich Standalone Message. - * - */ - public function testCreateMultiChannelRMBRichStandaloneMessage() - { - $content = new RbmStandaloneCard([ - 'orientation' => StandaloneCardOrientationEnum::HORIZONTAL, - 'thumbnail_image_alignment' => ThumbnailAlignmentEnum::LEFT, - 'card_content' => new RbmCardContent([ - 'title' => 'Test Title' - ]) - ]); - - $channel_list_object = new MultiChannelChannelListRBMObject([ - 'from' => self::$bw_number, - 'application_id' => self::$bw_messaging_application_id, - 'channel' => MultiChannelMessageChannelEnum::RBM, - 'content' => $content - ]); - - $multi_channel_message_request = new MultiChannelMessageRequest([ - 'to' => self::$user_number, - 'tag' => "tag", - 'priority' => PriorityEnum::HIGH, - 'expiration' => self::$expiration, - 'channel_list' => [$channel_list_object] - ]); - - [$data, $status_code] = self::$apiInstance->createMultiChannelMessageWithHttpInfo( - self::$account_id, - $multi_channel_message_request - ); - - $this->assertEquals(202, $status_code); - $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); - $this->assertIsArray($data->getLinks()); - $this->assertIsArray($data->getErrors()); - $this->assertIsString($data->getData()->getId()); - $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); - $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); - $this->assertEquals([self::$user_number], $data->getData()->getTo()); - $this->assertEquals("tag", $data->getData()->getTag()); - $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); - $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); - $this->assertIsArray($data->getData()->getChannelList()); - $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, $data->getData()->getChannelList()[0]); - $this->assertEquals(MultiChannelMessageChannelEnum::RBM, $data->getData()->getChannelList()[0]->getChannel()); - $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); - $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); - $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); - $this->assertInstanceOf(RbmStandaloneCard::class, $data->getData()->getChannelList()[0]->getContent()); - $rbm_card = $data->getData()->getChannelList()[0]->getContent(); - $this->assertEquals(StandaloneCardOrientationEnum::HORIZONTAL, $rbm_card->getOrientation()); - $this->assertEquals(ThumbnailAlignmentEnum::LEFT, $rbm_card->getThumbnailImageAlignment()); - $this->assertInstanceOf(RbmCardContent::class, $rbm_card->getCardContent()); - $this->assertIsString($rbm_card->getCardContent()->getTitle()); - } - - /** - * Test case for createMultiChannelMessage - * - * Create Multi-Channel RBM RichCarousel Message. - * - */ - public function testCreateMultiChannelRMBRichCarouselMessage() - { - $content = new RbmMessageCarouselCard([ - 'card_width' => CardWidthEnum::MEDIUM, - 'card_contents' => [ - new RbmCardContent([ - 'title' => 'Card 1 Title', - 'description' => 'Card 1 Description', - 'media' => new RbmCardContentMedia([ - 'file_url' => 'https://www.example.com/image1.png', - 'thumbnail_url' => 'https://www.example.com/thumbnail', - 'height' => RbmMediaHeightEnum::TALL - ]), - 'suggestions' => [ - new RbmActionDial([ - 'type' => RbmActionTypeEnum::DIAL_PHONE, - 'text' => 'Call Us', - 'postback_data' => base64_encode('postback data'), - 'phone_number' => self::$bw_number - ]) - ] - ]), - new RbmCardContent([ - 'title' => 'Card 2 Title' - ]) - ] - ]); - - $channel_list_object = new MultiChannelChannelListRBMObject([ - 'from' => self::$bw_number, - 'application_id' => self::$bw_messaging_application_id, - 'channel' => MultiChannelMessageChannelEnum::RBM, - 'content' => $content + 'content' => new SmsMessageContent(['text' => 'Hello World!']) ]); $multi_channel_message_request = new MultiChannelMessageRequest([ 'to' => self::$user_number, - 'tag' => "tag", + 'tag' => 'tag', 'priority' => PriorityEnum::HIGH, 'expiration' => self::$expiration, 'channel_list' => [$channel_list_object] @@ -468,42 +109,14 @@ public function testCreateMultiChannelRMBRichCarouselMessage() $this->assertEquals(202, $status_code); $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, $data); $this->assertIsArray($data->getLinks()); - $this->assertIsArray($data->getErrors()); + $this->assertInstanceOf(MultiChannelMessageResponseData::class, $data->getData()); $this->assertIsString($data->getData()->getId()); $this->assertInstanceOf(\DateTime::class, $data->getData()->getTime()); - $this->assertEquals(MessageDirectionEnum::OUT, $data->getData()->getDirection()); - $this->assertEquals([self::$user_number], $data->getData()->getTo()); - $this->assertEquals("tag", $data->getData()->getTag()); - $this->assertEquals(PriorityEnum::HIGH, $data->getData()->getPriority()); - $this->assertEquals(self::$expiration, $data->getData()->getExpiration()); + $this->assertInstanceOf(MessageDirectionEnum::class, $data->getData()->getDirection()); + $this->assertIsArray($data->getData()->getTo()); + $this->assertIsString($data->getData()->getTag()); + $this->assertInstanceOf(PriorityEnum::class, $data->getData()->getPriority()); + $this->assertInstanceOf(\DateTime::class, $data->getData()->getExpiration()); $this->assertIsArray($data->getData()->getChannelList()); - $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, $data->getData()->getChannelList()[0]); - $this->assertEquals(MultiChannelMessageChannelEnum::RBM, $data->getData()->getChannelList()[0]->getChannel()); - $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getFrom()); - $this->assertEquals(self::$bw_number, $data->getData()->getChannelList()[0]->getOwner()); - $this->assertEquals(self::$bw_messaging_application_id, $data->getData()->getChannelList()[0]->getApplicationId()); - $this->assertInstanceOf(RbmMessageCarouselCard::class, $data->getData()->getChannelList()[0]->getContent()); - $rbm_card = $data->getData()->getChannelList()[0]->getContent(); - $this->assertEquals(CardWidthEnum::MEDIUM, $rbm_card->getCardWidth()); - $this->assertIsArray($rbm_card->getCardContents()); - $this->assertInstanceOf(RbmCardContent::class, $rbm_card->getCardContents()[0]); - $card1 = $rbm_card->getCardContents()[0]; - $this->assertIsString($card1->getTitle()); - $this->assertIsString($card1->getDescription()); - $this->assertInstanceOf(RbmCardContentMedia::class, $card1->getMedia()); - $media = $card1->getMedia(); - $this->assertIsString($media->getFileUrl()); - $this->assertIsString($media->getThumbnailUrl()); - $this->assertEquals(RbmMediaHeightEnum::TALL, $media->getHeight()); - $this->assertIsArray($card1->getSuggestions()); - $this->assertInstanceOf(RbmActionDial::class, $card1->getSuggestions()[0]); - $rbm_action_dial = $card1->getSuggestions()[0]; - $this->assertEquals(RbmActionTypeEnum::DIAL_PHONE, $rbm_action_dial->getType()); - $this->assertIsString($rbm_action_dial->getText()); - $this->assertIsString($rbm_action_dial->getPostbackData()); - $this->assertIsString($rbm_action_dial->getPhoneNumber()); - $this->assertInstanceOf(RbmCardContent::class, $rbm_card->getCardContents()[1]); - $card2 = $rbm_card->getCardContents()[1]; - $this->assertIsString($card2->getTitle()); } } diff --git a/tests/Unit/Api/PhoneNumberLookupApiTest.php b/tests/Unit/Api/PhoneNumberLookupApiTest.php index ab524d5c..329b38dd 100644 --- a/tests/Unit/Api/PhoneNumberLookupApiTest.php +++ b/tests/Unit/Api/PhoneNumberLookupApiTest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -38,7 +38,9 @@ use Bandwidth\Model\GetAsyncBulkLookupResponse; use Bandwidth\Model\GetAsyncBulkLookupResponseData; use Bandwidth\Model\InProgressLookupStatusEnum; +use Bandwidth\Model\LatestMessageDeliveryStatusEnum; use Bandwidth\Model\LineTypeEnum; +use Bandwidth\Model\LinkSchema; use Bandwidth\Model\LookupResult; use Bandwidth\Model\SyncLookupRequest; @@ -53,10 +55,14 @@ */ class PhoneNumberLookupApiTest extends TestCase { + private static PhoneNumberLookupApi $apiInstance; private static string $account_id; - private static array $phone_numbers; - private static string $request_id; + + private static string $request_id = '123e4567-e89b-12d3-a456-426614174000'; + + /** @var string[] */ + private static array $phone_numbers = ['+1234567890', '+1987654321']; /** * Setup before running any test cases @@ -64,18 +70,44 @@ class PhoneNumberLookupApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setClientId(getenv("BW_CLIENT_ID")) - ->setClientSecret(getenv("BW_CLIENT_SECRET")); + ->setAccessToken("abcd1234") + ->setIgnoreOperationHosts(true) + ->setHost("http://127.0.0.1:4010"); self::$apiInstance = new PhoneNumberLookupApi(config: $config); self::$account_id = getenv("BW_ACCOUNT_ID"); - self::$phone_numbers = [ - getenv("BW_NUMBER"), - getenv("VZW_NUMBER"), - getenv("ATT_NUMBER"), - getenv("T_MOBILE_NUMBER") - ]; + } + + /** + * Test case for createAsyncBulkLookup + * + * Create Asynchronous Bulk Number Lookup. + * + */ + public function testCreateAsyncBulkLookup() + { + $async_lookup_request = new AsyncLookupRequest([ + 'phone_numbers' => self::$phone_numbers + ]); + + [$data, $status_code] = self::$apiInstance->createAsyncBulkLookupWithHttpInfo( + self::$account_id, + $async_lookup_request + ); + + $this->assertEquals(202, $status_code); + $this->assertInstanceOf(CreateAsyncBulkLookupResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertInstanceOf(LinkSchema::class, $data->getLinks()[0]); + $this->assertIsString($data->getLinks()[0]->getRel()); + $this->assertIsString($data->getLinks()[0]->getHref()); + $this->assertIsString($data->getLinks()[0]->getMethod()); + $this->assertInstanceOf(CreateAsyncBulkLookupResponseData::class, $data->getData()); + $this->assertIsString($data->getData()->getRequestId()); + $this->assertInstanceOf(InProgressLookupStatusEnum::class, $data->getData()->getStatus()); + $this->assertEquals(InProgressLookupStatusEnum::IN_PROGRESS, $data->getData()->getStatus()); + $this->assertIsArray($data->getErrors()); } /** @@ -86,11 +118,14 @@ public static function setUpBeforeClass(): void */ public function testCreateSyncLookup() { - $lookup_request = new SyncLookupRequest(['phone_numbers' => self::$phone_numbers]); + $sync_lookup_request = new SyncLookupRequest([ + 'phone_numbers' => self::$phone_numbers, + 'rcs_agent' => 'TestAgent' + ]); [$data, $status_code] = self::$apiInstance->createSyncLookupWithHttpInfo( self::$account_id, - $lookup_request + $sync_lookup_request ); $this->assertEquals(200, $status_code); @@ -99,13 +134,31 @@ public function testCreateSyncLookup() $this->assertInstanceOf(CreateSyncLookupResponseData::class, $data->getData()); $this->assertIsString($data->getData()->getRequestId()); $this->assertInstanceOf(CompletedLookupStatusEnum::class, $data->getData()->getStatus()); + $this->assertEquals(CompletedLookupStatusEnum::COMPLETE, $data->getData()->getStatus()); $this->assertIsArray($data->getData()->getResults()); - $first_result = $data->getData()->getResults()[0]; - $this->assertInstanceOf(LookupResult::class, $first_result); - $this->assertIsString($first_result->getPhoneNumber()); - $this->assertInstanceOf(LineTypeEnum::class, $first_result->getLineType()); - $this->assertIsString($first_result->getVoiceProvider()); - $this->assertIsString($first_result->getCountryCodeA3()); + $this->assertInstanceOf(LookupResult::class, $data->getData()->getResults()[0]); + $this->assertIsString($data->getData()->getResults()[0]->getPhoneNumber()); + $this->assertInstanceOf(LineTypeEnum::class, $data->getData()->getResults()[0]->getLineType()); + $this->assertIsString($data->getData()->getResults()[0]->getMessagingProvider()); + $this->assertIsString($data->getData()->getResults()[0]->getVoiceProvider()); + $this->assertIsString($data->getData()->getResults()[0]->getCountryCodeA3()); + $this->assertInstanceOf( + LatestMessageDeliveryStatusEnum::class, + $data->getData()->getResults()[0]->getLatestMessageDeliveryStatus() + ); + $this->assertEquals( + LatestMessageDeliveryStatusEnum::ACTIVE, + $data->getData()->getResults()[0]->getLatestMessageDeliveryStatus() + ); + $this->assertInstanceOf( + \DateTime::class, + $data->getData()->getResults()[0]->getInitialMessageDeliveryStatusDate() + ); + $this->assertInstanceOf( + \DateTime::class, + $data->getData()->getResults()[0]->getLatestMessageDeliveryStatusDate() + ); + $this->assertIsArray($data->getErrors()); } /** @@ -114,42 +167,43 @@ public function testCreateSyncLookup() * Get Asynchronous Bulk Number Lookup. * */ - public function testCreateGetAsyncBulkLookup() + public function testGetAsyncBulkLookup() { - $lookup_request = new AsyncLookupRequest(['phone_numbers' => self::$phone_numbers]); - - [$create_data, $create_status_code] = self::$apiInstance->createAsyncBulkLookupWithHttpInfo( - self::$account_id, - $lookup_request - ); - - $this->assertEquals(202, $create_status_code); - $this->assertInstanceOf(CreateAsyncBulkLookupResponse::class, $create_data); - $this->assertInstanceOf(CreateAsyncBulkLookupResponseData::class, $create_data->getData()); - $this->assertIsString($create_data->getData()->getRequestId()); - $this->assertInstanceOf(InProgressLookupStatusEnum::class, $create_data->getData()->getStatus()); - - self::$request_id = $create_data->getData()->getRequestId(); - - sleep(60); - - [$get_data, $get_status_code] = self::$apiInstance->getAsyncBulkLookupWithHttpInfo( + [$data, $status_code] = self::$apiInstance->getAsyncBulkLookupWithHttpInfo( self::$account_id, self::$request_id ); - $this->assertEquals(200, $get_status_code); - $this->assertInstanceOf(GetAsyncBulkLookupResponse::class, $get_data); - $this->assertIsArray($get_data->getLinks()); - $this->assertInstanceOf(GetAsyncBulkLookupResponseData::class, $get_data->getData()); - $this->assertEquals(self::$request_id, $get_data->getData()->getRequestId()); - $this->assertInstanceOf(InProgressLookupStatusEnum::class, $get_data->getData()->getStatus()); - $this->assertIsArray($get_data->getData()->getResults()); - $first_result = $get_data->getData()->getResults()[0]; - $this->assertInstanceOf(LookupResult::class, $first_result); - $this->assertIsString($first_result->getPhoneNumber()); - $this->assertInstanceOf(LineTypeEnum::class, $first_result->getLineType()); - $this->assertIsString($first_result->getVoiceProvider()); - $this->assertIsString($first_result->getCountryCodeA3()); + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(GetAsyncBulkLookupResponse::class, $data); + $this->assertIsArray($data->getLinks()); + $this->assertInstanceOf(GetAsyncBulkLookupResponseData::class, $data->getData()); + $this->assertIsString($data->getData()->getRequestId()); + $this->assertInstanceOf(InProgressLookupStatusEnum::class, $data->getData()->getStatus()); + $this->assertEquals(InProgressLookupStatusEnum::COMPLETE, $data->getData()->getStatus()); + $this->assertIsArray($data->getData()->getResults()); + $this->assertInstanceOf(LookupResult::class, $data->getData()->getResults()[0]); + $this->assertIsString($data->getData()->getResults()[0]->getPhoneNumber()); + $this->assertInstanceOf(LineTypeEnum::class, $data->getData()->getResults()[0]->getLineType()); + $this->assertIsString($data->getData()->getResults()[0]->getMessagingProvider()); + $this->assertIsString($data->getData()->getResults()[0]->getVoiceProvider()); + $this->assertIsString($data->getData()->getResults()[0]->getCountryCodeA3()); + $this->assertInstanceOf( + LatestMessageDeliveryStatusEnum::class, + $data->getData()->getResults()[0]->getLatestMessageDeliveryStatus() + ); + $this->assertEquals( + LatestMessageDeliveryStatusEnum::ACTIVE, + $data->getData()->getResults()[0]->getLatestMessageDeliveryStatus() + ); + $this->assertInstanceOf( + \DateTime::class, + $data->getData()->getResults()[0]->getInitialMessageDeliveryStatusDate() + ); + $this->assertInstanceOf( + \DateTime::class, + $data->getData()->getResults()[0]->getLatestMessageDeliveryStatusDate() + ); + $this->assertIsArray($data->getErrors()); } } diff --git a/tests/Unit/Api/RecordingsApiTest.php b/tests/Unit/Api/RecordingsApiTest.php index 50d61855..f0321910 100644 --- a/tests/Unit/Api/RecordingsApiTest.php +++ b/tests/Unit/Api/RecordingsApiTest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -28,18 +28,18 @@ namespace Bandwidth\Test\Unit\Api; use Bandwidth\Configuration; -use Bandwidth\Api\CallsApi; use Bandwidth\Api\RecordingsApi; +use Bandwidth\Model\CallDirectionEnum; use Bandwidth\Model\CallRecordingMetadata; -use Bandwidth\Model\CallStateEnum; -use Bandwidth\Model\CreateCall; +use Bandwidth\Model\FileFormatEnum; use Bandwidth\Model\RecordingStateEnum; +use Bandwidth\Model\RecordingTranscriptionClip; +use Bandwidth\Model\RecordingTranscriptionMetadata; use Bandwidth\Model\RecordingTranscriptions; use Bandwidth\Model\TranscribeRecording; -use Bandwidth\Model\UpdateCall; +use Bandwidth\Model\Transcription; use Bandwidth\Model\UpdateCallRecording; -use Bandwidth\Test\Utils\CallCleanup; -use Bandwidth\Test\Utils\Manteca; +use SplFileObject; use PHPUnit\Framework\TestCase; @@ -52,16 +52,12 @@ */ class RecordingsApiTest extends TestCase { - private const TEST_SLEEP = 3; - private const MAX_RETRIES = 40; - private static CallsApi $callsApi; - private static RecordingsApi $recordingsApi; + private static RecordingsApi $apiInstance; private static string $account_id; - private static string $test_id; - private static string $answer_url; - private static string $call_id; - private static string $recording_id; + + private static string $call_id = 'c-1234'; + private static string $recording_id = 'r-1234'; /** * Setup before running any test cases @@ -69,159 +65,277 @@ class RecordingsApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setClientId(getenv("BW_CLIENT_ID")) - ->setClientSecret(getenv("BW_CLIENT_SECRET")); + ->setAccessToken("abcd1234") + ->setIgnoreOperationHosts(true) + ->setHost("http://127.0.0.1:4010"); - self::$callsApi = new CallsApi(config: $config); - self::$recordingsApi = new RecordingsApi(config: $config); + self::$apiInstance = new RecordingsApi(config: $config); self::$account_id = getenv("BW_ACCOUNT_ID"); - self::$answer_url = getenv("MANTECA_BASE_URL") . "/bxml/startLongRecording"; } /** - * Ensure the call is hung up after the suite + * Test case for deleteRecording + * + * Delete Recording. + * */ - public static function tearDownAfterClass(): void + public function testDeleteRecording() { - CallCleanup::cleanup(self::$callsApi, self::$account_id, [self::$call_id]); + [, $status_code] = self::$apiInstance->deleteRecordingWithHttpInfo( + self::$account_id, + self::$call_id, + self::$recording_id + ); + + $this->assertEquals(204, $status_code); } /** - * Test case for the full call recording and transcription lifecycle. + * Test case for deleteRecordingMedia + * + * Delete Recording Media. * */ - public function testCallRecordingAndTranscription() + public function testDeleteRecordingMedia() { - $os = getenv("OPERATING_SYSTEM"); - $language = "PHP" . phpversion() . "_" . getenv("DISTRIBUTION"); - self::$test_id = Manteca::createTest($os, $language, "CALL"); - - $create_call_body = new CreateCall([ - 'to' => getenv("MANTECA_IDLE_NUMBER"), - 'from' => getenv("MANTECA_ACTIVE_NUMBER"), - 'application_id' => getenv("MANTECA_APPLICATION_ID"), - 'answer_url' => self::$answer_url, - 'tag' => self::$test_id - ]); - - [$create_data] = self::$callsApi->createCallWithHttpInfo(self::$account_id, $create_call_body); - self::$call_id = $create_data->getCallId(); - - // Pause recording - sleep(self::TEST_SLEEP * 2); - [, $pause_status_code] = self::$recordingsApi->updateCallRecordingStateWithHttpInfo( + [, $status_code] = self::$apiInstance->deleteRecordingMediaWithHttpInfo( self::$account_id, self::$call_id, - new UpdateCallRecording(['state' => RecordingStateEnum::PAUSED]) + self::$recording_id ); - $this->assertEquals(200, $pause_status_code); - // Resume recording - sleep(self::TEST_SLEEP); - [, $resume_status_code] = self::$recordingsApi->updateCallRecordingStateWithHttpInfo( - self::$account_id, - self::$call_id, - new UpdateCallRecording(['state' => RecordingStateEnum::RECORDING]) - ); - $this->assertEquals(200, $resume_status_code); + $this->assertEquals(204, $status_code); + } - // Terminate the call - [, $update_call_status_code] = self::$callsApi->updateCallWithHttpInfo( + /** + * Test case for deleteRecordingTranscription + * + * Delete Transcription. + * + */ + public function testDeleteRecordingTranscription() + { + [, $status_code] = self::$apiInstance->deleteRecordingTranscriptionWithHttpInfo( self::$account_id, self::$call_id, - new UpdateCall(['state' => CallStateEnum::COMPLETED]) - ); - $this->assertEquals(200, $update_call_status_code); - - // Poll Manteca until the call has been recorded - $recording_status = false; - for ($x = 0; $x < self::MAX_RETRIES && !$recording_status; $x++) { - sleep(self::TEST_SLEEP); - $recording_status = Manteca::getStatus(self::$test_id)['callRecorded'] ?? false; - } - $this->assertTrue($recording_status); - - // Validate the recording metadata endpoints - [$list_data, $list_status_code] = self::$recordingsApi->listCallRecordingsWithHttpInfo( - self::$account_id, - self::$call_id + self::$recording_id ); - $this->assertEquals(200, $list_status_code); - self::$recording_id = $list_data[0]->getRecordingId(); - [$get_data, $get_status_code] = self::$recordingsApi->getCallRecordingWithHttpInfo( + $this->assertEquals(204, $status_code); + } + + /** + * Test case for downloadCallRecording + * + * Download Recording. + * + */ + public function testDownloadCallRecording() + { + self::markTestSkipped("Can't set the correct Accept header for Prism"); + + [$data, $status_code] = self::$apiInstance->downloadCallRecordingWithHttpInfo( self::$account_id, self::$call_id, self::$recording_id ); - $this->assertEquals(200, $get_status_code); - $this->assertInstanceOf(CallRecordingMetadata::class, $get_data); - // Request a transcription; pass the tag to receive the Manteca callback - $transcribe_recording = new TranscribeRecording([ - 'callback_url' => getenv("MANTECA_BASE_URL") . "/transcriptions", - 'tag' => self::$test_id - ]); - [, $transcribe_status_code] = self::$recordingsApi->transcribeCallRecordingWithHttpInfo( - self::$account_id, - self::$call_id, - self::$recording_id, - $transcribe_recording - ); - $this->assertEquals(204, $transcribe_status_code); - - // Poll Manteca until the call has been transcribed - $transcription_status = false; - for ($i = 0; $i < self::MAX_RETRIES && !$transcription_status; $i++) { - sleep(self::TEST_SLEEP); - $transcription_status = Manteca::getStatus(self::$test_id)['callTranscribed'] ?? false; - } - $this->assertTrue($transcription_status); - - // Validate the transcription metadata endpoint - [$transcription_data, $transcription_get_status_code] = self::$recordingsApi->getRecordingTranscriptionWithHttpInfo( + $this->assertEquals(204, $status_code); + $this->assertInstanceOf(SplFileObject::class, $data); + } + + /** + * Test case for getCallRecording + * + * Get Call Recording. + * + */ + public function testGetCallRecording() + { + self::markTestSkipped('Prism Error'); + + [$data, $status_code] = self::$apiInstance->getCallRecordingWithHttpInfo( self::$account_id, self::$call_id, self::$recording_id ); - $this->assertEquals(200, $transcription_get_status_code); - $this->assertInstanceOf(RecordingTranscriptions::class, $transcription_data); - // Delete transcription - [, $delete_transcription_status_code] = self::$recordingsApi->deleteRecordingTranscriptionWithHttpInfo( + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(CallRecordingMetadata::class, $data); + $this->assertEquals(36, \strlen($data->getApplicationId())); + $this->assertEquals(7, \strlen($data->getAccountId())); + $this->assertEquals(47, \strlen($data->getCallId())); + $this->assertEquals(47, \strlen($data->getParentCallId())); + $this->assertEquals(47, \strlen($data->getRecordingId())); + $this->assertEquals(12, \strlen($data->getTo())); + $this->assertEquals(12, \strlen($data->getFrom())); + $this->assertEquals(12, \strlen($data->getTransferCallerId())); + $this->assertEquals(12, \strlen($data->getTransferTo())); + $this->assertIsString($data->getDuration()); + $this->assertInstanceOf(CallDirectionEnum::class, $data->getDirection()); + $this->assertIsInt($data->getChannels()); + $this->assertInstanceOf(\DateTime::class, $data->getStartTime()); + $this->assertInstanceOf(\DateTime::class, $data->getEndTime()); + $this->assertInstanceOf(FileFormatEnum::class, $data->getFileFormat()); + $this->assertIsString($data->getStatus()); + $this->assertIsString($data->getMediaUrl()); + $this->assertInstanceOf(RecordingTranscriptionMetadata::class, $data->getTranscription()); + $this->assertEquals(38, \strlen($data->getTranscription()->getId())); + $this->assertIsString($data->getTranscription()->getStatus()); + $this->assertInstanceOf(\DateTime::class, $data->getTranscription()->getCompletedTime()); + $this->assertIsString($data->getTranscription()->getUrl()); + $this->assertIsString($data->getRecordingName()); + } + + /** + * Test case for getRecordingTranscription + * + * Get Transcription. + * + */ + public function testGetRecordingTranscription() + { + [$data, $status_code] = self::$apiInstance->getRecordingTranscriptionWithHttpInfo( self::$account_id, self::$call_id, self::$recording_id ); - $this->assertEquals(204, $delete_transcription_status_code); - // Delete recording media - [, $delete_media_status_code] = self::$recordingsApi->deleteRecordingMediaWithHttpInfo( + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(RecordingTranscriptions::class, $data); + $this->assertIsArray($data->getTranscripts()); + $this->assertInstanceOf(Transcription::class, $data->getTranscripts()[0]); + $this->assertIsInt($data->getTranscripts()[0]->getSpeaker()); + $this->assertIsString($data->getTranscripts()[0]->getText()); + $this->assertIsFloat($data->getTranscripts()[0]->getConfidence()); + $this->assertIsArray($data->getClips()); + $this->assertInstanceOf(RecordingTranscriptionClip::class, $data->getClips()[0]); + $this->assertIsInt($data->getClips()[0]->getSpeaker()); + $this->assertIsString($data->getClips()[0]->getText()); + $this->assertIsFloat($data->getClips()[0]->getConfidence()); + $this->assertIsFloat($data->getClips()[0]->getStartTimeSeconds()); + $this->assertIsFloat($data->getClips()[0]->getEndTimeSeconds()); + } + + /** + * Test case for listAccountCallRecordings + * + * Get Call Recordings For Account. + * + */ + public function testListAccountCallRecordings() + { + [$data, $status_code] = self::$apiInstance->listAccountCallRecordingsWithHttpInfo( + self::$account_id + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(CallRecordingMetadata::class, $data[0]); + $this->assertEquals(36, \strlen($data[0]->getApplicationId())); + $this->assertEquals(7, \strlen($data[0]->getAccountId())); + $this->assertEquals(47, \strlen($data[0]->getCallId())); + $this->assertEquals(47, \strlen($data[0]->getParentCallId())); + $this->assertEquals(47, \strlen($data[0]->getRecordingId())); + $this->assertEquals(12, \strlen($data[0]->getTo())); + $this->assertEquals(12, \strlen($data[0]->getFrom())); + $this->assertEquals(12, \strlen($data[0]->getTransferCallerId())); + $this->assertEquals(12, \strlen($data[0]->getTransferTo())); + $this->assertIsString($data[0]->getDuration()); + $this->assertInstanceOf(CallDirectionEnum::class, $data[0]->getDirection()); + $this->assertIsInt($data[0]->getChannels()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getStartTime()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getEndTime()); + $this->assertInstanceOf(FileFormatEnum::class, $data[0]->getFileFormat()); + $this->assertIsString($data[0]->getStatus()); + $this->assertIsString($data[0]->getMediaUrl()); + $this->assertInstanceOf(RecordingTranscriptionMetadata::class, $data[0]->getTranscription()); + $this->assertEquals(38, \strlen($data[0]->getTranscription()->getId())); + $this->assertIsString($data[0]->getTranscription()->getStatus()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getTranscription()->getCompletedTime()); + $this->assertIsString($data[0]->getTranscription()->getUrl()); + $this->assertIsString($data[0]->getRecordingName()); + } + + /** + * Test case for listCallRecordings + * + * List Call Recordings. + * + */ + public function testListCallRecordings() + { + [$data, $status_code] = self::$apiInstance->listCallRecordingsWithHttpInfo( self::$account_id, - self::$call_id, - self::$recording_id + self::$call_id ); - $this->assertEquals(204, $delete_media_status_code); - // Delete recording metadata - [, $delete_recording_status_code] = self::$recordingsApi->deleteRecordingWithHttpInfo( + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(CallRecordingMetadata::class, $data[0]); + $this->assertEquals(36, \strlen($data[0]->getApplicationId())); + $this->assertEquals(7, \strlen($data[0]->getAccountId())); + $this->assertEquals(47, \strlen($data[0]->getCallId())); + $this->assertEquals(47, \strlen($data[0]->getParentCallId())); + $this->assertEquals(47, \strlen($data[0]->getRecordingId())); + $this->assertEquals(12, \strlen($data[0]->getTo())); + $this->assertEquals(12, \strlen($data[0]->getFrom())); + $this->assertEquals(12, \strlen($data[0]->getTransferCallerId())); + $this->assertEquals(12, \strlen($data[0]->getTransferTo())); + $this->assertIsString($data[0]->getDuration()); + $this->assertInstanceOf(CallDirectionEnum::class, $data[0]->getDirection()); + $this->assertIsInt($data[0]->getChannels()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getStartTime()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getEndTime()); + $this->assertInstanceOf(FileFormatEnum::class, $data[0]->getFileFormat()); + $this->assertIsString($data[0]->getStatus()); + $this->assertIsString($data[0]->getMediaUrl()); + $this->assertInstanceOf(RecordingTranscriptionMetadata::class, $data[0]->getTranscription()); + $this->assertEquals(38, \strlen($data[0]->getTranscription()->getId())); + $this->assertIsString($data[0]->getTranscription()->getStatus()); + $this->assertInstanceOf(\DateTime::class, $data[0]->getTranscription()->getCompletedTime()); + $this->assertIsString($data[0]->getTranscription()->getUrl()); + $this->assertIsString($data[0]->getRecordingName()); + } + + /** + * Test case for transcribeCallRecording + * + * Create Transcription Request. + * + */ + public function testTranscribeCallRecording() + { + $transcribe_recording = new TranscribeRecording([ + 'callback_url' => 'https://myServer.example/bandwidth/webhooks/transcriptionAvailable' + ]); + + [, $status_code] = self::$apiInstance->transcribeCallRecordingWithHttpInfo( self::$account_id, self::$call_id, - self::$recording_id + self::$recording_id, + $transcribe_recording ); - $this->assertEquals(204, $delete_recording_status_code); + + $this->assertEquals(204, $status_code); } /** - * Test case for listAccountCallRecordings + * Test case for updateCallRecordingState * - * Get Call Recordings. + * Update Recording. * */ - public function testListAccountCallRecordings() + public function testUpdateCallRecordingState() { - [, $status_code] = self::$recordingsApi->listAccountCallRecordingsWithHttpInfo(self::$account_id); + $update_call_recording = new UpdateCallRecording([ + 'state' => RecordingStateEnum::PAUSED + ]); + + [, $status_code] = self::$apiInstance->updateCallRecordingStateWithHttpInfo( + self::$account_id, + self::$call_id, + $update_call_recording + ); $this->assertEquals(200, $status_code); } diff --git a/tests/Unit/Api/StatisticsApiTest.php b/tests/Unit/Api/StatisticsApiTest.php index 8b9935b0..a606274a 100644 --- a/tests/Unit/Api/StatisticsApiTest.php +++ b/tests/Unit/Api/StatisticsApiTest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -42,6 +42,7 @@ */ class StatisticsApiTest extends TestCase { + private static StatisticsApi $apiInstance; private static string $account_id; @@ -51,8 +52,9 @@ class StatisticsApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setClientId(getenv("BW_CLIENT_ID")) - ->setClientSecret(getenv("BW_CLIENT_SECRET")); + ->setAccessToken("abcd1234") + ->setIgnoreOperationHosts(true) + ->setHost("http://127.0.0.1:4010"); self::$apiInstance = new StatisticsApi(config: $config); @@ -67,7 +69,9 @@ public static function setUpBeforeClass(): void */ public function testGetStatistics() { - [$data, $status_code] = self::$apiInstance->getStatisticsWithHttpInfo(self::$account_id); + [$data, $status_code] = self::$apiInstance->getStatisticsWithHttpInfo( + self::$account_id + ); $this->assertEquals(200, $status_code); $this->assertInstanceOf(AccountStatistics::class, $data); diff --git a/tests/Unit/Api/TollFreeVerificationApiTest.php b/tests/Unit/Api/TollFreeVerificationApiTest.php index bdc97e46..4cd6e059 100644 --- a/tests/Unit/Api/TollFreeVerificationApiTest.php +++ b/tests/Unit/Api/TollFreeVerificationApiTest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -29,6 +29,24 @@ use Bandwidth\Configuration; use Bandwidth\Api\TollFreeVerificationApi; +use Bandwidth\Model\Address; +use Bandwidth\Model\BusinessEntityTypeEnum; +use Bandwidth\Model\BusinessRegistrationTypeEnum; +use Bandwidth\Model\Contact; +use Bandwidth\Model\LinksObject; +use Bandwidth\Model\OptInWorkflow; +use Bandwidth\Model\TelephoneNumber; +use Bandwidth\Model\TfvBasicAuthentication; +use Bandwidth\Model\TfvStatus; +use Bandwidth\Model\TfvStatusEnum; +use Bandwidth\Model\TfvSubmissionInfo; +use Bandwidth\Model\TfvSubmissionWrapper; +use Bandwidth\Model\VerificationRequest; +use Bandwidth\Model\WebhookSubscription; +use Bandwidth\Model\WebhookSubscriptionBasicAuthentication; +use Bandwidth\Model\WebhookSubscriptionRequestSchema; +use Bandwidth\Model\WebhookSubscriptionsListBody; +use Bandwidth\Model\WebhookSubscriptionTypeEnum; use PHPUnit\Framework\TestCase; @@ -41,7 +59,13 @@ */ class TollFreeVerificationApiTest extends TestCase { + private static TollFreeVerificationApi $apiInstance; + private static string $account_id; + + private static string $phone_number = '+18005551234'; + private static string $subscription_id = 'test-id-1234'; + private static WebhookSubscriptionRequestSchema $webhook_subscription_request_schema; /** * Setup before running any test cases @@ -49,10 +73,22 @@ class TollFreeVerificationApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setClientId(getenv("BW_CLIENT_ID")) - ->setClientSecret(getenv("BW_CLIENT_SECRET")); + ->setAccessToken("abcd1234") + ->setIgnoreOperationHosts(true) + ->setHost("http://127.0.0.1:4010"); self::$apiInstance = new TollFreeVerificationApi(config: $config); + + self::$account_id = getenv("BW_ACCOUNT_ID"); + + self::$webhook_subscription_request_schema = new WebhookSubscriptionRequestSchema([ + 'basic_authentication' => new TfvBasicAuthentication([ + 'username' => 'username', + 'password' => 'password' + ]), + 'callback_url' => 'https://example.com', + 'shared_secret_key' => 'shared-secret-key' + ]); } /** @@ -63,20 +99,38 @@ public static function setUpBeforeClass(): void */ public function testCreateWebhookSubscription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$data, $status_code] = self::$apiInstance->createWebhookSubscriptionWithHttpInfo( + self::$account_id, + self::$webhook_subscription_request_schema + ); + + $this->assertEquals(201, $status_code); + $this->assertInstanceOf(WebhookSubscription::class, $data); + $this->assertIsString($data->getId()); + $this->assertIsString($data->getAccountId()); + $this->assertIsString($data->getCallbackUrl()); + $this->assertInstanceOf(WebhookSubscriptionTypeEnum::class, $data->getType()); + $this->assertInstanceOf(WebhookSubscriptionBasicAuthentication::class, $data->getBasicAuthentication()); + $this->assertIsString($data->getBasicAuthentication()->getUsername()); + $this->assertIsString($data->getBasicAuthentication()->getPassword()); + $this->assertInstanceOf(\DateTime::class, $data->getCreatedDate()); + $this->assertInstanceOf(\DateTime::class, $data->getModifiedDate()); } /** * Test case for deleteVerificationRequest * - * Delete a Toll-Free Verification Submission. + * Delete Verification Request. * */ public function testDeleteVerificationRequest() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [, $status_code] = self::$apiInstance->deleteVerificationRequestWithHttpInfo( + self::$account_id, + self::$phone_number + ); + + $this->assertEquals(204, $status_code); } /** @@ -87,8 +141,12 @@ public function testDeleteVerificationRequest() */ public function testDeleteWebhookSubscription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [, $status_code] = self::$apiInstance->deleteWebhookSubscriptionWithHttpInfo( + self::$account_id, + self::$subscription_id + ); + + $this->assertEquals(204, $status_code); } /** @@ -99,14 +157,30 @@ public function testDeleteWebhookSubscription() */ public function testGetTollFreeVerificationStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$data, $status_code] = self::$apiInstance->getTollFreeVerificationStatusWithHttpInfo( + self::$account_id, + self::$phone_number + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(TfvStatus::class, $data); + $this->assertIsString($data->getPhoneNumber()); + $this->assertInstanceOf(TfvStatusEnum::class, $data->getStatus()); + $this->assertIsString($data->getInternalTicketNumber()); + $this->assertIsString($data->getDeclineReasonDescription()); + $this->assertIsBool($data->getResubmitAllowed()); + $this->assertInstanceOf(\DateTime::class, $data->getCreatedDateTime()); + $this->assertInstanceOf(\DateTime::class, $data->getModifiedDateTime()); + $this->assertInstanceOf(TfvSubmissionInfo::class, $data->getSubmission()); + $this->assertIsBool($data->getBlocked()); + $this->assertIsString($data->getBlockedReason()); + $this->assertIsString($data->getCvToken()); } /** * Test case for listTollFreeUseCases * - * List Toll-Free Use Cases. + * Retrieve Toll-Free Use Cases. * */ public function testListTollFreeUseCases() @@ -125,8 +199,37 @@ public function testListTollFreeUseCases() */ public function testListWebhookSubscriptions() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$data, $status_code] = self::$apiInstance->listWebhookSubscriptionsWithHttpInfo( + self::$account_id + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(WebhookSubscriptionsListBody::class, $data); + $this->assertInstanceOf(LinksObject::class, $data->getLinks()); + $this->assertIsString($data->getLinks()->getFirst()); + $this->assertIsString($data->getLinks()->getNext()); + $this->assertIsString($data->getLinks()->getPrevious()); + $this->assertIsString($data->getLinks()->getLast()); + $this->assertIsArray($data->getErrors()); + $this->assertIsInt($data->getErrors()[0]->getCode()); + $this->assertIsString($data->getErrors()[0]->getDescription()); + $this->assertIsArray($data->getErrors()[0]->getTelephoneNumbers()); + $this->assertInstanceOf(TelephoneNumber::class, $data->getErrors()[0]->getTelephoneNumbers()[0]); + $this->assertIsString($data->getErrors()[0]->getTelephoneNumbers()[0]->getTelephoneNumber()); + $this->assertIsArray($data->getData()); + $this->assertInstanceOf(WebhookSubscription::class, $data->getData()[0]); + $this->assertIsString($data->getData()[0]->getId()); + $this->assertIsString($data->getData()[0]->getAccountId()); + $this->assertIsString($data->getData()[0]->getCallbackUrl()); + $this->assertInstanceOf(WebhookSubscriptionTypeEnum::class, $data->getData()[0]->getType()); + $this->assertInstanceOf( + WebhookSubscriptionBasicAuthentication::class, + $data->getData()[0]->getBasicAuthentication() + ); + $this->assertIsString($data->getData()[0]->getBasicAuthentication()->getUsername()); + $this->assertIsString($data->getData()[0]->getBasicAuthentication()->getPassword()); + $this->assertInstanceOf(\DateTime::class, $data->getData()[0]->getCreatedDate()); + $this->assertInstanceOf(\DateTime::class, $data->getData()[0]->getModifiedDate()); } /** @@ -137,8 +240,52 @@ public function testListWebhookSubscriptions() */ public function testRequestTollFreeVerification() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $verification_request = new VerificationRequest([ + 'business_address' => new Address([ + 'name' => 'name', + 'addr1' => 'addr1', + 'addr2' => 'addr2', + 'city' => 'city', + 'state' => 'state', + 'zip' => 'zip', + 'url' => 'https://example.com' + ]), + 'business_contact' => new Contact([ + 'first_name' => 'first-name', + 'last_name' => 'last-name', + 'email' => 'email@email.com', + 'phone_number' => '+19195551234' + ]), + 'message_volume' => 12, + 'phone_numbers' => [self::$phone_number], + 'use_case' => 'useCase', + 'use_case_summary' => 'useCaseSummary', + 'production_message_content' => 'productionMessageContent', + 'opt_in_workflow' => new OptInWorkflow([ + 'description' => 'description', + 'image_urls' => ['https://example.com'], + 'confirmation_response' => 'confirmationResponse' + ]), + 'additional_information' => 'additionalInformation', + 'isv_reseller' => 'isvReseller', + 'privacy_policy_url' => 'privacyPolicyUrl', + 'terms_and_conditions_url' => 'termsAndConditionsUrl', + 'business_dba' => 'businessDba', + 'business_registration_number' => 'businessRegistrationNumber', + 'business_registration_type' => BusinessRegistrationTypeEnum::EIN, + 'business_entity_type' => BusinessEntityTypeEnum::PRIVATE_PROFIT, + 'business_registration_issuing_country' => 'USA', + 'help_message_response' => 'helpMessageResponse', + 'age_gated_content' => true, + 'cv_token' => 'cvToken' + ]); + + [, $status_code] = self::$apiInstance->requestTollFreeVerificationWithHttpInfo( + self::$account_id, + $verification_request + ); + + $this->assertEquals(202, $status_code); } /** @@ -149,19 +296,43 @@ public function testRequestTollFreeVerification() */ public function testUpdateTollFreeVerificationRequest() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $tfv_submission_wrapper = new TfvSubmissionWrapper([ + 'submission' => null + ]); + + [, $status_code] = self::$apiInstance->updateTollFreeVerificationRequestWithHttpInfo( + self::$account_id, + self::$phone_number, + $tfv_submission_wrapper + ); + + $this->assertEquals(202, $status_code); } /** * Test case for updateWebhookSubscription * - * Update Webhook Subscription. + * Replace Webhook Subscription. * */ public function testUpdateWebhookSubscription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + [$data, $status_code] = self::$apiInstance->updateWebhookSubscriptionWithHttpInfo( + self::$account_id, + self::$subscription_id, + self::$webhook_subscription_request_schema + ); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(WebhookSubscription::class, $data); + $this->assertIsString($data->getId()); + $this->assertIsString($data->getAccountId()); + $this->assertIsString($data->getCallbackUrl()); + $this->assertInstanceOf(WebhookSubscriptionTypeEnum::class, $data->getType()); + $this->assertInstanceOf(WebhookSubscriptionBasicAuthentication::class, $data->getBasicAuthentication()); + $this->assertIsString($data->getBasicAuthentication()->getUsername()); + $this->assertIsString($data->getBasicAuthentication()->getPassword()); + $this->assertInstanceOf(\DateTime::class, $data->getCreatedDate()); + $this->assertInstanceOf(\DateTime::class, $data->getModifiedDate()); } } diff --git a/tests/Unit/Api/TranscriptionsApiTest.php b/tests/Unit/Api/TranscriptionsApiTest.php index 84ad0786..c1843096 100644 --- a/tests/Unit/Api/TranscriptionsApiTest.php +++ b/tests/Unit/Api/TranscriptionsApiTest.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.23.0 + * Generator version: 7.25.0-SNAPSHOT */ /** @@ -28,14 +28,12 @@ namespace Bandwidth\Test\Unit\Api; use Bandwidth\Configuration; -use Bandwidth\Api\CallsApi; use Bandwidth\Api\TranscriptionsApi; -use Bandwidth\Model\CallStateEnum; use Bandwidth\Model\CallTranscription; +use Bandwidth\Model\CallTranscriptionDetectedLanguageEnum; +use Bandwidth\Model\CallTranscriptionMetadata; use Bandwidth\Model\CallTranscriptionResponse; use Bandwidth\Model\CallTranscriptionTrackEnum; -use Bandwidth\Model\CreateCall; -use Bandwidth\Model\UpdateCall; use PHPUnit\Framework\TestCase; @@ -48,15 +46,12 @@ */ class TranscriptionsApiTest extends TestCase { - private const TEST_SLEEP = 10; - private const TEST_SLEEP_LONG = 60; - private static CallsApi $callsApi; - private static TranscriptionsApi $transcriptionsApi; + private static TranscriptionsApi $apiInstance; private static string $account_id; - private static string $manteca_answer_url; - private static string $bxml_body = 'This is a bxml start transcription test.Ideally this part is being transcribed.'; + private static string $call_id = 'c-1234'; + private static string $transcription_id = 't-1234'; /** * Setup before running any test cases @@ -64,95 +59,80 @@ class TranscriptionsApiTest extends TestCase public static function setUpBeforeClass(): void { $config = Configuration::getDefaultConfiguration() - ->setClientId(getenv("BW_CLIENT_ID")) - ->setClientSecret(getenv("BW_CLIENT_SECRET")); + ->setAccessToken("abcd1234") + ->setIgnoreOperationHosts(true) + ->setHost("http://127.0.0.1:4010"); - self::$callsApi = new CallsApi(config: $config); - self::$transcriptionsApi = new TranscriptionsApi(config: $config); + self::$apiInstance = new TranscriptionsApi(config: $config); self::$account_id = getenv("BW_ACCOUNT_ID"); - self::$manteca_answer_url = getenv("MANTECA_BASE_URL") . "/bxml/pause"; } /** - * Test case for listRealTimeTranscriptions, getRealTimeTranscription, deleteRealTimeTranscription + * Test case for deleteRealTimeTranscription * - * Create a transcribed call, then list, get, and delete its real-time transcriptions. + * Delete a specific transcription. * */ - public function testGetAndDeleteRealTimeTranscriptions() + public function testDeleteRealTimeTranscription() { - self::markTestSkipped('issue with PV API, can re-enable when fixed'); - - // Create a call, start transcription via BXML, and complete it so there is - // a transcription to exercise the endpoints below. - $create_call_body = new CreateCall([ - 'from' => getenv("MANTECA_ACTIVE_NUMBER"), - 'to' => getenv("MANTECA_IDLE_NUMBER"), - 'application_id' => getenv("MANTECA_APPLICATION_ID"), - 'answer_url' => self::$manteca_answer_url - ]); - - [$create_data, $create_status_code] = self::$callsApi->createCallWithHttpInfo( + [, $status_code] = self::$apiInstance->deleteRealTimeTranscriptionWithHttpInfo( self::$account_id, - $create_call_body + self::$call_id, + self::$transcription_id ); - $this->assertEquals(201, $create_status_code); - $call_id = $create_data->getCallId(); - // Redirect the call to start transcription - sleep(self::TEST_SLEEP); - [, $update_status_code] = self::$callsApi->updateCallBxmlWithHttpInfo( - self::$account_id, - $call_id, - self::$bxml_body - ); - $this->assertEquals(204, $update_status_code); + // The API returns 200 instead of 204; VAPI-1863 should fix this + $this->assertEquals(200, $status_code); + } - // Complete the call - sleep(self::TEST_SLEEP); - [, $complete_status_code] = self::$callsApi->updateCallWithHttpInfo( + /** + * Test case for getRealTimeTranscription + * + * Retrieve a specific transcription. + * + */ + public function testGetRealTimeTranscription() + { + [$data, $status_code] = self::$apiInstance->getRealTimeTranscriptionWithHttpInfo( self::$account_id, - $call_id, - new UpdateCall(['state' => CallStateEnum::COMPLETED]) + self::$call_id, + self::$transcription_id ); - $this->assertEquals(200, $complete_status_code); - // List the real-time transcriptions - sleep(self::TEST_SLEEP_LONG); - [$list_data, $list_status_code] = self::$transcriptionsApi->listRealTimeTranscriptionsWithHttpInfo( - self::$account_id, - $call_id + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(CallTranscriptionResponse::class, $data); + $this->assertEquals(7, \strlen($data->getAccountId())); + $this->assertEquals(47, \strlen($data->getCallId())); + $this->assertIsString($data->getTranscriptionId()); + $this->assertIsArray($data->getTracks()); + $this->assertInstanceOf(CallTranscription::class, $data->getTracks()[0]); + $this->assertInstanceOf( + CallTranscriptionDetectedLanguageEnum::class, + $data->getTracks()[0]->getDetectedLanguage() ); - $this->assertEquals(200, $list_status_code); - $this->assertIsString($list_data[0]->getTranscriptionId()); - $this->assertIsString($list_data[0]->getTranscriptionName()); - $this->assertIsString($list_data[0]->getTranscriptionUrl()); - - $transcription_id = $list_data[0]->getTranscriptionId(); + $this->assertInstanceOf(CallTranscriptionTrackEnum::class, $data->getTracks()[0]->getTrack()); + $this->assertIsString($data->getTracks()[0]->getTranscript()); + $this->assertIsFloat($data->getTracks()[0]->getConfidence()); + } - // Get the real-time transcription - sleep(self::TEST_SLEEP); - [$get_data, $get_status_code] = self::$transcriptionsApi->getRealTimeTranscriptionWithHttpInfo( - self::$account_id, - $call_id, - $transcription_id - ); - $this->assertEquals(200, $get_status_code); - $this->assertInstanceOf(CallTranscriptionResponse::class, $get_data); - $this->assertIsString($get_data->getTranscriptionId()); - $this->assertInstanceOf(CallTranscription::class, $get_data->getTracks()[0]); - $this->assertInstanceOf(CallTranscriptionTrackEnum::class, $get_data->getTracks()[0]->getTrack()); - $this->assertIsString($get_data->getTracks()[0]->getTranscript()); - $this->assertEquals(0.0, $get_data->getTracks()[0]->getConfidence()); - - // Delete the real-time transcription - // NOTE: this should be 204, but there is currently an API bug tracked in VAPI-1863 - [, $delete_status_code] = self::$transcriptionsApi->deleteRealTimeTranscriptionWithHttpInfo( + /** + * Test case for listRealTimeTranscriptions + * + * Get a list of transcriptions. + * + */ + public function testListRealTimeTranscriptions() + { + [$data, $status_code] = self::$apiInstance->listRealTimeTranscriptionsWithHttpInfo( self::$account_id, - $call_id, - $transcription_id + self::$call_id ); - $this->assertEquals(200, $delete_status_code); + + $this->assertEquals(200, $status_code); + $this->assertInstanceOf(CallTranscriptionMetadata::class, $data[0]); + $this->assertIsString($data[0]->getTranscriptionId()); + $this->assertIsString($data[0]->getTranscriptionUrl()); + $this->assertIsString($data[0]->getTranscriptionName()); } } From fde55e50b21f79720d01161179addaabb23dc602 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 20 Aug 2026 15:50:44 -0400 Subject: [PATCH 29/53] enum unit tests --- .../Unit/Model/BusinessEntityTypeEnumTest.php | 37 ++----------- .../BusinessRegistrationTypeEnumTest.php | 55 +++++++++---------- tests/Unit/Model/CallDirectionEnumTest.php | 36 ++---------- tests/Unit/Model/CallStateEnumTest.php | 36 ++---------- ...lTranscriptionDetectedLanguageEnumTest.php | 36 ++---------- .../Model/CallTranscriptionTrackEnumTest.php | 36 ++---------- tests/Unit/Model/CallbackMethodEnumTest.php | 36 ++---------- tests/Unit/Model/CardWidthEnumTest.php | 36 ++---------- .../Model/CompletedLookupStatusEnumTest.php | 36 ++---------- tests/Unit/Model/ConferenceStateEnumTest.php | 36 ++---------- .../Unit/Model/DeactivationEventEnumTest.php | 36 ++---------- tests/Unit/Model/DeviceStatusEnumTest.php | 36 ++---------- .../Unit/Model/EndpointDirectionEnumTest.php | 36 ++---------- .../Unit/Model/EndpointEventTypeEnumTest.php | 36 ++---------- tests/Unit/Model/EndpointStatusEnumTest.php | 36 ++---------- tests/Unit/Model/EndpointTypeEnumTest.php | 36 ++---------- tests/Unit/Model/FileFormatEnumTest.php | 36 ++---------- .../Model/InProgressLookupStatusEnumTest.php | 36 ++---------- .../Model/InboundCallbackTypeEnumTest.php | 36 ++---------- .../LatestMessageDeliveryStatusEnumTest.php | 36 ++---------- tests/Unit/Model/LineTypeEnumTest.php | 36 ++---------- .../Model/ListMessageDirectionEnumTest.php | 36 ++---------- .../Model/MachineDetectionModeEnumTest.php | 36 ++---------- tests/Unit/Model/MessageDirectionEnumTest.php | 36 ++---------- tests/Unit/Model/MessageStatusEnumTest.php | 36 ++---------- tests/Unit/Model/MessageTypeEnumTest.php | 36 ++---------- .../MultiChannelMessageChannelEnumTest.php | 36 ++---------- tests/Unit/Model/PriorityEnumTest.php | 36 ++---------- tests/Unit/Model/ProductTypeEnumTest.php | 46 ++++++---------- tests/Unit/Model/RbmActionTypeEnumTest.php | 36 ++---------- tests/Unit/Model/RbmMediaHeightEnumTest.php | 36 ++---------- tests/Unit/Model/RbmOpenUrlEnumTest.php | 36 ++---------- tests/Unit/Model/RbmWebViewEnumTest.php | 36 ++---------- tests/Unit/Model/RecordingStateEnumTest.php | 36 ++---------- tests/Unit/Model/RedirectMethodEnumTest.php | 36 ++---------- .../StandaloneCardOrientationEnumTest.php | 36 ++---------- .../Unit/Model/StatusCallbackTypeEnumTest.php | 36 ++---------- .../Unit/Model/TfvCallbackStatusEnumTest.php | 36 ++---------- tests/Unit/Model/TfvStatusEnumTest.php | 36 ++---------- .../Unit/Model/ThumbnailAlignmentEnumTest.php | 36 ++---------- .../Model/WebhookSubscriptionTypeEnumTest.php | 36 ++---------- 41 files changed, 275 insertions(+), 1231 deletions(-) diff --git a/tests/Unit/Model/BusinessEntityTypeEnumTest.php b/tests/Unit/Model/BusinessEntityTypeEnumTest.php index f7ab11dd..dce68031 100644 --- a/tests/Unit/Model/BusinessEntityTypeEnumTest.php +++ b/tests/Unit/Model/BusinessEntityTypeEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\BusinessEntityTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,41 +42,14 @@ */ class BusinessEntityTypeEnumTest extends TestCase { - - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "BusinessEntityTypeEnum" */ public function testBusinessEntityTypeEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['SOLE_PROPRIETOR', 'PRIVATE_PROFIT', 'PUBLIC_PROFIT', 'NON_PROFIT', 'GOVERNMENT'], + array_column(BusinessEntityTypeEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/BusinessRegistrationTypeEnumTest.php b/tests/Unit/Model/BusinessRegistrationTypeEnumTest.php index 09cb2aa8..7118eba3 100644 --- a/tests/Unit/Model/BusinessRegistrationTypeEnumTest.php +++ b/tests/Unit/Model/BusinessRegistrationTypeEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\BusinessRegistrationTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,33 @@ class BusinessRegistrationTypeEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "BusinessRegistrationTypeEnum" */ public function testBusinessRegistrationTypeEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + [ + 'EIN', + 'CBN', + 'NEQ', + 'PROVINCIAL_NUMBER', + 'CRN', + 'VAT', + 'ACN', + 'ABN', + 'BRN', + 'SIREN', + 'SIRET', + 'NZBN', + 'UST_IDNR', + 'CIF', + 'NIF', + 'CNPJ', + 'UID', + 'OTHER' + ], + array_column(BusinessRegistrationTypeEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/CallDirectionEnumTest.php b/tests/Unit/Model/CallDirectionEnumTest.php index b8ddc0e4..530cb654 100644 --- a/tests/Unit/Model/CallDirectionEnumTest.php +++ b/tests/Unit/Model/CallDirectionEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class CallDirectionEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "CallDirectionEnum" */ public function testCallDirectionEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['inbound', 'outbound'], + array_column(CallDirectionEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/CallStateEnumTest.php b/tests/Unit/Model/CallStateEnumTest.php index bf3f5745..0abfbfef 100644 --- a/tests/Unit/Model/CallStateEnumTest.php +++ b/tests/Unit/Model/CallStateEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallStateEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class CallStateEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "CallStateEnum" */ public function testCallStateEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['active', 'completed'], + array_column(CallStateEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/CallTranscriptionDetectedLanguageEnumTest.php b/tests/Unit/Model/CallTranscriptionDetectedLanguageEnumTest.php index 9fab0e83..a0a30856 100644 --- a/tests/Unit/Model/CallTranscriptionDetectedLanguageEnumTest.php +++ b/tests/Unit/Model/CallTranscriptionDetectedLanguageEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallTranscriptionDetectedLanguageEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class CallTranscriptionDetectedLanguageEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "CallTranscriptionDetectedLanguageEnum" */ public function testCallTranscriptionDetectedLanguageEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['en-US', 'es-US', 'fr-FR'], + array_column(CallTranscriptionDetectedLanguageEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/CallTranscriptionTrackEnumTest.php b/tests/Unit/Model/CallTranscriptionTrackEnumTest.php index e3947dfb..e46645e7 100644 --- a/tests/Unit/Model/CallTranscriptionTrackEnumTest.php +++ b/tests/Unit/Model/CallTranscriptionTrackEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallTranscriptionTrackEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class CallTranscriptionTrackEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "CallTranscriptionTrackEnum" */ public function testCallTranscriptionTrackEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['inbound', 'outbound'], + array_column(CallTranscriptionTrackEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/CallbackMethodEnumTest.php b/tests/Unit/Model/CallbackMethodEnumTest.php index f4769f4e..ce275c00 100644 --- a/tests/Unit/Model/CallbackMethodEnumTest.php +++ b/tests/Unit/Model/CallbackMethodEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallbackMethodEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class CallbackMethodEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "CallbackMethodEnum" */ public function testCallbackMethodEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['GET', 'POST'], + array_column(CallbackMethodEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/CardWidthEnumTest.php b/tests/Unit/Model/CardWidthEnumTest.php index 47775386..7b9cabc1 100644 --- a/tests/Unit/Model/CardWidthEnumTest.php +++ b/tests/Unit/Model/CardWidthEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CardWidthEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class CardWidthEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "CardWidthEnum" */ public function testCardWidthEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['SMALL', 'MEDIUM'], + array_column(CardWidthEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/CompletedLookupStatusEnumTest.php b/tests/Unit/Model/CompletedLookupStatusEnumTest.php index 7884bb27..cb5d3db8 100644 --- a/tests/Unit/Model/CompletedLookupStatusEnumTest.php +++ b/tests/Unit/Model/CompletedLookupStatusEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CompletedLookupStatusEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class CompletedLookupStatusEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "CompletedLookupStatusEnum" */ public function testCompletedLookupStatusEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['COMPLETE', 'PARTIAL_COMPLETE', 'FAILED'], + array_column(CompletedLookupStatusEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/ConferenceStateEnumTest.php b/tests/Unit/Model/ConferenceStateEnumTest.php index 7874668f..3076e92d 100644 --- a/tests/Unit/Model/ConferenceStateEnumTest.php +++ b/tests/Unit/Model/ConferenceStateEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ConferenceStateEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class ConferenceStateEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "ConferenceStateEnum" */ public function testConferenceStateEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['active', 'completed'], + array_column(ConferenceStateEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/DeactivationEventEnumTest.php b/tests/Unit/Model/DeactivationEventEnumTest.php index 70fc36e2..59691777 100644 --- a/tests/Unit/Model/DeactivationEventEnumTest.php +++ b/tests/Unit/Model/DeactivationEventEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\DeactivationEventEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class DeactivationEventEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "DeactivationEventEnum" */ public function testDeactivationEventEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['DEACTIVATED'], + array_column(DeactivationEventEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/DeviceStatusEnumTest.php b/tests/Unit/Model/DeviceStatusEnumTest.php index 41102a76..83f309e6 100644 --- a/tests/Unit/Model/DeviceStatusEnumTest.php +++ b/tests/Unit/Model/DeviceStatusEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\DeviceStatusEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class DeviceStatusEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "DeviceStatusEnum" */ public function testDeviceStatusEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['CONNECTED', 'DISCONNECTED'], + array_column(DeviceStatusEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/EndpointDirectionEnumTest.php b/tests/Unit/Model/EndpointDirectionEnumTest.php index 49c68d35..b87456df 100644 --- a/tests/Unit/Model/EndpointDirectionEnumTest.php +++ b/tests/Unit/Model/EndpointDirectionEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\EndpointDirectionEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class EndpointDirectionEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "EndpointDirectionEnum" */ public function testEndpointDirectionEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['INBOUND', 'OUTBOUND', 'BIDIRECTIONAL'], + array_column(EndpointDirectionEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/EndpointEventTypeEnumTest.php b/tests/Unit/Model/EndpointEventTypeEnumTest.php index db3417ab..a87c28ae 100644 --- a/tests/Unit/Model/EndpointEventTypeEnumTest.php +++ b/tests/Unit/Model/EndpointEventTypeEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\EndpointEventTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class EndpointEventTypeEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "EndpointEventTypeEnum" */ public function testEndpointEventTypeEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['DEVICE_CONNECTED', 'DEVICE_DISCONNECTED'], + array_column(EndpointEventTypeEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/EndpointStatusEnumTest.php b/tests/Unit/Model/EndpointStatusEnumTest.php index 3bd7f140..b6d3998c 100644 --- a/tests/Unit/Model/EndpointStatusEnumTest.php +++ b/tests/Unit/Model/EndpointStatusEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\EndpointStatusEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class EndpointStatusEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "EndpointStatusEnum" */ public function testEndpointStatusEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['CONNECTED', 'DISCONNECTED'], + array_column(EndpointStatusEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/EndpointTypeEnumTest.php b/tests/Unit/Model/EndpointTypeEnumTest.php index 6ac51835..52621b72 100644 --- a/tests/Unit/Model/EndpointTypeEnumTest.php +++ b/tests/Unit/Model/EndpointTypeEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\EndpointTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class EndpointTypeEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "EndpointTypeEnum" */ public function testEndpointTypeEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['WEBRTC'], + array_column(EndpointTypeEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/FileFormatEnumTest.php b/tests/Unit/Model/FileFormatEnumTest.php index 3cd85714..a81b7c91 100644 --- a/tests/Unit/Model/FileFormatEnumTest.php +++ b/tests/Unit/Model/FileFormatEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\FileFormatEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class FileFormatEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "FileFormatEnum" */ public function testFileFormatEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['mp3', 'wav'], + array_column(FileFormatEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/InProgressLookupStatusEnumTest.php b/tests/Unit/Model/InProgressLookupStatusEnumTest.php index 557da236..e7c68014 100644 --- a/tests/Unit/Model/InProgressLookupStatusEnumTest.php +++ b/tests/Unit/Model/InProgressLookupStatusEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\InProgressLookupStatusEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class InProgressLookupStatusEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "InProgressLookupStatusEnum" */ public function testInProgressLookupStatusEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['IN_PROGRESS', 'COMPLETE', 'PARTIAL_COMPLETE', 'FAILED'], + array_column(InProgressLookupStatusEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/InboundCallbackTypeEnumTest.php b/tests/Unit/Model/InboundCallbackTypeEnumTest.php index 8c6584ea..82d34152 100644 --- a/tests/Unit/Model/InboundCallbackTypeEnumTest.php +++ b/tests/Unit/Model/InboundCallbackTypeEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\InboundCallbackTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class InboundCallbackTypeEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "InboundCallbackTypeEnum" */ public function testInboundCallbackTypeEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['message-received', 'requested-location-response', 'suggestion-response'], + array_column(InboundCallbackTypeEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/LatestMessageDeliveryStatusEnumTest.php b/tests/Unit/Model/LatestMessageDeliveryStatusEnumTest.php index 75bf33fd..b5d21c0e 100644 --- a/tests/Unit/Model/LatestMessageDeliveryStatusEnumTest.php +++ b/tests/Unit/Model/LatestMessageDeliveryStatusEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\LatestMessageDeliveryStatusEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class LatestMessageDeliveryStatusEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "LatestMessageDeliveryStatusEnum" */ public function testLatestMessageDeliveryStatusEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['ACTIVE', 'DEACTIVATED', 'UNKNOWN', 'NOT_ENABLED'], + array_column(LatestMessageDeliveryStatusEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/LineTypeEnumTest.php b/tests/Unit/Model/LineTypeEnumTest.php index f9d7e14c..e65dbf11 100644 --- a/tests/Unit/Model/LineTypeEnumTest.php +++ b/tests/Unit/Model/LineTypeEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\LineTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class LineTypeEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "LineTypeEnum" */ public function testLineTypeEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['FIXED', 'VOIP-FIXED', 'MOBILE', 'VOIP'], + array_column(LineTypeEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/ListMessageDirectionEnumTest.php b/tests/Unit/Model/ListMessageDirectionEnumTest.php index 76ae7ac3..a117bf72 100644 --- a/tests/Unit/Model/ListMessageDirectionEnumTest.php +++ b/tests/Unit/Model/ListMessageDirectionEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ListMessageDirectionEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class ListMessageDirectionEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "ListMessageDirectionEnum" */ public function testListMessageDirectionEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['INBOUND', 'OUTBOUND'], + array_column(ListMessageDirectionEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/MachineDetectionModeEnumTest.php b/tests/Unit/Model/MachineDetectionModeEnumTest.php index a5d9b520..09ae13d6 100644 --- a/tests/Unit/Model/MachineDetectionModeEnumTest.php +++ b/tests/Unit/Model/MachineDetectionModeEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MachineDetectionModeEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class MachineDetectionModeEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "MachineDetectionModeEnum" */ public function testMachineDetectionModeEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['sync', 'async'], + array_column(MachineDetectionModeEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/MessageDirectionEnumTest.php b/tests/Unit/Model/MessageDirectionEnumTest.php index b008a2bc..43bf58a0 100644 --- a/tests/Unit/Model/MessageDirectionEnumTest.php +++ b/tests/Unit/Model/MessageDirectionEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MessageDirectionEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class MessageDirectionEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "MessageDirectionEnum" */ public function testMessageDirectionEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['in', 'out'], + array_column(MessageDirectionEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/MessageStatusEnumTest.php b/tests/Unit/Model/MessageStatusEnumTest.php index e881e0f3..f81f43fa 100644 --- a/tests/Unit/Model/MessageStatusEnumTest.php +++ b/tests/Unit/Model/MessageStatusEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MessageStatusEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class MessageStatusEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "MessageStatusEnum" */ public function testMessageStatusEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['RECEIVED', 'QUEUED', 'SENDING', 'SENT', 'FAILED', 'DELIVERED', 'ACCEPTED', 'UNDELIVERED'], + array_column(MessageStatusEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/MessageTypeEnumTest.php b/tests/Unit/Model/MessageTypeEnumTest.php index 7ef3d2d4..219ea60c 100644 --- a/tests/Unit/Model/MessageTypeEnumTest.php +++ b/tests/Unit/Model/MessageTypeEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MessageTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class MessageTypeEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "MessageTypeEnum" */ public function testMessageTypeEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['sms', 'mms', 'rcs'], + array_column(MessageTypeEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/MultiChannelMessageChannelEnumTest.php b/tests/Unit/Model/MultiChannelMessageChannelEnumTest.php index 26baae17..3ed71021 100644 --- a/tests/Unit/Model/MultiChannelMessageChannelEnumTest.php +++ b/tests/Unit/Model/MultiChannelMessageChannelEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelMessageChannelEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class MultiChannelMessageChannelEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "MultiChannelMessageChannelEnum" */ public function testMultiChannelMessageChannelEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['RBM', 'SMS', 'MMS'], + array_column(MultiChannelMessageChannelEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/PriorityEnumTest.php b/tests/Unit/Model/PriorityEnumTest.php index 523fbf95..e9efd135 100644 --- a/tests/Unit/Model/PriorityEnumTest.php +++ b/tests/Unit/Model/PriorityEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\PriorityEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class PriorityEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "PriorityEnum" */ public function testPriorityEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['default', 'high'], + array_column(PriorityEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/ProductTypeEnumTest.php b/tests/Unit/Model/ProductTypeEnumTest.php index 06d94c03..885abcaf 100644 --- a/tests/Unit/Model/ProductTypeEnumTest.php +++ b/tests/Unit/Model/ProductTypeEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ProductTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,24 @@ class ProductTypeEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "ProductTypeEnum" */ public function testProductTypeEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + [ + 'LOCAL_A2P', + 'P2P', + 'SHORT_CODE_REACH', + 'TOLL_FREE', + 'HOSTED_SHORT_CODE', + 'ALPHA_NUMERIC', + 'RBM_MEDIA', + 'RBM_RICH', + 'RBM_CONVERSATIONAL' + ], + array_column(ProductTypeEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/RbmActionTypeEnumTest.php b/tests/Unit/Model/RbmActionTypeEnumTest.php index 11a22af6..2b07ef16 100644 --- a/tests/Unit/Model/RbmActionTypeEnumTest.php +++ b/tests/Unit/Model/RbmActionTypeEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmActionTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class RbmActionTypeEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "RbmActionTypeEnum" */ public function testRbmActionTypeEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['REPLY', 'DIAL_PHONE', 'SHOW_LOCATION', 'CREATE_CALENDAR_EVENT', 'OPEN_URL', 'REQUEST_LOCATION'], + array_column(RbmActionTypeEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/RbmMediaHeightEnumTest.php b/tests/Unit/Model/RbmMediaHeightEnumTest.php index c286ca7c..9ac1a8cd 100644 --- a/tests/Unit/Model/RbmMediaHeightEnumTest.php +++ b/tests/Unit/Model/RbmMediaHeightEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmMediaHeightEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class RbmMediaHeightEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "RbmMediaHeightEnum" */ public function testRbmMediaHeightEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['SHORT', 'MEDIUM', 'TALL'], + array_column(RbmMediaHeightEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/RbmOpenUrlEnumTest.php b/tests/Unit/Model/RbmOpenUrlEnumTest.php index 3e5635c4..e2663539 100644 --- a/tests/Unit/Model/RbmOpenUrlEnumTest.php +++ b/tests/Unit/Model/RbmOpenUrlEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmOpenUrlEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class RbmOpenUrlEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "RbmOpenUrlEnum" */ public function testRbmOpenUrlEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['BROWSER', 'WEBVIEW'], + array_column(RbmOpenUrlEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/RbmWebViewEnumTest.php b/tests/Unit/Model/RbmWebViewEnumTest.php index a7f75fbd..101f04f2 100644 --- a/tests/Unit/Model/RbmWebViewEnumTest.php +++ b/tests/Unit/Model/RbmWebViewEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmWebViewEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class RbmWebViewEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "RbmWebViewEnum" */ public function testRbmWebViewEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['FULL', 'HALF', 'TALL'], + array_column(RbmWebViewEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/RecordingStateEnumTest.php b/tests/Unit/Model/RecordingStateEnumTest.php index 6ff19e04..52e27e6a 100644 --- a/tests/Unit/Model/RecordingStateEnumTest.php +++ b/tests/Unit/Model/RecordingStateEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RecordingStateEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class RecordingStateEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "RecordingStateEnum" */ public function testRecordingStateEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['paused', 'recording'], + array_column(RecordingStateEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/RedirectMethodEnumTest.php b/tests/Unit/Model/RedirectMethodEnumTest.php index e87339fd..ce0feb87 100644 --- a/tests/Unit/Model/RedirectMethodEnumTest.php +++ b/tests/Unit/Model/RedirectMethodEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RedirectMethodEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class RedirectMethodEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "RedirectMethodEnum" */ public function testRedirectMethodEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['GET', 'POST'], + array_column(RedirectMethodEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/StandaloneCardOrientationEnumTest.php b/tests/Unit/Model/StandaloneCardOrientationEnumTest.php index c8e6e846..41cf48f8 100644 --- a/tests/Unit/Model/StandaloneCardOrientationEnumTest.php +++ b/tests/Unit/Model/StandaloneCardOrientationEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\StandaloneCardOrientationEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class StandaloneCardOrientationEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "StandaloneCardOrientationEnum" */ public function testStandaloneCardOrientationEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['HORIZONTAL', 'VERTICAL'], + array_column(StandaloneCardOrientationEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/StatusCallbackTypeEnumTest.php b/tests/Unit/Model/StatusCallbackTypeEnumTest.php index c2751b77..d83ac2d8 100644 --- a/tests/Unit/Model/StatusCallbackTypeEnumTest.php +++ b/tests/Unit/Model/StatusCallbackTypeEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\StatusCallbackTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class StatusCallbackTypeEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "StatusCallbackTypeEnum" */ public function testStatusCallbackTypeEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['message-sending', 'message-sent', 'message-delivered', 'message-failed', 'message-read'], + array_column(StatusCallbackTypeEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/TfvCallbackStatusEnumTest.php b/tests/Unit/Model/TfvCallbackStatusEnumTest.php index 8a1552ac..69d45599 100644 --- a/tests/Unit/Model/TfvCallbackStatusEnumTest.php +++ b/tests/Unit/Model/TfvCallbackStatusEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\TfvCallbackStatusEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class TfvCallbackStatusEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "TfvCallbackStatusEnum" */ public function testTfvCallbackStatusEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['VERIFIED', 'UNVERIFIED'], + array_column(TfvCallbackStatusEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/TfvStatusEnumTest.php b/tests/Unit/Model/TfvStatusEnumTest.php index 74e1e6a6..7dc7d779 100644 --- a/tests/Unit/Model/TfvStatusEnumTest.php +++ b/tests/Unit/Model/TfvStatusEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\TfvStatusEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class TfvStatusEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "TfvStatusEnum" */ public function testTfvStatusEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['VERIFIED', 'UNVERIFIED', 'PENDING'], + array_column(TfvStatusEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/ThumbnailAlignmentEnumTest.php b/tests/Unit/Model/ThumbnailAlignmentEnumTest.php index d67c63d8..f6adc1b0 100644 --- a/tests/Unit/Model/ThumbnailAlignmentEnumTest.php +++ b/tests/Unit/Model/ThumbnailAlignmentEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ThumbnailAlignmentEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class ThumbnailAlignmentEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "ThumbnailAlignmentEnum" */ public function testThumbnailAlignmentEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['LEFT', 'RIGHT'], + array_column(ThumbnailAlignmentEnum::cases(), 'value') + ); } } diff --git a/tests/Unit/Model/WebhookSubscriptionTypeEnumTest.php b/tests/Unit/Model/WebhookSubscriptionTypeEnumTest.php index 8a3612c0..c51d4d4f 100644 --- a/tests/Unit/Model/WebhookSubscriptionTypeEnumTest.php +++ b/tests/Unit/Model/WebhookSubscriptionTypeEnumTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\WebhookSubscriptionTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -41,40 +43,14 @@ class WebhookSubscriptionTypeEnumTest extends TestCase { - /** - * Setup before running any test case - */ - public static function setUpBeforeClass(): void - { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { - } - /** * Test "WebhookSubscriptionTypeEnum" */ public function testWebhookSubscriptionTypeEnum() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertSame( + ['TOLLFREE_VERIFICATION_STATUS', 'MESSAGING_PORTOUT_APPROVAL_STATUS'], + array_column(WebhookSubscriptionTypeEnum::cases(), 'value') + ); } } From 7b1b7feb472f662debe617d6b44cac08d5031947 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 20 Aug 2026 16:19:48 -0400 Subject: [PATCH 30/53] non-polymorphic model tests --- tests/Unit/Model/AccountStatisticsTest.php | 39 ++--- .../Unit/Model/AdditionalDenialReasonTest.php | 47 ++---- tests/Unit/Model/AddressTest.php | 67 ++++---- tests/Unit/Model/AnswerCallbackTest.php | 103 ++++++------ tests/Unit/Model/AsyncLookupRequestTest.php | 37 ++--- tests/Unit/Model/BlockedWebhookTest.php | 63 +++----- .../Unit/Model/BridgeCompleteCallbackTest.php | 113 +++++++------ .../BridgeTargetCompleteCallbackTest.php | 98 ++++++------ tests/Unit/Model/BrtcErrorResponseTest.php | 49 +++--- tests/Unit/Model/BrtcErrorSourceTest.php | 52 +++--- tests/Unit/Model/BrtcErrorTest.php | 57 +++---- tests/Unit/Model/BrtcLinkTest.php | 47 ++---- .../Unit/Model/CallRecordingMetadataTest.php | 129 +++++++-------- tests/Unit/Model/CallStateTest.php | 123 +++++++------- .../Model/CallTranscriptionMetadataTest.php | 47 ++---- .../Model/CallTranscriptionResponseTest.php | 53 +++---- tests/Unit/Model/CallTranscriptionTest.php | 54 +++---- tests/Unit/Model/CodeRequestTest.php | 62 +++----- .../Model/ConferenceCompletedCallbackTest.php | 57 +++---- .../Model/ConferenceCreatedCallbackTest.php | 57 +++---- .../ConferenceMemberExitCallbackTest.php | 72 ++++----- .../ConferenceMemberJoinCallbackTest.php | 72 ++++----- tests/Unit/Model/ConferenceMemberTest.php | 62 +++----- ...nferenceRecordingAvailableCallbackTest.php | 103 ++++++------ .../Model/ConferenceRecordingMetadataTest.php | 93 +++++------ .../Model/ConferenceRedirectCallbackTest.php | 57 +++---- tests/Unit/Model/ConferenceTest.php | 74 ++++----- tests/Unit/Model/ContactTest.php | 52 +++--- .../CreateAsyncBulkLookupResponseDataTest.php | 43 ++--- .../CreateAsyncBulkLookupResponseTest.php | 49 +++--- tests/Unit/Model/CreateCallResponseTest.php | 138 ++++++++-------- tests/Unit/Model/CreateCallTest.php | 138 ++++++++-------- .../Model/CreateEndpointRequestBaseTest.php | 59 +++---- .../Model/CreateEndpointResponseDataTest.php | 75 ++++----- .../Unit/Model/CreateEndpointResponseTest.php | 49 +++--- .../Model/CreateMessageRequestErrorTest.php | 48 ++---- .../CreateMultiChannelMessageResponseTest.php | 49 +++--- .../CreateSyncLookupResponseDataTest.php | 49 +++--- .../Model/CreateSyncLookupResponseTest.php | 49 +++--- .../CreateWebRtcConnectionRequestTest.php | 64 ++++---- tests/Unit/Model/DeviceTest.php | 53 +++---- tests/Unit/Model/DisconnectCallbackTest.php | 118 +++++++------- tests/Unit/Model/DiversionTest.php | 67 ++++---- tests/Unit/Model/DtmfCallbackTest.php | 118 +++++++------- tests/Unit/Model/EndpointEventTest.php | 80 +++++----- tests/Unit/Model/EndpointResponseTest.php | 49 +++--- tests/Unit/Model/EndpointTest.php | 70 ++++---- tests/Unit/Model/EndpointsTest.php | 64 ++++---- tests/Unit/Model/ErrorObjectTest.php | 47 ++---- tests/Unit/Model/ErrorSourceTest.php | 52 +++--- tests/Unit/Model/FailureWebhookTest.php | 62 +++----- tests/Unit/Model/FieldErrorTest.php | 42 ++--- tests/Unit/Model/GatherCallbackTest.php | 123 +++++++------- .../GetAsyncBulkLookupResponseDataTest.php | 49 +++--- .../Model/GetAsyncBulkLookupResponseTest.php | 49 +++--- .../Unit/Model/InboundCallbackMessageTest.php | 115 +++++++------- tests/Unit/Model/InboundCallbackTest.php | 63 +++----- tests/Unit/Model/InitiateCallbackTest.php | 98 ++++++------ tests/Unit/Model/LinkSchemaTest.php | 47 ++---- tests/Unit/Model/LinkTest.php | 42 ++--- tests/Unit/Model/LinksObjectTest.php | 52 +++--- .../Unit/Model/ListEndpointsResponseTest.php | 55 +++---- tests/Unit/Model/ListMessageItemTest.php | 150 +++++++++--------- tests/Unit/Model/LookupErrorResponseTest.php | 49 +++--- .../Unit/Model/LookupErrorSchemaMetaTest.php | 47 ++---- tests/Unit/Model/LookupErrorSchemaTest.php | 52 +++--- tests/Unit/Model/LookupResultTest.php | 95 ++++++----- .../MachineDetectionCompleteCallbackTest.php | 103 ++++++------ .../MachineDetectionConfigurationTest.php | 109 +++++++------ .../Unit/Model/MachineDetectionResultTest.php | 42 ++--- tests/Unit/Model/MediaTest.php | 47 ++---- tests/Unit/Model/MessageRequestTest.php | 73 ++++----- tests/Unit/Model/MessageTest.php | 99 ++++++------ tests/Unit/Model/MessagesListTest.php | 48 ++---- .../Unit/Model/MessagingCodeResponseTest.php | 37 ++--- .../Unit/Model/MessagingRequestErrorTest.php | 42 ++--- .../Model/MfaForbiddenRequestErrorTest.php | 37 ++--- tests/Unit/Model/MfaRequestErrorTest.php | 42 ++--- .../Model/MfaUnauthorizedRequestErrorTest.php | 37 ++--- .../Unit/Model/MmsMessageContentFileTest.php | 37 ++--- tests/Unit/Model/MmsMessageContentTest.php | 43 ++--- .../MultiChannelActionCalendarEventTest.php | 68 ++++---- .../MultiChannelChannelListMMSObjectTest.php | 53 +++---- ...hannelChannelListMMSResponseObjectTest.php | 58 +++---- .../MultiChannelChannelListObjectBaseTest.php | 48 ++---- ...MultiChannelChannelListOwnerObjectTest.php | 37 ++--- .../MultiChannelChannelListRBMObjectTest.php | 53 +++---- ...hannelChannelListRBMResponseObjectTest.php | 58 +++---- .../MultiChannelChannelListSMSObjectTest.php | 53 +++---- ...hannelChannelListSMSResponseObjectTest.php | 58 +++---- tests/Unit/Model/MultiChannelErrorTest.php | 49 +++--- .../Model/MultiChannelMessageContentTest.php | 42 ++--- .../Model/MultiChannelMessageRequestTest.php | 59 +++---- .../MultiChannelMessageResponseDataTest.php | 75 ++++----- tests/Unit/Model/OptInWorkflowTest.php | 47 ++---- tests/Unit/Model/PageInfoTest.php | 52 +++--- tests/Unit/Model/PageTest.php | 52 +++--- tests/Unit/Model/RbmActionBaseTest.php | 48 ++---- tests/Unit/Model/RbmActionDialTest.php | 53 +++---- tests/Unit/Model/RbmActionOpenUrlTest.php | 65 ++++---- .../Unit/Model/RbmActionViewLocationTest.php | 63 +++----- tests/Unit/Model/RbmCardContentMediaTest.php | 48 ++---- tests/Unit/Model/RbmCardContentTest.php | 53 +++---- tests/Unit/Model/RbmLocationResponseTest.php | 42 ++--- .../Unit/Model/RbmMessageCarouselCardTest.php | 50 +++--- .../Unit/Model/RbmMessageContentFileTest.php | 42 ++--- .../Unit/Model/RbmMessageContentTextTest.php | 43 ++--- tests/Unit/Model/RbmMessageMediaTest.php | 44 ++--- tests/Unit/Model/RbmStandaloneCardTest.php | 55 +++---- .../Unit/Model/RbmSuggestionResponseTest.php | 47 ++---- .../Model/RecordingAvailableCallbackTest.php | 144 +++++++++-------- .../Model/RecordingCompleteCallbackTest.php | 144 +++++++++-------- .../Model/RecordingTranscriptionClipTest.php | 57 +++---- .../RecordingTranscriptionMetadataTest.php | 52 +++--- .../Model/RecordingTranscriptionsTest.php | 44 ++--- tests/Unit/Model/RedirectCallbackTest.php | 113 +++++++------ .../Unit/Model/SipConnectionMetadataTest.php | 52 +++--- tests/Unit/Model/SipCredentialsTest.php | 42 ++--- tests/Unit/Model/SmsMessageContentTest.php | 37 ++--- .../Unit/Model/StatusCallbackMessageTest.php | 100 ++++++------ tests/Unit/Model/StatusCallbackTest.php | 73 ++++----- tests/Unit/Model/StirShakenTest.php | 47 ++---- tests/Unit/Model/SyncLookupRequestTest.php | 42 ++--- tests/Unit/Model/TelephoneNumberTest.php | 37 ++--- .../Unit/Model/TfvBasicAuthenticationTest.php | 42 ++--- tests/Unit/Model/TfvErrorTest.php | 47 ++---- tests/Unit/Model/TfvStatusTest.php | 99 ++++++------ tests/Unit/Model/TfvSubmissionInfoTest.php | 114 ++++++------- tests/Unit/Model/TfvSubmissionWrapperTest.php | 37 ++--- tests/Unit/Model/TranscribeRecordingTest.php | 68 ++++---- .../TranscriptionAvailableCallbackTest.php | 139 ++++++++-------- tests/Unit/Model/TranscriptionTest.php | 47 ++---- .../Unit/Model/TransferAnswerCallbackTest.php | 108 +++++++------ .../Model/TransferCompleteCallbackTest.php | 123 +++++++------- .../Model/TransferDisconnectCallbackTest.php | 133 ++++++++-------- tests/Unit/Model/UpdateCallRecordingTest.php | 38 ++--- tests/Unit/Model/UpdateCallTest.php | 84 +++++----- .../Unit/Model/UpdateConferenceMemberTest.php | 47 ++---- tests/Unit/Model/UpdateConferenceTest.php | 79 +++++---- .../Model/VerificationDenialWebhookTest.php | 83 +++++----- tests/Unit/Model/VerificationRequestTest.php | 134 ++++++++-------- .../Model/VerificationUpdateRequestTest.php | 129 +++++++-------- tests/Unit/Model/VerificationWebhookTest.php | 53 +++---- tests/Unit/Model/VerifyCodeRequestTest.php | 52 +++--- tests/Unit/Model/VerifyCodeResponseTest.php | 37 ++--- tests/Unit/Model/VoiceApiErrorTest.php | 47 ++---- tests/Unit/Model/VoiceCodeResponseTest.php | 37 ++--- ...ookSubscriptionBasicAuthenticationTest.php | 42 ++--- .../Model/WebhookSubscriptionErrorTest.php | 48 ++---- .../WebhookSubscriptionRequestSchemaTest.php | 47 ++---- tests/Unit/Model/WebhookSubscriptionTest.php | 68 ++++---- .../WebhookSubscriptionsListBodyTest.php | 49 +++--- 152 files changed, 4195 insertions(+), 5788 deletions(-) diff --git a/tests/Unit/Model/AccountStatisticsTest.php b/tests/Unit/Model/AccountStatisticsTest.php index 210cf883..e4505bfd 100644 --- a/tests/Unit/Model/AccountStatisticsTest.php +++ b/tests/Unit/Model/AccountStatisticsTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\AccountStatistics; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,17 @@ */ class AccountStatisticsTest extends TestCase { + private static AccountStatistics $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new AccountStatistics([ + 'current_call_queue_size' => 10, + 'max_call_queue_size' => 100 + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testAccountStatistics() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(AccountStatistics::class, self::$instance); } /** @@ -83,8 +68,8 @@ public function testAccountStatistics() */ public function testPropertyCurrentCallQueueSize() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getCurrentCallQueueSize()); + $this->assertEquals(10, self::$instance->getCurrentCallQueueSize()); } /** @@ -92,7 +77,7 @@ public function testPropertyCurrentCallQueueSize() */ public function testPropertyMaxCallQueueSize() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getMaxCallQueueSize()); + $this->assertEquals(100, self::$instance->getMaxCallQueueSize()); } } diff --git a/tests/Unit/Model/AdditionalDenialReasonTest.php b/tests/Unit/Model/AdditionalDenialReasonTest.php index 2c22c4be..f77259e4 100644 --- a/tests/Unit/Model/AdditionalDenialReasonTest.php +++ b/tests/Unit/Model/AdditionalDenialReasonTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\AdditionalDenialReason; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,18 @@ */ class AdditionalDenialReasonTest extends TestCase { + private static AdditionalDenialReason $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new AdditionalDenialReason([ + 'status_code' => 1, + 'reason' => 'test_string', + 'resubmit_allowed' => true + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testAdditionalDenialReason() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(AdditionalDenialReason::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testAdditionalDenialReason() */ public function testPropertyStatusCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getStatusCode()); + $this->assertEquals(1, self::$instance->getStatusCode()); } /** @@ -92,8 +78,8 @@ public function testPropertyStatusCode() */ public function testPropertyReason() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getReason()); + $this->assertEquals('test_string', self::$instance->getReason()); } /** @@ -101,7 +87,6 @@ public function testPropertyReason() */ public function testPropertyResubmitAllowed() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsBool(self::$instance->getResubmitAllowed()); + $this->assertTrue(self::$instance->getResubmitAllowed()); + }} diff --git a/tests/Unit/Model/AddressTest.php b/tests/Unit/Model/AddressTest.php index ffedb829..63ccd3d5 100644 --- a/tests/Unit/Model/AddressTest.php +++ b/tests/Unit/Model/AddressTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Address; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,22 @@ */ class AddressTest extends TestCase { + private static Address $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new Address([ + 'name' => 'test_string', + 'addr1' => 'test_string', + 'addr2' => 'test_string', + 'city' => 'test_string', + 'state' => 'test_string', + 'zip' => 'test_string', + 'url' => 'test_string' + ]); } /** @@ -74,8 +65,7 @@ public static function tearDownAfterClass(): void */ public function testAddress() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Address::class, self::$instance); } /** @@ -83,8 +73,8 @@ public function testAddress() */ public function testPropertyName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getName()); + $this->assertEquals('test_string', self::$instance->getName()); } /** @@ -92,8 +82,8 @@ public function testPropertyName() */ public function testPropertyAddr1() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAddr1()); + $this->assertEquals('test_string', self::$instance->getAddr1()); } /** @@ -101,8 +91,8 @@ public function testPropertyAddr1() */ public function testPropertyAddr2() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAddr2()); + $this->assertEquals('test_string', self::$instance->getAddr2()); } /** @@ -110,8 +100,8 @@ public function testPropertyAddr2() */ public function testPropertyCity() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCity()); + $this->assertEquals('test_string', self::$instance->getCity()); } /** @@ -119,8 +109,8 @@ public function testPropertyCity() */ public function testPropertyState() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getState()); + $this->assertEquals('test_string', self::$instance->getState()); } /** @@ -128,8 +118,8 @@ public function testPropertyState() */ public function testPropertyZip() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getZip()); + $this->assertEquals('test_string', self::$instance->getZip()); } /** @@ -137,7 +127,6 @@ public function testPropertyZip() */ public function testPropertyUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getUrl()); + $this->assertEquals('test_string', self::$instance->getUrl()); + }} diff --git a/tests/Unit/Model/AnswerCallbackTest.php b/tests/Unit/Model/AnswerCallbackTest.php index 79f3e09a..cd6bb6f9 100644 --- a/tests/Unit/Model/AnswerCallbackTest.php +++ b/tests/Unit/Model/AnswerCallbackTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\AnswerCallback; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\MachineDetectionResult; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,29 @@ */ class AnswerCallbackTest extends TestCase { + private static AnswerCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new AnswerCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'call_url' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'tag' => 'test_string', + 'machine_detection_result' => new MachineDetectionResult([]) + ]); } /** @@ -74,8 +74,7 @@ public static function tearDownAfterClass(): void */ public function testAnswerCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(AnswerCallback::class, self::$instance); } /** @@ -83,8 +82,8 @@ public function testAnswerCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +91,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +100,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +109,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +118,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +127,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +136,8 @@ public function testPropertyTo() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +145,8 @@ public function testPropertyDirection() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -155,8 +154,8 @@ public function testPropertyCallId() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -164,8 +163,8 @@ public function testPropertyCallUrl() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -173,8 +172,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -182,8 +181,8 @@ public function testPropertyStartTime() */ public function testPropertyAnswerTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); } /** @@ -191,8 +190,8 @@ public function testPropertyAnswerTime() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -200,7 +199,5 @@ public function testPropertyTag() */ public function testPropertyMachineDetectionResult() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(MachineDetectionResult::class, self::$instance->getMachineDetectionResult()); + }} diff --git a/tests/Unit/Model/AsyncLookupRequestTest.php b/tests/Unit/Model/AsyncLookupRequestTest.php index 66ebf719..622d61be 100644 --- a/tests/Unit/Model/AsyncLookupRequestTest.php +++ b/tests/Unit/Model/AsyncLookupRequestTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\AsyncLookupRequest; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,16 @@ */ class AsyncLookupRequestTest extends TestCase { + private static AsyncLookupRequest $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new AsyncLookupRequest([ + 'phone_numbers' => ['test_string'] + ]); } /** @@ -74,8 +59,7 @@ public static function tearDownAfterClass(): void */ public function testAsyncLookupRequest() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(AsyncLookupRequest::class, self::$instance); } /** @@ -83,7 +67,6 @@ public function testAsyncLookupRequest() */ public function testPropertyPhoneNumbers() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getPhoneNumbers()); + $this->assertEquals(['test_string'], self::$instance->getPhoneNumbers()); + }} diff --git a/tests/Unit/Model/BlockedWebhookTest.php b/tests/Unit/Model/BlockedWebhookTest.php index abb3d015..2cf939a6 100644 --- a/tests/Unit/Model/BlockedWebhookTest.php +++ b/tests/Unit/Model/BlockedWebhookTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\BlockedWebhook; +use Bandwidth\Model\TfvCallbackStatusEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,21 @@ */ class BlockedWebhookTest extends TestCase { + private static BlockedWebhook $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new BlockedWebhook([ + 'account_id' => 'test_string', + 'phone_number' => 'test_string', + 'status' => TfvCallbackStatusEnum::VERIFIED, + 'internal_ticket_number' => 'test_string', + 'blocked' => true, + 'blocked_reason' => 'test_string' + ]); } /** @@ -74,8 +65,7 @@ public static function tearDownAfterClass(): void */ public function testBlockedWebhook() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(BlockedWebhook::class, self::$instance); } /** @@ -83,8 +73,8 @@ public function testBlockedWebhook() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -92,8 +82,8 @@ public function testPropertyAccountId() */ public function testPropertyPhoneNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPhoneNumber()); + $this->assertEquals('test_string', self::$instance->getPhoneNumber()); } /** @@ -101,8 +91,8 @@ public function testPropertyPhoneNumber() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TfvCallbackStatusEnum::class, self::$instance->getStatus()); + $this->assertSame(TfvCallbackStatusEnum::VERIFIED, self::$instance->getStatus()); } /** @@ -110,8 +100,8 @@ public function testPropertyStatus() */ public function testPropertyInternalTicketNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getInternalTicketNumber()); + $this->assertEquals('test_string', self::$instance->getInternalTicketNumber()); } /** @@ -119,8 +109,8 @@ public function testPropertyInternalTicketNumber() */ public function testPropertyBlocked() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsBool(self::$instance->getBlocked()); + $this->assertTrue(self::$instance->getBlocked()); } /** @@ -128,7 +118,6 @@ public function testPropertyBlocked() */ public function testPropertyBlockedReason() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getBlockedReason()); + $this->assertEquals('test_string', self::$instance->getBlockedReason()); + }} diff --git a/tests/Unit/Model/BridgeCompleteCallbackTest.php b/tests/Unit/Model/BridgeCompleteCallbackTest.php index dc15b8c1..37e1ac51 100644 --- a/tests/Unit/Model/BridgeCompleteCallbackTest.php +++ b/tests/Unit/Model/BridgeCompleteCallbackTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\BridgeCompleteCallback; +use Bandwidth\Model\CallDirectionEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,31 @@ */ class BridgeCompleteCallbackTest extends TestCase { + private static BridgeCompleteCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new BridgeCompleteCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'call_url' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'tag' => 'test_string', + 'cause' => 'test_string', + 'error_message' => 'test_string', + 'error_id' => 'test_string' + ]); } /** @@ -74,8 +75,7 @@ public static function tearDownAfterClass(): void */ public function testBridgeCompleteCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(BridgeCompleteCallback::class, self::$instance); } /** @@ -83,8 +83,8 @@ public function testBridgeCompleteCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +92,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +101,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +110,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +119,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +128,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +137,8 @@ public function testPropertyTo() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +146,8 @@ public function testPropertyDirection() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -155,8 +155,8 @@ public function testPropertyCallId() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -164,8 +164,8 @@ public function testPropertyCallUrl() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -173,8 +173,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -182,8 +182,8 @@ public function testPropertyStartTime() */ public function testPropertyAnswerTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); } /** @@ -191,8 +191,8 @@ public function testPropertyAnswerTime() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -200,8 +200,8 @@ public function testPropertyTag() */ public function testPropertyCause() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCause()); + $this->assertEquals('test_string', self::$instance->getCause()); } /** @@ -209,8 +209,8 @@ public function testPropertyCause() */ public function testPropertyErrorMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getErrorMessage()); + $this->assertEquals('test_string', self::$instance->getErrorMessage()); } /** @@ -218,7 +218,6 @@ public function testPropertyErrorMessage() */ public function testPropertyErrorId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getErrorId()); + $this->assertEquals('test_string', self::$instance->getErrorId()); + }} diff --git a/tests/Unit/Model/BridgeTargetCompleteCallbackTest.php b/tests/Unit/Model/BridgeTargetCompleteCallbackTest.php index 68b86179..046b77d9 100644 --- a/tests/Unit/Model/BridgeTargetCompleteCallbackTest.php +++ b/tests/Unit/Model/BridgeTargetCompleteCallbackTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\BridgeTargetCompleteCallback; +use Bandwidth\Model\CallDirectionEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,28 @@ */ class BridgeTargetCompleteCallbackTest extends TestCase { + private static BridgeTargetCompleteCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new BridgeTargetCompleteCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'call_url' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'tag' => 'test_string' + ]); } /** @@ -74,8 +72,7 @@ public static function tearDownAfterClass(): void */ public function testBridgeTargetCompleteCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(BridgeTargetCompleteCallback::class, self::$instance); } /** @@ -83,8 +80,8 @@ public function testBridgeTargetCompleteCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +89,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +98,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +107,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +116,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +125,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +134,8 @@ public function testPropertyTo() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +143,8 @@ public function testPropertyDirection() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -155,8 +152,8 @@ public function testPropertyCallId() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -164,8 +161,8 @@ public function testPropertyCallUrl() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -173,8 +170,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -182,8 +179,8 @@ public function testPropertyStartTime() */ public function testPropertyAnswerTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); } /** @@ -191,7 +188,6 @@ public function testPropertyAnswerTime() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + }} diff --git a/tests/Unit/Model/BrtcErrorResponseTest.php b/tests/Unit/Model/BrtcErrorResponseTest.php index 30d68d43..8719a70d 100644 --- a/tests/Unit/Model/BrtcErrorResponseTest.php +++ b/tests/Unit/Model/BrtcErrorResponseTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\BrtcError; +use Bandwidth\Model\BrtcErrorResponse; +use Bandwidth\Model\BrtcLink; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,18 @@ */ class BrtcErrorResponseTest extends TestCase { + private static BrtcErrorResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new BrtcErrorResponse([ + 'links' => [new BrtcLink([])], + 'data' => (object) ['key' => 'value'], + 'errors' => [new BrtcError([])] + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testBrtcErrorResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(BrtcErrorResponse::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testBrtcErrorResponse() */ public function testPropertyLinks() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getLinks()); + $this->assertInstanceOf(BrtcLink::class, self::$instance->getLinks()[0]); } /** @@ -92,8 +80,8 @@ public function testPropertyLinks() */ public function testPropertyData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsObject(self::$instance->getData()); + $this->assertEquals((object) ['key' => 'value'], self::$instance->getData()); } /** @@ -101,7 +89,6 @@ public function testPropertyData() */ public function testPropertyErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getErrors()); + $this->assertInstanceOf(BrtcError::class, self::$instance->getErrors()[0]); + }} diff --git a/tests/Unit/Model/BrtcErrorSourceTest.php b/tests/Unit/Model/BrtcErrorSourceTest.php index 0e4c17d9..d1c68111 100644 --- a/tests/Unit/Model/BrtcErrorSourceTest.php +++ b/tests/Unit/Model/BrtcErrorSourceTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\BrtcErrorSource; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,19 @@ */ class BrtcErrorSourceTest extends TestCase { + private static BrtcErrorSource $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new BrtcErrorSource([ + 'parameter' => 'test_string', + 'field' => 'test_string', + 'header' => 'test_string', + 'reference' => 'test_string' + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testBrtcErrorSource() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(BrtcErrorSource::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testBrtcErrorSource() */ public function testPropertyParameter() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getParameter()); + $this->assertEquals('test_string', self::$instance->getParameter()); } /** @@ -92,8 +79,8 @@ public function testPropertyParameter() */ public function testPropertyField() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getField()); + $this->assertEquals('test_string', self::$instance->getField()); } /** @@ -101,8 +88,8 @@ public function testPropertyField() */ public function testPropertyHeader() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getHeader()); + $this->assertEquals('test_string', self::$instance->getHeader()); } /** @@ -110,7 +97,6 @@ public function testPropertyHeader() */ public function testPropertyReference() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getReference()); + $this->assertEquals('test_string', self::$instance->getReference()); + }} diff --git a/tests/Unit/Model/BrtcErrorTest.php b/tests/Unit/Model/BrtcErrorTest.php index ec365703..a22c71e6 100644 --- a/tests/Unit/Model/BrtcErrorTest.php +++ b/tests/Unit/Model/BrtcErrorTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\BrtcError; +use Bandwidth\Model\BrtcErrorSource; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,20 @@ */ class BrtcErrorTest extends TestCase { + private static BrtcError $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new BrtcError([ + 'id' => 'test_string', + 'type' => 'test_string', + 'description' => 'test_string', + 'code' => 'test_string', + 'source' => new BrtcErrorSource([]) + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testBrtcError() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(BrtcError::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testBrtcError() */ public function testPropertyId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getId()); + $this->assertEquals('test_string', self::$instance->getId()); } /** @@ -92,8 +81,8 @@ public function testPropertyId() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getType()); + $this->assertEquals('test_string', self::$instance->getType()); } /** @@ -101,8 +90,8 @@ public function testPropertyType() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); } /** @@ -110,8 +99,8 @@ public function testPropertyDescription() */ public function testPropertyCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCode()); + $this->assertEquals('test_string', self::$instance->getCode()); } /** @@ -119,7 +108,5 @@ public function testPropertyCode() */ public function testPropertySource() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(BrtcErrorSource::class, self::$instance->getSource()); + }} diff --git a/tests/Unit/Model/BrtcLinkTest.php b/tests/Unit/Model/BrtcLinkTest.php index 01d827aa..87e8157e 100644 --- a/tests/Unit/Model/BrtcLinkTest.php +++ b/tests/Unit/Model/BrtcLinkTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\BrtcLink; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,18 @@ */ class BrtcLinkTest extends TestCase { + private static BrtcLink $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new BrtcLink([ + 'href' => 'test_string', + 'rel' => 'test_string', + 'method' => 'test_string' + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testBrtcLink() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(BrtcLink::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testBrtcLink() */ public function testPropertyHref() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getHref()); + $this->assertEquals('test_string', self::$instance->getHref()); } /** @@ -92,8 +78,8 @@ public function testPropertyHref() */ public function testPropertyRel() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRel()); + $this->assertEquals('test_string', self::$instance->getRel()); } /** @@ -101,7 +87,6 @@ public function testPropertyRel() */ public function testPropertyMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getMethod()); + $this->assertEquals('test_string', self::$instance->getMethod()); + }} diff --git a/tests/Unit/Model/CallRecordingMetadataTest.php b/tests/Unit/Model/CallRecordingMetadataTest.php index 8ed2dd7b..be681a92 100644 --- a/tests/Unit/Model/CallRecordingMetadataTest.php +++ b/tests/Unit/Model/CallRecordingMetadataTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\CallRecordingMetadata; +use Bandwidth\Model\FileFormatEnum; +use Bandwidth\Model\RecordingTranscriptionMetadata; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,34 @@ */ class CallRecordingMetadataTest extends TestCase { + private static CallRecordingMetadata $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CallRecordingMetadata([ + 'application_id' => 'test_string', + 'account_id' => 'test_string', + 'call_id' => 'test_string', + 'parent_call_id' => 'test_string', + 'recording_id' => 'test_string', + 'to' => 'test_string', + 'from' => 'test_string', + 'transfer_caller_id' => 'test_string', + 'transfer_to' => 'test_string', + 'duration' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'channels' => 1, + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'end_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'file_format' => FileFormatEnum::MP3, + 'status' => 'test_string', + 'media_url' => 'test_string', + 'transcription' => new RecordingTranscriptionMetadata([]), + 'recording_name' => 'test_string' + ]); } /** @@ -74,8 +80,7 @@ public static function tearDownAfterClass(): void */ public function testCallRecordingMetadata() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallRecordingMetadata::class, self::$instance); } /** @@ -83,8 +88,8 @@ public function testCallRecordingMetadata() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -92,8 +97,8 @@ public function testPropertyApplicationId() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -101,8 +106,8 @@ public function testPropertyAccountId() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -110,8 +115,8 @@ public function testPropertyCallId() */ public function testPropertyParentCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getParentCallId()); + $this->assertEquals('test_string', self::$instance->getParentCallId()); } /** @@ -119,8 +124,8 @@ public function testPropertyParentCallId() */ public function testPropertyRecordingId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRecordingId()); + $this->assertEquals('test_string', self::$instance->getRecordingId()); } /** @@ -128,8 +133,8 @@ public function testPropertyRecordingId() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +142,8 @@ public function testPropertyTo() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -146,8 +151,8 @@ public function testPropertyFrom() */ public function testPropertyTransferCallerId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferCallerId()); + $this->assertEquals('test_string', self::$instance->getTransferCallerId()); } /** @@ -155,8 +160,8 @@ public function testPropertyTransferCallerId() */ public function testPropertyTransferTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferTo()); + $this->assertEquals('test_string', self::$instance->getTransferTo()); } /** @@ -164,8 +169,8 @@ public function testPropertyTransferTo() */ public function testPropertyDuration() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDuration()); + $this->assertEquals('test_string', self::$instance->getDuration()); } /** @@ -173,8 +178,8 @@ public function testPropertyDuration() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -182,8 +187,8 @@ public function testPropertyDirection() */ public function testPropertyChannels() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getChannels()); + $this->assertEquals(1, self::$instance->getChannels()); } /** @@ -191,8 +196,8 @@ public function testPropertyChannels() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -200,8 +205,8 @@ public function testPropertyStartTime() */ public function testPropertyEndTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEndTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEndTime()); } /** @@ -209,8 +214,8 @@ public function testPropertyEndTime() */ public function testPropertyFileFormat() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(FileFormatEnum::class, self::$instance->getFileFormat()); + $this->assertSame(FileFormatEnum::MP3, self::$instance->getFileFormat()); } /** @@ -218,8 +223,8 @@ public function testPropertyFileFormat() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getStatus()); + $this->assertEquals('test_string', self::$instance->getStatus()); } /** @@ -227,8 +232,8 @@ public function testPropertyStatus() */ public function testPropertyMediaUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getMediaUrl()); + $this->assertEquals('test_string', self::$instance->getMediaUrl()); } /** @@ -236,8 +241,7 @@ public function testPropertyMediaUrl() */ public function testPropertyTranscription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RecordingTranscriptionMetadata::class, self::$instance->getTranscription()); } /** @@ -245,7 +249,6 @@ public function testPropertyTranscription() */ public function testPropertyRecordingName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getRecordingName()); + $this->assertEquals('test_string', self::$instance->getRecordingName()); + }} diff --git a/tests/Unit/Model/CallStateTest.php b/tests/Unit/Model/CallStateTest.php index 36d5c1fa..a54e144f 100644 --- a/tests/Unit/Model/CallStateTest.php +++ b/tests/Unit/Model/CallStateTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\CallState; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,33 @@ */ class CallStateTest extends TestCase { + private static CallState $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CallState([ + 'application_id' => 'test_string', + 'account_id' => 'test_string', + 'call_id' => 'test_string', + 'parent_call_id' => 'test_string', + 'to' => 'test_string', + 'from' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'state' => 'test_string', + 'stir_shaken' => ['key' => 'value'], + 'identity' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'end_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'disconnect_cause' => 'test_string', + 'error_message' => 'test_string', + 'error_id' => 'test_string', + 'last_update' => new \DateTime('2024-01-01T00:00:00+00:00') + ]); } /** @@ -74,8 +77,7 @@ public static function tearDownAfterClass(): void */ public function testCallState() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallState::class, self::$instance); } /** @@ -83,8 +85,8 @@ public function testCallState() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -92,8 +94,8 @@ public function testPropertyApplicationId() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -101,8 +103,8 @@ public function testPropertyAccountId() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -110,8 +112,8 @@ public function testPropertyCallId() */ public function testPropertyParentCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getParentCallId()); + $this->assertEquals('test_string', self::$instance->getParentCallId()); } /** @@ -119,8 +121,8 @@ public function testPropertyParentCallId() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -128,8 +130,8 @@ public function testPropertyTo() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -137,8 +139,8 @@ public function testPropertyFrom() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +148,8 @@ public function testPropertyDirection() */ public function testPropertyState() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getState()); + $this->assertEquals('test_string', self::$instance->getState()); } /** @@ -155,8 +157,8 @@ public function testPropertyState() */ public function testPropertyStirShaken() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getStirShaken()); + $this->assertEquals(['key' => 'value'], self::$instance->getStirShaken()); } /** @@ -164,8 +166,8 @@ public function testPropertyStirShaken() */ public function testPropertyIdentity() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getIdentity()); + $this->assertEquals('test_string', self::$instance->getIdentity()); } /** @@ -173,8 +175,8 @@ public function testPropertyIdentity() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -182,8 +184,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -191,8 +193,8 @@ public function testPropertyStartTime() */ public function testPropertyAnswerTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); } /** @@ -200,8 +202,8 @@ public function testPropertyAnswerTime() */ public function testPropertyEndTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEndTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEndTime()); } /** @@ -209,8 +211,8 @@ public function testPropertyEndTime() */ public function testPropertyDisconnectCause() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDisconnectCause()); + $this->assertEquals('test_string', self::$instance->getDisconnectCause()); } /** @@ -218,8 +220,8 @@ public function testPropertyDisconnectCause() */ public function testPropertyErrorMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getErrorMessage()); + $this->assertEquals('test_string', self::$instance->getErrorMessage()); } /** @@ -227,8 +229,8 @@ public function testPropertyErrorMessage() */ public function testPropertyErrorId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getErrorId()); + $this->assertEquals('test_string', self::$instance->getErrorId()); } /** @@ -236,7 +238,6 @@ public function testPropertyErrorId() */ public function testPropertyLastUpdate() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(\DateTime::class, self::$instance->getLastUpdate()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getLastUpdate()); + }} diff --git a/tests/Unit/Model/CallTranscriptionMetadataTest.php b/tests/Unit/Model/CallTranscriptionMetadataTest.php index b524a16c..26192a28 100644 --- a/tests/Unit/Model/CallTranscriptionMetadataTest.php +++ b/tests/Unit/Model/CallTranscriptionMetadataTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallTranscriptionMetadata; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,18 @@ */ class CallTranscriptionMetadataTest extends TestCase { + private static CallTranscriptionMetadata $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CallTranscriptionMetadata([ + 'transcription_id' => 'test_string', + 'transcription_name' => 'test_string', + 'transcription_url' => 'test_string' + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testCallTranscriptionMetadata() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallTranscriptionMetadata::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testCallTranscriptionMetadata() */ public function testPropertyTranscriptionId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTranscriptionId()); + $this->assertEquals('test_string', self::$instance->getTranscriptionId()); } /** @@ -92,8 +78,8 @@ public function testPropertyTranscriptionId() */ public function testPropertyTranscriptionName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTranscriptionName()); + $this->assertEquals('test_string', self::$instance->getTranscriptionName()); } /** @@ -101,7 +87,6 @@ public function testPropertyTranscriptionName() */ public function testPropertyTranscriptionUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTranscriptionUrl()); + $this->assertEquals('test_string', self::$instance->getTranscriptionUrl()); + }} diff --git a/tests/Unit/Model/CallTranscriptionResponseTest.php b/tests/Unit/Model/CallTranscriptionResponseTest.php index 71630afb..993b6181 100644 --- a/tests/Unit/Model/CallTranscriptionResponseTest.php +++ b/tests/Unit/Model/CallTranscriptionResponseTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallTranscription; +use Bandwidth\Model\CallTranscriptionResponse; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,19 @@ */ class CallTranscriptionResponseTest extends TestCase { + private static CallTranscriptionResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CallTranscriptionResponse([ + 'account_id' => 'test_string', + 'call_id' => 'test_string', + 'transcription_id' => 'test_string', + 'tracks' => [new CallTranscription([])] + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testCallTranscriptionResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallTranscriptionResponse::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testCallTranscriptionResponse() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -92,8 +80,8 @@ public function testPropertyAccountId() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -101,8 +89,8 @@ public function testPropertyCallId() */ public function testPropertyTranscriptionId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTranscriptionId()); + $this->assertEquals('test_string', self::$instance->getTranscriptionId()); } /** @@ -110,7 +98,6 @@ public function testPropertyTranscriptionId() */ public function testPropertyTracks() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getTracks()); + $this->assertInstanceOf(CallTranscription::class, self::$instance->getTracks()[0]); + }} diff --git a/tests/Unit/Model/CallTranscriptionTest.php b/tests/Unit/Model/CallTranscriptionTest.php index ead1e65f..001198d6 100644 --- a/tests/Unit/Model/CallTranscriptionTest.php +++ b/tests/Unit/Model/CallTranscriptionTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallTranscription; +use Bandwidth\Model\CallTranscriptionDetectedLanguageEnum; +use Bandwidth\Model\CallTranscriptionTrackEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,19 @@ */ class CallTranscriptionTest extends TestCase { + private static CallTranscription $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CallTranscription([ + 'detected_language' => CallTranscriptionDetectedLanguageEnum::EN_US, + 'track' => CallTranscriptionTrackEnum::INBOUND, + 'transcript' => 'test_string', + 'confidence' => 1.5 + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testCallTranscription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallTranscription::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testCallTranscription() */ public function testPropertyDetectedLanguage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallTranscriptionDetectedLanguageEnum::class, self::$instance->getDetectedLanguage()); + $this->assertSame(CallTranscriptionDetectedLanguageEnum::EN_US, self::$instance->getDetectedLanguage()); } /** @@ -92,8 +81,8 @@ public function testPropertyDetectedLanguage() */ public function testPropertyTrack() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallTranscriptionTrackEnum::class, self::$instance->getTrack()); + $this->assertSame(CallTranscriptionTrackEnum::INBOUND, self::$instance->getTrack()); } /** @@ -101,8 +90,8 @@ public function testPropertyTrack() */ public function testPropertyTranscript() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTranscript()); + $this->assertEquals('test_string', self::$instance->getTranscript()); } /** @@ -110,7 +99,6 @@ public function testPropertyTranscript() */ public function testPropertyConfidence() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsFloat(self::$instance->getConfidence()); + $this->assertEquals(1.5, self::$instance->getConfidence()); + }} diff --git a/tests/Unit/Model/CodeRequestTest.php b/tests/Unit/Model/CodeRequestTest.php index ab9f9683..247e89ce 100644 --- a/tests/Unit/Model/CodeRequestTest.php +++ b/tests/Unit/Model/CodeRequestTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CodeRequest; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,21 @@ */ class CodeRequestTest extends TestCase { + private static CodeRequest $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CodeRequest([ + 'to' => 'test_string', + 'from' => 'test_string', + 'application_id' => 'test_string', + 'scope' => 'test_string', + 'message' => 'test_string', + 'digits' => 1 + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testCodeRequest() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CodeRequest::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testCodeRequest() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -92,8 +81,8 @@ public function testPropertyTo() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -101,8 +90,8 @@ public function testPropertyFrom() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -110,8 +99,8 @@ public function testPropertyApplicationId() */ public function testPropertyScope() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getScope()); + $this->assertEquals('test_string', self::$instance->getScope()); } /** @@ -119,8 +108,8 @@ public function testPropertyScope() */ public function testPropertyMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getMessage()); + $this->assertEquals('test_string', self::$instance->getMessage()); } /** @@ -128,7 +117,6 @@ public function testPropertyMessage() */ public function testPropertyDigits() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsInt(self::$instance->getDigits()); + $this->assertEquals(1, self::$instance->getDigits()); + }} diff --git a/tests/Unit/Model/ConferenceCompletedCallbackTest.php b/tests/Unit/Model/ConferenceCompletedCallbackTest.php index b48338bc..530d8fc1 100644 --- a/tests/Unit/Model/ConferenceCompletedCallbackTest.php +++ b/tests/Unit/Model/ConferenceCompletedCallbackTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ConferenceCompletedCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,20 @@ */ class ConferenceCompletedCallbackTest extends TestCase { + private static ConferenceCompletedCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new ConferenceCompletedCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'conference_id' => 'test_string', + 'name' => 'test_string', + 'tag' => 'test_string' + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testConferenceCompletedCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ConferenceCompletedCallback::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testConferenceCompletedCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +80,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +89,8 @@ public function testPropertyEventTime() */ public function testPropertyConferenceId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getConferenceId()); + $this->assertEquals('test_string', self::$instance->getConferenceId()); } /** @@ -110,8 +98,8 @@ public function testPropertyConferenceId() */ public function testPropertyName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getName()); + $this->assertEquals('test_string', self::$instance->getName()); } /** @@ -119,7 +107,6 @@ public function testPropertyName() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + }} diff --git a/tests/Unit/Model/ConferenceCreatedCallbackTest.php b/tests/Unit/Model/ConferenceCreatedCallbackTest.php index 0364ca7b..ef4e4767 100644 --- a/tests/Unit/Model/ConferenceCreatedCallbackTest.php +++ b/tests/Unit/Model/ConferenceCreatedCallbackTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ConferenceCreatedCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,20 @@ */ class ConferenceCreatedCallbackTest extends TestCase { + private static ConferenceCreatedCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new ConferenceCreatedCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'conference_id' => 'test_string', + 'name' => 'test_string', + 'tag' => 'test_string' + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testConferenceCreatedCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ConferenceCreatedCallback::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testConferenceCreatedCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +80,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +89,8 @@ public function testPropertyEventTime() */ public function testPropertyConferenceId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getConferenceId()); + $this->assertEquals('test_string', self::$instance->getConferenceId()); } /** @@ -110,8 +98,8 @@ public function testPropertyConferenceId() */ public function testPropertyName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getName()); + $this->assertEquals('test_string', self::$instance->getName()); } /** @@ -119,7 +107,6 @@ public function testPropertyName() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + }} diff --git a/tests/Unit/Model/ConferenceMemberExitCallbackTest.php b/tests/Unit/Model/ConferenceMemberExitCallbackTest.php index cd06fcec..48ae5f60 100644 --- a/tests/Unit/Model/ConferenceMemberExitCallbackTest.php +++ b/tests/Unit/Model/ConferenceMemberExitCallbackTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ConferenceMemberExitCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,23 @@ */ class ConferenceMemberExitCallbackTest extends TestCase { + private static ConferenceMemberExitCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new ConferenceMemberExitCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'conference_id' => 'test_string', + 'name' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'call_id' => 'test_string', + 'tag' => 'test_string' + ]); } /** @@ -74,8 +66,7 @@ public static function tearDownAfterClass(): void */ public function testConferenceMemberExitCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ConferenceMemberExitCallback::class, self::$instance); } /** @@ -83,8 +74,8 @@ public function testConferenceMemberExitCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +83,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +92,8 @@ public function testPropertyEventTime() */ public function testPropertyConferenceId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getConferenceId()); + $this->assertEquals('test_string', self::$instance->getConferenceId()); } /** @@ -110,8 +101,8 @@ public function testPropertyConferenceId() */ public function testPropertyName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getName()); + $this->assertEquals('test_string', self::$instance->getName()); } /** @@ -119,8 +110,8 @@ public function testPropertyName() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +119,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +128,8 @@ public function testPropertyTo() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -146,7 +137,6 @@ public function testPropertyCallId() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + }} diff --git a/tests/Unit/Model/ConferenceMemberJoinCallbackTest.php b/tests/Unit/Model/ConferenceMemberJoinCallbackTest.php index 7a6016e5..c261c502 100644 --- a/tests/Unit/Model/ConferenceMemberJoinCallbackTest.php +++ b/tests/Unit/Model/ConferenceMemberJoinCallbackTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ConferenceMemberJoinCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,23 @@ */ class ConferenceMemberJoinCallbackTest extends TestCase { + private static ConferenceMemberJoinCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new ConferenceMemberJoinCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'conference_id' => 'test_string', + 'name' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'call_id' => 'test_string', + 'tag' => 'test_string' + ]); } /** @@ -74,8 +66,7 @@ public static function tearDownAfterClass(): void */ public function testConferenceMemberJoinCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ConferenceMemberJoinCallback::class, self::$instance); } /** @@ -83,8 +74,8 @@ public function testConferenceMemberJoinCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +83,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +92,8 @@ public function testPropertyEventTime() */ public function testPropertyConferenceId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getConferenceId()); + $this->assertEquals('test_string', self::$instance->getConferenceId()); } /** @@ -110,8 +101,8 @@ public function testPropertyConferenceId() */ public function testPropertyName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getName()); + $this->assertEquals('test_string', self::$instance->getName()); } /** @@ -119,8 +110,8 @@ public function testPropertyName() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +119,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +128,8 @@ public function testPropertyTo() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -146,7 +137,6 @@ public function testPropertyCallId() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + }} diff --git a/tests/Unit/Model/ConferenceMemberTest.php b/tests/Unit/Model/ConferenceMemberTest.php index 262bc9cf..c409d1df 100644 --- a/tests/Unit/Model/ConferenceMemberTest.php +++ b/tests/Unit/Model/ConferenceMemberTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ConferenceMember; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,21 @@ */ class ConferenceMemberTest extends TestCase { + private static ConferenceMember $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new ConferenceMember([ + 'call_id' => 'test_string', + 'conference_id' => 'test_string', + 'member_url' => 'test_string', + 'mute' => true, + 'hold' => true, + 'call_ids_to_coach' => ['test_string'] + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testConferenceMember() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ConferenceMember::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testConferenceMember() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -92,8 +81,8 @@ public function testPropertyCallId() */ public function testPropertyConferenceId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getConferenceId()); + $this->assertEquals('test_string', self::$instance->getConferenceId()); } /** @@ -101,8 +90,8 @@ public function testPropertyConferenceId() */ public function testPropertyMemberUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getMemberUrl()); + $this->assertEquals('test_string', self::$instance->getMemberUrl()); } /** @@ -110,8 +99,8 @@ public function testPropertyMemberUrl() */ public function testPropertyMute() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsBool(self::$instance->getMute()); + $this->assertTrue(self::$instance->getMute()); } /** @@ -119,8 +108,8 @@ public function testPropertyMute() */ public function testPropertyHold() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsBool(self::$instance->getHold()); + $this->assertTrue(self::$instance->getHold()); } /** @@ -128,7 +117,6 @@ public function testPropertyHold() */ public function testPropertyCallIdsToCoach() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getCallIdsToCoach()); + $this->assertEquals(['test_string'], self::$instance->getCallIdsToCoach()); + }} diff --git a/tests/Unit/Model/ConferenceRecordingAvailableCallbackTest.php b/tests/Unit/Model/ConferenceRecordingAvailableCallbackTest.php index 3540489e..ace5b7e3 100644 --- a/tests/Unit/Model/ConferenceRecordingAvailableCallbackTest.php +++ b/tests/Unit/Model/ConferenceRecordingAvailableCallbackTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ConferenceRecordingAvailableCallback; +use Bandwidth\Model\FileFormatEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,29 @@ */ class ConferenceRecordingAvailableCallbackTest extends TestCase { + private static ConferenceRecordingAvailableCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new ConferenceRecordingAvailableCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'conference_id' => 'test_string', + 'name' => 'test_string', + 'account_id' => 'test_string', + 'recording_id' => 'test_string', + 'channels' => 1, + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'end_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'duration' => 'test_string', + 'file_format' => FileFormatEnum::MP3, + 'media_url' => 'test_string', + 'tag' => 'test_string', + 'status' => 'test_string' + ]); } /** @@ -74,8 +73,7 @@ public static function tearDownAfterClass(): void */ public function testConferenceRecordingAvailableCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ConferenceRecordingAvailableCallback::class, self::$instance); } /** @@ -83,8 +81,8 @@ public function testConferenceRecordingAvailableCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +90,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +99,8 @@ public function testPropertyEventTime() */ public function testPropertyConferenceId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getConferenceId()); + $this->assertEquals('test_string', self::$instance->getConferenceId()); } /** @@ -110,8 +108,8 @@ public function testPropertyConferenceId() */ public function testPropertyName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getName()); + $this->assertEquals('test_string', self::$instance->getName()); } /** @@ -119,8 +117,8 @@ public function testPropertyName() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -128,8 +126,8 @@ public function testPropertyAccountId() */ public function testPropertyRecordingId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRecordingId()); + $this->assertEquals('test_string', self::$instance->getRecordingId()); } /** @@ -137,8 +135,8 @@ public function testPropertyRecordingId() */ public function testPropertyChannels() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getChannels()); + $this->assertEquals(1, self::$instance->getChannels()); } /** @@ -146,8 +144,8 @@ public function testPropertyChannels() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -155,8 +153,8 @@ public function testPropertyStartTime() */ public function testPropertyEndTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEndTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEndTime()); } /** @@ -164,8 +162,8 @@ public function testPropertyEndTime() */ public function testPropertyDuration() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDuration()); + $this->assertEquals('test_string', self::$instance->getDuration()); } /** @@ -173,8 +171,8 @@ public function testPropertyDuration() */ public function testPropertyFileFormat() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(FileFormatEnum::class, self::$instance->getFileFormat()); + $this->assertSame(FileFormatEnum::MP3, self::$instance->getFileFormat()); } /** @@ -182,8 +180,8 @@ public function testPropertyFileFormat() */ public function testPropertyMediaUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getMediaUrl()); + $this->assertEquals('test_string', self::$instance->getMediaUrl()); } /** @@ -191,8 +189,8 @@ public function testPropertyMediaUrl() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -200,7 +198,6 @@ public function testPropertyTag() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getStatus()); + $this->assertEquals('test_string', self::$instance->getStatus()); + }} diff --git a/tests/Unit/Model/ConferenceRecordingMetadataTest.php b/tests/Unit/Model/ConferenceRecordingMetadataTest.php index 42a019f2..5f14c099 100644 --- a/tests/Unit/Model/ConferenceRecordingMetadataTest.php +++ b/tests/Unit/Model/ConferenceRecordingMetadataTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ConferenceRecordingMetadata; +use Bandwidth\Model\FileFormatEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,27 @@ */ class ConferenceRecordingMetadataTest extends TestCase { + private static ConferenceRecordingMetadata $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new ConferenceRecordingMetadata([ + 'account_id' => 'test_string', + 'conference_id' => 'test_string', + 'name' => 'test_string', + 'recording_id' => 'test_string', + 'duration' => 'test_string', + 'channels' => 1, + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'end_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'file_format' => FileFormatEnum::MP3, + 'status' => 'test_string', + 'media_url' => 'test_string', + 'recording_name' => 'test_string' + ]); } /** @@ -74,8 +71,7 @@ public static function tearDownAfterClass(): void */ public function testConferenceRecordingMetadata() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ConferenceRecordingMetadata::class, self::$instance); } /** @@ -83,8 +79,8 @@ public function testConferenceRecordingMetadata() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -92,8 +88,8 @@ public function testPropertyAccountId() */ public function testPropertyConferenceId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getConferenceId()); + $this->assertEquals('test_string', self::$instance->getConferenceId()); } /** @@ -101,8 +97,8 @@ public function testPropertyConferenceId() */ public function testPropertyName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getName()); + $this->assertEquals('test_string', self::$instance->getName()); } /** @@ -110,8 +106,8 @@ public function testPropertyName() */ public function testPropertyRecordingId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRecordingId()); + $this->assertEquals('test_string', self::$instance->getRecordingId()); } /** @@ -119,8 +115,8 @@ public function testPropertyRecordingId() */ public function testPropertyDuration() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDuration()); + $this->assertEquals('test_string', self::$instance->getDuration()); } /** @@ -128,8 +124,8 @@ public function testPropertyDuration() */ public function testPropertyChannels() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getChannels()); + $this->assertEquals(1, self::$instance->getChannels()); } /** @@ -137,8 +133,8 @@ public function testPropertyChannels() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -146,8 +142,8 @@ public function testPropertyStartTime() */ public function testPropertyEndTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEndTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEndTime()); } /** @@ -155,8 +151,8 @@ public function testPropertyEndTime() */ public function testPropertyFileFormat() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(FileFormatEnum::class, self::$instance->getFileFormat()); + $this->assertSame(FileFormatEnum::MP3, self::$instance->getFileFormat()); } /** @@ -164,8 +160,8 @@ public function testPropertyFileFormat() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getStatus()); + $this->assertEquals('test_string', self::$instance->getStatus()); } /** @@ -173,8 +169,8 @@ public function testPropertyStatus() */ public function testPropertyMediaUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getMediaUrl()); + $this->assertEquals('test_string', self::$instance->getMediaUrl()); } /** @@ -182,7 +178,6 @@ public function testPropertyMediaUrl() */ public function testPropertyRecordingName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getRecordingName()); + $this->assertEquals('test_string', self::$instance->getRecordingName()); + }} diff --git a/tests/Unit/Model/ConferenceRedirectCallbackTest.php b/tests/Unit/Model/ConferenceRedirectCallbackTest.php index 0966a60a..7f7888a8 100644 --- a/tests/Unit/Model/ConferenceRedirectCallbackTest.php +++ b/tests/Unit/Model/ConferenceRedirectCallbackTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ConferenceRedirectCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,20 @@ */ class ConferenceRedirectCallbackTest extends TestCase { + private static ConferenceRedirectCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new ConferenceRedirectCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'conference_id' => 'test_string', + 'name' => 'test_string', + 'tag' => 'test_string' + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testConferenceRedirectCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ConferenceRedirectCallback::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testConferenceRedirectCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +80,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +89,8 @@ public function testPropertyEventTime() */ public function testPropertyConferenceId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getConferenceId()); + $this->assertEquals('test_string', self::$instance->getConferenceId()); } /** @@ -110,8 +98,8 @@ public function testPropertyConferenceId() */ public function testPropertyName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getName()); + $this->assertEquals('test_string', self::$instance->getName()); } /** @@ -119,7 +107,6 @@ public function testPropertyName() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + }} diff --git a/tests/Unit/Model/ConferenceTest.php b/tests/Unit/Model/ConferenceTest.php index 0d13610b..31b030ca 100644 --- a/tests/Unit/Model/ConferenceTest.php +++ b/tests/Unit/Model/ConferenceTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallbackMethodEnum; +use Bandwidth\Model\Conference; +use Bandwidth\Model\ConferenceMember; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,23 @@ */ class ConferenceTest extends TestCase { + private static Conference $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new Conference([ + 'id' => 'test_string', + 'name' => 'test_string', + 'created_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'completed_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'conference_event_url' => 'test_string', + 'conference_event_method' => CallbackMethodEnum::GET, + 'tag' => 'test_string', + 'active_members' => [new ConferenceMember([])] + ]); } /** @@ -74,8 +68,7 @@ public static function tearDownAfterClass(): void */ public function testConference() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Conference::class, self::$instance); } /** @@ -83,8 +76,8 @@ public function testConference() */ public function testPropertyId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getId()); + $this->assertEquals('test_string', self::$instance->getId()); } /** @@ -92,8 +85,8 @@ public function testPropertyId() */ public function testPropertyName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getName()); + $this->assertEquals('test_string', self::$instance->getName()); } /** @@ -101,8 +94,8 @@ public function testPropertyName() */ public function testPropertyCreatedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getCreatedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getCreatedTime()); } /** @@ -110,8 +103,8 @@ public function testPropertyCreatedTime() */ public function testPropertyCompletedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getCompletedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getCompletedTime()); } /** @@ -119,8 +112,8 @@ public function testPropertyCompletedTime() */ public function testPropertyConferenceEventUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getConferenceEventUrl()); + $this->assertEquals('test_string', self::$instance->getConferenceEventUrl()); } /** @@ -128,8 +121,8 @@ public function testPropertyConferenceEventUrl() */ public function testPropertyConferenceEventMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallbackMethodEnum::class, self::$instance->getConferenceEventMethod()); + $this->assertSame(CallbackMethodEnum::GET, self::$instance->getConferenceEventMethod()); } /** @@ -137,8 +130,8 @@ public function testPropertyConferenceEventMethod() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -146,7 +139,6 @@ public function testPropertyTag() */ public function testPropertyActiveMembers() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getActiveMembers()); + $this->assertInstanceOf(ConferenceMember::class, self::$instance->getActiveMembers()[0]); + }} diff --git a/tests/Unit/Model/ContactTest.php b/tests/Unit/Model/ContactTest.php index abcf781f..1f0a99ef 100644 --- a/tests/Unit/Model/ContactTest.php +++ b/tests/Unit/Model/ContactTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Contact; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,19 @@ */ class ContactTest extends TestCase { + private static Contact $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new Contact([ + 'first_name' => 'test_string', + 'last_name' => 'test_string', + 'email' => 'test_string', + 'phone_number' => 'test_string' + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testContact() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Contact::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testContact() */ public function testPropertyFirstName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFirstName()); + $this->assertEquals('test_string', self::$instance->getFirstName()); } /** @@ -92,8 +79,8 @@ public function testPropertyFirstName() */ public function testPropertyLastName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getLastName()); + $this->assertEquals('test_string', self::$instance->getLastName()); } /** @@ -101,8 +88,8 @@ public function testPropertyLastName() */ public function testPropertyEmail() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEmail()); + $this->assertEquals('test_string', self::$instance->getEmail()); } /** @@ -110,7 +97,6 @@ public function testPropertyEmail() */ public function testPropertyPhoneNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getPhoneNumber()); + $this->assertEquals('test_string', self::$instance->getPhoneNumber()); + }} diff --git a/tests/Unit/Model/CreateAsyncBulkLookupResponseDataTest.php b/tests/Unit/Model/CreateAsyncBulkLookupResponseDataTest.php index 0e6f6aca..0bc7d8ee 100644 --- a/tests/Unit/Model/CreateAsyncBulkLookupResponseDataTest.php +++ b/tests/Unit/Model/CreateAsyncBulkLookupResponseDataTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CreateAsyncBulkLookupResponseData; +use Bandwidth\Model\InProgressLookupStatusEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,17 @@ */ class CreateAsyncBulkLookupResponseDataTest extends TestCase { + private static CreateAsyncBulkLookupResponseData $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CreateAsyncBulkLookupResponseData([ + 'request_id' => 'test_string', + 'status' => InProgressLookupStatusEnum::IN_PROGRESS + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testCreateAsyncBulkLookupResponseData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateAsyncBulkLookupResponseData::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testCreateAsyncBulkLookupResponseData() */ public function testPropertyRequestId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRequestId()); + $this->assertEquals('test_string', self::$instance->getRequestId()); } /** @@ -92,7 +78,6 @@ public function testPropertyRequestId() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(InProgressLookupStatusEnum::class, self::$instance->getStatus()); + $this->assertSame(InProgressLookupStatusEnum::IN_PROGRESS, self::$instance->getStatus()); + }} diff --git a/tests/Unit/Model/CreateAsyncBulkLookupResponseTest.php b/tests/Unit/Model/CreateAsyncBulkLookupResponseTest.php index 3ff9ae49..aca3699e 100644 --- a/tests/Unit/Model/CreateAsyncBulkLookupResponseTest.php +++ b/tests/Unit/Model/CreateAsyncBulkLookupResponseTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CreateAsyncBulkLookupResponse; +use Bandwidth\Model\CreateAsyncBulkLookupResponseData; +use Bandwidth\Model\LinkSchema; +use Bandwidth\Model\LookupErrorSchema; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,18 @@ */ class CreateAsyncBulkLookupResponseTest extends TestCase { + private static CreateAsyncBulkLookupResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CreateAsyncBulkLookupResponse([ + 'links' => [new LinkSchema([])], + 'data' => new CreateAsyncBulkLookupResponseData([]), + 'errors' => [new LookupErrorSchema([])] + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testCreateAsyncBulkLookupResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateAsyncBulkLookupResponse::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testCreateAsyncBulkLookupResponse() */ public function testPropertyLinks() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getLinks()); + $this->assertInstanceOf(LinkSchema::class, self::$instance->getLinks()[0]); } /** @@ -92,8 +81,7 @@ public function testPropertyLinks() */ public function testPropertyData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateAsyncBulkLookupResponseData::class, self::$instance->getData()); } /** @@ -101,7 +89,6 @@ public function testPropertyData() */ public function testPropertyErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getErrors()); + $this->assertInstanceOf(LookupErrorSchema::class, self::$instance->getErrors()[0]); + }} diff --git a/tests/Unit/Model/CreateCallResponseTest.php b/tests/Unit/Model/CreateCallResponseTest.php index 13659d2a..c59d3607 100644 --- a/tests/Unit/Model/CreateCallResponseTest.php +++ b/tests/Unit/Model/CreateCallResponseTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallbackMethodEnum; +use Bandwidth\Model\CreateCallResponse; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,36 @@ */ class CreateCallResponseTest extends TestCase { + private static CreateCallResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CreateCallResponse([ + 'application_id' => 'test_string', + 'account_id' => 'test_string', + 'call_id' => 'test_string', + 'to' => 'test_string', + 'from' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'call_url' => 'test_string', + 'call_timeout' => 1.5, + 'callback_timeout' => 1.5, + 'tag' => 'test_string', + 'answer_method' => CallbackMethodEnum::GET, + 'answer_url' => 'test_string', + 'answer_fallback_method' => CallbackMethodEnum::GET, + 'answer_fallback_url' => 'test_string', + 'disconnect_method' => CallbackMethodEnum::GET, + 'disconnect_url' => 'test_string', + 'username' => 'test_string', + 'password' => 'test_string', + 'fallback_username' => 'test_string', + 'fallback_password' => 'test_string', + 'priority' => 1 + ]); } /** @@ -74,8 +80,7 @@ public static function tearDownAfterClass(): void */ public function testCreateCallResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateCallResponse::class, self::$instance); } /** @@ -83,8 +88,8 @@ public function testCreateCallResponse() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -92,8 +97,8 @@ public function testPropertyApplicationId() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -101,8 +106,8 @@ public function testPropertyAccountId() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -110,8 +115,8 @@ public function testPropertyCallId() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -119,8 +124,8 @@ public function testPropertyTo() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +133,8 @@ public function testPropertyFrom() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -137,8 +142,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -146,8 +151,8 @@ public function testPropertyCallUrl() */ public function testPropertyCallTimeout() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getCallTimeout()); + $this->assertEquals(1.5, self::$instance->getCallTimeout()); } /** @@ -155,8 +160,8 @@ public function testPropertyCallTimeout() */ public function testPropertyCallbackTimeout() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getCallbackTimeout()); + $this->assertEquals(1.5, self::$instance->getCallbackTimeout()); } /** @@ -164,8 +169,8 @@ public function testPropertyCallbackTimeout() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -173,8 +178,8 @@ public function testPropertyTag() */ public function testPropertyAnswerMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallbackMethodEnum::class, self::$instance->getAnswerMethod()); + $this->assertSame(CallbackMethodEnum::GET, self::$instance->getAnswerMethod()); } /** @@ -182,8 +187,8 @@ public function testPropertyAnswerMethod() */ public function testPropertyAnswerUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAnswerUrl()); + $this->assertEquals('test_string', self::$instance->getAnswerUrl()); } /** @@ -191,8 +196,8 @@ public function testPropertyAnswerUrl() */ public function testPropertyAnswerFallbackMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallbackMethodEnum::class, self::$instance->getAnswerFallbackMethod()); + $this->assertSame(CallbackMethodEnum::GET, self::$instance->getAnswerFallbackMethod()); } /** @@ -200,8 +205,8 @@ public function testPropertyAnswerFallbackMethod() */ public function testPropertyAnswerFallbackUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAnswerFallbackUrl()); + $this->assertEquals('test_string', self::$instance->getAnswerFallbackUrl()); } /** @@ -209,8 +214,8 @@ public function testPropertyAnswerFallbackUrl() */ public function testPropertyDisconnectMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallbackMethodEnum::class, self::$instance->getDisconnectMethod()); + $this->assertSame(CallbackMethodEnum::GET, self::$instance->getDisconnectMethod()); } /** @@ -218,8 +223,8 @@ public function testPropertyDisconnectMethod() */ public function testPropertyDisconnectUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDisconnectUrl()); + $this->assertEquals('test_string', self::$instance->getDisconnectUrl()); } /** @@ -227,8 +232,8 @@ public function testPropertyDisconnectUrl() */ public function testPropertyUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUsername()); + $this->assertEquals('test_string', self::$instance->getUsername()); } /** @@ -236,8 +241,8 @@ public function testPropertyUsername() */ public function testPropertyPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPassword()); + $this->assertEquals('test_string', self::$instance->getPassword()); } /** @@ -245,8 +250,8 @@ public function testPropertyPassword() */ public function testPropertyFallbackUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFallbackUsername()); + $this->assertEquals('test_string', self::$instance->getFallbackUsername()); } /** @@ -254,8 +259,8 @@ public function testPropertyFallbackUsername() */ public function testPropertyFallbackPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFallbackPassword()); + $this->assertEquals('test_string', self::$instance->getFallbackPassword()); } /** @@ -263,7 +268,6 @@ public function testPropertyFallbackPassword() */ public function testPropertyPriority() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsInt(self::$instance->getPriority()); + $this->assertEquals(1, self::$instance->getPriority()); + }} diff --git a/tests/Unit/Model/CreateCallTest.php b/tests/Unit/Model/CreateCallTest.php index bab49387..d814df32 100644 --- a/tests/Unit/Model/CreateCallTest.php +++ b/tests/Unit/Model/CreateCallTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallbackMethodEnum; +use Bandwidth\Model\CreateCall; +use Bandwidth\Model\MachineDetectionConfiguration; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,36 @@ */ class CreateCallTest extends TestCase { + private static CreateCall $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CreateCall([ + 'to' => 'test_string', + 'from' => 'test_string', + 'privacy' => true, + 'display_name' => 'test_string', + 'uui' => 'test_string', + 'application_id' => 'test_string', + 'answer_url' => 'test_string', + 'answer_method' => CallbackMethodEnum::GET, + 'username' => 'test_string', + 'password' => 'test_string', + 'answer_fallback_url' => 'test_string', + 'answer_fallback_method' => CallbackMethodEnum::GET, + 'fallback_username' => 'test_string', + 'fallback_password' => 'test_string', + 'disconnect_url' => 'test_string', + 'disconnect_method' => CallbackMethodEnum::GET, + 'call_timeout' => 1.5, + 'callback_timeout' => 1.5, + 'machine_detection' => new MachineDetectionConfiguration([]), + 'priority' => 1, + 'tag' => 'test_string' + ]); } /** @@ -74,8 +81,7 @@ public static function tearDownAfterClass(): void */ public function testCreateCall() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateCall::class, self::$instance); } /** @@ -83,8 +89,8 @@ public function testCreateCall() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -92,8 +98,8 @@ public function testPropertyTo() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -101,8 +107,8 @@ public function testPropertyFrom() */ public function testPropertyPrivacy() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsBool(self::$instance->getPrivacy()); + $this->assertTrue(self::$instance->getPrivacy()); } /** @@ -110,8 +116,8 @@ public function testPropertyPrivacy() */ public function testPropertyDisplayName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDisplayName()); + $this->assertEquals('test_string', self::$instance->getDisplayName()); } /** @@ -119,8 +125,8 @@ public function testPropertyDisplayName() */ public function testPropertyUui() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUui()); + $this->assertEquals('test_string', self::$instance->getUui()); } /** @@ -128,8 +134,8 @@ public function testPropertyUui() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -137,8 +143,8 @@ public function testPropertyApplicationId() */ public function testPropertyAnswerUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAnswerUrl()); + $this->assertEquals('test_string', self::$instance->getAnswerUrl()); } /** @@ -146,8 +152,8 @@ public function testPropertyAnswerUrl() */ public function testPropertyAnswerMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallbackMethodEnum::class, self::$instance->getAnswerMethod()); + $this->assertSame(CallbackMethodEnum::GET, self::$instance->getAnswerMethod()); } /** @@ -155,8 +161,8 @@ public function testPropertyAnswerMethod() */ public function testPropertyUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUsername()); + $this->assertEquals('test_string', self::$instance->getUsername()); } /** @@ -164,8 +170,8 @@ public function testPropertyUsername() */ public function testPropertyPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPassword()); + $this->assertEquals('test_string', self::$instance->getPassword()); } /** @@ -173,8 +179,8 @@ public function testPropertyPassword() */ public function testPropertyAnswerFallbackUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAnswerFallbackUrl()); + $this->assertEquals('test_string', self::$instance->getAnswerFallbackUrl()); } /** @@ -182,8 +188,8 @@ public function testPropertyAnswerFallbackUrl() */ public function testPropertyAnswerFallbackMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallbackMethodEnum::class, self::$instance->getAnswerFallbackMethod()); + $this->assertSame(CallbackMethodEnum::GET, self::$instance->getAnswerFallbackMethod()); } /** @@ -191,8 +197,8 @@ public function testPropertyAnswerFallbackMethod() */ public function testPropertyFallbackUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFallbackUsername()); + $this->assertEquals('test_string', self::$instance->getFallbackUsername()); } /** @@ -200,8 +206,8 @@ public function testPropertyFallbackUsername() */ public function testPropertyFallbackPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFallbackPassword()); + $this->assertEquals('test_string', self::$instance->getFallbackPassword()); } /** @@ -209,8 +215,8 @@ public function testPropertyFallbackPassword() */ public function testPropertyDisconnectUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDisconnectUrl()); + $this->assertEquals('test_string', self::$instance->getDisconnectUrl()); } /** @@ -218,8 +224,8 @@ public function testPropertyDisconnectUrl() */ public function testPropertyDisconnectMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallbackMethodEnum::class, self::$instance->getDisconnectMethod()); + $this->assertSame(CallbackMethodEnum::GET, self::$instance->getDisconnectMethod()); } /** @@ -227,8 +233,8 @@ public function testPropertyDisconnectMethod() */ public function testPropertyCallTimeout() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getCallTimeout()); + $this->assertEquals(1.5, self::$instance->getCallTimeout()); } /** @@ -236,8 +242,8 @@ public function testPropertyCallTimeout() */ public function testPropertyCallbackTimeout() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getCallbackTimeout()); + $this->assertEquals(1.5, self::$instance->getCallbackTimeout()); } /** @@ -245,8 +251,7 @@ public function testPropertyCallbackTimeout() */ public function testPropertyMachineDetection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MachineDetectionConfiguration::class, self::$instance->getMachineDetection()); } /** @@ -254,8 +259,8 @@ public function testPropertyMachineDetection() */ public function testPropertyPriority() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getPriority()); + $this->assertEquals(1, self::$instance->getPriority()); } /** @@ -263,7 +268,6 @@ public function testPropertyPriority() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + }} diff --git a/tests/Unit/Model/CreateEndpointRequestBaseTest.php b/tests/Unit/Model/CreateEndpointRequestBaseTest.php index b10942ea..56dea6f3 100644 --- a/tests/Unit/Model/CreateEndpointRequestBaseTest.php +++ b/tests/Unit/Model/CreateEndpointRequestBaseTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CreateEndpointRequestBase; +use Bandwidth\Model\EndpointDirectionEnum; +use Bandwidth\Model\EndpointTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,20 @@ */ class CreateEndpointRequestBaseTest extends TestCase { + private static CreateEndpointRequestBase $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CreateEndpointRequestBase([ + 'type' => EndpointTypeEnum::WEBRTC, + 'direction' => EndpointDirectionEnum::INBOUND, + 'event_callback_url' => 'test_string', + 'event_fallback_url' => 'test_string', + 'tag' => 'test_string' + ]); } /** @@ -74,8 +65,7 @@ public static function tearDownAfterClass(): void */ public function testCreateEndpointRequestBase() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateEndpointRequestBase::class, self::$instance); } /** @@ -83,8 +73,8 @@ public function testCreateEndpointRequestBase() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointTypeEnum::class, self::$instance->getType()); + $this->assertSame(EndpointTypeEnum::WEBRTC, self::$instance->getType()); } /** @@ -92,8 +82,8 @@ public function testPropertyType() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(EndpointDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -101,8 +91,8 @@ public function testPropertyDirection() */ public function testPropertyEventCallbackUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventCallbackUrl()); + $this->assertEquals('test_string', self::$instance->getEventCallbackUrl()); } /** @@ -110,8 +100,8 @@ public function testPropertyEventCallbackUrl() */ public function testPropertyEventFallbackUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventFallbackUrl()); + $this->assertEquals('test_string', self::$instance->getEventFallbackUrl()); } /** @@ -119,7 +109,6 @@ public function testPropertyEventFallbackUrl() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + }} diff --git a/tests/Unit/Model/CreateEndpointResponseDataTest.php b/tests/Unit/Model/CreateEndpointResponseDataTest.php index dc1cba79..2aee3739 100644 --- a/tests/Unit/Model/CreateEndpointResponseDataTest.php +++ b/tests/Unit/Model/CreateEndpointResponseDataTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CreateEndpointResponseData; +use Bandwidth\Model\Device; +use Bandwidth\Model\EndpointStatusEnum; +use Bandwidth\Model\EndpointTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,23 @@ */ class CreateEndpointResponseDataTest extends TestCase { + private static CreateEndpointResponseData $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CreateEndpointResponseData([ + 'endpoint_id' => 'test_string', + 'type' => EndpointTypeEnum::WEBRTC, + 'status' => EndpointStatusEnum::CONNECTED, + 'creation_timestamp' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'expiration_timestamp' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'tag' => 'test_string', + 'devices' => [new Device([])], + 'token' => 'test_string' + ]); } /** @@ -74,8 +69,7 @@ public static function tearDownAfterClass(): void */ public function testCreateEndpointResponseData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateEndpointResponseData::class, self::$instance); } /** @@ -83,8 +77,8 @@ public function testCreateEndpointResponseData() */ public function testPropertyEndpointId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEndpointId()); + $this->assertEquals('test_string', self::$instance->getEndpointId()); } /** @@ -92,8 +86,8 @@ public function testPropertyEndpointId() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointTypeEnum::class, self::$instance->getType()); + $this->assertSame(EndpointTypeEnum::WEBRTC, self::$instance->getType()); } /** @@ -101,8 +95,8 @@ public function testPropertyType() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointStatusEnum::class, self::$instance->getStatus()); + $this->assertSame(EndpointStatusEnum::CONNECTED, self::$instance->getStatus()); } /** @@ -110,8 +104,8 @@ public function testPropertyStatus() */ public function testPropertyCreationTimestamp() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getCreationTimestamp()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getCreationTimestamp()); } /** @@ -119,8 +113,8 @@ public function testPropertyCreationTimestamp() */ public function testPropertyExpirationTimestamp() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getExpirationTimestamp()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getExpirationTimestamp()); } /** @@ -128,8 +122,8 @@ public function testPropertyExpirationTimestamp() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -137,8 +131,8 @@ public function testPropertyTag() */ public function testPropertyDevices() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getDevices()); + $this->assertInstanceOf(Device::class, self::$instance->getDevices()[0]); } /** @@ -146,7 +140,6 @@ public function testPropertyDevices() */ public function testPropertyToken() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getToken()); + $this->assertEquals('test_string', self::$instance->getToken()); + }} diff --git a/tests/Unit/Model/CreateEndpointResponseTest.php b/tests/Unit/Model/CreateEndpointResponseTest.php index 502b4407..a4fdf200 100644 --- a/tests/Unit/Model/CreateEndpointResponseTest.php +++ b/tests/Unit/Model/CreateEndpointResponseTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\BrtcError; +use Bandwidth\Model\BrtcLink; +use Bandwidth\Model\CreateEndpointResponse; +use Bandwidth\Model\CreateEndpointResponseData; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,18 @@ */ class CreateEndpointResponseTest extends TestCase { + private static CreateEndpointResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CreateEndpointResponse([ + 'links' => [new BrtcLink([])], + 'data' => new CreateEndpointResponseData([]), + 'errors' => [new BrtcError([])] + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testCreateEndpointResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateEndpointResponse::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testCreateEndpointResponse() */ public function testPropertyLinks() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getLinks()); + $this->assertInstanceOf(BrtcLink::class, self::$instance->getLinks()[0]); } /** @@ -92,8 +81,7 @@ public function testPropertyLinks() */ public function testPropertyData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateEndpointResponseData::class, self::$instance->getData()); } /** @@ -101,7 +89,6 @@ public function testPropertyData() */ public function testPropertyErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getErrors()); + $this->assertInstanceOf(BrtcError::class, self::$instance->getErrors()[0]); + }} diff --git a/tests/Unit/Model/CreateMessageRequestErrorTest.php b/tests/Unit/Model/CreateMessageRequestErrorTest.php index f8307a0c..c93250bf 100644 --- a/tests/Unit/Model/CreateMessageRequestErrorTest.php +++ b/tests/Unit/Model/CreateMessageRequestErrorTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CreateMessageRequestError; +use Bandwidth\Model\FieldError; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,18 @@ */ class CreateMessageRequestErrorTest extends TestCase { + private static CreateMessageRequestError $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CreateMessageRequestError([ + 'type' => 'test_string', + 'description' => 'test_string', + 'field_errors' => [new FieldError([])] + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testCreateMessageRequestError() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateMessageRequestError::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testCreateMessageRequestError() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getType()); + $this->assertEquals('test_string', self::$instance->getType()); } /** @@ -92,8 +79,8 @@ public function testPropertyType() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); } /** @@ -101,7 +88,6 @@ public function testPropertyDescription() */ public function testPropertyFieldErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getFieldErrors()); + $this->assertInstanceOf(FieldError::class, self::$instance->getFieldErrors()[0]); + }} diff --git a/tests/Unit/Model/CreateMultiChannelMessageResponseTest.php b/tests/Unit/Model/CreateMultiChannelMessageResponseTest.php index 0decfdde..56e9b26e 100644 --- a/tests/Unit/Model/CreateMultiChannelMessageResponseTest.php +++ b/tests/Unit/Model/CreateMultiChannelMessageResponseTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CreateMultiChannelMessageResponse; +use Bandwidth\Model\ErrorObject; +use Bandwidth\Model\Link; +use Bandwidth\Model\MultiChannelMessageResponseData; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,18 @@ */ class CreateMultiChannelMessageResponseTest extends TestCase { + private static CreateMultiChannelMessageResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CreateMultiChannelMessageResponse([ + 'links' => [new Link([])], + 'data' => new MultiChannelMessageResponseData([]), + 'errors' => [new ErrorObject([])] + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testCreateMultiChannelMessageResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateMultiChannelMessageResponse::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testCreateMultiChannelMessageResponse() */ public function testPropertyLinks() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getLinks()); + $this->assertInstanceOf(Link::class, self::$instance->getLinks()[0]); } /** @@ -92,8 +81,7 @@ public function testPropertyLinks() */ public function testPropertyData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelMessageResponseData::class, self::$instance->getData()); } /** @@ -101,7 +89,6 @@ public function testPropertyData() */ public function testPropertyErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getErrors()); + $this->assertInstanceOf(ErrorObject::class, self::$instance->getErrors()[0]); + }} diff --git a/tests/Unit/Model/CreateSyncLookupResponseDataTest.php b/tests/Unit/Model/CreateSyncLookupResponseDataTest.php index acbb55e6..d1aab5bf 100644 --- a/tests/Unit/Model/CreateSyncLookupResponseDataTest.php +++ b/tests/Unit/Model/CreateSyncLookupResponseDataTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CompletedLookupStatusEnum; +use Bandwidth\Model\CreateSyncLookupResponseData; +use Bandwidth\Model\LookupResult; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,18 @@ */ class CreateSyncLookupResponseDataTest extends TestCase { + private static CreateSyncLookupResponseData $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CreateSyncLookupResponseData([ + 'request_id' => 'test_string', + 'status' => CompletedLookupStatusEnum::COMPLETE, + 'results' => [new LookupResult([])] + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testCreateSyncLookupResponseData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateSyncLookupResponseData::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testCreateSyncLookupResponseData() */ public function testPropertyRequestId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRequestId()); + $this->assertEquals('test_string', self::$instance->getRequestId()); } /** @@ -92,8 +80,8 @@ public function testPropertyRequestId() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CompletedLookupStatusEnum::class, self::$instance->getStatus()); + $this->assertSame(CompletedLookupStatusEnum::COMPLETE, self::$instance->getStatus()); } /** @@ -101,7 +89,6 @@ public function testPropertyStatus() */ public function testPropertyResults() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getResults()); + $this->assertInstanceOf(LookupResult::class, self::$instance->getResults()[0]); + }} diff --git a/tests/Unit/Model/CreateSyncLookupResponseTest.php b/tests/Unit/Model/CreateSyncLookupResponseTest.php index 6edb323b..4100dd46 100644 --- a/tests/Unit/Model/CreateSyncLookupResponseTest.php +++ b/tests/Unit/Model/CreateSyncLookupResponseTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CreateSyncLookupResponse; +use Bandwidth\Model\CreateSyncLookupResponseData; +use Bandwidth\Model\LinkSchema; +use Bandwidth\Model\LookupErrorSchema; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,18 @@ */ class CreateSyncLookupResponseTest extends TestCase { + private static CreateSyncLookupResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CreateSyncLookupResponse([ + 'links' => [new LinkSchema([])], + 'data' => new CreateSyncLookupResponseData([]), + 'errors' => [new LookupErrorSchema([])] + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testCreateSyncLookupResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateSyncLookupResponse::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testCreateSyncLookupResponse() */ public function testPropertyLinks() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getLinks()); + $this->assertInstanceOf(LinkSchema::class, self::$instance->getLinks()[0]); } /** @@ -92,8 +81,7 @@ public function testPropertyLinks() */ public function testPropertyData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateSyncLookupResponseData::class, self::$instance->getData()); } /** @@ -101,7 +89,6 @@ public function testPropertyData() */ public function testPropertyErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getErrors()); + $this->assertInstanceOf(LookupErrorSchema::class, self::$instance->getErrors()[0]); + }} diff --git a/tests/Unit/Model/CreateWebRtcConnectionRequestTest.php b/tests/Unit/Model/CreateWebRtcConnectionRequestTest.php index 7a4443fa..ec57f285 100644 --- a/tests/Unit/Model/CreateWebRtcConnectionRequestTest.php +++ b/tests/Unit/Model/CreateWebRtcConnectionRequestTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CreateWebRtcConnectionRequest; +use Bandwidth\Model\EndpointDirectionEnum; +use Bandwidth\Model\EndpointTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,21 @@ */ class CreateWebRtcConnectionRequestTest extends TestCase { + private static CreateWebRtcConnectionRequest $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new CreateWebRtcConnectionRequest([ + 'type' => EndpointTypeEnum::WEBRTC, + 'direction' => EndpointDirectionEnum::INBOUND, + 'event_callback_url' => 'test_string', + 'event_fallback_url' => 'test_string', + 'tag' => 'test_string', + 'connection_metadata' => (object) ['key' => 'value'] + ]); } /** @@ -74,8 +66,7 @@ public static function tearDownAfterClass(): void */ public function testCreateWebRtcConnectionRequest() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CreateWebRtcConnectionRequest::class, self::$instance); } /** @@ -83,8 +74,8 @@ public function testCreateWebRtcConnectionRequest() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointTypeEnum::class, self::$instance->getType()); + $this->assertSame(EndpointTypeEnum::WEBRTC, self::$instance->getType()); } /** @@ -92,8 +83,8 @@ public function testPropertyType() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(EndpointDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -101,8 +92,8 @@ public function testPropertyDirection() */ public function testPropertyEventCallbackUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventCallbackUrl()); + $this->assertEquals('test_string', self::$instance->getEventCallbackUrl()); } /** @@ -110,8 +101,8 @@ public function testPropertyEventCallbackUrl() */ public function testPropertyEventFallbackUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventFallbackUrl()); + $this->assertEquals('test_string', self::$instance->getEventFallbackUrl()); } /** @@ -119,8 +110,8 @@ public function testPropertyEventFallbackUrl() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -128,7 +119,6 @@ public function testPropertyTag() */ public function testPropertyConnectionMetadata() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsObject(self::$instance->getConnectionMetadata()); + $this->assertEquals((object) ['key' => 'value'], self::$instance->getConnectionMetadata()); + }} diff --git a/tests/Unit/Model/DeviceTest.php b/tests/Unit/Model/DeviceTest.php index 9554947b..e73c3856 100644 --- a/tests/Unit/Model/DeviceTest.php +++ b/tests/Unit/Model/DeviceTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Device; +use Bandwidth\Model\DeviceStatusEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,19 @@ */ class DeviceTest extends TestCase { + private static Device $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new Device([ + 'device_id' => 'test_string', + 'device_name' => 'test_string', + 'status' => DeviceStatusEnum::CONNECTED, + 'creation_timestamp' => new \DateTime('2024-01-01T00:00:00+00:00') + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testDevice() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Device::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testDevice() */ public function testPropertyDeviceId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDeviceId()); + $this->assertEquals('test_string', self::$instance->getDeviceId()); } /** @@ -92,8 +80,8 @@ public function testPropertyDeviceId() */ public function testPropertyDeviceName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDeviceName()); + $this->assertEquals('test_string', self::$instance->getDeviceName()); } /** @@ -101,8 +89,8 @@ public function testPropertyDeviceName() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(DeviceStatusEnum::class, self::$instance->getStatus()); + $this->assertSame(DeviceStatusEnum::CONNECTED, self::$instance->getStatus()); } /** @@ -110,7 +98,6 @@ public function testPropertyStatus() */ public function testPropertyCreationTimestamp() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(\DateTime::class, self::$instance->getCreationTimestamp()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getCreationTimestamp()); + }} diff --git a/tests/Unit/Model/DisconnectCallbackTest.php b/tests/Unit/Model/DisconnectCallbackTest.php index ca6f196e..e45025c8 100644 --- a/tests/Unit/Model/DisconnectCallbackTest.php +++ b/tests/Unit/Model/DisconnectCallbackTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\DisconnectCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,32 @@ */ class DisconnectCallbackTest extends TestCase { + private static DisconnectCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new DisconnectCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'call_id' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_url' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'end_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'cause' => 'test_string', + 'error_message' => 'test_string', + 'error_id' => 'test_string', + 'tag' => 'test_string' + ]); } /** @@ -74,8 +76,7 @@ public static function tearDownAfterClass(): void */ public function testDisconnectCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(DisconnectCallback::class, self::$instance); } /** @@ -83,8 +84,8 @@ public function testDisconnectCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +93,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +102,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +111,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +120,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +129,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +138,8 @@ public function testPropertyTo() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -146,8 +147,8 @@ public function testPropertyCallId() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -155,8 +156,8 @@ public function testPropertyDirection() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -164,8 +165,8 @@ public function testPropertyCallUrl() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -173,8 +174,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -182,8 +183,8 @@ public function testPropertyStartTime() */ public function testPropertyAnswerTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); } /** @@ -191,8 +192,8 @@ public function testPropertyAnswerTime() */ public function testPropertyEndTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEndTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEndTime()); } /** @@ -200,8 +201,8 @@ public function testPropertyEndTime() */ public function testPropertyCause() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCause()); + $this->assertEquals('test_string', self::$instance->getCause()); } /** @@ -209,8 +210,8 @@ public function testPropertyCause() */ public function testPropertyErrorMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getErrorMessage()); + $this->assertEquals('test_string', self::$instance->getErrorMessage()); } /** @@ -218,8 +219,8 @@ public function testPropertyErrorMessage() */ public function testPropertyErrorId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getErrorId()); + $this->assertEquals('test_string', self::$instance->getErrorId()); } /** @@ -227,7 +228,6 @@ public function testPropertyErrorId() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + }} diff --git a/tests/Unit/Model/DiversionTest.php b/tests/Unit/Model/DiversionTest.php index 8712a87b..10a57c03 100644 --- a/tests/Unit/Model/DiversionTest.php +++ b/tests/Unit/Model/DiversionTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Diversion; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,22 @@ */ class DiversionTest extends TestCase { + private static Diversion $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new Diversion([ + 'reason' => 'test_string', + 'privacy' => 'test_string', + 'screen' => 'test_string', + 'counter' => 'test_string', + 'limit' => 'test_string', + 'unknown' => 'test_string', + 'orig_to' => 'test_string' + ]); } /** @@ -74,8 +65,7 @@ public static function tearDownAfterClass(): void */ public function testDiversion() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Diversion::class, self::$instance); } /** @@ -83,8 +73,8 @@ public function testDiversion() */ public function testPropertyReason() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getReason()); + $this->assertEquals('test_string', self::$instance->getReason()); } /** @@ -92,8 +82,8 @@ public function testPropertyReason() */ public function testPropertyPrivacy() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPrivacy()); + $this->assertEquals('test_string', self::$instance->getPrivacy()); } /** @@ -101,8 +91,8 @@ public function testPropertyPrivacy() */ public function testPropertyScreen() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getScreen()); + $this->assertEquals('test_string', self::$instance->getScreen()); } /** @@ -110,8 +100,8 @@ public function testPropertyScreen() */ public function testPropertyCounter() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCounter()); + $this->assertEquals('test_string', self::$instance->getCounter()); } /** @@ -119,8 +109,8 @@ public function testPropertyCounter() */ public function testPropertyLimit() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getLimit()); + $this->assertEquals('test_string', self::$instance->getLimit()); } /** @@ -128,8 +118,8 @@ public function testPropertyLimit() */ public function testPropertyUnknown() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUnknown()); + $this->assertEquals('test_string', self::$instance->getUnknown()); } /** @@ -137,7 +127,6 @@ public function testPropertyUnknown() */ public function testPropertyOrigTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getOrigTo()); + $this->assertEquals('test_string', self::$instance->getOrigTo()); + }} diff --git a/tests/Unit/Model/DtmfCallbackTest.php b/tests/Unit/Model/DtmfCallbackTest.php index cf940a9f..82f32416 100644 --- a/tests/Unit/Model/DtmfCallbackTest.php +++ b/tests/Unit/Model/DtmfCallbackTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\DtmfCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,32 @@ */ class DtmfCallbackTest extends TestCase { + private static DtmfCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new DtmfCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'call_id' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'digit' => 'test_string', + 'call_url' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'parent_call_id' => 'test_string', + 'transfer_caller_id' => 'test_string', + 'transfer_to' => 'test_string', + 'tag' => 'test_string' + ]); } /** @@ -74,8 +76,7 @@ public static function tearDownAfterClass(): void */ public function testDtmfCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(DtmfCallback::class, self::$instance); } /** @@ -83,8 +84,8 @@ public function testDtmfCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +93,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +102,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +111,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +120,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +129,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +138,8 @@ public function testPropertyTo() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -146,8 +147,8 @@ public function testPropertyCallId() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -155,8 +156,8 @@ public function testPropertyDirection() */ public function testPropertyDigit() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDigit()); + $this->assertEquals('test_string', self::$instance->getDigit()); } /** @@ -164,8 +165,8 @@ public function testPropertyDigit() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -173,8 +174,8 @@ public function testPropertyCallUrl() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -182,8 +183,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -191,8 +192,8 @@ public function testPropertyStartTime() */ public function testPropertyAnswerTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); } /** @@ -200,8 +201,8 @@ public function testPropertyAnswerTime() */ public function testPropertyParentCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getParentCallId()); + $this->assertEquals('test_string', self::$instance->getParentCallId()); } /** @@ -209,8 +210,8 @@ public function testPropertyParentCallId() */ public function testPropertyTransferCallerId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferCallerId()); + $this->assertEquals('test_string', self::$instance->getTransferCallerId()); } /** @@ -218,8 +219,8 @@ public function testPropertyTransferCallerId() */ public function testPropertyTransferTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferTo()); + $this->assertEquals('test_string', self::$instance->getTransferTo()); } /** @@ -227,7 +228,6 @@ public function testPropertyTransferTo() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + }} diff --git a/tests/Unit/Model/EndpointEventTest.php b/tests/Unit/Model/EndpointEventTest.php index 5958cd62..6228f4d1 100644 --- a/tests/Unit/Model/EndpointEventTest.php +++ b/tests/Unit/Model/EndpointEventTest.php @@ -28,6 +28,12 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Device; +use Bandwidth\Model\EndpointEvent; +use Bandwidth\Model\EndpointEventTypeEnum; +use Bandwidth\Model\EndpointStatusEnum; +use Bandwidth\Model\EndpointTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +46,24 @@ */ class EndpointEventTest extends TestCase { + private static EndpointEvent $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new EndpointEvent([ + 'endpoint_id' => 'test_string', + 'type' => EndpointTypeEnum::WEBRTC, + 'status' => EndpointStatusEnum::CONNECTED, + 'creation_timestamp' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'expiration_timestamp' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'tag' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'event_type' => EndpointEventTypeEnum::DEVICE_CONNECTED, + 'device' => new Device([]) + ]); } /** @@ -74,8 +71,7 @@ public static function tearDownAfterClass(): void */ public function testEndpointEvent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointEvent::class, self::$instance); } /** @@ -83,8 +79,8 @@ public function testEndpointEvent() */ public function testPropertyEndpointId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEndpointId()); + $this->assertEquals('test_string', self::$instance->getEndpointId()); } /** @@ -92,8 +88,8 @@ public function testPropertyEndpointId() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointTypeEnum::class, self::$instance->getType()); + $this->assertSame(EndpointTypeEnum::WEBRTC, self::$instance->getType()); } /** @@ -101,8 +97,8 @@ public function testPropertyType() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointStatusEnum::class, self::$instance->getStatus()); + $this->assertSame(EndpointStatusEnum::CONNECTED, self::$instance->getStatus()); } /** @@ -110,8 +106,8 @@ public function testPropertyStatus() */ public function testPropertyCreationTimestamp() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getCreationTimestamp()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getCreationTimestamp()); } /** @@ -119,8 +115,8 @@ public function testPropertyCreationTimestamp() */ public function testPropertyExpirationTimestamp() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getExpirationTimestamp()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getExpirationTimestamp()); } /** @@ -128,8 +124,8 @@ public function testPropertyExpirationTimestamp() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -137,8 +133,8 @@ public function testPropertyTag() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -146,8 +142,8 @@ public function testPropertyEventTime() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointEventTypeEnum::class, self::$instance->getEventType()); + $this->assertSame(EndpointEventTypeEnum::DEVICE_CONNECTED, self::$instance->getEventType()); } /** @@ -155,7 +151,5 @@ public function testPropertyEventType() */ public function testPropertyDevice() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(Device::class, self::$instance->getDevice()); + }} diff --git a/tests/Unit/Model/EndpointResponseTest.php b/tests/Unit/Model/EndpointResponseTest.php index ba975dee..c6dc58d3 100644 --- a/tests/Unit/Model/EndpointResponseTest.php +++ b/tests/Unit/Model/EndpointResponseTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\BrtcError; +use Bandwidth\Model\BrtcLink; +use Bandwidth\Model\Endpoint; +use Bandwidth\Model\EndpointResponse; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,18 @@ */ class EndpointResponseTest extends TestCase { + private static EndpointResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new EndpointResponse([ + 'links' => [new BrtcLink([])], + 'data' => new Endpoint([]), + 'errors' => [new BrtcError([])] + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testEndpointResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointResponse::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testEndpointResponse() */ public function testPropertyLinks() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getLinks()); + $this->assertInstanceOf(BrtcLink::class, self::$instance->getLinks()[0]); } /** @@ -92,8 +81,7 @@ public function testPropertyLinks() */ public function testPropertyData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Endpoint::class, self::$instance->getData()); } /** @@ -101,7 +89,6 @@ public function testPropertyData() */ public function testPropertyErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getErrors()); + $this->assertInstanceOf(BrtcError::class, self::$instance->getErrors()[0]); + }} diff --git a/tests/Unit/Model/EndpointTest.php b/tests/Unit/Model/EndpointTest.php index a0a92868..9b8ae8a7 100644 --- a/tests/Unit/Model/EndpointTest.php +++ b/tests/Unit/Model/EndpointTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Device; +use Bandwidth\Model\Endpoint; +use Bandwidth\Model\EndpointStatusEnum; +use Bandwidth\Model\EndpointTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,22 @@ */ class EndpointTest extends TestCase { + private static Endpoint $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new Endpoint([ + 'endpoint_id' => 'test_string', + 'type' => EndpointTypeEnum::WEBRTC, + 'status' => EndpointStatusEnum::CONNECTED, + 'creation_timestamp' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'expiration_timestamp' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'tag' => 'test_string', + 'devices' => [new Device([])] + ]); } /** @@ -74,8 +68,7 @@ public static function tearDownAfterClass(): void */ public function testEndpoint() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Endpoint::class, self::$instance); } /** @@ -83,8 +76,8 @@ public function testEndpoint() */ public function testPropertyEndpointId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEndpointId()); + $this->assertEquals('test_string', self::$instance->getEndpointId()); } /** @@ -92,8 +85,8 @@ public function testPropertyEndpointId() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointTypeEnum::class, self::$instance->getType()); + $this->assertSame(EndpointTypeEnum::WEBRTC, self::$instance->getType()); } /** @@ -101,8 +94,8 @@ public function testPropertyType() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointStatusEnum::class, self::$instance->getStatus()); + $this->assertSame(EndpointStatusEnum::CONNECTED, self::$instance->getStatus()); } /** @@ -110,8 +103,8 @@ public function testPropertyStatus() */ public function testPropertyCreationTimestamp() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getCreationTimestamp()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getCreationTimestamp()); } /** @@ -119,8 +112,8 @@ public function testPropertyCreationTimestamp() */ public function testPropertyExpirationTimestamp() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getExpirationTimestamp()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getExpirationTimestamp()); } /** @@ -128,8 +121,8 @@ public function testPropertyExpirationTimestamp() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -137,7 +130,6 @@ public function testPropertyTag() */ public function testPropertyDevices() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getDevices()); + $this->assertInstanceOf(Device::class, self::$instance->getDevices()[0]); + }} diff --git a/tests/Unit/Model/EndpointsTest.php b/tests/Unit/Model/EndpointsTest.php index 704725fb..2cdd490a 100644 --- a/tests/Unit/Model/EndpointsTest.php +++ b/tests/Unit/Model/EndpointsTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\EndpointStatusEnum; +use Bandwidth\Model\EndpointTypeEnum; +use Bandwidth\Model\Endpoints; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,21 @@ */ class EndpointsTest extends TestCase { + private static Endpoints $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new Endpoints([ + 'endpoint_id' => 'test_string', + 'type' => EndpointTypeEnum::WEBRTC, + 'status' => EndpointStatusEnum::CONNECTED, + 'creation_timestamp' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'expiration_timestamp' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'tag' => 'test_string' + ]); } /** @@ -74,8 +66,7 @@ public static function tearDownAfterClass(): void */ public function testEndpoints() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Endpoints::class, self::$instance); } /** @@ -83,8 +74,8 @@ public function testEndpoints() */ public function testPropertyEndpointId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEndpointId()); + $this->assertEquals('test_string', self::$instance->getEndpointId()); } /** @@ -92,8 +83,8 @@ public function testPropertyEndpointId() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointTypeEnum::class, self::$instance->getType()); + $this->assertSame(EndpointTypeEnum::WEBRTC, self::$instance->getType()); } /** @@ -101,8 +92,8 @@ public function testPropertyType() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(EndpointStatusEnum::class, self::$instance->getStatus()); + $this->assertSame(EndpointStatusEnum::CONNECTED, self::$instance->getStatus()); } /** @@ -110,8 +101,8 @@ public function testPropertyStatus() */ public function testPropertyCreationTimestamp() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getCreationTimestamp()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getCreationTimestamp()); } /** @@ -119,8 +110,8 @@ public function testPropertyCreationTimestamp() */ public function testPropertyExpirationTimestamp() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getExpirationTimestamp()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getExpirationTimestamp()); } /** @@ -128,7 +119,6 @@ public function testPropertyExpirationTimestamp() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + }} diff --git a/tests/Unit/Model/ErrorObjectTest.php b/tests/Unit/Model/ErrorObjectTest.php index d884dfee..473b8591 100644 --- a/tests/Unit/Model/ErrorObjectTest.php +++ b/tests/Unit/Model/ErrorObjectTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ErrorObject; +use Bandwidth\Model\ErrorSource; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,18 @@ */ class ErrorObjectTest extends TestCase { + private static ErrorObject $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new ErrorObject([ + 'type' => 'test_string', + 'description' => 'test_string', + 'source' => new ErrorSource([]) + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testErrorObject() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ErrorObject::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testErrorObject() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getType()); + $this->assertEquals('test_string', self::$instance->getType()); } /** @@ -92,8 +79,8 @@ public function testPropertyType() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); } /** @@ -101,7 +88,5 @@ public function testPropertyDescription() */ public function testPropertySource() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(ErrorSource::class, self::$instance->getSource()); + }} diff --git a/tests/Unit/Model/ErrorSourceTest.php b/tests/Unit/Model/ErrorSourceTest.php index 310f4fc3..951c5265 100644 --- a/tests/Unit/Model/ErrorSourceTest.php +++ b/tests/Unit/Model/ErrorSourceTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ErrorSource; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,19 @@ */ class ErrorSourceTest extends TestCase { + private static ErrorSource $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new ErrorSource([ + 'parameter' => 'test_string', + 'field' => 'test_string', + 'header' => 'test_string', + 'reference' => 'test_string' + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testErrorSource() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ErrorSource::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testErrorSource() */ public function testPropertyParameter() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getParameter()); + $this->assertEquals('test_string', self::$instance->getParameter()); } /** @@ -92,8 +79,8 @@ public function testPropertyParameter() */ public function testPropertyField() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getField()); + $this->assertEquals('test_string', self::$instance->getField()); } /** @@ -101,8 +88,8 @@ public function testPropertyField() */ public function testPropertyHeader() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getHeader()); + $this->assertEquals('test_string', self::$instance->getHeader()); } /** @@ -110,7 +97,6 @@ public function testPropertyHeader() */ public function testPropertyReference() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getReference()); + $this->assertEquals('test_string', self::$instance->getReference()); + }} diff --git a/tests/Unit/Model/FailureWebhookTest.php b/tests/Unit/Model/FailureWebhookTest.php index 3e8a346b..f24cb140 100644 --- a/tests/Unit/Model/FailureWebhookTest.php +++ b/tests/Unit/Model/FailureWebhookTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\FailureWebhook; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,21 @@ */ class FailureWebhookTest extends TestCase { + private static FailureWebhook $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new FailureWebhook([ + 'account_id' => 'test_string', + 'phone_number' => 'test_string', + 'error_code' => 'test_string', + 'error_message' => 'test_string', + 'errors' => ['test_string'], + 'internal_ticket_number' => 'test_string' + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testFailureWebhook() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(FailureWebhook::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testFailureWebhook() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -92,8 +81,8 @@ public function testPropertyAccountId() */ public function testPropertyPhoneNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPhoneNumber()); + $this->assertEquals('test_string', self::$instance->getPhoneNumber()); } /** @@ -101,8 +90,8 @@ public function testPropertyPhoneNumber() */ public function testPropertyErrorCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getErrorCode()); + $this->assertEquals('test_string', self::$instance->getErrorCode()); } /** @@ -110,8 +99,8 @@ public function testPropertyErrorCode() */ public function testPropertyErrorMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getErrorMessage()); + $this->assertEquals('test_string', self::$instance->getErrorMessage()); } /** @@ -119,8 +108,8 @@ public function testPropertyErrorMessage() */ public function testPropertyErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getErrors()); + $this->assertEquals(['test_string'], self::$instance->getErrors()); } /** @@ -128,7 +117,6 @@ public function testPropertyErrors() */ public function testPropertyInternalTicketNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getInternalTicketNumber()); + $this->assertEquals('test_string', self::$instance->getInternalTicketNumber()); + }} diff --git a/tests/Unit/Model/FieldErrorTest.php b/tests/Unit/Model/FieldErrorTest.php index 0b5c8095..9001e49c 100644 --- a/tests/Unit/Model/FieldErrorTest.php +++ b/tests/Unit/Model/FieldErrorTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\FieldError; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,17 @@ */ class FieldErrorTest extends TestCase { + private static FieldError $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new FieldError([ + 'field_name' => 'test_string', + 'description' => 'test_string' + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testFieldError() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(FieldError::class, self::$instance); } /** @@ -83,8 +68,8 @@ public function testFieldError() */ public function testPropertyFieldName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFieldName()); + $this->assertEquals('test_string', self::$instance->getFieldName()); } /** @@ -92,7 +77,6 @@ public function testPropertyFieldName() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); + }} diff --git a/tests/Unit/Model/GatherCallbackTest.php b/tests/Unit/Model/GatherCallbackTest.php index 26c613c9..2202d30d 100644 --- a/tests/Unit/Model/GatherCallbackTest.php +++ b/tests/Unit/Model/GatherCallbackTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\GatherCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,33 @@ */ class GatherCallbackTest extends TestCase { + private static GatherCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new GatherCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'digits' => 'test_string', + 'call_url' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'parent_call_id' => 'test_string', + 'terminating_digit' => 'test_string', + 'transfer_caller_id' => 'test_string', + 'transfer_to' => 'test_string', + 'tag' => 'test_string' + ]); } /** @@ -74,8 +77,7 @@ public static function tearDownAfterClass(): void */ public function testGatherCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(GatherCallback::class, self::$instance); } /** @@ -83,8 +85,8 @@ public function testGatherCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +94,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +103,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +112,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +121,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +130,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +139,8 @@ public function testPropertyTo() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +148,8 @@ public function testPropertyDirection() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -155,8 +157,8 @@ public function testPropertyCallId() */ public function testPropertyDigits() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDigits()); + $this->assertEquals('test_string', self::$instance->getDigits()); } /** @@ -164,8 +166,8 @@ public function testPropertyDigits() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -173,8 +175,8 @@ public function testPropertyCallUrl() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -182,8 +184,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -191,8 +193,8 @@ public function testPropertyStartTime() */ public function testPropertyAnswerTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); } /** @@ -200,8 +202,8 @@ public function testPropertyAnswerTime() */ public function testPropertyParentCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getParentCallId()); + $this->assertEquals('test_string', self::$instance->getParentCallId()); } /** @@ -209,8 +211,8 @@ public function testPropertyParentCallId() */ public function testPropertyTerminatingDigit() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTerminatingDigit()); + $this->assertEquals('test_string', self::$instance->getTerminatingDigit()); } /** @@ -218,8 +220,8 @@ public function testPropertyTerminatingDigit() */ public function testPropertyTransferCallerId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferCallerId()); + $this->assertEquals('test_string', self::$instance->getTransferCallerId()); } /** @@ -227,8 +229,8 @@ public function testPropertyTransferCallerId() */ public function testPropertyTransferTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferTo()); + $this->assertEquals('test_string', self::$instance->getTransferTo()); } /** @@ -236,7 +238,6 @@ public function testPropertyTransferTo() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + }} diff --git a/tests/Unit/Model/GetAsyncBulkLookupResponseDataTest.php b/tests/Unit/Model/GetAsyncBulkLookupResponseDataTest.php index 6251e873..01025cbd 100644 --- a/tests/Unit/Model/GetAsyncBulkLookupResponseDataTest.php +++ b/tests/Unit/Model/GetAsyncBulkLookupResponseDataTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\GetAsyncBulkLookupResponseData; +use Bandwidth\Model\InProgressLookupStatusEnum; +use Bandwidth\Model\LookupResult; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,18 @@ */ class GetAsyncBulkLookupResponseDataTest extends TestCase { + private static GetAsyncBulkLookupResponseData $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new GetAsyncBulkLookupResponseData([ + 'request_id' => 'test_string', + 'status' => InProgressLookupStatusEnum::IN_PROGRESS, + 'results' => [new LookupResult([])] + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testGetAsyncBulkLookupResponseData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(GetAsyncBulkLookupResponseData::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testGetAsyncBulkLookupResponseData() */ public function testPropertyRequestId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRequestId()); + $this->assertEquals('test_string', self::$instance->getRequestId()); } /** @@ -92,8 +80,8 @@ public function testPropertyRequestId() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(InProgressLookupStatusEnum::class, self::$instance->getStatus()); + $this->assertSame(InProgressLookupStatusEnum::IN_PROGRESS, self::$instance->getStatus()); } /** @@ -101,7 +89,6 @@ public function testPropertyStatus() */ public function testPropertyResults() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getResults()); + $this->assertInstanceOf(LookupResult::class, self::$instance->getResults()[0]); + }} diff --git a/tests/Unit/Model/GetAsyncBulkLookupResponseTest.php b/tests/Unit/Model/GetAsyncBulkLookupResponseTest.php index e536672b..ce831d1b 100644 --- a/tests/Unit/Model/GetAsyncBulkLookupResponseTest.php +++ b/tests/Unit/Model/GetAsyncBulkLookupResponseTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\GetAsyncBulkLookupResponse; +use Bandwidth\Model\GetAsyncBulkLookupResponseData; +use Bandwidth\Model\LinkSchema; +use Bandwidth\Model\LookupErrorSchema; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,18 @@ */ class GetAsyncBulkLookupResponseTest extends TestCase { + private static GetAsyncBulkLookupResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new GetAsyncBulkLookupResponse([ + 'links' => [new LinkSchema([])], + 'data' => new GetAsyncBulkLookupResponseData([]), + 'errors' => [new LookupErrorSchema([])] + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testGetAsyncBulkLookupResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(GetAsyncBulkLookupResponse::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testGetAsyncBulkLookupResponse() */ public function testPropertyLinks() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getLinks()); + $this->assertInstanceOf(LinkSchema::class, self::$instance->getLinks()[0]); } /** @@ -92,8 +81,7 @@ public function testPropertyLinks() */ public function testPropertyData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(GetAsyncBulkLookupResponseData::class, self::$instance->getData()); } /** @@ -101,7 +89,6 @@ public function testPropertyData() */ public function testPropertyErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getErrors()); + $this->assertInstanceOf(LookupErrorSchema::class, self::$instance->getErrors()[0]); + }} diff --git a/tests/Unit/Model/InboundCallbackMessageTest.php b/tests/Unit/Model/InboundCallbackMessageTest.php index 02d25784..d8714c54 100644 --- a/tests/Unit/Model/InboundCallbackMessageTest.php +++ b/tests/Unit/Model/InboundCallbackMessageTest.php @@ -28,6 +28,14 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\InboundCallbackMessage; +use Bandwidth\Model\MessageDirectionEnum; +use Bandwidth\Model\MultiChannelMessageChannelEnum; +use Bandwidth\Model\MultiChannelMessageContent; +use Bandwidth\Model\PriorityEnum; +use Bandwidth\Model\RbmLocationResponse; +use Bandwidth\Model\RbmSuggestionResponse; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +48,31 @@ */ class InboundCallbackMessageTest extends TestCase { + private static InboundCallbackMessage $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new InboundCallbackMessage([ + 'id' => 'test_string', + 'owner' => 'test_string', + 'application_id' => 'test_string', + 'time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'segment_count' => 1, + 'direction' => MessageDirectionEnum::IN, + 'to' => ['test_string'], + 'from' => 'test_string', + 'text' => 'test_string', + 'tag' => 'test_string', + 'media' => ['test_string'], + 'priority' => PriorityEnum::_DEFAULT, + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => new MultiChannelMessageContent([]), + 'suggestion_response' => new RbmSuggestionResponse([]), + 'location_response' => new RbmLocationResponse([]) + ]); } /** @@ -74,8 +80,7 @@ public static function tearDownAfterClass(): void */ public function testInboundCallbackMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(InboundCallbackMessage::class, self::$instance); } /** @@ -83,8 +88,8 @@ public function testInboundCallbackMessage() */ public function testPropertyId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getId()); + $this->assertEquals('test_string', self::$instance->getId()); } /** @@ -92,8 +97,8 @@ public function testPropertyId() */ public function testPropertyOwner() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getOwner()); + $this->assertEquals('test_string', self::$instance->getOwner()); } /** @@ -101,8 +106,8 @@ public function testPropertyOwner() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -110,8 +115,8 @@ public function testPropertyApplicationId() */ public function testPropertyTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getTime()); } /** @@ -119,8 +124,8 @@ public function testPropertyTime() */ public function testPropertySegmentCount() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getSegmentCount()); + $this->assertEquals(1, self::$instance->getSegmentCount()); } /** @@ -128,8 +133,8 @@ public function testPropertySegmentCount() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MessageDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(MessageDirectionEnum::IN, self::$instance->getDirection()); } /** @@ -137,8 +142,8 @@ public function testPropertyDirection() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getTo()); + $this->assertEquals(['test_string'], self::$instance->getTo()); } /** @@ -146,8 +151,8 @@ public function testPropertyTo() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -155,8 +160,8 @@ public function testPropertyFrom() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -164,8 +169,8 @@ public function testPropertyText() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -173,8 +178,8 @@ public function testPropertyTag() */ public function testPropertyMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getMedia()); + $this->assertEquals(['test_string'], self::$instance->getMedia()); } /** @@ -182,8 +187,8 @@ public function testPropertyMedia() */ public function testPropertyPriority() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(PriorityEnum::class, self::$instance->getPriority()); + $this->assertSame(PriorityEnum::_DEFAULT, self::$instance->getPriority()); } /** @@ -191,8 +196,8 @@ public function testPropertyPriority() */ public function testPropertyChannel() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelMessageChannelEnum::class, self::$instance->getChannel()); + $this->assertSame(MultiChannelMessageChannelEnum::RBM, self::$instance->getChannel()); } /** @@ -200,8 +205,7 @@ public function testPropertyChannel() */ public function testPropertyContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelMessageContent::class, self::$instance->getContent()); } /** @@ -209,8 +213,7 @@ public function testPropertyContent() */ public function testPropertySuggestionResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmSuggestionResponse::class, self::$instance->getSuggestionResponse()); } /** @@ -218,7 +221,5 @@ public function testPropertySuggestionResponse() */ public function testPropertyLocationResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(RbmLocationResponse::class, self::$instance->getLocationResponse()); + }} diff --git a/tests/Unit/Model/InboundCallbackTest.php b/tests/Unit/Model/InboundCallbackTest.php index 76c9f38d..66df754e 100644 --- a/tests/Unit/Model/InboundCallbackTest.php +++ b/tests/Unit/Model/InboundCallbackTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\InboundCallback; +use Bandwidth\Model\InboundCallbackMessage; +use Bandwidth\Model\InboundCallbackTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,21 @@ */ class InboundCallbackTest extends TestCase { + private static InboundCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new InboundCallback([ + 'time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'type' => InboundCallbackTypeEnum::MESSAGE_RECEIVED, + 'to' => 'test_string', + 'description' => 'test_string', + 'message' => new InboundCallbackMessage([]), + 'carrier_name' => 'test_string' + ]); } /** @@ -74,8 +66,7 @@ public static function tearDownAfterClass(): void */ public function testInboundCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(InboundCallback::class, self::$instance); } /** @@ -83,8 +74,8 @@ public function testInboundCallback() */ public function testPropertyTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getTime()); } /** @@ -92,8 +83,8 @@ public function testPropertyTime() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(InboundCallbackTypeEnum::class, self::$instance->getType()); + $this->assertSame(InboundCallbackTypeEnum::MESSAGE_RECEIVED, self::$instance->getType()); } /** @@ -101,8 +92,8 @@ public function testPropertyType() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -110,8 +101,8 @@ public function testPropertyTo() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); } /** @@ -119,8 +110,7 @@ public function testPropertyDescription() */ public function testPropertyMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(InboundCallbackMessage::class, self::$instance->getMessage()); } /** @@ -128,7 +118,6 @@ public function testPropertyMessage() */ public function testPropertyCarrierName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getCarrierName()); + $this->assertEquals('test_string', self::$instance->getCarrierName()); + }} diff --git a/tests/Unit/Model/InitiateCallbackTest.php b/tests/Unit/Model/InitiateCallbackTest.php index 495271b9..c2a12e11 100644 --- a/tests/Unit/Model/InitiateCallbackTest.php +++ b/tests/Unit/Model/InitiateCallbackTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\Diversion; +use Bandwidth\Model\InitiateCallback; +use Bandwidth\Model\StirShaken; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,28 @@ */ class InitiateCallbackTest extends TestCase { + private static InitiateCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new InitiateCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'call_url' => 'test_string', + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'diversion' => new Diversion([]), + 'stir_shaken' => new StirShaken([]), + 'uui' => 'test_string' + ]); } /** @@ -74,8 +74,7 @@ public static function tearDownAfterClass(): void */ public function testInitiateCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(InitiateCallback::class, self::$instance); } /** @@ -83,8 +82,8 @@ public function testInitiateCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +91,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +100,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +109,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +118,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +127,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +136,8 @@ public function testPropertyTo() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +145,8 @@ public function testPropertyDirection() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -155,8 +154,8 @@ public function testPropertyCallId() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -164,8 +163,8 @@ public function testPropertyCallUrl() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -173,8 +172,7 @@ public function testPropertyStartTime() */ public function testPropertyDiversion() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Diversion::class, self::$instance->getDiversion()); } /** @@ -182,8 +180,7 @@ public function testPropertyDiversion() */ public function testPropertyStirShaken() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(StirShaken::class, self::$instance->getStirShaken()); } /** @@ -191,7 +188,6 @@ public function testPropertyStirShaken() */ public function testPropertyUui() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getUui()); + $this->assertEquals('test_string', self::$instance->getUui()); + }} diff --git a/tests/Unit/Model/LinkSchemaTest.php b/tests/Unit/Model/LinkSchemaTest.php index 45af0232..da89a17c 100644 --- a/tests/Unit/Model/LinkSchemaTest.php +++ b/tests/Unit/Model/LinkSchemaTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\LinkSchema; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,18 @@ */ class LinkSchemaTest extends TestCase { + private static LinkSchema $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new LinkSchema([ + 'href' => 'test_string', + 'rel' => 'test_string', + 'method' => 'test_string' + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testLinkSchema() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(LinkSchema::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testLinkSchema() */ public function testPropertyHref() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getHref()); + $this->assertEquals('test_string', self::$instance->getHref()); } /** @@ -92,8 +78,8 @@ public function testPropertyHref() */ public function testPropertyRel() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRel()); + $this->assertEquals('test_string', self::$instance->getRel()); } /** @@ -101,7 +87,6 @@ public function testPropertyRel() */ public function testPropertyMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getMethod()); + $this->assertEquals('test_string', self::$instance->getMethod()); + }} diff --git a/tests/Unit/Model/LinkTest.php b/tests/Unit/Model/LinkTest.php index fa5ec2d4..6a46a911 100644 --- a/tests/Unit/Model/LinkTest.php +++ b/tests/Unit/Model/LinkTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Link; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,17 @@ */ class LinkTest extends TestCase { + private static Link $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new Link([ + 'rel' => 'test_string', + 'href' => 'test_string' + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testLink() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Link::class, self::$instance); } /** @@ -83,8 +68,8 @@ public function testLink() */ public function testPropertyRel() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRel()); + $this->assertEquals('test_string', self::$instance->getRel()); } /** @@ -92,7 +77,6 @@ public function testPropertyRel() */ public function testPropertyHref() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getHref()); + $this->assertEquals('test_string', self::$instance->getHref()); + }} diff --git a/tests/Unit/Model/LinksObjectTest.php b/tests/Unit/Model/LinksObjectTest.php index 62d81394..594aab0c 100644 --- a/tests/Unit/Model/LinksObjectTest.php +++ b/tests/Unit/Model/LinksObjectTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\LinksObject; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,19 @@ */ class LinksObjectTest extends TestCase { + private static LinksObject $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new LinksObject([ + 'first' => 'test_string', + 'next' => 'test_string', + 'previous' => 'test_string', + 'last' => 'test_string' + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testLinksObject() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(LinksObject::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testLinksObject() */ public function testPropertyFirst() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFirst()); + $this->assertEquals('test_string', self::$instance->getFirst()); } /** @@ -92,8 +79,8 @@ public function testPropertyFirst() */ public function testPropertyNext() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getNext()); + $this->assertEquals('test_string', self::$instance->getNext()); } /** @@ -101,8 +88,8 @@ public function testPropertyNext() */ public function testPropertyPrevious() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPrevious()); + $this->assertEquals('test_string', self::$instance->getPrevious()); } /** @@ -110,7 +97,6 @@ public function testPropertyPrevious() */ public function testPropertyLast() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getLast()); + $this->assertEquals('test_string', self::$instance->getLast()); + }} diff --git a/tests/Unit/Model/ListEndpointsResponseTest.php b/tests/Unit/Model/ListEndpointsResponseTest.php index 0178c85e..e43c31ce 100644 --- a/tests/Unit/Model/ListEndpointsResponseTest.php +++ b/tests/Unit/Model/ListEndpointsResponseTest.php @@ -28,6 +28,12 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\BrtcError; +use Bandwidth\Model\BrtcLink; +use Bandwidth\Model\Endpoints; +use Bandwidth\Model\ListEndpointsResponse; +use Bandwidth\Model\Page; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +46,19 @@ */ class ListEndpointsResponseTest extends TestCase { + private static ListEndpointsResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new ListEndpointsResponse([ + 'links' => [new BrtcLink([])], + 'page' => new Page([]), + 'data' => [new Endpoints([])], + 'errors' => [new BrtcError([])] + ]); } /** @@ -74,8 +66,7 @@ public static function tearDownAfterClass(): void */ public function testListEndpointsResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ListEndpointsResponse::class, self::$instance); } /** @@ -83,8 +74,8 @@ public function testListEndpointsResponse() */ public function testPropertyLinks() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getLinks()); + $this->assertInstanceOf(BrtcLink::class, self::$instance->getLinks()[0]); } /** @@ -92,8 +83,7 @@ public function testPropertyLinks() */ public function testPropertyPage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Page::class, self::$instance->getPage()); } /** @@ -101,8 +91,8 @@ public function testPropertyPage() */ public function testPropertyData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getData()); + $this->assertInstanceOf(Endpoints::class, self::$instance->getData()[0]); } /** @@ -110,7 +100,6 @@ public function testPropertyData() */ public function testPropertyErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getErrors()); + $this->assertInstanceOf(BrtcError::class, self::$instance->getErrors()[0]); + }} diff --git a/tests/Unit/Model/ListMessageItemTest.php b/tests/Unit/Model/ListMessageItemTest.php index 07b3b2bd..c0bff340 100644 --- a/tests/Unit/Model/ListMessageItemTest.php +++ b/tests/Unit/Model/ListMessageItemTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ListMessageDirectionEnum; +use Bandwidth\Model\ListMessageItem; +use Bandwidth\Model\MessageStatusEnum; +use Bandwidth\Model\MessageTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,38 @@ */ class ListMessageItemTest extends TestCase { + private static ListMessageItem $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new ListMessageItem([ + 'message_id' => 'test_string', + 'account_id' => 'test_string', + 'source_tn' => 'test_string', + 'destination_tn' => 'test_string', + 'message_status' => MessageStatusEnum::RECEIVED, + 'message_direction' => ListMessageDirectionEnum::INBOUND, + 'message_type' => MessageTypeEnum::SMS, + 'segment_count' => 1, + 'error_code' => 1, + 'receive_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'carrier_name' => 'test_string', + 'message_size' => 1, + 'message_length' => 1, + 'attachment_count' => 1, + 'recipient_count' => 1, + 'campaign_class' => 'test_string', + 'campaign_id' => 'test_string', + 'bw_latency' => 1, + 'carrier_latency' => 1, + 'calling_number_country_a3' => 'test_string', + 'called_number_country_a3' => 'test_string', + 'product' => 'test_string', + 'location' => 'test_string' + ]); } /** @@ -74,8 +84,7 @@ public static function tearDownAfterClass(): void */ public function testListMessageItem() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ListMessageItem::class, self::$instance); } /** @@ -83,8 +92,8 @@ public function testListMessageItem() */ public function testPropertyMessageId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getMessageId()); + $this->assertEquals('test_string', self::$instance->getMessageId()); } /** @@ -92,8 +101,8 @@ public function testPropertyMessageId() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -101,8 +110,8 @@ public function testPropertyAccountId() */ public function testPropertySourceTn() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getSourceTn()); + $this->assertEquals('test_string', self::$instance->getSourceTn()); } /** @@ -110,8 +119,8 @@ public function testPropertySourceTn() */ public function testPropertyDestinationTn() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDestinationTn()); + $this->assertEquals('test_string', self::$instance->getDestinationTn()); } /** @@ -119,8 +128,8 @@ public function testPropertyDestinationTn() */ public function testPropertyMessageStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MessageStatusEnum::class, self::$instance->getMessageStatus()); + $this->assertSame(MessageStatusEnum::RECEIVED, self::$instance->getMessageStatus()); } /** @@ -128,8 +137,8 @@ public function testPropertyMessageStatus() */ public function testPropertyMessageDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ListMessageDirectionEnum::class, self::$instance->getMessageDirection()); + $this->assertSame(ListMessageDirectionEnum::INBOUND, self::$instance->getMessageDirection()); } /** @@ -137,8 +146,8 @@ public function testPropertyMessageDirection() */ public function testPropertyMessageType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MessageTypeEnum::class, self::$instance->getMessageType()); + $this->assertSame(MessageTypeEnum::SMS, self::$instance->getMessageType()); } /** @@ -146,8 +155,8 @@ public function testPropertyMessageType() */ public function testPropertySegmentCount() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getSegmentCount()); + $this->assertEquals(1, self::$instance->getSegmentCount()); } /** @@ -155,8 +164,8 @@ public function testPropertySegmentCount() */ public function testPropertyErrorCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getErrorCode()); + $this->assertEquals(1, self::$instance->getErrorCode()); } /** @@ -164,8 +173,8 @@ public function testPropertyErrorCode() */ public function testPropertyReceiveTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getReceiveTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getReceiveTime()); } /** @@ -173,8 +182,8 @@ public function testPropertyReceiveTime() */ public function testPropertyCarrierName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCarrierName()); + $this->assertEquals('test_string', self::$instance->getCarrierName()); } /** @@ -182,8 +191,8 @@ public function testPropertyCarrierName() */ public function testPropertyMessageSize() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getMessageSize()); + $this->assertEquals(1, self::$instance->getMessageSize()); } /** @@ -191,8 +200,8 @@ public function testPropertyMessageSize() */ public function testPropertyMessageLength() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getMessageLength()); + $this->assertEquals(1, self::$instance->getMessageLength()); } /** @@ -200,8 +209,8 @@ public function testPropertyMessageLength() */ public function testPropertyAttachmentCount() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getAttachmentCount()); + $this->assertEquals(1, self::$instance->getAttachmentCount()); } /** @@ -209,8 +218,8 @@ public function testPropertyAttachmentCount() */ public function testPropertyRecipientCount() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getRecipientCount()); + $this->assertEquals(1, self::$instance->getRecipientCount()); } /** @@ -218,8 +227,8 @@ public function testPropertyRecipientCount() */ public function testPropertyCampaignClass() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCampaignClass()); + $this->assertEquals('test_string', self::$instance->getCampaignClass()); } /** @@ -227,8 +236,8 @@ public function testPropertyCampaignClass() */ public function testPropertyCampaignId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCampaignId()); + $this->assertEquals('test_string', self::$instance->getCampaignId()); } /** @@ -236,8 +245,8 @@ public function testPropertyCampaignId() */ public function testPropertyBwLatency() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getBwLatency()); + $this->assertEquals(1, self::$instance->getBwLatency()); } /** @@ -245,8 +254,8 @@ public function testPropertyBwLatency() */ public function testPropertyCarrierLatency() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getCarrierLatency()); + $this->assertEquals(1, self::$instance->getCarrierLatency()); } /** @@ -254,8 +263,8 @@ public function testPropertyCarrierLatency() */ public function testPropertyCallingNumberCountryA3() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallingNumberCountryA3()); + $this->assertEquals('test_string', self::$instance->getCallingNumberCountryA3()); } /** @@ -263,8 +272,8 @@ public function testPropertyCallingNumberCountryA3() */ public function testPropertyCalledNumberCountryA3() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCalledNumberCountryA3()); + $this->assertEquals('test_string', self::$instance->getCalledNumberCountryA3()); } /** @@ -272,8 +281,8 @@ public function testPropertyCalledNumberCountryA3() */ public function testPropertyProduct() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getProduct()); + $this->assertEquals('test_string', self::$instance->getProduct()); } /** @@ -281,7 +290,6 @@ public function testPropertyProduct() */ public function testPropertyLocation() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getLocation()); + $this->assertEquals('test_string', self::$instance->getLocation()); + }} diff --git a/tests/Unit/Model/LookupErrorResponseTest.php b/tests/Unit/Model/LookupErrorResponseTest.php index 98ccc911..368203a4 100644 --- a/tests/Unit/Model/LookupErrorResponseTest.php +++ b/tests/Unit/Model/LookupErrorResponseTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\LinkSchema; +use Bandwidth\Model\LookupErrorResponse; +use Bandwidth\Model\LookupErrorSchema; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,18 @@ */ class LookupErrorResponseTest extends TestCase { + private static LookupErrorResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new LookupErrorResponse([ + 'links' => [new LinkSchema([])], + 'data' => (object) ['key' => 'value'], + 'errors' => [new LookupErrorSchema([])] + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testLookupErrorResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(LookupErrorResponse::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testLookupErrorResponse() */ public function testPropertyLinks() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getLinks()); + $this->assertInstanceOf(LinkSchema::class, self::$instance->getLinks()[0]); } /** @@ -92,8 +80,8 @@ public function testPropertyLinks() */ public function testPropertyData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsObject(self::$instance->getData()); + $this->assertEquals((object) ['key' => 'value'], self::$instance->getData()); } /** @@ -101,7 +89,6 @@ public function testPropertyData() */ public function testPropertyErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getErrors()); + $this->assertInstanceOf(LookupErrorSchema::class, self::$instance->getErrors()[0]); + }} diff --git a/tests/Unit/Model/LookupErrorSchemaMetaTest.php b/tests/Unit/Model/LookupErrorSchemaMetaTest.php index c878e1eb..3e5b4240 100644 --- a/tests/Unit/Model/LookupErrorSchemaMetaTest.php +++ b/tests/Unit/Model/LookupErrorSchemaMetaTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\LookupErrorSchemaMeta; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,18 @@ */ class LookupErrorSchemaMetaTest extends TestCase { + private static LookupErrorSchemaMeta $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new LookupErrorSchemaMeta([ + 'phone_numbers' => ['test_string'], + 'message' => 'test_string', + 'code' => 1 + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testLookupErrorSchemaMeta() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(LookupErrorSchemaMeta::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testLookupErrorSchemaMeta() */ public function testPropertyPhoneNumbers() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getPhoneNumbers()); + $this->assertEquals(['test_string'], self::$instance->getPhoneNumbers()); } /** @@ -92,8 +78,8 @@ public function testPropertyPhoneNumbers() */ public function testPropertyMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getMessage()); + $this->assertEquals('test_string', self::$instance->getMessage()); } /** @@ -101,7 +87,6 @@ public function testPropertyMessage() */ public function testPropertyCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsInt(self::$instance->getCode()); + $this->assertEquals(1, self::$instance->getCode()); + }} diff --git a/tests/Unit/Model/LookupErrorSchemaTest.php b/tests/Unit/Model/LookupErrorSchemaTest.php index dad03354..4d6f4ae8 100644 --- a/tests/Unit/Model/LookupErrorSchemaTest.php +++ b/tests/Unit/Model/LookupErrorSchemaTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\LookupErrorSchema; +use Bandwidth\Model\LookupErrorSchemaMeta; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,19 @@ */ class LookupErrorSchemaTest extends TestCase { + private static LookupErrorSchema $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new LookupErrorSchema([ + 'code' => 'test_string', + 'description' => 'test_string', + 'type' => 'test_string', + 'meta' => new LookupErrorSchemaMeta([]) + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testLookupErrorSchema() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(LookupErrorSchema::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testLookupErrorSchema() */ public function testPropertyCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCode()); + $this->assertEquals('test_string', self::$instance->getCode()); } /** @@ -92,8 +80,8 @@ public function testPropertyCode() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); } /** @@ -101,8 +89,8 @@ public function testPropertyDescription() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getType()); + $this->assertEquals('test_string', self::$instance->getType()); } /** @@ -110,7 +98,5 @@ public function testPropertyType() */ public function testPropertyMeta() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(LookupErrorSchemaMeta::class, self::$instance->getMeta()); + }} diff --git a/tests/Unit/Model/LookupResultTest.php b/tests/Unit/Model/LookupResultTest.php index 3065feec..69ab4e74 100644 --- a/tests/Unit/Model/LookupResultTest.php +++ b/tests/Unit/Model/LookupResultTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\DeactivationEventEnum; +use Bandwidth\Model\LatestMessageDeliveryStatusEnum; +use Bandwidth\Model\LineTypeEnum; +use Bandwidth\Model\LookupResult; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,27 @@ */ class LookupResultTest extends TestCase { + private static LookupResult $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new LookupResult([ + 'phone_number' => 'test_string', + 'line_type' => LineTypeEnum::FIXED, + 'messaging_provider' => 'test_string', + 'voice_provider' => 'test_string', + 'country_code_a3' => 'test_string', + 'deactivation_reporter' => 'test_string', + 'deactivation_date' => 'test_string', + 'deactivation_event' => DeactivationEventEnum::DEACTIVATED, + 'latest_message_delivery_status' => LatestMessageDeliveryStatusEnum::ACTIVE, + 'initial_message_delivery_status_date' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'latest_message_delivery_status_date' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'rcs_enabled' => true + ]); } /** @@ -74,8 +73,7 @@ public static function tearDownAfterClass(): void */ public function testLookupResult() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(LookupResult::class, self::$instance); } /** @@ -83,8 +81,8 @@ public function testLookupResult() */ public function testPropertyPhoneNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPhoneNumber()); + $this->assertEquals('test_string', self::$instance->getPhoneNumber()); } /** @@ -92,8 +90,8 @@ public function testPropertyPhoneNumber() */ public function testPropertyLineType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(LineTypeEnum::class, self::$instance->getLineType()); + $this->assertSame(LineTypeEnum::FIXED, self::$instance->getLineType()); } /** @@ -101,8 +99,8 @@ public function testPropertyLineType() */ public function testPropertyMessagingProvider() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getMessagingProvider()); + $this->assertEquals('test_string', self::$instance->getMessagingProvider()); } /** @@ -110,8 +108,8 @@ public function testPropertyMessagingProvider() */ public function testPropertyVoiceProvider() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getVoiceProvider()); + $this->assertEquals('test_string', self::$instance->getVoiceProvider()); } /** @@ -119,8 +117,8 @@ public function testPropertyVoiceProvider() */ public function testPropertyCountryCodeA3() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCountryCodeA3()); + $this->assertEquals('test_string', self::$instance->getCountryCodeA3()); } /** @@ -128,8 +126,8 @@ public function testPropertyCountryCodeA3() */ public function testPropertyDeactivationReporter() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDeactivationReporter()); + $this->assertEquals('test_string', self::$instance->getDeactivationReporter()); } /** @@ -137,8 +135,8 @@ public function testPropertyDeactivationReporter() */ public function testPropertyDeactivationDate() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDeactivationDate()); + $this->assertEquals('test_string', self::$instance->getDeactivationDate()); } /** @@ -146,8 +144,8 @@ public function testPropertyDeactivationDate() */ public function testPropertyDeactivationEvent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(DeactivationEventEnum::class, self::$instance->getDeactivationEvent()); + $this->assertSame(DeactivationEventEnum::DEACTIVATED, self::$instance->getDeactivationEvent()); } /** @@ -155,8 +153,8 @@ public function testPropertyDeactivationEvent() */ public function testPropertyLatestMessageDeliveryStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(LatestMessageDeliveryStatusEnum::class, self::$instance->getLatestMessageDeliveryStatus()); + $this->assertSame(LatestMessageDeliveryStatusEnum::ACTIVE, self::$instance->getLatestMessageDeliveryStatus()); } /** @@ -164,8 +162,8 @@ public function testPropertyLatestMessageDeliveryStatus() */ public function testPropertyInitialMessageDeliveryStatusDate() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getInitialMessageDeliveryStatusDate()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getInitialMessageDeliveryStatusDate()); } /** @@ -173,8 +171,8 @@ public function testPropertyInitialMessageDeliveryStatusDate() */ public function testPropertyLatestMessageDeliveryStatusDate() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getLatestMessageDeliveryStatusDate()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getLatestMessageDeliveryStatusDate()); } /** @@ -182,7 +180,6 @@ public function testPropertyLatestMessageDeliveryStatusDate() */ public function testPropertyRcsEnabled() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsBool(self::$instance->getRcsEnabled()); + $this->assertTrue(self::$instance->getRcsEnabled()); + }} diff --git a/tests/Unit/Model/MachineDetectionCompleteCallbackTest.php b/tests/Unit/Model/MachineDetectionCompleteCallbackTest.php index 8ab9778f..124f8f46 100644 --- a/tests/Unit/Model/MachineDetectionCompleteCallbackTest.php +++ b/tests/Unit/Model/MachineDetectionCompleteCallbackTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\MachineDetectionCompleteCallback; +use Bandwidth\Model\MachineDetectionResult; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,29 @@ */ class MachineDetectionCompleteCallbackTest extends TestCase { + private static MachineDetectionCompleteCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MachineDetectionCompleteCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'call_url' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'tag' => 'test_string', + 'machine_detection_result' => new MachineDetectionResult([]) + ]); } /** @@ -74,8 +74,7 @@ public static function tearDownAfterClass(): void */ public function testMachineDetectionCompleteCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MachineDetectionCompleteCallback::class, self::$instance); } /** @@ -83,8 +82,8 @@ public function testMachineDetectionCompleteCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +91,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +100,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +109,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +118,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +127,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +136,8 @@ public function testPropertyTo() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +145,8 @@ public function testPropertyDirection() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -155,8 +154,8 @@ public function testPropertyCallId() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -164,8 +163,8 @@ public function testPropertyCallUrl() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -173,8 +172,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -182,8 +181,8 @@ public function testPropertyStartTime() */ public function testPropertyAnswerTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); } /** @@ -191,8 +190,8 @@ public function testPropertyAnswerTime() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -200,7 +199,5 @@ public function testPropertyTag() */ public function testPropertyMachineDetectionResult() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(MachineDetectionResult::class, self::$instance->getMachineDetectionResult()); + }} diff --git a/tests/Unit/Model/MachineDetectionConfigurationTest.php b/tests/Unit/Model/MachineDetectionConfigurationTest.php index fb5e9653..a578744d 100644 --- a/tests/Unit/Model/MachineDetectionConfigurationTest.php +++ b/tests/Unit/Model/MachineDetectionConfigurationTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallbackMethodEnum; +use Bandwidth\Model\MachineDetectionConfiguration; +use Bandwidth\Model\MachineDetectionModeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,30 @@ */ class MachineDetectionConfigurationTest extends TestCase { + private static MachineDetectionConfiguration $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MachineDetectionConfiguration([ + 'mode' => MachineDetectionModeEnum::SYNC, + 'detection_timeout' => 1.5, + 'silence_timeout' => 1.5, + 'speech_threshold' => 1.5, + 'speech_end_threshold' => 1.5, + 'machine_speech_end_threshold' => 1.5, + 'delay_result' => true, + 'callback_url' => 'test_string', + 'callback_method' => CallbackMethodEnum::GET, + 'username' => 'test_string', + 'password' => 'test_string', + 'fallback_url' => 'test_string', + 'fallback_method' => CallbackMethodEnum::GET, + 'fallback_username' => 'test_string', + 'fallback_password' => 'test_string' + ]); } /** @@ -74,8 +75,7 @@ public static function tearDownAfterClass(): void */ public function testMachineDetectionConfiguration() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MachineDetectionConfiguration::class, self::$instance); } /** @@ -83,8 +83,8 @@ public function testMachineDetectionConfiguration() */ public function testPropertyMode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MachineDetectionModeEnum::class, self::$instance->getMode()); + $this->assertSame(MachineDetectionModeEnum::SYNC, self::$instance->getMode()); } /** @@ -92,8 +92,8 @@ public function testPropertyMode() */ public function testPropertyDetectionTimeout() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getDetectionTimeout()); + $this->assertEquals(1.5, self::$instance->getDetectionTimeout()); } /** @@ -101,8 +101,8 @@ public function testPropertyDetectionTimeout() */ public function testPropertySilenceTimeout() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getSilenceTimeout()); + $this->assertEquals(1.5, self::$instance->getSilenceTimeout()); } /** @@ -110,8 +110,8 @@ public function testPropertySilenceTimeout() */ public function testPropertySpeechThreshold() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getSpeechThreshold()); + $this->assertEquals(1.5, self::$instance->getSpeechThreshold()); } /** @@ -119,8 +119,8 @@ public function testPropertySpeechThreshold() */ public function testPropertySpeechEndThreshold() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getSpeechEndThreshold()); + $this->assertEquals(1.5, self::$instance->getSpeechEndThreshold()); } /** @@ -128,8 +128,8 @@ public function testPropertySpeechEndThreshold() */ public function testPropertyMachineSpeechEndThreshold() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getMachineSpeechEndThreshold()); + $this->assertEquals(1.5, self::$instance->getMachineSpeechEndThreshold()); } /** @@ -137,8 +137,8 @@ public function testPropertyMachineSpeechEndThreshold() */ public function testPropertyDelayResult() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsBool(self::$instance->getDelayResult()); + $this->assertTrue(self::$instance->getDelayResult()); } /** @@ -146,8 +146,8 @@ public function testPropertyDelayResult() */ public function testPropertyCallbackUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallbackUrl()); + $this->assertEquals('test_string', self::$instance->getCallbackUrl()); } /** @@ -155,8 +155,8 @@ public function testPropertyCallbackUrl() */ public function testPropertyCallbackMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallbackMethodEnum::class, self::$instance->getCallbackMethod()); + $this->assertSame(CallbackMethodEnum::GET, self::$instance->getCallbackMethod()); } /** @@ -164,8 +164,8 @@ public function testPropertyCallbackMethod() */ public function testPropertyUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUsername()); + $this->assertEquals('test_string', self::$instance->getUsername()); } /** @@ -173,8 +173,8 @@ public function testPropertyUsername() */ public function testPropertyPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPassword()); + $this->assertEquals('test_string', self::$instance->getPassword()); } /** @@ -182,8 +182,8 @@ public function testPropertyPassword() */ public function testPropertyFallbackUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFallbackUrl()); + $this->assertEquals('test_string', self::$instance->getFallbackUrl()); } /** @@ -191,8 +191,8 @@ public function testPropertyFallbackUrl() */ public function testPropertyFallbackMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallbackMethodEnum::class, self::$instance->getFallbackMethod()); + $this->assertSame(CallbackMethodEnum::GET, self::$instance->getFallbackMethod()); } /** @@ -200,8 +200,8 @@ public function testPropertyFallbackMethod() */ public function testPropertyFallbackUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFallbackUsername()); + $this->assertEquals('test_string', self::$instance->getFallbackUsername()); } /** @@ -209,7 +209,6 @@ public function testPropertyFallbackUsername() */ public function testPropertyFallbackPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getFallbackPassword()); + $this->assertEquals('test_string', self::$instance->getFallbackPassword()); + }} diff --git a/tests/Unit/Model/MachineDetectionResultTest.php b/tests/Unit/Model/MachineDetectionResultTest.php index 767307a0..2f0af84b 100644 --- a/tests/Unit/Model/MachineDetectionResultTest.php +++ b/tests/Unit/Model/MachineDetectionResultTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MachineDetectionResult; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,17 @@ */ class MachineDetectionResultTest extends TestCase { + private static MachineDetectionResult $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MachineDetectionResult([ + 'value' => 'test_string', + 'duration' => 'test_string' + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testMachineDetectionResult() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MachineDetectionResult::class, self::$instance); } /** @@ -83,8 +68,8 @@ public function testMachineDetectionResult() */ public function testPropertyValue() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getValue()); + $this->assertEquals('test_string', self::$instance->getValue()); } /** @@ -92,7 +77,6 @@ public function testPropertyValue() */ public function testPropertyDuration() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getDuration()); + $this->assertEquals('test_string', self::$instance->getDuration()); + }} diff --git a/tests/Unit/Model/MediaTest.php b/tests/Unit/Model/MediaTest.php index 3ab0c18f..659ebec7 100644 --- a/tests/Unit/Model/MediaTest.php +++ b/tests/Unit/Model/MediaTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Media; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,18 @@ */ class MediaTest extends TestCase { + private static Media $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new Media([ + 'content' => 'test_string', + 'content_length' => 1, + 'media_name' => 'test_string' + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Media::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testMedia() */ public function testPropertyContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getContent()); + $this->assertEquals('test_string', self::$instance->getContent()); } /** @@ -92,8 +78,8 @@ public function testPropertyContent() */ public function testPropertyContentLength() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getContentLength()); + $this->assertEquals(1, self::$instance->getContentLength()); } /** @@ -101,7 +87,6 @@ public function testPropertyContentLength() */ public function testPropertyMediaName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getMediaName()); + $this->assertEquals('test_string', self::$instance->getMediaName()); + }} diff --git a/tests/Unit/Model/MessageRequestTest.php b/tests/Unit/Model/MessageRequestTest.php index ffb49dca..babf9140 100644 --- a/tests/Unit/Model/MessageRequestTest.php +++ b/tests/Unit/Model/MessageRequestTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MessageRequest; +use Bandwidth\Model\PriorityEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,23 @@ */ class MessageRequestTest extends TestCase { + private static MessageRequest $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MessageRequest([ + 'application_id' => 'test_string', + 'to' => ['test_string'], + 'from' => 'test_string', + 'text' => 'test_string', + 'media' => ['test_string'], + 'tag' => 'test_string', + 'priority' => PriorityEnum::_DEFAULT, + 'expiration' => new \DateTime('2024-01-01T00:00:00+00:00') + ]); } /** @@ -74,8 +67,7 @@ public static function tearDownAfterClass(): void */ public function testMessageRequest() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MessageRequest::class, self::$instance); } /** @@ -83,8 +75,8 @@ public function testMessageRequest() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -92,8 +84,8 @@ public function testPropertyApplicationId() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getTo()); + $this->assertEquals(['test_string'], self::$instance->getTo()); } /** @@ -101,8 +93,8 @@ public function testPropertyTo() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -110,8 +102,8 @@ public function testPropertyFrom() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -119,8 +111,8 @@ public function testPropertyText() */ public function testPropertyMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getMedia()); + $this->assertEquals(['test_string'], self::$instance->getMedia()); } /** @@ -128,8 +120,8 @@ public function testPropertyMedia() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -137,8 +129,8 @@ public function testPropertyTag() */ public function testPropertyPriority() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(PriorityEnum::class, self::$instance->getPriority()); + $this->assertSame(PriorityEnum::_DEFAULT, self::$instance->getPriority()); } /** @@ -146,7 +138,6 @@ public function testPropertyPriority() */ public function testPropertyExpiration() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(\DateTime::class, self::$instance->getExpiration()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getExpiration()); + }} diff --git a/tests/Unit/Model/MessageTest.php b/tests/Unit/Model/MessageTest.php index 0178ea87..0beafff6 100644 --- a/tests/Unit/Model/MessageTest.php +++ b/tests/Unit/Model/MessageTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Message; +use Bandwidth\Model\MessageDirectionEnum; +use Bandwidth\Model\PriorityEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,28 @@ */ class MessageTest extends TestCase { + private static Message $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new Message([ + 'id' => 'test_string', + 'owner' => 'test_string', + 'application_id' => 'test_string', + 'time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'segment_count' => 1, + 'direction' => MessageDirectionEnum::IN, + 'to' => ['test_string'], + 'from' => 'test_string', + 'media' => ['test_string'], + 'text' => 'test_string', + 'tag' => 'test_string', + 'priority' => PriorityEnum::_DEFAULT, + 'expiration' => new \DateTime('2024-01-01T00:00:00+00:00') + ]); } /** @@ -74,8 +73,7 @@ public static function tearDownAfterClass(): void */ public function testMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Message::class, self::$instance); } /** @@ -83,8 +81,8 @@ public function testMessage() */ public function testPropertyId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getId()); + $this->assertEquals('test_string', self::$instance->getId()); } /** @@ -92,8 +90,8 @@ public function testPropertyId() */ public function testPropertyOwner() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getOwner()); + $this->assertEquals('test_string', self::$instance->getOwner()); } /** @@ -101,8 +99,8 @@ public function testPropertyOwner() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -110,8 +108,8 @@ public function testPropertyApplicationId() */ public function testPropertyTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getTime()); } /** @@ -119,8 +117,8 @@ public function testPropertyTime() */ public function testPropertySegmentCount() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getSegmentCount()); + $this->assertEquals(1, self::$instance->getSegmentCount()); } /** @@ -128,8 +126,8 @@ public function testPropertySegmentCount() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MessageDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(MessageDirectionEnum::IN, self::$instance->getDirection()); } /** @@ -137,8 +135,8 @@ public function testPropertyDirection() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getTo()); + $this->assertEquals(['test_string'], self::$instance->getTo()); } /** @@ -146,8 +144,8 @@ public function testPropertyTo() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -155,8 +153,8 @@ public function testPropertyFrom() */ public function testPropertyMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getMedia()); + $this->assertEquals(['test_string'], self::$instance->getMedia()); } /** @@ -164,8 +162,8 @@ public function testPropertyMedia() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -173,8 +171,8 @@ public function testPropertyText() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -182,8 +180,8 @@ public function testPropertyTag() */ public function testPropertyPriority() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(PriorityEnum::class, self::$instance->getPriority()); + $this->assertSame(PriorityEnum::_DEFAULT, self::$instance->getPriority()); } /** @@ -191,7 +189,6 @@ public function testPropertyPriority() */ public function testPropertyExpiration() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(\DateTime::class, self::$instance->getExpiration()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getExpiration()); + }} diff --git a/tests/Unit/Model/MessagesListTest.php b/tests/Unit/Model/MessagesListTest.php index d6832f57..48d09ed6 100644 --- a/tests/Unit/Model/MessagesListTest.php +++ b/tests/Unit/Model/MessagesListTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ListMessageItem; +use Bandwidth\Model\MessagesList; +use Bandwidth\Model\PageInfo; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,18 @@ */ class MessagesListTest extends TestCase { + private static MessagesList $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MessagesList([ + 'total_count' => 1, + 'page_info' => new PageInfo([]), + 'messages' => [new ListMessageItem([])] + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testMessagesList() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MessagesList::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testMessagesList() */ public function testPropertyTotalCount() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getTotalCount()); + $this->assertEquals(1, self::$instance->getTotalCount()); } /** @@ -92,8 +80,7 @@ public function testPropertyTotalCount() */ public function testPropertyPageInfo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(PageInfo::class, self::$instance->getPageInfo()); } /** @@ -101,7 +88,6 @@ public function testPropertyPageInfo() */ public function testPropertyMessages() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getMessages()); + $this->assertInstanceOf(ListMessageItem::class, self::$instance->getMessages()[0]); + }} diff --git a/tests/Unit/Model/MessagingCodeResponseTest.php b/tests/Unit/Model/MessagingCodeResponseTest.php index 946dac32..dfdd5b52 100644 --- a/tests/Unit/Model/MessagingCodeResponseTest.php +++ b/tests/Unit/Model/MessagingCodeResponseTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MessagingCodeResponse; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,16 @@ */ class MessagingCodeResponseTest extends TestCase { + private static MessagingCodeResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MessagingCodeResponse([ + 'message_id' => 'test_string' + ]); } /** @@ -74,8 +59,7 @@ public static function tearDownAfterClass(): void */ public function testMessagingCodeResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MessagingCodeResponse::class, self::$instance); } /** @@ -83,7 +67,6 @@ public function testMessagingCodeResponse() */ public function testPropertyMessageId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getMessageId()); + $this->assertEquals('test_string', self::$instance->getMessageId()); + }} diff --git a/tests/Unit/Model/MessagingRequestErrorTest.php b/tests/Unit/Model/MessagingRequestErrorTest.php index 4e682e56..054b390a 100644 --- a/tests/Unit/Model/MessagingRequestErrorTest.php +++ b/tests/Unit/Model/MessagingRequestErrorTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MessagingRequestError; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,17 @@ */ class MessagingRequestErrorTest extends TestCase { + private static MessagingRequestError $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MessagingRequestError([ + 'type' => 'test_string', + 'description' => 'test_string' + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testMessagingRequestError() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MessagingRequestError::class, self::$instance); } /** @@ -83,8 +68,8 @@ public function testMessagingRequestError() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getType()); + $this->assertEquals('test_string', self::$instance->getType()); } /** @@ -92,7 +77,6 @@ public function testPropertyType() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); + }} diff --git a/tests/Unit/Model/MfaForbiddenRequestErrorTest.php b/tests/Unit/Model/MfaForbiddenRequestErrorTest.php index 259e4738..bc867075 100644 --- a/tests/Unit/Model/MfaForbiddenRequestErrorTest.php +++ b/tests/Unit/Model/MfaForbiddenRequestErrorTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MfaForbiddenRequestError; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,16 @@ */ class MfaForbiddenRequestErrorTest extends TestCase { + private static MfaForbiddenRequestError $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MfaForbiddenRequestError([ + 'message' => 'test_string' + ]); } /** @@ -74,8 +59,7 @@ public static function tearDownAfterClass(): void */ public function testMfaForbiddenRequestError() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MfaForbiddenRequestError::class, self::$instance); } /** @@ -83,7 +67,6 @@ public function testMfaForbiddenRequestError() */ public function testPropertyMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getMessage()); + $this->assertEquals('test_string', self::$instance->getMessage()); + }} diff --git a/tests/Unit/Model/MfaRequestErrorTest.php b/tests/Unit/Model/MfaRequestErrorTest.php index 889f3dc8..bc2cd6d3 100644 --- a/tests/Unit/Model/MfaRequestErrorTest.php +++ b/tests/Unit/Model/MfaRequestErrorTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MfaRequestError; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,17 @@ */ class MfaRequestErrorTest extends TestCase { + private static MfaRequestError $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MfaRequestError([ + 'error' => 'test_string', + 'request_id' => 'test_string' + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testMfaRequestError() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MfaRequestError::class, self::$instance); } /** @@ -83,8 +68,8 @@ public function testMfaRequestError() */ public function testPropertyError() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getError()); + $this->assertEquals('test_string', self::$instance->getError()); } /** @@ -92,7 +77,6 @@ public function testPropertyError() */ public function testPropertyRequestId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getRequestId()); + $this->assertEquals('test_string', self::$instance->getRequestId()); + }} diff --git a/tests/Unit/Model/MfaUnauthorizedRequestErrorTest.php b/tests/Unit/Model/MfaUnauthorizedRequestErrorTest.php index 257ca9c6..294e04f7 100644 --- a/tests/Unit/Model/MfaUnauthorizedRequestErrorTest.php +++ b/tests/Unit/Model/MfaUnauthorizedRequestErrorTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MfaUnauthorizedRequestError; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,16 @@ */ class MfaUnauthorizedRequestErrorTest extends TestCase { + private static MfaUnauthorizedRequestError $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MfaUnauthorizedRequestError([ + 'message' => 'test_string' + ]); } /** @@ -74,8 +59,7 @@ public static function tearDownAfterClass(): void */ public function testMfaUnauthorizedRequestError() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MfaUnauthorizedRequestError::class, self::$instance); } /** @@ -83,7 +67,6 @@ public function testMfaUnauthorizedRequestError() */ public function testPropertyMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getMessage()); + $this->assertEquals('test_string', self::$instance->getMessage()); + }} diff --git a/tests/Unit/Model/MmsMessageContentFileTest.php b/tests/Unit/Model/MmsMessageContentFileTest.php index 9aa156cf..1651ec3f 100644 --- a/tests/Unit/Model/MmsMessageContentFileTest.php +++ b/tests/Unit/Model/MmsMessageContentFileTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MmsMessageContentFile; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,16 @@ */ class MmsMessageContentFileTest extends TestCase { + private static MmsMessageContentFile $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MmsMessageContentFile([ + 'file_url' => 'test_string' + ]); } /** @@ -74,8 +59,7 @@ public static function tearDownAfterClass(): void */ public function testMmsMessageContentFile() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MmsMessageContentFile::class, self::$instance); } /** @@ -83,7 +67,6 @@ public function testMmsMessageContentFile() */ public function testPropertyFileUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getFileUrl()); + $this->assertEquals('test_string', self::$instance->getFileUrl()); + }} diff --git a/tests/Unit/Model/MmsMessageContentTest.php b/tests/Unit/Model/MmsMessageContentTest.php index a133d73e..5e11f127 100644 --- a/tests/Unit/Model/MmsMessageContentTest.php +++ b/tests/Unit/Model/MmsMessageContentTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MmsMessageContent; +use Bandwidth\Model\MmsMessageContentFile; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,17 @@ */ class MmsMessageContentTest extends TestCase { + private static MmsMessageContent $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MmsMessageContent([ + 'text' => 'test_string', + 'media' => [new MmsMessageContentFile([])] + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testMmsMessageContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MmsMessageContent::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testMmsMessageContent() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -92,7 +78,6 @@ public function testPropertyText() */ public function testPropertyMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getMedia()); + $this->assertInstanceOf(MmsMessageContentFile::class, self::$instance->getMedia()[0]); + }} diff --git a/tests/Unit/Model/MultiChannelActionCalendarEventTest.php b/tests/Unit/Model/MultiChannelActionCalendarEventTest.php index 7cae5a20..92e1b324 100644 --- a/tests/Unit/Model/MultiChannelActionCalendarEventTest.php +++ b/tests/Unit/Model/MultiChannelActionCalendarEventTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelActionCalendarEvent; +use Bandwidth\Model\RbmActionTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,22 @@ */ class MultiChannelActionCalendarEventTest extends TestCase { + private static MultiChannelActionCalendarEvent $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MultiChannelActionCalendarEvent([ + 'type' => RbmActionTypeEnum::REPLY, + 'text' => 'test_string', + 'postback_data' => 'test_string', + 'title' => 'test_string', + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'end_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'description' => 'test_string' + ]); } /** @@ -74,8 +66,7 @@ public static function tearDownAfterClass(): void */ public function testMultiChannelActionCalendarEvent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelActionCalendarEvent::class, self::$instance); } /** @@ -83,8 +74,8 @@ public function testMultiChannelActionCalendarEvent() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmActionTypeEnum::class, self::$instance->getType()); + $this->assertSame(RbmActionTypeEnum::REPLY, self::$instance->getType()); } /** @@ -92,8 +83,8 @@ public function testPropertyType() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -101,8 +92,8 @@ public function testPropertyText() */ public function testPropertyPostbackData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPostbackData()); + $this->assertEquals('test_string', self::$instance->getPostbackData()); } /** @@ -110,8 +101,8 @@ public function testPropertyPostbackData() */ public function testPropertyTitle() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTitle()); + $this->assertEquals('test_string', self::$instance->getTitle()); } /** @@ -119,8 +110,8 @@ public function testPropertyTitle() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -128,8 +119,8 @@ public function testPropertyStartTime() */ public function testPropertyEndTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEndTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEndTime()); } /** @@ -137,7 +128,6 @@ public function testPropertyEndTime() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); + }} diff --git a/tests/Unit/Model/MultiChannelChannelListMMSObjectTest.php b/tests/Unit/Model/MultiChannelChannelListMMSObjectTest.php index b85d1604..cc28f8f0 100644 --- a/tests/Unit/Model/MultiChannelChannelListMMSObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListMMSObjectTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MmsMessageContent; +use Bandwidth\Model\MultiChannelChannelListMMSObject; +use Bandwidth\Model\MultiChannelMessageChannelEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,19 @@ */ class MultiChannelChannelListMMSObjectTest extends TestCase { + private static MultiChannelChannelListMMSObject $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MultiChannelChannelListMMSObject([ + 'from' => 'test_string', + 'application_id' => 'test_string', + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => new MmsMessageContent([]) + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testMultiChannelChannelListMMSObject() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelChannelListMMSObject::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testMultiChannelChannelListMMSObject() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -92,8 +81,8 @@ public function testPropertyFrom() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -101,8 +90,8 @@ public function testPropertyApplicationId() */ public function testPropertyChannel() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelMessageChannelEnum::class, self::$instance->getChannel()); + $this->assertSame(MultiChannelMessageChannelEnum::RBM, self::$instance->getChannel()); } /** @@ -110,7 +99,5 @@ public function testPropertyChannel() */ public function testPropertyContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(MmsMessageContent::class, self::$instance->getContent()); + }} diff --git a/tests/Unit/Model/MultiChannelChannelListMMSResponseObjectTest.php b/tests/Unit/Model/MultiChannelChannelListMMSResponseObjectTest.php index d829d21a..28776c96 100644 --- a/tests/Unit/Model/MultiChannelChannelListMMSResponseObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListMMSResponseObjectTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MmsMessageContent; +use Bandwidth\Model\MultiChannelChannelListMMSResponseObject; +use Bandwidth\Model\MultiChannelMessageChannelEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,20 @@ */ class MultiChannelChannelListMMSResponseObjectTest extends TestCase { + private static MultiChannelChannelListMMSResponseObject $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MultiChannelChannelListMMSResponseObject([ + 'from' => 'test_string', + 'application_id' => 'test_string', + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => new MmsMessageContent([]), + 'owner' => 'test_string' + ]); } /** @@ -74,8 +65,7 @@ public static function tearDownAfterClass(): void */ public function testMultiChannelChannelListMMSResponseObject() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelChannelListMMSResponseObject::class, self::$instance); } /** @@ -83,8 +73,8 @@ public function testMultiChannelChannelListMMSResponseObject() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -92,8 +82,8 @@ public function testPropertyFrom() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -101,8 +91,8 @@ public function testPropertyApplicationId() */ public function testPropertyChannel() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelMessageChannelEnum::class, self::$instance->getChannel()); + $this->assertSame(MultiChannelMessageChannelEnum::RBM, self::$instance->getChannel()); } /** @@ -110,8 +100,7 @@ public function testPropertyChannel() */ public function testPropertyContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MmsMessageContent::class, self::$instance->getContent()); } /** @@ -119,7 +108,6 @@ public function testPropertyContent() */ public function testPropertyOwner() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getOwner()); + $this->assertEquals('test_string', self::$instance->getOwner()); + }} diff --git a/tests/Unit/Model/MultiChannelChannelListObjectBaseTest.php b/tests/Unit/Model/MultiChannelChannelListObjectBaseTest.php index c6e1fc10..2a1b3f5c 100644 --- a/tests/Unit/Model/MultiChannelChannelListObjectBaseTest.php +++ b/tests/Unit/Model/MultiChannelChannelListObjectBaseTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelChannelListObjectBase; +use Bandwidth\Model\MultiChannelMessageChannelEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,18 @@ */ class MultiChannelChannelListObjectBaseTest extends TestCase { + private static MultiChannelChannelListObjectBase $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MultiChannelChannelListObjectBase([ + 'from' => 'test_string', + 'application_id' => 'test_string', + 'channel' => MultiChannelMessageChannelEnum::RBM + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testMultiChannelChannelListObjectBase() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelChannelListObjectBase::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testMultiChannelChannelListObjectBase() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -92,8 +79,8 @@ public function testPropertyFrom() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -101,7 +88,6 @@ public function testPropertyApplicationId() */ public function testPropertyChannel() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(MultiChannelMessageChannelEnum::class, self::$instance->getChannel()); + $this->assertSame(MultiChannelMessageChannelEnum::RBM, self::$instance->getChannel()); + }} diff --git a/tests/Unit/Model/MultiChannelChannelListOwnerObjectTest.php b/tests/Unit/Model/MultiChannelChannelListOwnerObjectTest.php index d262980d..7fefe739 100644 --- a/tests/Unit/Model/MultiChannelChannelListOwnerObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListOwnerObjectTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelChannelListOwnerObject; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,16 @@ */ class MultiChannelChannelListOwnerObjectTest extends TestCase { + private static MultiChannelChannelListOwnerObject $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MultiChannelChannelListOwnerObject([ + 'owner' => 'test_string' + ]); } /** @@ -74,8 +59,7 @@ public static function tearDownAfterClass(): void */ public function testMultiChannelChannelListOwnerObject() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelChannelListOwnerObject::class, self::$instance); } /** @@ -83,7 +67,6 @@ public function testMultiChannelChannelListOwnerObject() */ public function testPropertyOwner() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getOwner()); + $this->assertEquals('test_string', self::$instance->getOwner()); + }} diff --git a/tests/Unit/Model/MultiChannelChannelListRBMObjectTest.php b/tests/Unit/Model/MultiChannelChannelListRBMObjectTest.php index 9db4ef3f..45ab0b1b 100644 --- a/tests/Unit/Model/MultiChannelChannelListRBMObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListRBMObjectTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelChannelListRBMObject; +use Bandwidth\Model\MultiChannelMessageChannelEnum; +use Bandwidth\Model\RbmMessageContentText; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,19 @@ */ class MultiChannelChannelListRBMObjectTest extends TestCase { + private static MultiChannelChannelListRBMObject $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MultiChannelChannelListRBMObject([ + 'from' => 'test_string', + 'application_id' => 'test_string', + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => new RbmMessageContentText([]) + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testMultiChannelChannelListRBMObject() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelChannelListRBMObject::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testMultiChannelChannelListRBMObject() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -92,8 +81,8 @@ public function testPropertyFrom() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -101,8 +90,8 @@ public function testPropertyApplicationId() */ public function testPropertyChannel() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelMessageChannelEnum::class, self::$instance->getChannel()); + $this->assertSame(MultiChannelMessageChannelEnum::RBM, self::$instance->getChannel()); } /** @@ -110,7 +99,5 @@ public function testPropertyChannel() */ public function testPropertyContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(RbmMessageContentText::class, self::$instance->getContent()); + }} diff --git a/tests/Unit/Model/MultiChannelChannelListRBMResponseObjectTest.php b/tests/Unit/Model/MultiChannelChannelListRBMResponseObjectTest.php index 5f878a15..2ac362e4 100644 --- a/tests/Unit/Model/MultiChannelChannelListRBMResponseObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListRBMResponseObjectTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelChannelListRBMResponseObject; +use Bandwidth\Model\MultiChannelMessageChannelEnum; +use Bandwidth\Model\RbmMessageContentText; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,20 @@ */ class MultiChannelChannelListRBMResponseObjectTest extends TestCase { + private static MultiChannelChannelListRBMResponseObject $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MultiChannelChannelListRBMResponseObject([ + 'from' => 'test_string', + 'application_id' => 'test_string', + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => new RbmMessageContentText([]), + 'owner' => 'test_string' + ]); } /** @@ -74,8 +65,7 @@ public static function tearDownAfterClass(): void */ public function testMultiChannelChannelListRBMResponseObject() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, self::$instance); } /** @@ -83,8 +73,8 @@ public function testMultiChannelChannelListRBMResponseObject() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -92,8 +82,8 @@ public function testPropertyFrom() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -101,8 +91,8 @@ public function testPropertyApplicationId() */ public function testPropertyChannel() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelMessageChannelEnum::class, self::$instance->getChannel()); + $this->assertSame(MultiChannelMessageChannelEnum::RBM, self::$instance->getChannel()); } /** @@ -110,8 +100,7 @@ public function testPropertyChannel() */ public function testPropertyContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmMessageContentText::class, self::$instance->getContent()); } /** @@ -119,7 +108,6 @@ public function testPropertyContent() */ public function testPropertyOwner() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getOwner()); + $this->assertEquals('test_string', self::$instance->getOwner()); + }} diff --git a/tests/Unit/Model/MultiChannelChannelListSMSObjectTest.php b/tests/Unit/Model/MultiChannelChannelListSMSObjectTest.php index c490bd5f..f8231f94 100644 --- a/tests/Unit/Model/MultiChannelChannelListSMSObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListSMSObjectTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelChannelListSMSObject; +use Bandwidth\Model\MultiChannelMessageChannelEnum; +use Bandwidth\Model\SmsMessageContent; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,19 @@ */ class MultiChannelChannelListSMSObjectTest extends TestCase { + private static MultiChannelChannelListSMSObject $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MultiChannelChannelListSMSObject([ + 'from' => 'test_string', + 'application_id' => 'test_string', + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => new SmsMessageContent([]) + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testMultiChannelChannelListSMSObject() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelChannelListSMSObject::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testMultiChannelChannelListSMSObject() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -92,8 +81,8 @@ public function testPropertyFrom() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -101,8 +90,8 @@ public function testPropertyApplicationId() */ public function testPropertyChannel() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelMessageChannelEnum::class, self::$instance->getChannel()); + $this->assertSame(MultiChannelMessageChannelEnum::RBM, self::$instance->getChannel()); } /** @@ -110,7 +99,5 @@ public function testPropertyChannel() */ public function testPropertyContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(SmsMessageContent::class, self::$instance->getContent()); + }} diff --git a/tests/Unit/Model/MultiChannelChannelListSMSResponseObjectTest.php b/tests/Unit/Model/MultiChannelChannelListSMSResponseObjectTest.php index 40f5ffec..720d191e 100644 --- a/tests/Unit/Model/MultiChannelChannelListSMSResponseObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListSMSResponseObjectTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelChannelListSMSResponseObject; +use Bandwidth\Model\MultiChannelMessageChannelEnum; +use Bandwidth\Model\SmsMessageContent; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,20 @@ */ class MultiChannelChannelListSMSResponseObjectTest extends TestCase { + private static MultiChannelChannelListSMSResponseObject $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MultiChannelChannelListSMSResponseObject([ + 'from' => 'test_string', + 'application_id' => 'test_string', + 'channel' => MultiChannelMessageChannelEnum::RBM, + 'content' => new SmsMessageContent([]), + 'owner' => 'test_string' + ]); } /** @@ -74,8 +65,7 @@ public static function tearDownAfterClass(): void */ public function testMultiChannelChannelListSMSResponseObject() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelChannelListSMSResponseObject::class, self::$instance); } /** @@ -83,8 +73,8 @@ public function testMultiChannelChannelListSMSResponseObject() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -92,8 +82,8 @@ public function testPropertyFrom() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -101,8 +91,8 @@ public function testPropertyApplicationId() */ public function testPropertyChannel() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelMessageChannelEnum::class, self::$instance->getChannel()); + $this->assertSame(MultiChannelMessageChannelEnum::RBM, self::$instance->getChannel()); } /** @@ -110,8 +100,7 @@ public function testPropertyChannel() */ public function testPropertyContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(SmsMessageContent::class, self::$instance->getContent()); } /** @@ -119,7 +108,6 @@ public function testPropertyContent() */ public function testPropertyOwner() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getOwner()); + $this->assertEquals('test_string', self::$instance->getOwner()); + }} diff --git a/tests/Unit/Model/MultiChannelErrorTest.php b/tests/Unit/Model/MultiChannelErrorTest.php index bd8cae13..ee2fb355 100644 --- a/tests/Unit/Model/MultiChannelErrorTest.php +++ b/tests/Unit/Model/MultiChannelErrorTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ErrorObject; +use Bandwidth\Model\Link; +use Bandwidth\Model\MultiChannelError; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,18 @@ */ class MultiChannelErrorTest extends TestCase { + private static MultiChannelError $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MultiChannelError([ + 'links' => [new Link([])], + 'data' => (object) ['key' => 'value'], + 'errors' => [new ErrorObject([])] + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testMultiChannelError() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelError::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testMultiChannelError() */ public function testPropertyLinks() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getLinks()); + $this->assertInstanceOf(Link::class, self::$instance->getLinks()[0]); } /** @@ -92,8 +80,8 @@ public function testPropertyLinks() */ public function testPropertyData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsObject(self::$instance->getData()); + $this->assertEquals((object) ['key' => 'value'], self::$instance->getData()); } /** @@ -101,7 +89,6 @@ public function testPropertyData() */ public function testPropertyErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getErrors()); + $this->assertInstanceOf(ErrorObject::class, self::$instance->getErrors()[0]); + }} diff --git a/tests/Unit/Model/MultiChannelMessageContentTest.php b/tests/Unit/Model/MultiChannelMessageContentTest.php index 6cd1c2a3..334d310d 100644 --- a/tests/Unit/Model/MultiChannelMessageContentTest.php +++ b/tests/Unit/Model/MultiChannelMessageContentTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelMessageContent; +use Bandwidth\Model\RbmMessageContentFile; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,17 @@ */ class MultiChannelMessageContentTest extends TestCase { + private static MultiChannelMessageContent $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MultiChannelMessageContent([ + 'text' => 'test_string', + 'media' => new RbmMessageContentFile([]) + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testMultiChannelMessageContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelMessageContent::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testMultiChannelMessageContent() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -92,7 +78,5 @@ public function testPropertyText() */ public function testPropertyMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(RbmMessageContentFile::class, self::$instance->getMedia()); + }} diff --git a/tests/Unit/Model/MultiChannelMessageRequestTest.php b/tests/Unit/Model/MultiChannelMessageRequestTest.php index 767784b5..bd14604b 100644 --- a/tests/Unit/Model/MultiChannelMessageRequestTest.php +++ b/tests/Unit/Model/MultiChannelMessageRequestTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelChannelListRBMObject; +use Bandwidth\Model\MultiChannelMessageRequest; +use Bandwidth\Model\PriorityEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,20 @@ */ class MultiChannelMessageRequestTest extends TestCase { + private static MultiChannelMessageRequest $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MultiChannelMessageRequest([ + 'to' => 'test_string', + 'channel_list' => [new MultiChannelChannelListRBMObject([])], + 'tag' => 'test_string', + 'priority' => PriorityEnum::_DEFAULT, + 'expiration' => new \DateTime('2024-01-01T00:00:00+00:00') + ]); } /** @@ -74,8 +65,7 @@ public static function tearDownAfterClass(): void */ public function testMultiChannelMessageRequest() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelMessageRequest::class, self::$instance); } /** @@ -83,8 +73,8 @@ public function testMultiChannelMessageRequest() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -92,8 +82,8 @@ public function testPropertyTo() */ public function testPropertyChannelList() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListRBMObject::class, self::$instance->getChannelList()[0]); } /** @@ -101,8 +91,8 @@ public function testPropertyChannelList() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -110,8 +100,8 @@ public function testPropertyTag() */ public function testPropertyPriority() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(PriorityEnum::class, self::$instance->getPriority()); + $this->assertSame(PriorityEnum::_DEFAULT, self::$instance->getPriority()); } /** @@ -119,7 +109,6 @@ public function testPropertyPriority() */ public function testPropertyExpiration() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(\DateTime::class, self::$instance->getExpiration()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getExpiration()); + }} diff --git a/tests/Unit/Model/MultiChannelMessageResponseDataTest.php b/tests/Unit/Model/MultiChannelMessageResponseDataTest.php index caf34143..a7bbc7b5 100644 --- a/tests/Unit/Model/MultiChannelMessageResponseDataTest.php +++ b/tests/Unit/Model/MultiChannelMessageResponseDataTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MessageDirectionEnum; +use Bandwidth\Model\MultiChannelChannelListRBMResponseObject; +use Bandwidth\Model\MultiChannelMessageResponseData; +use Bandwidth\Model\PriorityEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,23 @@ */ class MultiChannelMessageResponseDataTest extends TestCase { + private static MultiChannelMessageResponseData $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new MultiChannelMessageResponseData([ + 'id' => 'test_string', + 'time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'direction' => MessageDirectionEnum::IN, + 'to' => ['test_string'], + 'channel_list' => [new MultiChannelChannelListRBMResponseObject([])], + 'tag' => 'test_string', + 'priority' => PriorityEnum::_DEFAULT, + 'expiration' => new \DateTime('2024-01-01T00:00:00+00:00') + ]); } /** @@ -74,8 +69,7 @@ public static function tearDownAfterClass(): void */ public function testMultiChannelMessageResponseData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MultiChannelMessageResponseData::class, self::$instance); } /** @@ -83,8 +77,8 @@ public function testMultiChannelMessageResponseData() */ public function testPropertyId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getId()); + $this->assertEquals('test_string', self::$instance->getId()); } /** @@ -92,8 +86,8 @@ public function testPropertyId() */ public function testPropertyTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getTime()); } /** @@ -101,8 +95,8 @@ public function testPropertyTime() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MessageDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(MessageDirectionEnum::IN, self::$instance->getDirection()); } /** @@ -110,8 +104,8 @@ public function testPropertyDirection() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getTo()); + $this->assertEquals(['test_string'], self::$instance->getTo()); } /** @@ -119,8 +113,8 @@ public function testPropertyTo() */ public function testPropertyChannelList() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getChannelList()); + $this->assertInstanceOf(MultiChannelChannelListRBMResponseObject::class, self::$instance->getChannelList()[0]); } /** @@ -128,8 +122,8 @@ public function testPropertyChannelList() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -137,8 +131,8 @@ public function testPropertyTag() */ public function testPropertyPriority() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(PriorityEnum::class, self::$instance->getPriority()); + $this->assertSame(PriorityEnum::_DEFAULT, self::$instance->getPriority()); } /** @@ -146,7 +140,6 @@ public function testPropertyPriority() */ public function testPropertyExpiration() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(\DateTime::class, self::$instance->getExpiration()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getExpiration()); + }} diff --git a/tests/Unit/Model/OptInWorkflowTest.php b/tests/Unit/Model/OptInWorkflowTest.php index e2caf1ae..0a7ed0c5 100644 --- a/tests/Unit/Model/OptInWorkflowTest.php +++ b/tests/Unit/Model/OptInWorkflowTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\OptInWorkflow; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,18 @@ */ class OptInWorkflowTest extends TestCase { + private static OptInWorkflow $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new OptInWorkflow([ + 'description' => 'test_string', + 'image_urls' => ['test_string'], + 'confirmation_response' => 'test_string' + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testOptInWorkflow() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(OptInWorkflow::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testOptInWorkflow() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); } /** @@ -92,8 +78,8 @@ public function testPropertyDescription() */ public function testPropertyImageUrls() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getImageUrls()); + $this->assertEquals(['test_string'], self::$instance->getImageUrls()); } /** @@ -101,7 +87,6 @@ public function testPropertyImageUrls() */ public function testPropertyConfirmationResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getConfirmationResponse()); + $this->assertEquals('test_string', self::$instance->getConfirmationResponse()); + }} diff --git a/tests/Unit/Model/PageInfoTest.php b/tests/Unit/Model/PageInfoTest.php index 95892d96..d4824ab0 100644 --- a/tests/Unit/Model/PageInfoTest.php +++ b/tests/Unit/Model/PageInfoTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\PageInfo; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,19 @@ */ class PageInfoTest extends TestCase { + private static PageInfo $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new PageInfo([ + 'prev_page' => 'test_string', + 'next_page' => 'test_string', + 'prev_page_token' => 'test_string', + 'next_page_token' => 'test_string' + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testPageInfo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(PageInfo::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testPageInfo() */ public function testPropertyPrevPage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPrevPage()); + $this->assertEquals('test_string', self::$instance->getPrevPage()); } /** @@ -92,8 +79,8 @@ public function testPropertyPrevPage() */ public function testPropertyNextPage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getNextPage()); + $this->assertEquals('test_string', self::$instance->getNextPage()); } /** @@ -101,8 +88,8 @@ public function testPropertyNextPage() */ public function testPropertyPrevPageToken() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPrevPageToken()); + $this->assertEquals('test_string', self::$instance->getPrevPageToken()); } /** @@ -110,7 +97,6 @@ public function testPropertyPrevPageToken() */ public function testPropertyNextPageToken() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getNextPageToken()); + $this->assertEquals('test_string', self::$instance->getNextPageToken()); + }} diff --git a/tests/Unit/Model/PageTest.php b/tests/Unit/Model/PageTest.php index fbe6bf3c..c902b290 100644 --- a/tests/Unit/Model/PageTest.php +++ b/tests/Unit/Model/PageTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Page; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,19 @@ */ class PageTest extends TestCase { + private static Page $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new Page([ + 'page_size' => 1, + 'total_elements' => 1, + 'total_pages' => 1, + 'page_number' => 1 + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testPage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Page::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testPage() */ public function testPropertyPageSize() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getPageSize()); + $this->assertEquals(1, self::$instance->getPageSize()); } /** @@ -92,8 +79,8 @@ public function testPropertyPageSize() */ public function testPropertyTotalElements() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getTotalElements()); + $this->assertEquals(1, self::$instance->getTotalElements()); } /** @@ -101,8 +88,8 @@ public function testPropertyTotalElements() */ public function testPropertyTotalPages() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getTotalPages()); + $this->assertEquals(1, self::$instance->getTotalPages()); } /** @@ -110,7 +97,6 @@ public function testPropertyTotalPages() */ public function testPropertyPageNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsInt(self::$instance->getPageNumber()); + $this->assertEquals(1, self::$instance->getPageNumber()); + }} diff --git a/tests/Unit/Model/RbmActionBaseTest.php b/tests/Unit/Model/RbmActionBaseTest.php index ac593ec2..ca459078 100644 --- a/tests/Unit/Model/RbmActionBaseTest.php +++ b/tests/Unit/Model/RbmActionBaseTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmActionBase; +use Bandwidth\Model\RbmActionTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,18 @@ */ class RbmActionBaseTest extends TestCase { + private static RbmActionBase $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RbmActionBase([ + 'type' => RbmActionTypeEnum::REPLY, + 'text' => 'test_string', + 'postback_data' => 'test_string' + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testRbmActionBase() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmActionBase::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testRbmActionBase() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmActionTypeEnum::class, self::$instance->getType()); + $this->assertSame(RbmActionTypeEnum::REPLY, self::$instance->getType()); } /** @@ -92,8 +79,8 @@ public function testPropertyType() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -101,7 +88,6 @@ public function testPropertyText() */ public function testPropertyPostbackData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getPostbackData()); + $this->assertEquals('test_string', self::$instance->getPostbackData()); + }} diff --git a/tests/Unit/Model/RbmActionDialTest.php b/tests/Unit/Model/RbmActionDialTest.php index c13aec0f..1e4cc2f6 100644 --- a/tests/Unit/Model/RbmActionDialTest.php +++ b/tests/Unit/Model/RbmActionDialTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmActionDial; +use Bandwidth\Model\RbmActionTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,19 @@ */ class RbmActionDialTest extends TestCase { + private static RbmActionDial $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RbmActionDial([ + 'type' => RbmActionTypeEnum::REPLY, + 'text' => 'test_string', + 'postback_data' => 'test_string', + 'phone_number' => 'test_string' + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testRbmActionDial() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmActionDial::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testRbmActionDial() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmActionTypeEnum::class, self::$instance->getType()); + $this->assertSame(RbmActionTypeEnum::REPLY, self::$instance->getType()); } /** @@ -92,8 +80,8 @@ public function testPropertyType() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -101,8 +89,8 @@ public function testPropertyText() */ public function testPropertyPostbackData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPostbackData()); + $this->assertEquals('test_string', self::$instance->getPostbackData()); } /** @@ -110,7 +98,6 @@ public function testPropertyPostbackData() */ public function testPropertyPhoneNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getPhoneNumber()); + $this->assertEquals('test_string', self::$instance->getPhoneNumber()); + }} diff --git a/tests/Unit/Model/RbmActionOpenUrlTest.php b/tests/Unit/Model/RbmActionOpenUrlTest.php index e549a142..fc65b9be 100644 --- a/tests/Unit/Model/RbmActionOpenUrlTest.php +++ b/tests/Unit/Model/RbmActionOpenUrlTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmActionOpenUrl; +use Bandwidth\Model\RbmActionTypeEnum; +use Bandwidth\Model\RbmOpenUrlEnum; +use Bandwidth\Model\RbmWebViewEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,21 @@ */ class RbmActionOpenUrlTest extends TestCase { + private static RbmActionOpenUrl $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RbmActionOpenUrl([ + 'type' => RbmActionTypeEnum::REPLY, + 'text' => 'test_string', + 'postback_data' => 'test_string', + 'url' => 'test_string', + 'application' => RbmOpenUrlEnum::BROWSER, + 'webview_view_mode' => RbmWebViewEnum::FULL + ]); } /** @@ -74,8 +67,7 @@ public static function tearDownAfterClass(): void */ public function testRbmActionOpenUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmActionOpenUrl::class, self::$instance); } /** @@ -83,8 +75,8 @@ public function testRbmActionOpenUrl() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmActionTypeEnum::class, self::$instance->getType()); + $this->assertSame(RbmActionTypeEnum::REPLY, self::$instance->getType()); } /** @@ -92,8 +84,8 @@ public function testPropertyType() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -101,8 +93,8 @@ public function testPropertyText() */ public function testPropertyPostbackData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPostbackData()); + $this->assertEquals('test_string', self::$instance->getPostbackData()); } /** @@ -110,8 +102,8 @@ public function testPropertyPostbackData() */ public function testPropertyUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUrl()); + $this->assertEquals('test_string', self::$instance->getUrl()); } /** @@ -119,8 +111,8 @@ public function testPropertyUrl() */ public function testPropertyApplication() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmOpenUrlEnum::class, self::$instance->getApplication()); + $this->assertSame(RbmOpenUrlEnum::BROWSER, self::$instance->getApplication()); } /** @@ -128,7 +120,6 @@ public function testPropertyApplication() */ public function testPropertyWebviewViewMode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(RbmWebViewEnum::class, self::$instance->getWebviewViewMode()); + $this->assertSame(RbmWebViewEnum::FULL, self::$instance->getWebviewViewMode()); + }} diff --git a/tests/Unit/Model/RbmActionViewLocationTest.php b/tests/Unit/Model/RbmActionViewLocationTest.php index 21100666..f9b18fdb 100644 --- a/tests/Unit/Model/RbmActionViewLocationTest.php +++ b/tests/Unit/Model/RbmActionViewLocationTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmActionTypeEnum; +use Bandwidth\Model\RbmActionViewLocation; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,21 @@ */ class RbmActionViewLocationTest extends TestCase { + private static RbmActionViewLocation $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RbmActionViewLocation([ + 'type' => RbmActionTypeEnum::REPLY, + 'text' => 'test_string', + 'postback_data' => 'test_string', + 'latitude' => 1.5, + 'longitude' => 1.5, + 'label' => 'test_string' + ]); } /** @@ -74,8 +65,7 @@ public static function tearDownAfterClass(): void */ public function testRbmActionViewLocation() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmActionViewLocation::class, self::$instance); } /** @@ -83,8 +73,8 @@ public function testRbmActionViewLocation() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmActionTypeEnum::class, self::$instance->getType()); + $this->assertSame(RbmActionTypeEnum::REPLY, self::$instance->getType()); } /** @@ -92,8 +82,8 @@ public function testPropertyType() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -101,8 +91,8 @@ public function testPropertyText() */ public function testPropertyPostbackData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPostbackData()); + $this->assertEquals('test_string', self::$instance->getPostbackData()); } /** @@ -110,8 +100,8 @@ public function testPropertyPostbackData() */ public function testPropertyLatitude() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getLatitude()); + $this->assertEquals(1.5, self::$instance->getLatitude()); } /** @@ -119,8 +109,8 @@ public function testPropertyLatitude() */ public function testPropertyLongitude() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getLongitude()); + $this->assertEquals(1.5, self::$instance->getLongitude()); } /** @@ -128,7 +118,6 @@ public function testPropertyLongitude() */ public function testPropertyLabel() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getLabel()); + $this->assertEquals('test_string', self::$instance->getLabel()); + }} diff --git a/tests/Unit/Model/RbmCardContentMediaTest.php b/tests/Unit/Model/RbmCardContentMediaTest.php index 22f17ada..78243ac8 100644 --- a/tests/Unit/Model/RbmCardContentMediaTest.php +++ b/tests/Unit/Model/RbmCardContentMediaTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmCardContentMedia; +use Bandwidth\Model\RbmMediaHeightEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,18 @@ */ class RbmCardContentMediaTest extends TestCase { + private static RbmCardContentMedia $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RbmCardContentMedia([ + 'file_url' => 'test_string', + 'thumbnail_url' => 'test_string', + 'height' => RbmMediaHeightEnum::SHORT + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testRbmCardContentMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmCardContentMedia::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testRbmCardContentMedia() */ public function testPropertyFileUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFileUrl()); + $this->assertEquals('test_string', self::$instance->getFileUrl()); } /** @@ -92,8 +79,8 @@ public function testPropertyFileUrl() */ public function testPropertyThumbnailUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getThumbnailUrl()); + $this->assertEquals('test_string', self::$instance->getThumbnailUrl()); } /** @@ -101,7 +88,6 @@ public function testPropertyThumbnailUrl() */ public function testPropertyHeight() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(RbmMediaHeightEnum::class, self::$instance->getHeight()); + $this->assertSame(RbmMediaHeightEnum::SHORT, self::$instance->getHeight()); + }} diff --git a/tests/Unit/Model/RbmCardContentTest.php b/tests/Unit/Model/RbmCardContentTest.php index d0a3ba02..cdd7c873 100644 --- a/tests/Unit/Model/RbmCardContentTest.php +++ b/tests/Unit/Model/RbmCardContentTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmActionBase; +use Bandwidth\Model\RbmCardContent; +use Bandwidth\Model\RbmCardContentMedia; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,19 @@ */ class RbmCardContentTest extends TestCase { + private static RbmCardContent $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RbmCardContent([ + 'title' => 'test_string', + 'description' => 'test_string', + 'media' => new RbmCardContentMedia([]), + 'suggestions' => [new RbmActionBase([])] + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testRbmCardContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmCardContent::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testRbmCardContent() */ public function testPropertyTitle() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTitle()); + $this->assertEquals('test_string', self::$instance->getTitle()); } /** @@ -92,8 +81,8 @@ public function testPropertyTitle() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); } /** @@ -101,8 +90,7 @@ public function testPropertyDescription() */ public function testPropertyMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmCardContentMedia::class, self::$instance->getMedia()); } /** @@ -110,7 +98,6 @@ public function testPropertyMedia() */ public function testPropertySuggestions() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getSuggestions()); + $this->assertInstanceOf(RbmActionBase::class, self::$instance->getSuggestions()[0]); + }} diff --git a/tests/Unit/Model/RbmLocationResponseTest.php b/tests/Unit/Model/RbmLocationResponseTest.php index 74e6f858..a694521c 100644 --- a/tests/Unit/Model/RbmLocationResponseTest.php +++ b/tests/Unit/Model/RbmLocationResponseTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmLocationResponse; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,17 @@ */ class RbmLocationResponseTest extends TestCase { + private static RbmLocationResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RbmLocationResponse([ + 'latitude' => 1.5, + 'longitude' => 1.5 + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testRbmLocationResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmLocationResponse::class, self::$instance); } /** @@ -83,8 +68,8 @@ public function testRbmLocationResponse() */ public function testPropertyLatitude() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getLatitude()); + $this->assertEquals(1.5, self::$instance->getLatitude()); } /** @@ -92,7 +77,6 @@ public function testPropertyLatitude() */ public function testPropertyLongitude() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsFloat(self::$instance->getLongitude()); + $this->assertEquals(1.5, self::$instance->getLongitude()); + }} diff --git a/tests/Unit/Model/RbmMessageCarouselCardTest.php b/tests/Unit/Model/RbmMessageCarouselCardTest.php index 094d2ff4..2d73dfd2 100644 --- a/tests/Unit/Model/RbmMessageCarouselCardTest.php +++ b/tests/Unit/Model/RbmMessageCarouselCardTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CardWidthEnum; +use Bandwidth\Model\RbmActionBase; +use Bandwidth\Model\RbmCardContent; +use Bandwidth\Model\RbmMessageCarouselCard; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,18 @@ */ class RbmMessageCarouselCardTest extends TestCase { + private static RbmMessageCarouselCard $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RbmMessageCarouselCard([ + 'card_width' => CardWidthEnum::SMALL, + 'card_contents' => [new RbmCardContent([])], + 'suggestions' => [new RbmActionBase([])] + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testRbmMessageCarouselCard() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmMessageCarouselCard::class, self::$instance); } /** @@ -83,8 +72,8 @@ public function testRbmMessageCarouselCard() */ public function testPropertyCardWidth() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CardWidthEnum::class, self::$instance->getCardWidth()); + $this->assertSame(CardWidthEnum::SMALL, self::$instance->getCardWidth()); } /** @@ -92,8 +81,8 @@ public function testPropertyCardWidth() */ public function testPropertyCardContents() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getCardContents()); + $this->assertInstanceOf(RbmCardContent::class, self::$instance->getCardContents()[0]); } /** @@ -101,7 +90,6 @@ public function testPropertyCardContents() */ public function testPropertySuggestions() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getSuggestions()); + $this->assertInstanceOf(RbmActionBase::class, self::$instance->getSuggestions()[0]); + }} diff --git a/tests/Unit/Model/RbmMessageContentFileTest.php b/tests/Unit/Model/RbmMessageContentFileTest.php index 360e0643..ddfdd32a 100644 --- a/tests/Unit/Model/RbmMessageContentFileTest.php +++ b/tests/Unit/Model/RbmMessageContentFileTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmMessageContentFile; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,17 @@ */ class RbmMessageContentFileTest extends TestCase { + private static RbmMessageContentFile $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RbmMessageContentFile([ + 'file_url' => 'test_string', + 'thumbnail_url' => 'test_string' + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testRbmMessageContentFile() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmMessageContentFile::class, self::$instance); } /** @@ -83,8 +68,8 @@ public function testRbmMessageContentFile() */ public function testPropertyFileUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFileUrl()); + $this->assertEquals('test_string', self::$instance->getFileUrl()); } /** @@ -92,7 +77,6 @@ public function testPropertyFileUrl() */ public function testPropertyThumbnailUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getThumbnailUrl()); + $this->assertEquals('test_string', self::$instance->getThumbnailUrl()); + }} diff --git a/tests/Unit/Model/RbmMessageContentTextTest.php b/tests/Unit/Model/RbmMessageContentTextTest.php index 24670a35..b10aa399 100644 --- a/tests/Unit/Model/RbmMessageContentTextTest.php +++ b/tests/Unit/Model/RbmMessageContentTextTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmActionBase; +use Bandwidth\Model\RbmMessageContentText; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,17 @@ */ class RbmMessageContentTextTest extends TestCase { + private static RbmMessageContentText $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RbmMessageContentText([ + 'text' => 'test_string', + 'suggestions' => [new RbmActionBase([])] + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testRbmMessageContentText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmMessageContentText::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testRbmMessageContentText() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -92,7 +78,6 @@ public function testPropertyText() */ public function testPropertySuggestions() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getSuggestions()); + $this->assertInstanceOf(RbmActionBase::class, self::$instance->getSuggestions()[0]); + }} diff --git a/tests/Unit/Model/RbmMessageMediaTest.php b/tests/Unit/Model/RbmMessageMediaTest.php index 5befa055..77b260b6 100644 --- a/tests/Unit/Model/RbmMessageMediaTest.php +++ b/tests/Unit/Model/RbmMessageMediaTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmActionBase; +use Bandwidth\Model\RbmMessageContentFile; +use Bandwidth\Model\RbmMessageMedia; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,17 @@ */ class RbmMessageMediaTest extends TestCase { + private static RbmMessageMedia $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RbmMessageMedia([ + 'media' => [new RbmMessageContentFile([])], + 'suggestions' => [new RbmActionBase([])] + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testRbmMessageMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmMessageMedia::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testRbmMessageMedia() */ public function testPropertyMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getMedia()); + $this->assertInstanceOf(RbmMessageContentFile::class, self::$instance->getMedia()[0]); } /** @@ -92,7 +79,6 @@ public function testPropertyMedia() */ public function testPropertySuggestions() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getSuggestions()); + $this->assertInstanceOf(RbmActionBase::class, self::$instance->getSuggestions()[0]); + }} diff --git a/tests/Unit/Model/RbmStandaloneCardTest.php b/tests/Unit/Model/RbmStandaloneCardTest.php index f24252fd..f1b0a5b3 100644 --- a/tests/Unit/Model/RbmStandaloneCardTest.php +++ b/tests/Unit/Model/RbmStandaloneCardTest.php @@ -28,6 +28,12 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmActionBase; +use Bandwidth\Model\RbmCardContent; +use Bandwidth\Model\RbmStandaloneCard; +use Bandwidth\Model\StandaloneCardOrientationEnum; +use Bandwidth\Model\ThumbnailAlignmentEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +46,19 @@ */ class RbmStandaloneCardTest extends TestCase { + private static RbmStandaloneCard $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RbmStandaloneCard([ + 'orientation' => StandaloneCardOrientationEnum::HORIZONTAL, + 'thumbnail_image_alignment' => ThumbnailAlignmentEnum::LEFT, + 'card_content' => new RbmCardContent([]), + 'suggestions' => [new RbmActionBase([])] + ]); } /** @@ -74,8 +66,7 @@ public static function tearDownAfterClass(): void */ public function testRbmStandaloneCard() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmStandaloneCard::class, self::$instance); } /** @@ -83,8 +74,8 @@ public function testRbmStandaloneCard() */ public function testPropertyOrientation() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(StandaloneCardOrientationEnum::class, self::$instance->getOrientation()); + $this->assertSame(StandaloneCardOrientationEnum::HORIZONTAL, self::$instance->getOrientation()); } /** @@ -92,8 +83,8 @@ public function testPropertyOrientation() */ public function testPropertyThumbnailImageAlignment() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ThumbnailAlignmentEnum::class, self::$instance->getThumbnailImageAlignment()); + $this->assertSame(ThumbnailAlignmentEnum::LEFT, self::$instance->getThumbnailImageAlignment()); } /** @@ -101,8 +92,7 @@ public function testPropertyThumbnailImageAlignment() */ public function testPropertyCardContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmCardContent::class, self::$instance->getCardContent()); } /** @@ -110,7 +100,6 @@ public function testPropertyCardContent() */ public function testPropertySuggestions() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getSuggestions()); + $this->assertInstanceOf(RbmActionBase::class, self::$instance->getSuggestions()[0]); + }} diff --git a/tests/Unit/Model/RbmSuggestionResponseTest.php b/tests/Unit/Model/RbmSuggestionResponseTest.php index f48a71e9..daa544e3 100644 --- a/tests/Unit/Model/RbmSuggestionResponseTest.php +++ b/tests/Unit/Model/RbmSuggestionResponseTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmSuggestionResponse; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,18 @@ */ class RbmSuggestionResponseTest extends TestCase { + private static RbmSuggestionResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RbmSuggestionResponse([ + 'text' => 'test_string', + 'postback_data' => 'test_string', + 'paired_message_id' => 'test_string' + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testRbmSuggestionResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RbmSuggestionResponse::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testRbmSuggestionResponse() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -92,8 +78,8 @@ public function testPropertyText() */ public function testPropertyPostbackData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPostbackData()); + $this->assertEquals('test_string', self::$instance->getPostbackData()); } /** @@ -101,7 +87,6 @@ public function testPropertyPostbackData() */ public function testPropertyPairedMessageId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getPairedMessageId()); + $this->assertEquals('test_string', self::$instance->getPairedMessageId()); + }} diff --git a/tests/Unit/Model/RecordingAvailableCallbackTest.php b/tests/Unit/Model/RecordingAvailableCallbackTest.php index b54b0f3a..677a0704 100644 --- a/tests/Unit/Model/RecordingAvailableCallbackTest.php +++ b/tests/Unit/Model/RecordingAvailableCallbackTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\FileFormatEnum; +use Bandwidth\Model\RecordingAvailableCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,37 @@ */ class RecordingAvailableCallbackTest extends TestCase { + private static RecordingAvailableCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RecordingAvailableCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'call_url' => 'test_string', + 'parent_call_id' => 'test_string', + 'recording_id' => 'test_string', + 'media_url' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'end_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'duration' => 'test_string', + 'file_format' => FileFormatEnum::MP3, + 'channels' => 1, + 'tag' => 'test_string', + 'status' => 'test_string', + 'transfer_caller_id' => 'test_string', + 'transfer_to' => 'test_string' + ]); } /** @@ -74,8 +82,7 @@ public static function tearDownAfterClass(): void */ public function testRecordingAvailableCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RecordingAvailableCallback::class, self::$instance); } /** @@ -83,8 +90,8 @@ public function testRecordingAvailableCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +99,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +108,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +117,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +126,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +135,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +144,8 @@ public function testPropertyTo() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +153,8 @@ public function testPropertyDirection() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -155,8 +162,8 @@ public function testPropertyCallId() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -164,8 +171,8 @@ public function testPropertyCallUrl() */ public function testPropertyParentCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getParentCallId()); + $this->assertEquals('test_string', self::$instance->getParentCallId()); } /** @@ -173,8 +180,8 @@ public function testPropertyParentCallId() */ public function testPropertyRecordingId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRecordingId()); + $this->assertEquals('test_string', self::$instance->getRecordingId()); } /** @@ -182,8 +189,8 @@ public function testPropertyRecordingId() */ public function testPropertyMediaUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getMediaUrl()); + $this->assertEquals('test_string', self::$instance->getMediaUrl()); } /** @@ -191,8 +198,8 @@ public function testPropertyMediaUrl() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -200,8 +207,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -209,8 +216,8 @@ public function testPropertyStartTime() */ public function testPropertyEndTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEndTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEndTime()); } /** @@ -218,8 +225,8 @@ public function testPropertyEndTime() */ public function testPropertyDuration() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDuration()); + $this->assertEquals('test_string', self::$instance->getDuration()); } /** @@ -227,8 +234,8 @@ public function testPropertyDuration() */ public function testPropertyFileFormat() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(FileFormatEnum::class, self::$instance->getFileFormat()); + $this->assertSame(FileFormatEnum::MP3, self::$instance->getFileFormat()); } /** @@ -236,8 +243,8 @@ public function testPropertyFileFormat() */ public function testPropertyChannels() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getChannels()); + $this->assertEquals(1, self::$instance->getChannels()); } /** @@ -245,8 +252,8 @@ public function testPropertyChannels() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -254,8 +261,8 @@ public function testPropertyTag() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getStatus()); + $this->assertEquals('test_string', self::$instance->getStatus()); } /** @@ -263,8 +270,8 @@ public function testPropertyStatus() */ public function testPropertyTransferCallerId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferCallerId()); + $this->assertEquals('test_string', self::$instance->getTransferCallerId()); } /** @@ -272,7 +279,6 @@ public function testPropertyTransferCallerId() */ public function testPropertyTransferTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTransferTo()); + $this->assertEquals('test_string', self::$instance->getTransferTo()); + }} diff --git a/tests/Unit/Model/RecordingCompleteCallbackTest.php b/tests/Unit/Model/RecordingCompleteCallbackTest.php index 74b4fe89..8d1c898b 100644 --- a/tests/Unit/Model/RecordingCompleteCallbackTest.php +++ b/tests/Unit/Model/RecordingCompleteCallbackTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\FileFormatEnum; +use Bandwidth\Model\RecordingCompleteCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,37 @@ */ class RecordingCompleteCallbackTest extends TestCase { + private static RecordingCompleteCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RecordingCompleteCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'call_url' => 'test_string', + 'parent_call_id' => 'test_string', + 'recording_id' => 'test_string', + 'media_url' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'end_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'duration' => 'test_string', + 'file_format' => FileFormatEnum::MP3, + 'channels' => 1, + 'tag' => 'test_string', + 'transfer_caller_id' => 'test_string', + 'transfer_to' => 'test_string' + ]); } /** @@ -74,8 +82,7 @@ public static function tearDownAfterClass(): void */ public function testRecordingCompleteCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RecordingCompleteCallback::class, self::$instance); } /** @@ -83,8 +90,8 @@ public function testRecordingCompleteCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +99,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +108,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +117,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +126,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +135,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +144,8 @@ public function testPropertyTo() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +153,8 @@ public function testPropertyDirection() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -155,8 +162,8 @@ public function testPropertyCallId() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -164,8 +171,8 @@ public function testPropertyCallUrl() */ public function testPropertyParentCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getParentCallId()); + $this->assertEquals('test_string', self::$instance->getParentCallId()); } /** @@ -173,8 +180,8 @@ public function testPropertyParentCallId() */ public function testPropertyRecordingId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRecordingId()); + $this->assertEquals('test_string', self::$instance->getRecordingId()); } /** @@ -182,8 +189,8 @@ public function testPropertyRecordingId() */ public function testPropertyMediaUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getMediaUrl()); + $this->assertEquals('test_string', self::$instance->getMediaUrl()); } /** @@ -191,8 +198,8 @@ public function testPropertyMediaUrl() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -200,8 +207,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -209,8 +216,8 @@ public function testPropertyStartTime() */ public function testPropertyAnswerTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); } /** @@ -218,8 +225,8 @@ public function testPropertyAnswerTime() */ public function testPropertyEndTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEndTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEndTime()); } /** @@ -227,8 +234,8 @@ public function testPropertyEndTime() */ public function testPropertyDuration() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDuration()); + $this->assertEquals('test_string', self::$instance->getDuration()); } /** @@ -236,8 +243,8 @@ public function testPropertyDuration() */ public function testPropertyFileFormat() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(FileFormatEnum::class, self::$instance->getFileFormat()); + $this->assertSame(FileFormatEnum::MP3, self::$instance->getFileFormat()); } /** @@ -245,8 +252,8 @@ public function testPropertyFileFormat() */ public function testPropertyChannels() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getChannels()); + $this->assertEquals(1, self::$instance->getChannels()); } /** @@ -254,8 +261,8 @@ public function testPropertyChannels() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -263,8 +270,8 @@ public function testPropertyTag() */ public function testPropertyTransferCallerId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferCallerId()); + $this->assertEquals('test_string', self::$instance->getTransferCallerId()); } /** @@ -272,7 +279,6 @@ public function testPropertyTransferCallerId() */ public function testPropertyTransferTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTransferTo()); + $this->assertEquals('test_string', self::$instance->getTransferTo()); + }} diff --git a/tests/Unit/Model/RecordingTranscriptionClipTest.php b/tests/Unit/Model/RecordingTranscriptionClipTest.php index da9aab47..5a639104 100644 --- a/tests/Unit/Model/RecordingTranscriptionClipTest.php +++ b/tests/Unit/Model/RecordingTranscriptionClipTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RecordingTranscriptionClip; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,20 @@ */ class RecordingTranscriptionClipTest extends TestCase { + private static RecordingTranscriptionClip $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RecordingTranscriptionClip([ + 'speaker' => 1, + 'text' => 'test_string', + 'confidence' => 1.5, + 'start_time_seconds' => 1.5, + 'end_time_seconds' => 1.5 + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testRecordingTranscriptionClip() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RecordingTranscriptionClip::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testRecordingTranscriptionClip() */ public function testPropertySpeaker() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getSpeaker()); + $this->assertEquals(1, self::$instance->getSpeaker()); } /** @@ -92,8 +80,8 @@ public function testPropertySpeaker() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -101,8 +89,8 @@ public function testPropertyText() */ public function testPropertyConfidence() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getConfidence()); + $this->assertEquals(1.5, self::$instance->getConfidence()); } /** @@ -110,8 +98,8 @@ public function testPropertyConfidence() */ public function testPropertyStartTimeSeconds() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getStartTimeSeconds()); + $this->assertEquals(1.5, self::$instance->getStartTimeSeconds()); } /** @@ -119,7 +107,6 @@ public function testPropertyStartTimeSeconds() */ public function testPropertyEndTimeSeconds() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsFloat(self::$instance->getEndTimeSeconds()); + $this->assertEquals(1.5, self::$instance->getEndTimeSeconds()); + }} diff --git a/tests/Unit/Model/RecordingTranscriptionMetadataTest.php b/tests/Unit/Model/RecordingTranscriptionMetadataTest.php index 56c8b2cc..377a83d5 100644 --- a/tests/Unit/Model/RecordingTranscriptionMetadataTest.php +++ b/tests/Unit/Model/RecordingTranscriptionMetadataTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RecordingTranscriptionMetadata; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,19 @@ */ class RecordingTranscriptionMetadataTest extends TestCase { + private static RecordingTranscriptionMetadata $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RecordingTranscriptionMetadata([ + 'id' => 'test_string', + 'status' => 'test_string', + 'completed_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'url' => 'test_string' + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testRecordingTranscriptionMetadata() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RecordingTranscriptionMetadata::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testRecordingTranscriptionMetadata() */ public function testPropertyId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getId()); + $this->assertEquals('test_string', self::$instance->getId()); } /** @@ -92,8 +79,8 @@ public function testPropertyId() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getStatus()); + $this->assertEquals('test_string', self::$instance->getStatus()); } /** @@ -101,8 +88,8 @@ public function testPropertyStatus() */ public function testPropertyCompletedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getCompletedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getCompletedTime()); } /** @@ -110,7 +97,6 @@ public function testPropertyCompletedTime() */ public function testPropertyUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getUrl()); + $this->assertEquals('test_string', self::$instance->getUrl()); + }} diff --git a/tests/Unit/Model/RecordingTranscriptionsTest.php b/tests/Unit/Model/RecordingTranscriptionsTest.php index e932f8d6..df486ace 100644 --- a/tests/Unit/Model/RecordingTranscriptionsTest.php +++ b/tests/Unit/Model/RecordingTranscriptionsTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RecordingTranscriptionClip; +use Bandwidth\Model\RecordingTranscriptions; +use Bandwidth\Model\Transcription; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,17 @@ */ class RecordingTranscriptionsTest extends TestCase { + private static RecordingTranscriptions $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RecordingTranscriptions([ + 'transcripts' => [new Transcription([])], + 'clips' => [new RecordingTranscriptionClip([])] + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testRecordingTranscriptions() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RecordingTranscriptions::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testRecordingTranscriptions() */ public function testPropertyTranscripts() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getTranscripts()); + $this->assertInstanceOf(Transcription::class, self::$instance->getTranscripts()[0]); } /** @@ -92,7 +79,6 @@ public function testPropertyTranscripts() */ public function testPropertyClips() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getClips()); + $this->assertInstanceOf(RecordingTranscriptionClip::class, self::$instance->getClips()[0]); + }} diff --git a/tests/Unit/Model/RedirectCallbackTest.php b/tests/Unit/Model/RedirectCallbackTest.php index b7105f85..8b710cd6 100644 --- a/tests/Unit/Model/RedirectCallbackTest.php +++ b/tests/Unit/Model/RedirectCallbackTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\RedirectCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,31 @@ */ class RedirectCallbackTest extends TestCase { + private static RedirectCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new RedirectCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'call_url' => 'test_string', + 'parent_call_id' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'tag' => 'test_string', + 'transfer_caller_id' => 'test_string', + 'transfer_to' => 'test_string' + ]); } /** @@ -74,8 +75,7 @@ public static function tearDownAfterClass(): void */ public function testRedirectCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RedirectCallback::class, self::$instance); } /** @@ -83,8 +83,8 @@ public function testRedirectCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +92,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +101,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +110,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +119,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +128,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +137,8 @@ public function testPropertyTo() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +146,8 @@ public function testPropertyDirection() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -155,8 +155,8 @@ public function testPropertyCallId() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -164,8 +164,8 @@ public function testPropertyCallUrl() */ public function testPropertyParentCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getParentCallId()); + $this->assertEquals('test_string', self::$instance->getParentCallId()); } /** @@ -173,8 +173,8 @@ public function testPropertyParentCallId() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -182,8 +182,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -191,8 +191,8 @@ public function testPropertyStartTime() */ public function testPropertyAnswerTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); } /** @@ -200,8 +200,8 @@ public function testPropertyAnswerTime() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -209,8 +209,8 @@ public function testPropertyTag() */ public function testPropertyTransferCallerId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferCallerId()); + $this->assertEquals('test_string', self::$instance->getTransferCallerId()); } /** @@ -218,7 +218,6 @@ public function testPropertyTransferCallerId() */ public function testPropertyTransferTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTransferTo()); + $this->assertEquals('test_string', self::$instance->getTransferTo()); + }} diff --git a/tests/Unit/Model/SipConnectionMetadataTest.php b/tests/Unit/Model/SipConnectionMetadataTest.php index 7405b082..0adf3f34 100644 --- a/tests/Unit/Model/SipConnectionMetadataTest.php +++ b/tests/Unit/Model/SipConnectionMetadataTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\SipConnectionMetadata; +use Bandwidth\Model\SipCredentials; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,19 @@ */ class SipConnectionMetadataTest extends TestCase { + private static SipConnectionMetadata $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new SipConnectionMetadata([ + 'ip_address' => 'test_string', + 'port' => 1, + 'credentials' => new SipCredentials([]), + 'uui_header' => 'test_string' + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testSipConnectionMetadata() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(SipConnectionMetadata::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testSipConnectionMetadata() */ public function testPropertyIpAddress() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getIpAddress()); + $this->assertEquals('test_string', self::$instance->getIpAddress()); } /** @@ -92,8 +80,8 @@ public function testPropertyIpAddress() */ public function testPropertyPort() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getPort()); + $this->assertEquals(1, self::$instance->getPort()); } /** @@ -101,8 +89,7 @@ public function testPropertyPort() */ public function testPropertyCredentials() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(SipCredentials::class, self::$instance->getCredentials()); } /** @@ -110,7 +97,6 @@ public function testPropertyCredentials() */ public function testPropertyUuiHeader() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getUuiHeader()); + $this->assertEquals('test_string', self::$instance->getUuiHeader()); + }} diff --git a/tests/Unit/Model/SipCredentialsTest.php b/tests/Unit/Model/SipCredentialsTest.php index 9cf37210..c1598e55 100644 --- a/tests/Unit/Model/SipCredentialsTest.php +++ b/tests/Unit/Model/SipCredentialsTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\SipCredentials; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,17 @@ */ class SipCredentialsTest extends TestCase { + private static SipCredentials $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new SipCredentials([ + 'username' => 'test_string', + 'password' => 'test_string' + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testSipCredentials() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(SipCredentials::class, self::$instance); } /** @@ -83,8 +68,8 @@ public function testSipCredentials() */ public function testPropertyUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUsername()); + $this->assertEquals('test_string', self::$instance->getUsername()); } /** @@ -92,7 +77,6 @@ public function testPropertyUsername() */ public function testPropertyPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getPassword()); + $this->assertEquals('test_string', self::$instance->getPassword()); + }} diff --git a/tests/Unit/Model/SmsMessageContentTest.php b/tests/Unit/Model/SmsMessageContentTest.php index 5056df56..2b9fb713 100644 --- a/tests/Unit/Model/SmsMessageContentTest.php +++ b/tests/Unit/Model/SmsMessageContentTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\SmsMessageContent; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,16 @@ */ class SmsMessageContentTest extends TestCase { + private static SmsMessageContent $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new SmsMessageContent([ + 'text' => 'test_string' + ]); } /** @@ -74,8 +59,7 @@ public static function tearDownAfterClass(): void */ public function testSmsMessageContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(SmsMessageContent::class, self::$instance); } /** @@ -83,7 +67,6 @@ public function testSmsMessageContent() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); + }} diff --git a/tests/Unit/Model/StatusCallbackMessageTest.php b/tests/Unit/Model/StatusCallbackMessageTest.php index 3c385f14..5d9405d6 100644 --- a/tests/Unit/Model/StatusCallbackMessageTest.php +++ b/tests/Unit/Model/StatusCallbackMessageTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MessageDirectionEnum; +use Bandwidth\Model\MultiChannelMessageChannelEnum; +use Bandwidth\Model\PriorityEnum; +use Bandwidth\Model\StatusCallbackMessage; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,28 @@ */ class StatusCallbackMessageTest extends TestCase { + private static StatusCallbackMessage $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new StatusCallbackMessage([ + 'id' => 'test_string', + 'owner' => 'test_string', + 'application_id' => 'test_string', + 'time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'segment_count' => 1, + 'direction' => MessageDirectionEnum::IN, + 'to' => ['test_string'], + 'from' => 'test_string', + 'text' => 'test_string', + 'tag' => 'test_string', + 'media' => ['test_string'], + 'priority' => PriorityEnum::_DEFAULT, + 'channel' => MultiChannelMessageChannelEnum::RBM + ]); } /** @@ -74,8 +74,7 @@ public static function tearDownAfterClass(): void */ public function testStatusCallbackMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(StatusCallbackMessage::class, self::$instance); } /** @@ -83,8 +82,8 @@ public function testStatusCallbackMessage() */ public function testPropertyId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getId()); + $this->assertEquals('test_string', self::$instance->getId()); } /** @@ -92,8 +91,8 @@ public function testPropertyId() */ public function testPropertyOwner() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getOwner()); + $this->assertEquals('test_string', self::$instance->getOwner()); } /** @@ -101,8 +100,8 @@ public function testPropertyOwner() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -110,8 +109,8 @@ public function testPropertyApplicationId() */ public function testPropertyTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getTime()); } /** @@ -119,8 +118,8 @@ public function testPropertyTime() */ public function testPropertySegmentCount() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getSegmentCount()); + $this->assertEquals(1, self::$instance->getSegmentCount()); } /** @@ -128,8 +127,8 @@ public function testPropertySegmentCount() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(MessageDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(MessageDirectionEnum::IN, self::$instance->getDirection()); } /** @@ -137,8 +136,8 @@ public function testPropertyDirection() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getTo()); + $this->assertEquals(['test_string'], self::$instance->getTo()); } /** @@ -146,8 +145,8 @@ public function testPropertyTo() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -155,8 +154,8 @@ public function testPropertyFrom() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -164,8 +163,8 @@ public function testPropertyText() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -173,8 +172,8 @@ public function testPropertyTag() */ public function testPropertyMedia() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getMedia()); + $this->assertEquals(['test_string'], self::$instance->getMedia()); } /** @@ -182,8 +181,8 @@ public function testPropertyMedia() */ public function testPropertyPriority() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(PriorityEnum::class, self::$instance->getPriority()); + $this->assertSame(PriorityEnum::_DEFAULT, self::$instance->getPriority()); } /** @@ -191,7 +190,6 @@ public function testPropertyPriority() */ public function testPropertyChannel() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(MultiChannelMessageChannelEnum::class, self::$instance->getChannel()); + $this->assertSame(MultiChannelMessageChannelEnum::RBM, self::$instance->getChannel()); + }} diff --git a/tests/Unit/Model/StatusCallbackTest.php b/tests/Unit/Model/StatusCallbackTest.php index 5b0ba685..b606ede0 100644 --- a/tests/Unit/Model/StatusCallbackTest.php +++ b/tests/Unit/Model/StatusCallbackTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\StatusCallback; +use Bandwidth\Model\StatusCallbackMessage; +use Bandwidth\Model\StatusCallbackTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,23 @@ */ class StatusCallbackTest extends TestCase { + private static StatusCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new StatusCallback([ + 'time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'type' => StatusCallbackTypeEnum::MESSAGE_SENDING, + 'to' => 'test_string', + 'description' => 'test_string', + 'message' => new StatusCallbackMessage([]), + 'error_code' => 1, + 'carrier_name' => 'test_string' + ]); } /** @@ -74,8 +68,7 @@ public static function tearDownAfterClass(): void */ public function testStatusCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(StatusCallback::class, self::$instance); } /** @@ -83,8 +76,8 @@ public function testStatusCallback() */ public function testPropertyTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getTime()); } /** @@ -92,8 +85,8 @@ public function testPropertyTime() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +94,8 @@ public function testPropertyEventTime() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(StatusCallbackTypeEnum::class, self::$instance->getType()); + $this->assertSame(StatusCallbackTypeEnum::MESSAGE_SENDING, self::$instance->getType()); } /** @@ -110,8 +103,8 @@ public function testPropertyType() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -119,8 +112,8 @@ public function testPropertyTo() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); } /** @@ -128,8 +121,7 @@ public function testPropertyDescription() */ public function testPropertyMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(StatusCallbackMessage::class, self::$instance->getMessage()); } /** @@ -137,8 +129,8 @@ public function testPropertyMessage() */ public function testPropertyErrorCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getErrorCode()); + $this->assertEquals(1, self::$instance->getErrorCode()); } /** @@ -146,7 +138,6 @@ public function testPropertyErrorCode() */ public function testPropertyCarrierName() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getCarrierName()); + $this->assertEquals('test_string', self::$instance->getCarrierName()); + }} diff --git a/tests/Unit/Model/StirShakenTest.php b/tests/Unit/Model/StirShakenTest.php index f26b1dfa..517bf38c 100644 --- a/tests/Unit/Model/StirShakenTest.php +++ b/tests/Unit/Model/StirShakenTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\StirShaken; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,18 @@ */ class StirShakenTest extends TestCase { + private static StirShaken $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new StirShaken([ + 'verstat' => 'test_string', + 'attestation_indicator' => 'test_string', + 'originating_id' => 'test_string' + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testStirShaken() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(StirShaken::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testStirShaken() */ public function testPropertyVerstat() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getVerstat()); + $this->assertEquals('test_string', self::$instance->getVerstat()); } /** @@ -92,8 +78,8 @@ public function testPropertyVerstat() */ public function testPropertyAttestationIndicator() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAttestationIndicator()); + $this->assertEquals('test_string', self::$instance->getAttestationIndicator()); } /** @@ -101,7 +87,6 @@ public function testPropertyAttestationIndicator() */ public function testPropertyOriginatingId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getOriginatingId()); + $this->assertEquals('test_string', self::$instance->getOriginatingId()); + }} diff --git a/tests/Unit/Model/SyncLookupRequestTest.php b/tests/Unit/Model/SyncLookupRequestTest.php index 2a8e90d8..e48ce61c 100644 --- a/tests/Unit/Model/SyncLookupRequestTest.php +++ b/tests/Unit/Model/SyncLookupRequestTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\SyncLookupRequest; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,17 @@ */ class SyncLookupRequestTest extends TestCase { + private static SyncLookupRequest $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new SyncLookupRequest([ + 'phone_numbers' => ['test_string'], + 'rcs_agent' => 'test_string' + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testSyncLookupRequest() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(SyncLookupRequest::class, self::$instance); } /** @@ -83,8 +68,8 @@ public function testSyncLookupRequest() */ public function testPropertyPhoneNumbers() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getPhoneNumbers()); + $this->assertEquals(['test_string'], self::$instance->getPhoneNumbers()); } /** @@ -92,7 +77,6 @@ public function testPropertyPhoneNumbers() */ public function testPropertyRcsAgent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getRcsAgent()); + $this->assertEquals('test_string', self::$instance->getRcsAgent()); + }} diff --git a/tests/Unit/Model/TelephoneNumberTest.php b/tests/Unit/Model/TelephoneNumberTest.php index 88d8527c..12fc8047 100644 --- a/tests/Unit/Model/TelephoneNumberTest.php +++ b/tests/Unit/Model/TelephoneNumberTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\TelephoneNumber; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,16 @@ */ class TelephoneNumberTest extends TestCase { + private static TelephoneNumber $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new TelephoneNumber([ + 'telephone_number' => 'test_string' + ]); } /** @@ -74,8 +59,7 @@ public static function tearDownAfterClass(): void */ public function testTelephoneNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TelephoneNumber::class, self::$instance); } /** @@ -83,7 +67,6 @@ public function testTelephoneNumber() */ public function testPropertyTelephoneNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTelephoneNumber()); + $this->assertEquals('test_string', self::$instance->getTelephoneNumber()); + }} diff --git a/tests/Unit/Model/TfvBasicAuthenticationTest.php b/tests/Unit/Model/TfvBasicAuthenticationTest.php index 260af420..daa979d4 100644 --- a/tests/Unit/Model/TfvBasicAuthenticationTest.php +++ b/tests/Unit/Model/TfvBasicAuthenticationTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\TfvBasicAuthentication; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,17 @@ */ class TfvBasicAuthenticationTest extends TestCase { + private static TfvBasicAuthentication $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new TfvBasicAuthentication([ + 'username' => 'test_string', + 'password' => 'test_string' + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testTfvBasicAuthentication() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TfvBasicAuthentication::class, self::$instance); } /** @@ -83,8 +68,8 @@ public function testTfvBasicAuthentication() */ public function testPropertyUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUsername()); + $this->assertEquals('test_string', self::$instance->getUsername()); } /** @@ -92,7 +77,6 @@ public function testPropertyUsername() */ public function testPropertyPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getPassword()); + $this->assertEquals('test_string', self::$instance->getPassword()); + }} diff --git a/tests/Unit/Model/TfvErrorTest.php b/tests/Unit/Model/TfvErrorTest.php index 02d1fb48..032e5add 100644 --- a/tests/Unit/Model/TfvErrorTest.php +++ b/tests/Unit/Model/TfvErrorTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\TfvError; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,18 @@ */ class TfvErrorTest extends TestCase { + private static TfvError $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new TfvError([ + 'type' => 'test_string', + 'description' => 'test_string', + 'errors' => (object) ['key' => 'value'] + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testTfvError() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TfvError::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testTfvError() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getType()); + $this->assertEquals('test_string', self::$instance->getType()); } /** @@ -92,8 +78,8 @@ public function testPropertyType() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); } /** @@ -101,7 +87,6 @@ public function testPropertyDescription() */ public function testPropertyErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsObject(self::$instance->getErrors()); + $this->assertEquals((object) ['key' => 'value'], self::$instance->getErrors()); + }} diff --git a/tests/Unit/Model/TfvStatusTest.php b/tests/Unit/Model/TfvStatusTest.php index 2c51b0c3..b60d3f06 100644 --- a/tests/Unit/Model/TfvStatusTest.php +++ b/tests/Unit/Model/TfvStatusTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\AdditionalDenialReason; +use Bandwidth\Model\TfvStatus; +use Bandwidth\Model\TfvStatusEnum; +use Bandwidth\Model\TfvSubmissionInfo; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,28 @@ */ class TfvStatusTest extends TestCase { + private static TfvStatus $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new TfvStatus([ + 'phone_number' => 'test_string', + 'status' => TfvStatusEnum::VERIFIED, + 'internal_ticket_number' => 'test_string', + 'decline_reason_description' => 'test_string', + 'denial_status_code' => 1, + 'additional_denial_reasons' => [new AdditionalDenialReason([])], + 'resubmit_allowed' => true, + 'created_date_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'modified_date_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'submission' => new TfvSubmissionInfo([]), + 'blocked' => true, + 'blocked_reason' => 'test_string', + 'cv_token' => 'test_string' + ]); } /** @@ -74,8 +74,7 @@ public static function tearDownAfterClass(): void */ public function testTfvStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TfvStatus::class, self::$instance); } /** @@ -83,8 +82,8 @@ public function testTfvStatus() */ public function testPropertyPhoneNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPhoneNumber()); + $this->assertEquals('test_string', self::$instance->getPhoneNumber()); } /** @@ -92,8 +91,8 @@ public function testPropertyPhoneNumber() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TfvStatusEnum::class, self::$instance->getStatus()); + $this->assertSame(TfvStatusEnum::VERIFIED, self::$instance->getStatus()); } /** @@ -101,8 +100,8 @@ public function testPropertyStatus() */ public function testPropertyInternalTicketNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getInternalTicketNumber()); + $this->assertEquals('test_string', self::$instance->getInternalTicketNumber()); } /** @@ -110,8 +109,8 @@ public function testPropertyInternalTicketNumber() */ public function testPropertyDeclineReasonDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDeclineReasonDescription()); + $this->assertEquals('test_string', self::$instance->getDeclineReasonDescription()); } /** @@ -119,8 +118,8 @@ public function testPropertyDeclineReasonDescription() */ public function testPropertyDenialStatusCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getDenialStatusCode()); + $this->assertEquals(1, self::$instance->getDenialStatusCode()); } /** @@ -128,8 +127,8 @@ public function testPropertyDenialStatusCode() */ public function testPropertyAdditionalDenialReasons() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getAdditionalDenialReasons()); + $this->assertInstanceOf(AdditionalDenialReason::class, self::$instance->getAdditionalDenialReasons()[0]); } /** @@ -137,8 +136,8 @@ public function testPropertyAdditionalDenialReasons() */ public function testPropertyResubmitAllowed() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsBool(self::$instance->getResubmitAllowed()); + $this->assertTrue(self::$instance->getResubmitAllowed()); } /** @@ -146,8 +145,8 @@ public function testPropertyResubmitAllowed() */ public function testPropertyCreatedDateTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getCreatedDateTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getCreatedDateTime()); } /** @@ -155,8 +154,8 @@ public function testPropertyCreatedDateTime() */ public function testPropertyModifiedDateTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getModifiedDateTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getModifiedDateTime()); } /** @@ -164,8 +163,7 @@ public function testPropertyModifiedDateTime() */ public function testPropertySubmission() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TfvSubmissionInfo::class, self::$instance->getSubmission()); } /** @@ -173,8 +171,8 @@ public function testPropertySubmission() */ public function testPropertyBlocked() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsBool(self::$instance->getBlocked()); + $this->assertTrue(self::$instance->getBlocked()); } /** @@ -182,8 +180,8 @@ public function testPropertyBlocked() */ public function testPropertyBlockedReason() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getBlockedReason()); + $this->assertEquals('test_string', self::$instance->getBlockedReason()); } /** @@ -191,7 +189,6 @@ public function testPropertyBlockedReason() */ public function testPropertyCvToken() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getCvToken()); + $this->assertEquals('test_string', self::$instance->getCvToken()); + }} diff --git a/tests/Unit/Model/TfvSubmissionInfoTest.php b/tests/Unit/Model/TfvSubmissionInfoTest.php index 382f9199..d333443b 100644 --- a/tests/Unit/Model/TfvSubmissionInfoTest.php +++ b/tests/Unit/Model/TfvSubmissionInfoTest.php @@ -28,6 +28,13 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Address; +use Bandwidth\Model\BusinessEntityTypeEnum; +use Bandwidth\Model\BusinessRegistrationTypeEnum; +use Bandwidth\Model\Contact; +use Bandwidth\Model\OptInWorkflow; +use Bandwidth\Model\TfvSubmissionInfo; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +47,31 @@ */ class TfvSubmissionInfoTest extends TestCase { + private static TfvSubmissionInfo $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new TfvSubmissionInfo([ + 'business_address' => new Address([]), + 'business_contact' => new Contact([]), + 'message_volume' => 1, + 'use_case' => 'test_string', + 'use_case_summary' => 'test_string', + 'production_message_content' => 'test_string', + 'opt_in_workflow' => new OptInWorkflow([]), + 'additional_information' => 'test_string', + 'isv_reseller' => 'test_string', + 'privacy_policy_url' => 'test_string', + 'terms_and_conditions_url' => 'test_string', + 'business_dba' => 'test_string', + 'business_registration_number' => 'test_string', + 'business_registration_type' => BusinessRegistrationTypeEnum::EIN, + 'business_registration_issuing_country' => 'test_string', + 'business_entity_type' => BusinessEntityTypeEnum::SOLE_PROPRIETOR + ]); } /** @@ -74,8 +79,7 @@ public static function tearDownAfterClass(): void */ public function testTfvSubmissionInfo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TfvSubmissionInfo::class, self::$instance); } /** @@ -83,8 +87,7 @@ public function testTfvSubmissionInfo() */ public function testPropertyBusinessAddress() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Address::class, self::$instance->getBusinessAddress()); } /** @@ -92,8 +95,7 @@ public function testPropertyBusinessAddress() */ public function testPropertyBusinessContact() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Contact::class, self::$instance->getBusinessContact()); } /** @@ -101,8 +103,8 @@ public function testPropertyBusinessContact() */ public function testPropertyMessageVolume() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getMessageVolume()); + $this->assertEquals(1, self::$instance->getMessageVolume()); } /** @@ -110,8 +112,8 @@ public function testPropertyMessageVolume() */ public function testPropertyUseCase() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUseCase()); + $this->assertEquals('test_string', self::$instance->getUseCase()); } /** @@ -119,8 +121,8 @@ public function testPropertyUseCase() */ public function testPropertyUseCaseSummary() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUseCaseSummary()); + $this->assertEquals('test_string', self::$instance->getUseCaseSummary()); } /** @@ -128,8 +130,8 @@ public function testPropertyUseCaseSummary() */ public function testPropertyProductionMessageContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getProductionMessageContent()); + $this->assertEquals('test_string', self::$instance->getProductionMessageContent()); } /** @@ -137,8 +139,7 @@ public function testPropertyProductionMessageContent() */ public function testPropertyOptInWorkflow() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(OptInWorkflow::class, self::$instance->getOptInWorkflow()); } /** @@ -146,8 +147,8 @@ public function testPropertyOptInWorkflow() */ public function testPropertyAdditionalInformation() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAdditionalInformation()); + $this->assertEquals('test_string', self::$instance->getAdditionalInformation()); } /** @@ -155,8 +156,8 @@ public function testPropertyAdditionalInformation() */ public function testPropertyIsvReseller() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getIsvReseller()); + $this->assertEquals('test_string', self::$instance->getIsvReseller()); } /** @@ -164,8 +165,8 @@ public function testPropertyIsvReseller() */ public function testPropertyPrivacyPolicyUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPrivacyPolicyUrl()); + $this->assertEquals('test_string', self::$instance->getPrivacyPolicyUrl()); } /** @@ -173,8 +174,8 @@ public function testPropertyPrivacyPolicyUrl() */ public function testPropertyTermsAndConditionsUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTermsAndConditionsUrl()); + $this->assertEquals('test_string', self::$instance->getTermsAndConditionsUrl()); } /** @@ -182,8 +183,8 @@ public function testPropertyTermsAndConditionsUrl() */ public function testPropertyBusinessDba() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getBusinessDba()); + $this->assertEquals('test_string', self::$instance->getBusinessDba()); } /** @@ -191,8 +192,8 @@ public function testPropertyBusinessDba() */ public function testPropertyBusinessRegistrationNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getBusinessRegistrationNumber()); + $this->assertEquals('test_string', self::$instance->getBusinessRegistrationNumber()); } /** @@ -200,8 +201,8 @@ public function testPropertyBusinessRegistrationNumber() */ public function testPropertyBusinessRegistrationType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(BusinessRegistrationTypeEnum::class, self::$instance->getBusinessRegistrationType()); + $this->assertSame(BusinessRegistrationTypeEnum::EIN, self::$instance->getBusinessRegistrationType()); } /** @@ -209,8 +210,8 @@ public function testPropertyBusinessRegistrationType() */ public function testPropertyBusinessRegistrationIssuingCountry() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getBusinessRegistrationIssuingCountry()); + $this->assertEquals('test_string', self::$instance->getBusinessRegistrationIssuingCountry()); } /** @@ -218,7 +219,6 @@ public function testPropertyBusinessRegistrationIssuingCountry() */ public function testPropertyBusinessEntityType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(BusinessEntityTypeEnum::class, self::$instance->getBusinessEntityType()); + $this->assertSame(BusinessEntityTypeEnum::SOLE_PROPRIETOR, self::$instance->getBusinessEntityType()); + }} diff --git a/tests/Unit/Model/TfvSubmissionWrapperTest.php b/tests/Unit/Model/TfvSubmissionWrapperTest.php index 9c3dd006..5c74b3d6 100644 --- a/tests/Unit/Model/TfvSubmissionWrapperTest.php +++ b/tests/Unit/Model/TfvSubmissionWrapperTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\TfvSubmissionWrapper; +use Bandwidth\Model\VerificationUpdateRequest; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,16 @@ */ class TfvSubmissionWrapperTest extends TestCase { + private static TfvSubmissionWrapper $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new TfvSubmissionWrapper([ + 'submission' => new VerificationUpdateRequest([]) + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testTfvSubmissionWrapper() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TfvSubmissionWrapper::class, self::$instance); } /** @@ -83,7 +68,5 @@ public function testTfvSubmissionWrapper() */ public function testPropertySubmission() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(VerificationUpdateRequest::class, self::$instance->getSubmission()); + }} diff --git a/tests/Unit/Model/TranscribeRecordingTest.php b/tests/Unit/Model/TranscribeRecordingTest.php index 73c24367..55909681 100644 --- a/tests/Unit/Model/TranscribeRecordingTest.php +++ b/tests/Unit/Model/TranscribeRecordingTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallbackMethodEnum; +use Bandwidth\Model\TranscribeRecording; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,22 @@ */ class TranscribeRecordingTest extends TestCase { + private static TranscribeRecording $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new TranscribeRecording([ + 'callback_url' => 'test_string', + 'callback_method' => CallbackMethodEnum::GET, + 'username' => 'test_string', + 'password' => 'test_string', + 'tag' => 'test_string', + 'callback_timeout' => 1.5, + 'detect_language' => true + ]); } /** @@ -74,8 +66,7 @@ public static function tearDownAfterClass(): void */ public function testTranscribeRecording() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TranscribeRecording::class, self::$instance); } /** @@ -83,8 +74,8 @@ public function testTranscribeRecording() */ public function testPropertyCallbackUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallbackUrl()); + $this->assertEquals('test_string', self::$instance->getCallbackUrl()); } /** @@ -92,8 +83,8 @@ public function testPropertyCallbackUrl() */ public function testPropertyCallbackMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallbackMethodEnum::class, self::$instance->getCallbackMethod()); + $this->assertSame(CallbackMethodEnum::GET, self::$instance->getCallbackMethod()); } /** @@ -101,8 +92,8 @@ public function testPropertyCallbackMethod() */ public function testPropertyUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUsername()); + $this->assertEquals('test_string', self::$instance->getUsername()); } /** @@ -110,8 +101,8 @@ public function testPropertyUsername() */ public function testPropertyPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPassword()); + $this->assertEquals('test_string', self::$instance->getPassword()); } /** @@ -119,8 +110,8 @@ public function testPropertyPassword() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -128,8 +119,8 @@ public function testPropertyTag() */ public function testPropertyCallbackTimeout() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getCallbackTimeout()); + $this->assertEquals(1.5, self::$instance->getCallbackTimeout()); } /** @@ -137,7 +128,6 @@ public function testPropertyCallbackTimeout() */ public function testPropertyDetectLanguage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsBool(self::$instance->getDetectLanguage()); + $this->assertTrue(self::$instance->getDetectLanguage()); + }} diff --git a/tests/Unit/Model/TranscriptionAvailableCallbackTest.php b/tests/Unit/Model/TranscriptionAvailableCallbackTest.php index dd4893ef..13b9b408 100644 --- a/tests/Unit/Model/TranscriptionAvailableCallbackTest.php +++ b/tests/Unit/Model/TranscriptionAvailableCallbackTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\FileFormatEnum; +use Bandwidth\Model\Transcription; +use Bandwidth\Model\TranscriptionAvailableCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,36 @@ */ class TranscriptionAvailableCallbackTest extends TestCase { + private static TranscriptionAvailableCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new TranscriptionAvailableCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'call_url' => 'test_string', + 'media_url' => 'test_string', + 'parent_call_id' => 'test_string', + 'recording_id' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'end_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'duration' => 'test_string', + 'file_format' => FileFormatEnum::MP3, + 'tag' => 'test_string', + 'transcription' => new Transcription([]), + 'transfer_caller_id' => 'test_string', + 'transfer_to' => 'test_string' + ]); } /** @@ -74,8 +82,7 @@ public static function tearDownAfterClass(): void */ public function testTranscriptionAvailableCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TranscriptionAvailableCallback::class, self::$instance); } /** @@ -83,8 +90,8 @@ public function testTranscriptionAvailableCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +99,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +108,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +117,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +126,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +135,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +144,8 @@ public function testPropertyTo() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +153,8 @@ public function testPropertyDirection() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -155,8 +162,8 @@ public function testPropertyCallId() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -164,8 +171,8 @@ public function testPropertyCallUrl() */ public function testPropertyMediaUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getMediaUrl()); + $this->assertEquals('test_string', self::$instance->getMediaUrl()); } /** @@ -173,8 +180,8 @@ public function testPropertyMediaUrl() */ public function testPropertyParentCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getParentCallId()); + $this->assertEquals('test_string', self::$instance->getParentCallId()); } /** @@ -182,8 +189,8 @@ public function testPropertyParentCallId() */ public function testPropertyRecordingId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRecordingId()); + $this->assertEquals('test_string', self::$instance->getRecordingId()); } /** @@ -191,8 +198,8 @@ public function testPropertyRecordingId() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -200,8 +207,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -209,8 +216,8 @@ public function testPropertyStartTime() */ public function testPropertyEndTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEndTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEndTime()); } /** @@ -218,8 +225,8 @@ public function testPropertyEndTime() */ public function testPropertyDuration() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDuration()); + $this->assertEquals('test_string', self::$instance->getDuration()); } /** @@ -227,8 +234,8 @@ public function testPropertyDuration() */ public function testPropertyFileFormat() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(FileFormatEnum::class, self::$instance->getFileFormat()); + $this->assertSame(FileFormatEnum::MP3, self::$instance->getFileFormat()); } /** @@ -236,8 +243,8 @@ public function testPropertyFileFormat() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -245,8 +252,7 @@ public function testPropertyTag() */ public function testPropertyTranscription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Transcription::class, self::$instance->getTranscription()); } /** @@ -254,8 +260,8 @@ public function testPropertyTranscription() */ public function testPropertyTransferCallerId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferCallerId()); + $this->assertEquals('test_string', self::$instance->getTransferCallerId()); } /** @@ -263,7 +269,6 @@ public function testPropertyTransferCallerId() */ public function testPropertyTransferTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTransferTo()); + $this->assertEquals('test_string', self::$instance->getTransferTo()); + }} diff --git a/tests/Unit/Model/TranscriptionTest.php b/tests/Unit/Model/TranscriptionTest.php index 33b6b385..80fb4446 100644 --- a/tests/Unit/Model/TranscriptionTest.php +++ b/tests/Unit/Model/TranscriptionTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Transcription; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,18 @@ */ class TranscriptionTest extends TestCase { + private static Transcription $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new Transcription([ + 'speaker' => 1, + 'text' => 'test_string', + 'confidence' => 1.5 + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testTranscription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Transcription::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testTranscription() */ public function testPropertySpeaker() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getSpeaker()); + $this->assertEquals(1, self::$instance->getSpeaker()); } /** @@ -92,8 +78,8 @@ public function testPropertySpeaker() */ public function testPropertyText() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getText()); + $this->assertEquals('test_string', self::$instance->getText()); } /** @@ -101,7 +87,6 @@ public function testPropertyText() */ public function testPropertyConfidence() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsFloat(self::$instance->getConfidence()); + $this->assertEquals(1.5, self::$instance->getConfidence()); + }} diff --git a/tests/Unit/Model/TransferAnswerCallbackTest.php b/tests/Unit/Model/TransferAnswerCallbackTest.php index 1c93a43e..c2b6839d 100644 --- a/tests/Unit/Model/TransferAnswerCallbackTest.php +++ b/tests/Unit/Model/TransferAnswerCallbackTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\TransferAnswerCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,30 @@ */ class TransferAnswerCallbackTest extends TestCase { + private static TransferAnswerCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new TransferAnswerCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'call_url' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'tag' => 'test_string', + 'transfer_caller_id' => 'test_string', + 'transfer_to' => 'test_string' + ]); } /** @@ -74,8 +74,7 @@ public static function tearDownAfterClass(): void */ public function testTransferAnswerCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TransferAnswerCallback::class, self::$instance); } /** @@ -83,8 +82,8 @@ public function testTransferAnswerCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +91,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +100,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +109,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +118,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +127,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +136,8 @@ public function testPropertyTo() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +145,8 @@ public function testPropertyDirection() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -155,8 +154,8 @@ public function testPropertyCallId() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -164,8 +163,8 @@ public function testPropertyCallUrl() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -173,8 +172,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -182,8 +181,8 @@ public function testPropertyStartTime() */ public function testPropertyAnswerTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); } /** @@ -191,8 +190,8 @@ public function testPropertyAnswerTime() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -200,8 +199,8 @@ public function testPropertyTag() */ public function testPropertyTransferCallerId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferCallerId()); + $this->assertEquals('test_string', self::$instance->getTransferCallerId()); } /** @@ -209,7 +208,6 @@ public function testPropertyTransferCallerId() */ public function testPropertyTransferTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTransferTo()); + $this->assertEquals('test_string', self::$instance->getTransferTo()); + }} diff --git a/tests/Unit/Model/TransferCompleteCallbackTest.php b/tests/Unit/Model/TransferCompleteCallbackTest.php index 7e534aec..d809011f 100644 --- a/tests/Unit/Model/TransferCompleteCallbackTest.php +++ b/tests/Unit/Model/TransferCompleteCallbackTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\TransferCompleteCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,33 @@ */ class TransferCompleteCallbackTest extends TestCase { + private static TransferCompleteCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new TransferCompleteCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'call_url' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'tag' => 'test_string', + 'transfer_caller_id' => 'test_string', + 'transfer_to' => 'test_string', + 'cause' => 'test_string', + 'error_message' => 'test_string', + 'error_id' => 'test_string' + ]); } /** @@ -74,8 +77,7 @@ public static function tearDownAfterClass(): void */ public function testTransferCompleteCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TransferCompleteCallback::class, self::$instance); } /** @@ -83,8 +85,8 @@ public function testTransferCompleteCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +94,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +103,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +112,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +121,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +130,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +139,8 @@ public function testPropertyTo() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +148,8 @@ public function testPropertyDirection() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -155,8 +157,8 @@ public function testPropertyCallId() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -164,8 +166,8 @@ public function testPropertyCallUrl() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -173,8 +175,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -182,8 +184,8 @@ public function testPropertyStartTime() */ public function testPropertyAnswerTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); } /** @@ -191,8 +193,8 @@ public function testPropertyAnswerTime() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -200,8 +202,8 @@ public function testPropertyTag() */ public function testPropertyTransferCallerId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferCallerId()); + $this->assertEquals('test_string', self::$instance->getTransferCallerId()); } /** @@ -209,8 +211,8 @@ public function testPropertyTransferCallerId() */ public function testPropertyTransferTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferTo()); + $this->assertEquals('test_string', self::$instance->getTransferTo()); } /** @@ -218,8 +220,8 @@ public function testPropertyTransferTo() */ public function testPropertyCause() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCause()); + $this->assertEquals('test_string', self::$instance->getCause()); } /** @@ -227,8 +229,8 @@ public function testPropertyCause() */ public function testPropertyErrorMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getErrorMessage()); + $this->assertEquals('test_string', self::$instance->getErrorMessage()); } /** @@ -236,7 +238,6 @@ public function testPropertyErrorMessage() */ public function testPropertyErrorId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getErrorId()); + $this->assertEquals('test_string', self::$instance->getErrorId()); + }} diff --git a/tests/Unit/Model/TransferDisconnectCallbackTest.php b/tests/Unit/Model/TransferDisconnectCallbackTest.php index 5303fc3c..71a6c8d8 100644 --- a/tests/Unit/Model/TransferDisconnectCallbackTest.php +++ b/tests/Unit/Model/TransferDisconnectCallbackTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallDirectionEnum; +use Bandwidth\Model\TransferDisconnectCallback; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,35 @@ */ class TransferDisconnectCallbackTest extends TestCase { + private static TransferDisconnectCallback $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new TransferDisconnectCallback([ + 'event_type' => 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'call_url' => 'test_string', + 'parent_call_id' => 'test_string', + 'enqueued_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'end_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'tag' => 'test_string', + 'transfer_caller_id' => 'test_string', + 'transfer_to' => 'test_string', + 'cause' => 'test_string', + 'error_message' => 'test_string', + 'error_id' => 'test_string' + ]); } /** @@ -74,8 +79,7 @@ public static function tearDownAfterClass(): void */ public function testTransferDisconnectCallback() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TransferDisconnectCallback::class, self::$instance); } /** @@ -83,8 +87,8 @@ public function testTransferDisconnectCallback() */ public function testPropertyEventType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); } /** @@ -92,8 +96,8 @@ public function testPropertyEventType() */ public function testPropertyEventTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); } /** @@ -101,8 +105,8 @@ public function testPropertyEventTime() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -110,8 +114,8 @@ public function testPropertyAccountId() */ public function testPropertyApplicationId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); } /** @@ -119,8 +123,8 @@ public function testPropertyApplicationId() */ public function testPropertyFrom() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); } /** @@ -128,8 +132,8 @@ public function testPropertyFrom() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -137,8 +141,8 @@ public function testPropertyTo() */ public function testPropertyDirection() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); } /** @@ -146,8 +150,8 @@ public function testPropertyDirection() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); } /** @@ -155,8 +159,8 @@ public function testPropertyCallId() */ public function testPropertyCallUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); } /** @@ -164,8 +168,8 @@ public function testPropertyCallUrl() */ public function testPropertyParentCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getParentCallId()); + $this->assertEquals('test_string', self::$instance->getParentCallId()); } /** @@ -173,8 +177,8 @@ public function testPropertyParentCallId() */ public function testPropertyEnqueuedTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEnqueuedTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEnqueuedTime()); } /** @@ -182,8 +186,8 @@ public function testPropertyEnqueuedTime() */ public function testPropertyStartTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); } /** @@ -191,8 +195,8 @@ public function testPropertyStartTime() */ public function testPropertyAnswerTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); } /** @@ -200,8 +204,8 @@ public function testPropertyAnswerTime() */ public function testPropertyEndTime() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getEndTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEndTime()); } /** @@ -209,8 +213,8 @@ public function testPropertyEndTime() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); } /** @@ -218,8 +222,8 @@ public function testPropertyTag() */ public function testPropertyTransferCallerId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferCallerId()); + $this->assertEquals('test_string', self::$instance->getTransferCallerId()); } /** @@ -227,8 +231,8 @@ public function testPropertyTransferCallerId() */ public function testPropertyTransferTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTransferTo()); + $this->assertEquals('test_string', self::$instance->getTransferTo()); } /** @@ -236,8 +240,8 @@ public function testPropertyTransferTo() */ public function testPropertyCause() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCause()); + $this->assertEquals('test_string', self::$instance->getCause()); } /** @@ -245,8 +249,8 @@ public function testPropertyCause() */ public function testPropertyErrorMessage() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getErrorMessage()); + $this->assertEquals('test_string', self::$instance->getErrorMessage()); } /** @@ -254,7 +258,6 @@ public function testPropertyErrorMessage() */ public function testPropertyErrorId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getErrorId()); + $this->assertEquals('test_string', self::$instance->getErrorId()); + }} diff --git a/tests/Unit/Model/UpdateCallRecordingTest.php b/tests/Unit/Model/UpdateCallRecordingTest.php index f895a9cf..83c41508 100644 --- a/tests/Unit/Model/UpdateCallRecordingTest.php +++ b/tests/Unit/Model/UpdateCallRecordingTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RecordingStateEnum; +use Bandwidth\Model\UpdateCallRecording; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,16 @@ */ class UpdateCallRecordingTest extends TestCase { + private static UpdateCallRecording $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new UpdateCallRecording([ + 'state' => RecordingStateEnum::PAUSED + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testUpdateCallRecording() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(UpdateCallRecording::class, self::$instance); } /** @@ -83,7 +68,6 @@ public function testUpdateCallRecording() */ public function testPropertyState() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(RecordingStateEnum::class, self::$instance->getState()); + $this->assertSame(RecordingStateEnum::PAUSED, self::$instance->getState()); + }} diff --git a/tests/Unit/Model/UpdateCallTest.php b/tests/Unit/Model/UpdateCallTest.php index dd45a911..7a3745db 100644 --- a/tests/Unit/Model/UpdateCallTest.php +++ b/tests/Unit/Model/UpdateCallTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\CallStateEnum; +use Bandwidth\Model\RedirectMethodEnum; +use Bandwidth\Model\UpdateCall; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,25 @@ */ class UpdateCallTest extends TestCase { + private static UpdateCall $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new UpdateCall([ + 'state' => CallStateEnum::ACTIVE, + 'redirect_url' => 'test_string', + 'redirect_method' => RedirectMethodEnum::GET, + 'username' => 'test_string', + 'password' => 'test_string', + 'redirect_fallback_url' => 'test_string', + 'redirect_fallback_method' => RedirectMethodEnum::GET, + 'fallback_username' => 'test_string', + 'fallback_password' => 'test_string', + 'tag' => 'test_string' + ]); } /** @@ -74,8 +70,7 @@ public static function tearDownAfterClass(): void */ public function testUpdateCall() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(UpdateCall::class, self::$instance); } /** @@ -83,8 +78,8 @@ public function testUpdateCall() */ public function testPropertyState() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(CallStateEnum::class, self::$instance->getState()); + $this->assertSame(CallStateEnum::ACTIVE, self::$instance->getState()); } /** @@ -92,8 +87,8 @@ public function testPropertyState() */ public function testPropertyRedirectUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRedirectUrl()); + $this->assertEquals('test_string', self::$instance->getRedirectUrl()); } /** @@ -101,8 +96,8 @@ public function testPropertyRedirectUrl() */ public function testPropertyRedirectMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RedirectMethodEnum::class, self::$instance->getRedirectMethod()); + $this->assertSame(RedirectMethodEnum::GET, self::$instance->getRedirectMethod()); } /** @@ -110,8 +105,8 @@ public function testPropertyRedirectMethod() */ public function testPropertyUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUsername()); + $this->assertEquals('test_string', self::$instance->getUsername()); } /** @@ -119,8 +114,8 @@ public function testPropertyUsername() */ public function testPropertyPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPassword()); + $this->assertEquals('test_string', self::$instance->getPassword()); } /** @@ -128,8 +123,8 @@ public function testPropertyPassword() */ public function testPropertyRedirectFallbackUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRedirectFallbackUrl()); + $this->assertEquals('test_string', self::$instance->getRedirectFallbackUrl()); } /** @@ -137,8 +132,8 @@ public function testPropertyRedirectFallbackUrl() */ public function testPropertyRedirectFallbackMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RedirectMethodEnum::class, self::$instance->getRedirectFallbackMethod()); + $this->assertSame(RedirectMethodEnum::GET, self::$instance->getRedirectFallbackMethod()); } /** @@ -146,8 +141,8 @@ public function testPropertyRedirectFallbackMethod() */ public function testPropertyFallbackUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFallbackUsername()); + $this->assertEquals('test_string', self::$instance->getFallbackUsername()); } /** @@ -155,8 +150,8 @@ public function testPropertyFallbackUsername() */ public function testPropertyFallbackPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFallbackPassword()); + $this->assertEquals('test_string', self::$instance->getFallbackPassword()); } /** @@ -164,7 +159,6 @@ public function testPropertyFallbackPassword() */ public function testPropertyTag() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + }} diff --git a/tests/Unit/Model/UpdateConferenceMemberTest.php b/tests/Unit/Model/UpdateConferenceMemberTest.php index a48a7fe7..85e9c59d 100644 --- a/tests/Unit/Model/UpdateConferenceMemberTest.php +++ b/tests/Unit/Model/UpdateConferenceMemberTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\UpdateConferenceMember; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,18 @@ */ class UpdateConferenceMemberTest extends TestCase { + private static UpdateConferenceMember $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new UpdateConferenceMember([ + 'mute' => true, + 'hold' => true, + 'call_ids_to_coach' => ['test_string'] + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testUpdateConferenceMember() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(UpdateConferenceMember::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testUpdateConferenceMember() */ public function testPropertyMute() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsBool(self::$instance->getMute()); + $this->assertTrue(self::$instance->getMute()); } /** @@ -92,8 +78,8 @@ public function testPropertyMute() */ public function testPropertyHold() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsBool(self::$instance->getHold()); + $this->assertTrue(self::$instance->getHold()); } /** @@ -101,7 +87,6 @@ public function testPropertyHold() */ public function testPropertyCallIdsToCoach() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getCallIdsToCoach()); + $this->assertEquals(['test_string'], self::$instance->getCallIdsToCoach()); + }} diff --git a/tests/Unit/Model/UpdateConferenceTest.php b/tests/Unit/Model/UpdateConferenceTest.php index 201108bb..e8c57011 100644 --- a/tests/Unit/Model/UpdateConferenceTest.php +++ b/tests/Unit/Model/UpdateConferenceTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\ConferenceStateEnum; +use Bandwidth\Model\RedirectMethodEnum; +use Bandwidth\Model\UpdateConference; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,24 @@ */ class UpdateConferenceTest extends TestCase { + private static UpdateConference $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new UpdateConference([ + 'status' => ConferenceStateEnum::ACTIVE, + 'redirect_url' => 'test_string', + 'redirect_method' => RedirectMethodEnum::GET, + 'username' => 'test_string', + 'password' => 'test_string', + 'redirect_fallback_url' => 'test_string', + 'redirect_fallback_method' => RedirectMethodEnum::GET, + 'fallback_username' => 'test_string', + 'fallback_password' => 'test_string' + ]); } /** @@ -74,8 +69,7 @@ public static function tearDownAfterClass(): void */ public function testUpdateConference() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(UpdateConference::class, self::$instance); } /** @@ -83,8 +77,8 @@ public function testUpdateConference() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(ConferenceStateEnum::class, self::$instance->getStatus()); + $this->assertSame(ConferenceStateEnum::ACTIVE, self::$instance->getStatus()); } /** @@ -92,8 +86,8 @@ public function testPropertyStatus() */ public function testPropertyRedirectUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRedirectUrl()); + $this->assertEquals('test_string', self::$instance->getRedirectUrl()); } /** @@ -101,8 +95,8 @@ public function testPropertyRedirectUrl() */ public function testPropertyRedirectMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RedirectMethodEnum::class, self::$instance->getRedirectMethod()); + $this->assertSame(RedirectMethodEnum::GET, self::$instance->getRedirectMethod()); } /** @@ -110,8 +104,8 @@ public function testPropertyRedirectMethod() */ public function testPropertyUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUsername()); + $this->assertEquals('test_string', self::$instance->getUsername()); } /** @@ -119,8 +113,8 @@ public function testPropertyUsername() */ public function testPropertyPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPassword()); + $this->assertEquals('test_string', self::$instance->getPassword()); } /** @@ -128,8 +122,8 @@ public function testPropertyPassword() */ public function testPropertyRedirectFallbackUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getRedirectFallbackUrl()); + $this->assertEquals('test_string', self::$instance->getRedirectFallbackUrl()); } /** @@ -137,8 +131,8 @@ public function testPropertyRedirectFallbackUrl() */ public function testPropertyRedirectFallbackMethod() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(RedirectMethodEnum::class, self::$instance->getRedirectFallbackMethod()); + $this->assertSame(RedirectMethodEnum::GET, self::$instance->getRedirectFallbackMethod()); } /** @@ -146,8 +140,8 @@ public function testPropertyRedirectFallbackMethod() */ public function testPropertyFallbackUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getFallbackUsername()); + $this->assertEquals('test_string', self::$instance->getFallbackUsername()); } /** @@ -155,7 +149,6 @@ public function testPropertyFallbackUsername() */ public function testPropertyFallbackPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getFallbackPassword()); + $this->assertEquals('test_string', self::$instance->getFallbackPassword()); + }} diff --git a/tests/Unit/Model/VerificationDenialWebhookTest.php b/tests/Unit/Model/VerificationDenialWebhookTest.php index 1f1dfd61..66458724 100644 --- a/tests/Unit/Model/VerificationDenialWebhookTest.php +++ b/tests/Unit/Model/VerificationDenialWebhookTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\AdditionalDenialReason; +use Bandwidth\Model\VerificationDenialWebhook; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,25 @@ */ class VerificationDenialWebhookTest extends TestCase { + private static VerificationDenialWebhook $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new VerificationDenialWebhook([ + 'account_id' => 'test_string', + 'additional_denial_reasons' => [new AdditionalDenialReason([])], + 'decline_reason_description' => 'test_string', + 'denial_status_code' => 1, + 'internal_ticket_number' => 'test_string', + 'phone_number' => 'test_string', + 'resubmit_allowed' => true, + 'status' => 'test_string', + 'blocked' => true, + 'blocked_reason' => 'test_string' + ]); } /** @@ -74,8 +69,7 @@ public static function tearDownAfterClass(): void */ public function testVerificationDenialWebhook() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(VerificationDenialWebhook::class, self::$instance); } /** @@ -83,8 +77,8 @@ public function testVerificationDenialWebhook() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -92,8 +86,8 @@ public function testPropertyAccountId() */ public function testPropertyAdditionalDenialReasons() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getAdditionalDenialReasons()); + $this->assertInstanceOf(AdditionalDenialReason::class, self::$instance->getAdditionalDenialReasons()[0]); } /** @@ -101,8 +95,8 @@ public function testPropertyAdditionalDenialReasons() */ public function testPropertyDeclineReasonDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDeclineReasonDescription()); + $this->assertEquals('test_string', self::$instance->getDeclineReasonDescription()); } /** @@ -110,8 +104,8 @@ public function testPropertyDeclineReasonDescription() */ public function testPropertyDenialStatusCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getDenialStatusCode()); + $this->assertEquals(1, self::$instance->getDenialStatusCode()); } /** @@ -119,8 +113,8 @@ public function testPropertyDenialStatusCode() */ public function testPropertyInternalTicketNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getInternalTicketNumber()); + $this->assertEquals('test_string', self::$instance->getInternalTicketNumber()); } /** @@ -128,8 +122,8 @@ public function testPropertyInternalTicketNumber() */ public function testPropertyPhoneNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPhoneNumber()); + $this->assertEquals('test_string', self::$instance->getPhoneNumber()); } /** @@ -137,8 +131,8 @@ public function testPropertyPhoneNumber() */ public function testPropertyResubmitAllowed() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsBool(self::$instance->getResubmitAllowed()); + $this->assertTrue(self::$instance->getResubmitAllowed()); } /** @@ -146,8 +140,8 @@ public function testPropertyResubmitAllowed() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getStatus()); + $this->assertEquals('test_string', self::$instance->getStatus()); } /** @@ -155,8 +149,8 @@ public function testPropertyStatus() */ public function testPropertyBlocked() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsBool(self::$instance->getBlocked()); + $this->assertTrue(self::$instance->getBlocked()); } /** @@ -164,7 +158,6 @@ public function testPropertyBlocked() */ public function testPropertyBlockedReason() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getBlockedReason()); + $this->assertEquals('test_string', self::$instance->getBlockedReason()); + }} diff --git a/tests/Unit/Model/VerificationRequestTest.php b/tests/Unit/Model/VerificationRequestTest.php index 593fe239..63ce0967 100644 --- a/tests/Unit/Model/VerificationRequestTest.php +++ b/tests/Unit/Model/VerificationRequestTest.php @@ -28,6 +28,13 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Address; +use Bandwidth\Model\BusinessEntityTypeEnum; +use Bandwidth\Model\BusinessRegistrationTypeEnum; +use Bandwidth\Model\Contact; +use Bandwidth\Model\OptInWorkflow; +use Bandwidth\Model\VerificationRequest; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +47,35 @@ */ class VerificationRequestTest extends TestCase { + private static VerificationRequest $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new VerificationRequest([ + 'business_address' => new Address([]), + 'business_contact' => new Contact([]), + 'message_volume' => 1, + 'phone_numbers' => ['test_string'], + 'use_case' => 'test_string', + 'use_case_summary' => 'test_string', + 'production_message_content' => 'test_string', + 'opt_in_workflow' => new OptInWorkflow([]), + 'additional_information' => 'test_string', + 'isv_reseller' => 'test_string', + 'privacy_policy_url' => 'test_string', + 'terms_and_conditions_url' => 'test_string', + 'business_dba' => 'test_string', + 'business_registration_number' => 'test_string', + 'business_registration_type' => BusinessRegistrationTypeEnum::EIN, + 'business_registration_issuing_country' => 'test_string', + 'business_entity_type' => BusinessEntityTypeEnum::SOLE_PROPRIETOR, + 'help_message_response' => 'test_string', + 'age_gated_content' => true, + 'cv_token' => 'test_string' + ]); } /** @@ -74,8 +83,7 @@ public static function tearDownAfterClass(): void */ public function testVerificationRequest() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(VerificationRequest::class, self::$instance); } /** @@ -83,8 +91,7 @@ public function testVerificationRequest() */ public function testPropertyBusinessAddress() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Address::class, self::$instance->getBusinessAddress()); } /** @@ -92,8 +99,7 @@ public function testPropertyBusinessAddress() */ public function testPropertyBusinessContact() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Contact::class, self::$instance->getBusinessContact()); } /** @@ -101,8 +107,8 @@ public function testPropertyBusinessContact() */ public function testPropertyMessageVolume() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getMessageVolume()); + $this->assertEquals(1, self::$instance->getMessageVolume()); } /** @@ -110,8 +116,8 @@ public function testPropertyMessageVolume() */ public function testPropertyPhoneNumbers() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getPhoneNumbers()); + $this->assertEquals(['test_string'], self::$instance->getPhoneNumbers()); } /** @@ -119,8 +125,8 @@ public function testPropertyPhoneNumbers() */ public function testPropertyUseCase() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUseCase()); + $this->assertEquals('test_string', self::$instance->getUseCase()); } /** @@ -128,8 +134,8 @@ public function testPropertyUseCase() */ public function testPropertyUseCaseSummary() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUseCaseSummary()); + $this->assertEquals('test_string', self::$instance->getUseCaseSummary()); } /** @@ -137,8 +143,8 @@ public function testPropertyUseCaseSummary() */ public function testPropertyProductionMessageContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getProductionMessageContent()); + $this->assertEquals('test_string', self::$instance->getProductionMessageContent()); } /** @@ -146,8 +152,7 @@ public function testPropertyProductionMessageContent() */ public function testPropertyOptInWorkflow() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(OptInWorkflow::class, self::$instance->getOptInWorkflow()); } /** @@ -155,8 +160,8 @@ public function testPropertyOptInWorkflow() */ public function testPropertyAdditionalInformation() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAdditionalInformation()); + $this->assertEquals('test_string', self::$instance->getAdditionalInformation()); } /** @@ -164,8 +169,8 @@ public function testPropertyAdditionalInformation() */ public function testPropertyIsvReseller() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getIsvReseller()); + $this->assertEquals('test_string', self::$instance->getIsvReseller()); } /** @@ -173,8 +178,8 @@ public function testPropertyIsvReseller() */ public function testPropertyPrivacyPolicyUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPrivacyPolicyUrl()); + $this->assertEquals('test_string', self::$instance->getPrivacyPolicyUrl()); } /** @@ -182,8 +187,8 @@ public function testPropertyPrivacyPolicyUrl() */ public function testPropertyTermsAndConditionsUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTermsAndConditionsUrl()); + $this->assertEquals('test_string', self::$instance->getTermsAndConditionsUrl()); } /** @@ -191,8 +196,8 @@ public function testPropertyTermsAndConditionsUrl() */ public function testPropertyBusinessDba() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getBusinessDba()); + $this->assertEquals('test_string', self::$instance->getBusinessDba()); } /** @@ -200,8 +205,8 @@ public function testPropertyBusinessDba() */ public function testPropertyBusinessRegistrationNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getBusinessRegistrationNumber()); + $this->assertEquals('test_string', self::$instance->getBusinessRegistrationNumber()); } /** @@ -209,8 +214,8 @@ public function testPropertyBusinessRegistrationNumber() */ public function testPropertyBusinessRegistrationType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(BusinessRegistrationTypeEnum::class, self::$instance->getBusinessRegistrationType()); + $this->assertSame(BusinessRegistrationTypeEnum::EIN, self::$instance->getBusinessRegistrationType()); } /** @@ -218,8 +223,8 @@ public function testPropertyBusinessRegistrationType() */ public function testPropertyBusinessRegistrationIssuingCountry() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getBusinessRegistrationIssuingCountry()); + $this->assertEquals('test_string', self::$instance->getBusinessRegistrationIssuingCountry()); } /** @@ -227,8 +232,8 @@ public function testPropertyBusinessRegistrationIssuingCountry() */ public function testPropertyBusinessEntityType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(BusinessEntityTypeEnum::class, self::$instance->getBusinessEntityType()); + $this->assertSame(BusinessEntityTypeEnum::SOLE_PROPRIETOR, self::$instance->getBusinessEntityType()); } /** @@ -236,8 +241,8 @@ public function testPropertyBusinessEntityType() */ public function testPropertyHelpMessageResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getHelpMessageResponse()); + $this->assertEquals('test_string', self::$instance->getHelpMessageResponse()); } /** @@ -245,8 +250,8 @@ public function testPropertyHelpMessageResponse() */ public function testPropertyAgeGatedContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsBool(self::$instance->getAgeGatedContent()); + $this->assertTrue(self::$instance->getAgeGatedContent()); } /** @@ -254,7 +259,6 @@ public function testPropertyAgeGatedContent() */ public function testPropertyCvToken() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getCvToken()); + $this->assertEquals('test_string', self::$instance->getCvToken()); + }} diff --git a/tests/Unit/Model/VerificationUpdateRequestTest.php b/tests/Unit/Model/VerificationUpdateRequestTest.php index 98d1501d..a2224f01 100644 --- a/tests/Unit/Model/VerificationUpdateRequestTest.php +++ b/tests/Unit/Model/VerificationUpdateRequestTest.php @@ -28,6 +28,13 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Address; +use Bandwidth\Model\BusinessEntityTypeEnum; +use Bandwidth\Model\BusinessRegistrationTypeEnum; +use Bandwidth\Model\Contact; +use Bandwidth\Model\OptInWorkflow; +use Bandwidth\Model\VerificationUpdateRequest; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +47,34 @@ */ class VerificationUpdateRequestTest extends TestCase { + private static VerificationUpdateRequest $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new VerificationUpdateRequest([ + 'business_address' => new Address([]), + 'business_contact' => new Contact([]), + 'message_volume' => 1, + 'use_case' => 'test_string', + 'use_case_summary' => 'test_string', + 'production_message_content' => 'test_string', + 'opt_in_workflow' => new OptInWorkflow([]), + 'additional_information' => 'test_string', + 'isv_reseller' => 'test_string', + 'privacy_policy_url' => 'test_string', + 'terms_and_conditions_url' => 'test_string', + 'business_dba' => 'test_string', + 'business_registration_number' => 'test_string', + 'business_registration_type' => BusinessRegistrationTypeEnum::EIN, + 'business_entity_type' => BusinessEntityTypeEnum::SOLE_PROPRIETOR, + 'business_registration_issuing_country' => 'test_string', + 'help_message_response' => 'test_string', + 'age_gated_content' => true, + 'cv_token' => 'test_string' + ]); } /** @@ -74,8 +82,7 @@ public static function tearDownAfterClass(): void */ public function testVerificationUpdateRequest() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(VerificationUpdateRequest::class, self::$instance); } /** @@ -83,8 +90,7 @@ public function testVerificationUpdateRequest() */ public function testPropertyBusinessAddress() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Address::class, self::$instance->getBusinessAddress()); } /** @@ -92,8 +98,7 @@ public function testPropertyBusinessAddress() */ public function testPropertyBusinessContact() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(Contact::class, self::$instance->getBusinessContact()); } /** @@ -101,8 +106,8 @@ public function testPropertyBusinessContact() */ public function testPropertyMessageVolume() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getMessageVolume()); + $this->assertEquals(1, self::$instance->getMessageVolume()); } /** @@ -110,8 +115,8 @@ public function testPropertyMessageVolume() */ public function testPropertyUseCase() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUseCase()); + $this->assertEquals('test_string', self::$instance->getUseCase()); } /** @@ -119,8 +124,8 @@ public function testPropertyUseCase() */ public function testPropertyUseCaseSummary() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUseCaseSummary()); + $this->assertEquals('test_string', self::$instance->getUseCaseSummary()); } /** @@ -128,8 +133,8 @@ public function testPropertyUseCaseSummary() */ public function testPropertyProductionMessageContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getProductionMessageContent()); + $this->assertEquals('test_string', self::$instance->getProductionMessageContent()); } /** @@ -137,8 +142,7 @@ public function testPropertyProductionMessageContent() */ public function testPropertyOptInWorkflow() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(OptInWorkflow::class, self::$instance->getOptInWorkflow()); } /** @@ -146,8 +150,8 @@ public function testPropertyOptInWorkflow() */ public function testPropertyAdditionalInformation() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAdditionalInformation()); + $this->assertEquals('test_string', self::$instance->getAdditionalInformation()); } /** @@ -155,8 +159,8 @@ public function testPropertyAdditionalInformation() */ public function testPropertyIsvReseller() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getIsvReseller()); + $this->assertEquals('test_string', self::$instance->getIsvReseller()); } /** @@ -164,8 +168,8 @@ public function testPropertyIsvReseller() */ public function testPropertyPrivacyPolicyUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPrivacyPolicyUrl()); + $this->assertEquals('test_string', self::$instance->getPrivacyPolicyUrl()); } /** @@ -173,8 +177,8 @@ public function testPropertyPrivacyPolicyUrl() */ public function testPropertyTermsAndConditionsUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTermsAndConditionsUrl()); + $this->assertEquals('test_string', self::$instance->getTermsAndConditionsUrl()); } /** @@ -182,8 +186,8 @@ public function testPropertyTermsAndConditionsUrl() */ public function testPropertyBusinessDba() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getBusinessDba()); + $this->assertEquals('test_string', self::$instance->getBusinessDba()); } /** @@ -191,8 +195,8 @@ public function testPropertyBusinessDba() */ public function testPropertyBusinessRegistrationNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getBusinessRegistrationNumber()); + $this->assertEquals('test_string', self::$instance->getBusinessRegistrationNumber()); } /** @@ -200,8 +204,8 @@ public function testPropertyBusinessRegistrationNumber() */ public function testPropertyBusinessRegistrationType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(BusinessRegistrationTypeEnum::class, self::$instance->getBusinessRegistrationType()); + $this->assertSame(BusinessRegistrationTypeEnum::EIN, self::$instance->getBusinessRegistrationType()); } /** @@ -209,8 +213,8 @@ public function testPropertyBusinessRegistrationType() */ public function testPropertyBusinessEntityType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(BusinessEntityTypeEnum::class, self::$instance->getBusinessEntityType()); + $this->assertSame(BusinessEntityTypeEnum::SOLE_PROPRIETOR, self::$instance->getBusinessEntityType()); } /** @@ -218,8 +222,8 @@ public function testPropertyBusinessEntityType() */ public function testPropertyBusinessRegistrationIssuingCountry() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getBusinessRegistrationIssuingCountry()); + $this->assertEquals('test_string', self::$instance->getBusinessRegistrationIssuingCountry()); } /** @@ -227,8 +231,8 @@ public function testPropertyBusinessRegistrationIssuingCountry() */ public function testPropertyHelpMessageResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getHelpMessageResponse()); + $this->assertEquals('test_string', self::$instance->getHelpMessageResponse()); } /** @@ -236,8 +240,8 @@ public function testPropertyHelpMessageResponse() */ public function testPropertyAgeGatedContent() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsBool(self::$instance->getAgeGatedContent()); + $this->assertTrue(self::$instance->getAgeGatedContent()); } /** @@ -245,7 +249,6 @@ public function testPropertyAgeGatedContent() */ public function testPropertyCvToken() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getCvToken()); + $this->assertEquals('test_string', self::$instance->getCvToken()); + }} diff --git a/tests/Unit/Model/VerificationWebhookTest.php b/tests/Unit/Model/VerificationWebhookTest.php index be55be82..51a64151 100644 --- a/tests/Unit/Model/VerificationWebhookTest.php +++ b/tests/Unit/Model/VerificationWebhookTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\TfvCallbackStatusEnum; +use Bandwidth\Model\VerificationWebhook; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,19 @@ */ class VerificationWebhookTest extends TestCase { + private static VerificationWebhook $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new VerificationWebhook([ + 'account_id' => 'test_string', + 'phone_number' => 'test_string', + 'status' => TfvCallbackStatusEnum::VERIFIED, + 'internal_ticket_number' => 'test_string' + ]); } /** @@ -74,8 +63,7 @@ public static function tearDownAfterClass(): void */ public function testVerificationWebhook() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(VerificationWebhook::class, self::$instance); } /** @@ -83,8 +71,8 @@ public function testVerificationWebhook() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -92,8 +80,8 @@ public function testPropertyAccountId() */ public function testPropertyPhoneNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getPhoneNumber()); + $this->assertEquals('test_string', self::$instance->getPhoneNumber()); } /** @@ -101,8 +89,8 @@ public function testPropertyPhoneNumber() */ public function testPropertyStatus() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TfvCallbackStatusEnum::class, self::$instance->getStatus()); + $this->assertSame(TfvCallbackStatusEnum::VERIFIED, self::$instance->getStatus()); } /** @@ -110,7 +98,6 @@ public function testPropertyStatus() */ public function testPropertyInternalTicketNumber() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getInternalTicketNumber()); + $this->assertEquals('test_string', self::$instance->getInternalTicketNumber()); + }} diff --git a/tests/Unit/Model/VerifyCodeRequestTest.php b/tests/Unit/Model/VerifyCodeRequestTest.php index 48171a12..72b3b7f6 100644 --- a/tests/Unit/Model/VerifyCodeRequestTest.php +++ b/tests/Unit/Model/VerifyCodeRequestTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\VerifyCodeRequest; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,19 @@ */ class VerifyCodeRequestTest extends TestCase { + private static VerifyCodeRequest $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new VerifyCodeRequest([ + 'to' => 'test_string', + 'scope' => 'test_string', + 'expiration_time_in_minutes' => 1.5, + 'code' => 'test_string' + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testVerifyCodeRequest() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(VerifyCodeRequest::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testVerifyCodeRequest() */ public function testPropertyTo() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); } /** @@ -92,8 +79,8 @@ public function testPropertyTo() */ public function testPropertyScope() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getScope()); + $this->assertEquals('test_string', self::$instance->getScope()); } /** @@ -101,8 +88,8 @@ public function testPropertyScope() */ public function testPropertyExpirationTimeInMinutes() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsFloat(self::$instance->getExpirationTimeInMinutes()); + $this->assertEquals(1.5, self::$instance->getExpirationTimeInMinutes()); } /** @@ -110,7 +97,6 @@ public function testPropertyExpirationTimeInMinutes() */ public function testPropertyCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getCode()); + $this->assertEquals('test_string', self::$instance->getCode()); + }} diff --git a/tests/Unit/Model/VerifyCodeResponseTest.php b/tests/Unit/Model/VerifyCodeResponseTest.php index 7faad122..2c8d4a05 100644 --- a/tests/Unit/Model/VerifyCodeResponseTest.php +++ b/tests/Unit/Model/VerifyCodeResponseTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\VerifyCodeResponse; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,16 @@ */ class VerifyCodeResponseTest extends TestCase { + private static VerifyCodeResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new VerifyCodeResponse([ + 'valid' => true + ]); } /** @@ -74,8 +59,7 @@ public static function tearDownAfterClass(): void */ public function testVerifyCodeResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(VerifyCodeResponse::class, self::$instance); } /** @@ -83,7 +67,6 @@ public function testVerifyCodeResponse() */ public function testPropertyValid() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsBool(self::$instance->getValid()); + $this->assertTrue(self::$instance->getValid()); + }} diff --git a/tests/Unit/Model/VoiceApiErrorTest.php b/tests/Unit/Model/VoiceApiErrorTest.php index 4e72f126..04c8f850 100644 --- a/tests/Unit/Model/VoiceApiErrorTest.php +++ b/tests/Unit/Model/VoiceApiErrorTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\VoiceApiError; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,18 @@ */ class VoiceApiErrorTest extends TestCase { + private static VoiceApiError $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new VoiceApiError([ + 'type' => 'test_string', + 'description' => 'test_string', + 'id' => 'test_string' + ]); } /** @@ -74,8 +61,7 @@ public static function tearDownAfterClass(): void */ public function testVoiceApiError() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(VoiceApiError::class, self::$instance); } /** @@ -83,8 +69,8 @@ public function testVoiceApiError() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getType()); + $this->assertEquals('test_string', self::$instance->getType()); } /** @@ -92,8 +78,8 @@ public function testPropertyType() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); } /** @@ -101,7 +87,6 @@ public function testPropertyDescription() */ public function testPropertyId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getId()); + $this->assertEquals('test_string', self::$instance->getId()); + }} diff --git a/tests/Unit/Model/VoiceCodeResponseTest.php b/tests/Unit/Model/VoiceCodeResponseTest.php index ad5346f6..5ad055bc 100644 --- a/tests/Unit/Model/VoiceCodeResponseTest.php +++ b/tests/Unit/Model/VoiceCodeResponseTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\VoiceCodeResponse; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,16 @@ */ class VoiceCodeResponseTest extends TestCase { + private static VoiceCodeResponse $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new VoiceCodeResponse([ + 'call_id' => 'test_string' + ]); } /** @@ -74,8 +59,7 @@ public static function tearDownAfterClass(): void */ public function testVoiceCodeResponse() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(VoiceCodeResponse::class, self::$instance); } /** @@ -83,7 +67,6 @@ public function testVoiceCodeResponse() */ public function testPropertyCallId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); + }} diff --git a/tests/Unit/Model/WebhookSubscriptionBasicAuthenticationTest.php b/tests/Unit/Model/WebhookSubscriptionBasicAuthenticationTest.php index d585ccb0..37a290bc 100644 --- a/tests/Unit/Model/WebhookSubscriptionBasicAuthenticationTest.php +++ b/tests/Unit/Model/WebhookSubscriptionBasicAuthenticationTest.php @@ -28,6 +28,8 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\WebhookSubscriptionBasicAuthentication; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +42,17 @@ */ class WebhookSubscriptionBasicAuthenticationTest extends TestCase { + private static WebhookSubscriptionBasicAuthentication $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new WebhookSubscriptionBasicAuthentication([ + 'username' => 'test_string', + 'password' => 'test_string' + ]); } /** @@ -74,8 +60,7 @@ public static function tearDownAfterClass(): void */ public function testWebhookSubscriptionBasicAuthentication() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(WebhookSubscriptionBasicAuthentication::class, self::$instance); } /** @@ -83,8 +68,8 @@ public function testWebhookSubscriptionBasicAuthentication() */ public function testPropertyUsername() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getUsername()); + $this->assertEquals('test_string', self::$instance->getUsername()); } /** @@ -92,7 +77,6 @@ public function testPropertyUsername() */ public function testPropertyPassword() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getPassword()); + $this->assertEquals('test_string', self::$instance->getPassword()); + }} diff --git a/tests/Unit/Model/WebhookSubscriptionErrorTest.php b/tests/Unit/Model/WebhookSubscriptionErrorTest.php index d7379cac..965f70fc 100644 --- a/tests/Unit/Model/WebhookSubscriptionErrorTest.php +++ b/tests/Unit/Model/WebhookSubscriptionErrorTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\TelephoneNumber; +use Bandwidth\Model\WebhookSubscriptionError; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,18 @@ */ class WebhookSubscriptionErrorTest extends TestCase { + private static WebhookSubscriptionError $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new WebhookSubscriptionError([ + 'code' => 1, + 'description' => 'test_string', + 'telephone_numbers' => [new TelephoneNumber([])] + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testWebhookSubscriptionError() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(WebhookSubscriptionError::class, self::$instance); } /** @@ -83,8 +70,8 @@ public function testWebhookSubscriptionError() */ public function testPropertyCode() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsInt(self::$instance->getCode()); + $this->assertEquals(1, self::$instance->getCode()); } /** @@ -92,8 +79,8 @@ public function testPropertyCode() */ public function testPropertyDescription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getDescription()); + $this->assertEquals('test_string', self::$instance->getDescription()); } /** @@ -101,7 +88,6 @@ public function testPropertyDescription() */ public function testPropertyTelephoneNumbers() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getTelephoneNumbers()); + $this->assertInstanceOf(TelephoneNumber::class, self::$instance->getTelephoneNumbers()[0]); + }} diff --git a/tests/Unit/Model/WebhookSubscriptionRequestSchemaTest.php b/tests/Unit/Model/WebhookSubscriptionRequestSchemaTest.php index 5f0a2017..8176d3d5 100644 --- a/tests/Unit/Model/WebhookSubscriptionRequestSchemaTest.php +++ b/tests/Unit/Model/WebhookSubscriptionRequestSchemaTest.php @@ -28,6 +28,9 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\TfvBasicAuthentication; +use Bandwidth\Model\WebhookSubscriptionRequestSchema; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +43,18 @@ */ class WebhookSubscriptionRequestSchemaTest extends TestCase { + private static WebhookSubscriptionRequestSchema $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new WebhookSubscriptionRequestSchema([ + 'basic_authentication' => new TfvBasicAuthentication([]), + 'callback_url' => 'test_string', + 'shared_secret_key' => 'test_string' + ]); } /** @@ -74,8 +62,7 @@ public static function tearDownAfterClass(): void */ public function testWebhookSubscriptionRequestSchema() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(WebhookSubscriptionRequestSchema::class, self::$instance); } /** @@ -83,8 +70,7 @@ public function testWebhookSubscriptionRequestSchema() */ public function testPropertyBasicAuthentication() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(TfvBasicAuthentication::class, self::$instance->getBasicAuthentication()); } /** @@ -92,8 +78,8 @@ public function testPropertyBasicAuthentication() */ public function testPropertyCallbackUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallbackUrl()); + $this->assertEquals('test_string', self::$instance->getCallbackUrl()); } /** @@ -101,7 +87,6 @@ public function testPropertyCallbackUrl() */ public function testPropertySharedSecretKey() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsString(self::$instance->getSharedSecretKey()); + $this->assertEquals('test_string', self::$instance->getSharedSecretKey()); + }} diff --git a/tests/Unit/Model/WebhookSubscriptionTest.php b/tests/Unit/Model/WebhookSubscriptionTest.php index bb96d931..2c71cd31 100644 --- a/tests/Unit/Model/WebhookSubscriptionTest.php +++ b/tests/Unit/Model/WebhookSubscriptionTest.php @@ -28,6 +28,10 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\WebhookSubscription; +use Bandwidth\Model\WebhookSubscriptionBasicAuthentication; +use Bandwidth\Model\WebhookSubscriptionTypeEnum; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +44,22 @@ */ class WebhookSubscriptionTest extends TestCase { + private static WebhookSubscription $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new WebhookSubscription([ + 'id' => 'test_string', + 'account_id' => 'test_string', + 'callback_url' => 'test_string', + 'type' => WebhookSubscriptionTypeEnum::TOLLFREE_VERIFICATION_STATUS, + 'basic_authentication' => new WebhookSubscriptionBasicAuthentication([]), + 'created_date' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'modified_date' => new \DateTime('2024-01-01T00:00:00+00:00') + ]); } /** @@ -74,8 +67,7 @@ public static function tearDownAfterClass(): void */ public function testWebhookSubscription() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(WebhookSubscription::class, self::$instance); } /** @@ -83,8 +75,8 @@ public function testWebhookSubscription() */ public function testPropertyId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getId()); + $this->assertEquals('test_string', self::$instance->getId()); } /** @@ -92,8 +84,8 @@ public function testPropertyId() */ public function testPropertyAccountId() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); } /** @@ -101,8 +93,8 @@ public function testPropertyAccountId() */ public function testPropertyCallbackUrl() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsString(self::$instance->getCallbackUrl()); + $this->assertEquals('test_string', self::$instance->getCallbackUrl()); } /** @@ -110,8 +102,8 @@ public function testPropertyCallbackUrl() */ public function testPropertyType() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(WebhookSubscriptionTypeEnum::class, self::$instance->getType()); + $this->assertSame(WebhookSubscriptionTypeEnum::TOLLFREE_VERIFICATION_STATUS, self::$instance->getType()); } /** @@ -119,8 +111,7 @@ public function testPropertyType() */ public function testPropertyBasicAuthentication() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(WebhookSubscriptionBasicAuthentication::class, self::$instance->getBasicAuthentication()); } /** @@ -128,8 +119,8 @@ public function testPropertyBasicAuthentication() */ public function testPropertyCreatedDate() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(\DateTime::class, self::$instance->getCreatedDate()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getCreatedDate()); } /** @@ -137,7 +128,6 @@ public function testPropertyCreatedDate() */ public function testPropertyModifiedDate() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertInstanceOf(\DateTime::class, self::$instance->getModifiedDate()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getModifiedDate()); + }} diff --git a/tests/Unit/Model/WebhookSubscriptionsListBodyTest.php b/tests/Unit/Model/WebhookSubscriptionsListBodyTest.php index 72cc52c8..fcad2282 100644 --- a/tests/Unit/Model/WebhookSubscriptionsListBodyTest.php +++ b/tests/Unit/Model/WebhookSubscriptionsListBodyTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\LinksObject; +use Bandwidth\Model\WebhookSubscription; +use Bandwidth\Model\WebhookSubscriptionError; +use Bandwidth\Model\WebhookSubscriptionsListBody; + use PHPUnit\Framework\TestCase; /** @@ -40,33 +45,18 @@ */ class WebhookSubscriptionsListBodyTest extends TestCase { + private static WebhookSubscriptionsListBody $instance; /** * Setup before running any test case */ public static function setUpBeforeClass(): void { - } - - /** - * Setup before running each test case - */ - public function setUp(): void - { - } - - /** - * Clean up after running each test case - */ - public function tearDown(): void - { - } - - /** - * Clean up after running all test cases - */ - public static function tearDownAfterClass(): void - { + self::$instance = new WebhookSubscriptionsListBody([ + 'links' => new LinksObject([]), + 'errors' => [new WebhookSubscriptionError([])], + 'data' => [new WebhookSubscription([])] + ]); } /** @@ -74,8 +64,7 @@ public static function tearDownAfterClass(): void */ public function testWebhookSubscriptionsListBody() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(WebhookSubscriptionsListBody::class, self::$instance); } /** @@ -83,8 +72,7 @@ public function testWebhookSubscriptionsListBody() */ public function testPropertyLinks() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertInstanceOf(LinksObject::class, self::$instance->getLinks()); } /** @@ -92,8 +80,8 @@ public function testPropertyLinks() */ public function testPropertyErrors() { - // TODO: implement - self::markTestIncomplete('Not implemented'); + $this->assertIsArray(self::$instance->getErrors()); + $this->assertInstanceOf(WebhookSubscriptionError::class, self::$instance->getErrors()[0]); } /** @@ -101,7 +89,6 @@ public function testPropertyErrors() */ public function testPropertyData() { - // TODO: implement - self::markTestIncomplete('Not implemented'); - } -} + $this->assertIsArray(self::$instance->getData()); + $this->assertInstanceOf(WebhookSubscription::class, self::$instance->getData()[0]); + }} From 20e9e24a466823241553262faf1a33f3487202f3 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 20 Aug 2026 17:08:34 -0400 Subject: [PATCH 31/53] add sleep to unit tests --- .github/workflows/test-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 38c8acf7..295e60bf 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -48,4 +48,4 @@ jobs: run: | npm install -g @stoplight/prism-cli composer install - prism mock ./bandwidth.yml & ./vendor/bin/phpunit tests/Unit + prism mock ./bandwidth.yml & (sleep 4; ./vendor/bin/phpunit tests/Unit) From bf8f2a89c84f3206d8e73cce4774c1ecc246cded Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 20 Aug 2026 17:08:50 -0400 Subject: [PATCH 32/53] unit tests for models with discriminators --- tests/Unit/Model/CallbackTest.php | 66 ++++++++++++----- tests/Unit/Model/MultiChannelActionTest.php | 71 ++++++++++++++----- ...ltiChannelChannelListRequestObjectTest.php | 70 +++++++++++++----- ...tiChannelChannelListResponseObjectTest.php | 70 +++++++++++++----- 4 files changed, 209 insertions(+), 68 deletions(-) diff --git a/tests/Unit/Model/CallbackTest.php b/tests/Unit/Model/CallbackTest.php index 3880bdf3..7a6d0bc5 100644 --- a/tests/Unit/Model/CallbackTest.php +++ b/tests/Unit/Model/CallbackTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\Callback; +use Bandwidth\Model\InboundCallback; +use Bandwidth\Model\StatusCallback; +use Bandwidth\ObjectSerializer; + use PHPUnit\Framework\TestCase; /** @@ -40,41 +45,68 @@ */ class CallbackTest extends TestCase { - /** - * Setup before running any test case + * Test "Callback" */ - public static function setUpBeforeClass(): void + public function testCallback() { + $this->assertSame( + [StatusCallback::class, InboundCallback::class], + array_map(fn($type) => ltrim($type, '\\'), Callback::getOneOfTypes()) + ); + $this->assertSame('type', Callback::getOneOfDiscriminator()); + $this->assertSame( + [ + 'message-delivered' => StatusCallback::class, + 'message-failed' => StatusCallback::class, + 'message-read' => StatusCallback::class, + 'message-received' => InboundCallback::class, + 'message-sending' => StatusCallback::class, + 'message-sent' => StatusCallback::class, + 'requested-location-response' => InboundCallback::class, + 'suggestion-response' => InboundCallback::class + ], + array_map(fn($type) => ltrim($type, '\\'), Callback::getOneOfDiscriminatorMappings()) + ); } /** - * Setup before running each test case + * Test that each discriminator value deserializes to its mapped type + * + * @dataProvider discriminatorProvider */ - public function setUp(): void + public function testDeserializeResolvesDiscriminator(string $type, string $expected) { - } + $result = ObjectSerializer::deserialize((object) ['type' => $type], Callback::class); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { + $this->assertInstanceOf($expected, $result); + $this->assertSame($type, $result->getType()->value); } /** - * Clean up after running all test cases + * Test that an unmapped discriminator value is rejected */ - public static function tearDownAfterClass(): void + public function testDeserializeRejectsUnknownDiscriminator() { + $this->expectException(\InvalidArgumentException::class); + + ObjectSerializer::deserialize((object) ['type' => 'not-a-callback-type'], Callback::class); } /** - * Test "Callback" + * @return array */ - public function testCallback() + public static function discriminatorProvider(): array { - // TODO: implement - self::markTestIncomplete('Not implemented'); + return [ + 'message-delivered' => ['message-delivered', StatusCallback::class], + 'message-failed' => ['message-failed', StatusCallback::class], + 'message-read' => ['message-read', StatusCallback::class], + 'message-received' => ['message-received', InboundCallback::class], + 'message-sending' => ['message-sending', StatusCallback::class], + 'message-sent' => ['message-sent', StatusCallback::class], + 'requested-location-response' => ['requested-location-response', InboundCallback::class], + 'suggestion-response' => ['suggestion-response', InboundCallback::class] + ]; } } diff --git a/tests/Unit/Model/MultiChannelActionTest.php b/tests/Unit/Model/MultiChannelActionTest.php index a2e1cec9..5f7c9f6b 100644 --- a/tests/Unit/Model/MultiChannelActionTest.php +++ b/tests/Unit/Model/MultiChannelActionTest.php @@ -28,6 +28,14 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelAction; +use Bandwidth\Model\MultiChannelActionCalendarEvent; +use Bandwidth\Model\RbmActionBase; +use Bandwidth\Model\RbmActionDial; +use Bandwidth\Model\RbmActionOpenUrl; +use Bandwidth\Model\RbmActionViewLocation; +use Bandwidth\ObjectSerializer; + use PHPUnit\Framework\TestCase; /** @@ -40,41 +48,70 @@ */ class MultiChannelActionTest extends TestCase { - /** - * Setup before running any test case + * Test "MultiChannelAction" */ - public static function setUpBeforeClass(): void + public function testMultiChannelAction() { + $this->assertSame( + [ + RbmActionBase::class, + RbmActionDial::class, + RbmActionViewLocation::class, + MultiChannelActionCalendarEvent::class, + RbmActionOpenUrl::class + ], + array_map(fn($type) => ltrim($type, '\\'), MultiChannelAction::getAnyOfTypes()) + ); + $this->assertSame('type', MultiChannelAction::getAnyOfDiscriminator()); + $this->assertSame( + [ + 'CREATE_CALENDAR_EVENT' => MultiChannelActionCalendarEvent::class, + 'DIAL_PHONE' => RbmActionDial::class, + 'OPEN_URL' => RbmActionOpenUrl::class, + 'REPLY' => RbmActionBase::class, + 'REQUEST_LOCATION' => RbmActionBase::class, + 'SHOW_LOCATION' => RbmActionViewLocation::class + ], + array_map(fn($type) => ltrim($type, '\\'), MultiChannelAction::getAnyOfDiscriminatorMappings()) + ); } /** - * Setup before running each test case + * Test that each discriminator value deserializes to its mapped type + * + * @dataProvider discriminatorProvider */ - public function setUp(): void + public function testDeserializeResolvesDiscriminator(string $type, string $expected) { - } + $result = ObjectSerializer::deserialize((object) ['type' => $type], MultiChannelAction::class); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { + $this->assertInstanceOf($expected, $result); + $this->assertSame($type, $result->getType()->value); } /** - * Clean up after running all test cases + * Test that an unmapped discriminator value is rejected */ - public static function tearDownAfterClass(): void + public function testDeserializeRejectsUnknownDiscriminator() { + $this->expectException(\InvalidArgumentException::class); + + ObjectSerializer::deserialize((object) ['type' => 'NOT_AN_ACTION'], MultiChannelAction::class); } /** - * Test "MultiChannelAction" + * @return array */ - public function testMultiChannelAction() + public static function discriminatorProvider(): array { - // TODO: implement - self::markTestIncomplete('Not implemented'); + return [ + 'CREATE_CALENDAR_EVENT' => ['CREATE_CALENDAR_EVENT', MultiChannelActionCalendarEvent::class], + 'DIAL_PHONE' => ['DIAL_PHONE', RbmActionDial::class], + 'OPEN_URL' => ['OPEN_URL', RbmActionOpenUrl::class], + 'REPLY' => ['REPLY', RbmActionBase::class], + 'REQUEST_LOCATION' => ['REQUEST_LOCATION', RbmActionBase::class], + 'SHOW_LOCATION' => ['SHOW_LOCATION', RbmActionViewLocation::class] + ]; } } diff --git a/tests/Unit/Model/MultiChannelChannelListRequestObjectTest.php b/tests/Unit/Model/MultiChannelChannelListRequestObjectTest.php index eb47d167..da213fe5 100644 --- a/tests/Unit/Model/MultiChannelChannelListRequestObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListRequestObjectTest.php @@ -28,6 +28,12 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelChannelListMMSObject; +use Bandwidth\Model\MultiChannelChannelListRBMObject; +use Bandwidth\Model\MultiChannelChannelListRequestObject; +use Bandwidth\Model\MultiChannelChannelListSMSObject; +use Bandwidth\ObjectSerializer; + use PHPUnit\Framework\TestCase; /** @@ -40,41 +46,71 @@ */ class MultiChannelChannelListRequestObjectTest extends TestCase { - /** - * Setup before running any test case + * Test "MultiChannelChannelListRequestObject" */ - public static function setUpBeforeClass(): void + public function testMultiChannelChannelListRequestObject() { + $this->assertSame( + [ + MultiChannelChannelListRBMObject::class, + MultiChannelChannelListSMSObject::class, + MultiChannelChannelListMMSObject::class + ], + array_map(fn($type) => ltrim($type, '\\'), MultiChannelChannelListRequestObject::getAnyOfTypes()) + ); + $this->assertSame('channel', MultiChannelChannelListRequestObject::getAnyOfDiscriminator()); + $this->assertSame( + [ + 'MMS' => MultiChannelChannelListMMSObject::class, + 'RBM' => MultiChannelChannelListRBMObject::class, + 'SMS' => MultiChannelChannelListSMSObject::class + ], + array_map( + fn($type) => ltrim($type, '\\'), + MultiChannelChannelListRequestObject::getAnyOfDiscriminatorMappings() + ) + ); } /** - * Setup before running each test case + * Test that each discriminator value deserializes to its mapped type + * + * @dataProvider discriminatorProvider */ - public function setUp(): void + public function testDeserializeResolvesDiscriminator(string $channel, string $expected) { - } + $result = ObjectSerializer::deserialize( + (object) ['channel' => $channel], + MultiChannelChannelListRequestObject::class + ); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { + $this->assertInstanceOf($expected, $result); + $this->assertSame($channel, $result->getChannel()->value); } /** - * Clean up after running all test cases + * Test that an unmapped discriminator value is rejected */ - public static function tearDownAfterClass(): void + public function testDeserializeRejectsUnknownDiscriminator() { + $this->expectException(\InvalidArgumentException::class); + + ObjectSerializer::deserialize( + (object) ['channel' => 'FAX'], + MultiChannelChannelListRequestObject::class + ); } /** - * Test "MultiChannelChannelListRequestObject" + * @return array */ - public function testMultiChannelChannelListRequestObject() + public static function discriminatorProvider(): array { - // TODO: implement - self::markTestIncomplete('Not implemented'); + return [ + 'MMS' => ['MMS', MultiChannelChannelListMMSObject::class], + 'RBM' => ['RBM', MultiChannelChannelListRBMObject::class], + 'SMS' => ['SMS', MultiChannelChannelListSMSObject::class] + ]; } } diff --git a/tests/Unit/Model/MultiChannelChannelListResponseObjectTest.php b/tests/Unit/Model/MultiChannelChannelListResponseObjectTest.php index 795fedbe..3270d2e8 100644 --- a/tests/Unit/Model/MultiChannelChannelListResponseObjectTest.php +++ b/tests/Unit/Model/MultiChannelChannelListResponseObjectTest.php @@ -28,6 +28,12 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelChannelListMMSResponseObject; +use Bandwidth\Model\MultiChannelChannelListRBMResponseObject; +use Bandwidth\Model\MultiChannelChannelListResponseObject; +use Bandwidth\Model\MultiChannelChannelListSMSResponseObject; +use Bandwidth\ObjectSerializer; + use PHPUnit\Framework\TestCase; /** @@ -40,41 +46,71 @@ */ class MultiChannelChannelListResponseObjectTest extends TestCase { - /** - * Setup before running any test case + * Test "MultiChannelChannelListResponseObject" */ - public static function setUpBeforeClass(): void + public function testMultiChannelChannelListResponseObject() { + $this->assertSame( + [ + MultiChannelChannelListRBMResponseObject::class, + MultiChannelChannelListSMSResponseObject::class, + MultiChannelChannelListMMSResponseObject::class + ], + array_map(fn($type) => ltrim($type, '\\'), MultiChannelChannelListResponseObject::getAnyOfTypes()) + ); + $this->assertSame('channel', MultiChannelChannelListResponseObject::getAnyOfDiscriminator()); + $this->assertSame( + [ + 'MMS' => MultiChannelChannelListMMSResponseObject::class, + 'RBM' => MultiChannelChannelListRBMResponseObject::class, + 'SMS' => MultiChannelChannelListSMSResponseObject::class + ], + array_map( + fn($type) => ltrim($type, '\\'), + MultiChannelChannelListResponseObject::getAnyOfDiscriminatorMappings() + ) + ); } /** - * Setup before running each test case + * Test that each discriminator value deserializes to its mapped type + * + * @dataProvider discriminatorProvider */ - public function setUp(): void + public function testDeserializeResolvesDiscriminator(string $channel, string $expected) { - } + $result = ObjectSerializer::deserialize( + (object) ['channel' => $channel], + MultiChannelChannelListResponseObject::class + ); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { + $this->assertInstanceOf($expected, $result); + $this->assertSame($channel, $result->getChannel()->value); } /** - * Clean up after running all test cases + * Test that an unmapped discriminator value is rejected */ - public static function tearDownAfterClass(): void + public function testDeserializeRejectsUnknownDiscriminator() { + $this->expectException(\InvalidArgumentException::class); + + ObjectSerializer::deserialize( + (object) ['channel' => 'FAX'], + MultiChannelChannelListResponseObject::class + ); } /** - * Test "MultiChannelChannelListResponseObject" + * @return array */ - public function testMultiChannelChannelListResponseObject() + public static function discriminatorProvider(): array { - // TODO: implement - self::markTestIncomplete('Not implemented'); + return [ + 'MMS' => ['MMS', MultiChannelChannelListMMSResponseObject::class], + 'RBM' => ['RBM', MultiChannelChannelListRBMResponseObject::class], + 'SMS' => ['SMS', MultiChannelChannelListSMSResponseObject::class] + ]; } } From 361f5bc301a5ee55a9af592628060bf1b288e60c Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 20 Aug 2026 17:11:15 -0400 Subject: [PATCH 33/53] bash --- .github/workflows/test-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 295e60bf..d0789fae 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -49,3 +49,4 @@ jobs: npm install -g @stoplight/prism-cli composer install prism mock ./bandwidth.yml & (sleep 4; ./vendor/bin/phpunit tests/Unit) + shell: bash From 54ca35e66f3185411e5a80fc9f44d42555c0094f Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 26 Aug 2026 11:20:24 -0400 Subject: [PATCH 34/53] update models with null guard --- src/Model/Address.php | 22 +++++++++---------- src/Model/CodeRequest.php | 14 ++++++------ src/Model/Contact.php | 18 +++++++-------- src/Model/CreateCall.php | 2 +- src/Model/MmsMessageContentFile.php | 2 +- src/Model/MultiChannelActionCalendarEvent.php | 4 ++-- src/Model/MultiChannelMessageRequest.php | 2 +- src/Model/MultiChannelMessageResponseData.php | 2 +- src/Model/OptInWorkflow.php | 4 ++-- src/Model/Page.php | 2 +- src/Model/RbmActionBase.php | 2 +- src/Model/RbmActionDial.php | 2 +- src/Model/RbmActionOpenUrl.php | 4 ++-- src/Model/RbmActionViewLocation.php | 2 +- src/Model/RbmCardContentMedia.php | 2 +- src/Model/RbmMessageCarouselCard.php | 4 ++-- src/Model/RbmMessageContentFile.php | 2 +- src/Model/RbmMessageContentText.php | 2 +- src/Model/SmsMessageContent.php | 2 +- src/Model/TfvBasicAuthentication.php | 4 ++-- src/Model/VerificationRequest.php | 20 ++++++++--------- src/Model/VerificationUpdateRequest.php | 16 +++++++------- src/Model/VerifyCodeRequest.php | 10 ++++----- ...WebhookSubscriptionBasicAuthentication.php | 4 ++-- 24 files changed, 74 insertions(+), 74 deletions(-) diff --git a/src/Model/Address.php b/src/Model/Address.php index db6710ad..30984ff7 100644 --- a/src/Model/Address.php +++ b/src/Model/Address.php @@ -297,22 +297,22 @@ public function listInvalidProperties(): array if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } - if ((mb_strlen($this->container['name']) > 500)) { + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 500)) { $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['name']) < 1)) { + if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) < 1)) { $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; } if ($this->container['addr1'] === null) { $invalidProperties[] = "'addr1' can't be null"; } - if ((mb_strlen($this->container['addr1']) > 500)) { + if (!is_null($this->container['addr1']) && (mb_strlen($this->container['addr1']) > 500)) { $invalidProperties[] = "invalid value for 'addr1', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['addr1']) < 1)) { + if (!is_null($this->container['addr1']) && (mb_strlen($this->container['addr1']) < 1)) { $invalidProperties[] = "invalid value for 'addr1', the character length must be bigger than or equal to 1."; } @@ -327,40 +327,40 @@ public function listInvalidProperties(): array if ($this->container['city'] === null) { $invalidProperties[] = "'city' can't be null"; } - if ((mb_strlen($this->container['city']) > 500)) { + if (!is_null($this->container['city']) && (mb_strlen($this->container['city']) > 500)) { $invalidProperties[] = "invalid value for 'city', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['city']) < 1)) { + if (!is_null($this->container['city']) && (mb_strlen($this->container['city']) < 1)) { $invalidProperties[] = "invalid value for 'city', the character length must be bigger than or equal to 1."; } if ($this->container['state'] === null) { $invalidProperties[] = "'state' can't be null"; } - if ((mb_strlen($this->container['state']) > 500)) { + if (!is_null($this->container['state']) && (mb_strlen($this->container['state']) > 500)) { $invalidProperties[] = "invalid value for 'state', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['state']) < 1)) { + if (!is_null($this->container['state']) && (mb_strlen($this->container['state']) < 1)) { $invalidProperties[] = "invalid value for 'state', the character length must be bigger than or equal to 1."; } if ($this->container['zip'] === null) { $invalidProperties[] = "'zip' can't be null"; } - if (!preg_match("/[- A-Za-z0-9]{0,500}/", $this->container['zip'])) { + if (!is_null($this->container['zip']) && !preg_match("/[- A-Za-z0-9]{0,500}/", $this->container['zip'])) { $invalidProperties[] = "invalid value for 'zip', must be conform to the pattern /[- A-Za-z0-9]{0,500}/."; } if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } - if ((mb_strlen($this->container['url']) > 500)) { + if (!is_null($this->container['url']) && (mb_strlen($this->container['url']) > 500)) { $invalidProperties[] = "invalid value for 'url', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['url']) < 1)) { + if (!is_null($this->container['url']) && (mb_strlen($this->container['url']) < 1)) { $invalidProperties[] = "invalid value for 'url', the character length must be bigger than or equal to 1."; } diff --git a/src/Model/CodeRequest.php b/src/Model/CodeRequest.php index a2bd6d20..b62c8714 100644 --- a/src/Model/CodeRequest.php +++ b/src/Model/CodeRequest.php @@ -290,25 +290,25 @@ public function listInvalidProperties(): array if ($this->container['to'] === null) { $invalidProperties[] = "'to' can't be null"; } - if (!preg_match("/^\\+[1-9]\\d{1,14}$/", $this->container['to'])) { + if (!is_null($this->container['to']) && !preg_match("/^\\+[1-9]\\d{1,14}$/", $this->container['to'])) { $invalidProperties[] = "invalid value for 'to', must be conform to the pattern /^\\+[1-9]\\d{1,14}$/."; } if ($this->container['from'] === null) { $invalidProperties[] = "'from' can't be null"; } - if ((mb_strlen($this->container['from']) > 32)) { + if (!is_null($this->container['from']) && (mb_strlen($this->container['from']) > 32)) { $invalidProperties[] = "invalid value for 'from', the character length must be smaller than or equal to 32."; } - if (!preg_match("/^\\+[1-9]\\d{1,14}$/", $this->container['from'])) { + if (!is_null($this->container['from']) && !preg_match("/^\\+[1-9]\\d{1,14}$/", $this->container['from'])) { $invalidProperties[] = "invalid value for 'from', must be conform to the pattern /^\\+[1-9]\\d{1,14}$/."; } if ($this->container['application_id'] === null) { $invalidProperties[] = "'application_id' can't be null"; } - if ((mb_strlen($this->container['application_id']) > 50)) { + if (!is_null($this->container['application_id']) && (mb_strlen($this->container['application_id']) > 50)) { $invalidProperties[] = "invalid value for 'application_id', the character length must be smaller than or equal to 50."; } @@ -319,18 +319,18 @@ public function listInvalidProperties(): array if ($this->container['message'] === null) { $invalidProperties[] = "'message' can't be null"; } - if ((mb_strlen($this->container['message']) > 2048)) { + if (!is_null($this->container['message']) && (mb_strlen($this->container['message']) > 2048)) { $invalidProperties[] = "invalid value for 'message', the character length must be smaller than or equal to 2048."; } if ($this->container['digits'] === null) { $invalidProperties[] = "'digits' can't be null"; } - if (($this->container['digits'] > 8)) { + if (!is_null($this->container['digits']) && ($this->container['digits'] > 8)) { $invalidProperties[] = "invalid value for 'digits', must be smaller than or equal to 8."; } - if (($this->container['digits'] < 4)) { + if (!is_null($this->container['digits']) && ($this->container['digits'] < 4)) { $invalidProperties[] = "invalid value for 'digits', must be bigger than or equal to 4."; } diff --git a/src/Model/Contact.php b/src/Model/Contact.php index f77d7968..202d2d4c 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -276,48 +276,48 @@ public function listInvalidProperties(): array if ($this->container['first_name'] === null) { $invalidProperties[] = "'first_name' can't be null"; } - if ((mb_strlen($this->container['first_name']) > 500)) { + if (!is_null($this->container['first_name']) && (mb_strlen($this->container['first_name']) > 500)) { $invalidProperties[] = "invalid value for 'first_name', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['first_name']) < 1)) { + if (!is_null($this->container['first_name']) && (mb_strlen($this->container['first_name']) < 1)) { $invalidProperties[] = "invalid value for 'first_name', the character length must be bigger than or equal to 1."; } if ($this->container['last_name'] === null) { $invalidProperties[] = "'last_name' can't be null"; } - if ((mb_strlen($this->container['last_name']) > 500)) { + if (!is_null($this->container['last_name']) && (mb_strlen($this->container['last_name']) > 500)) { $invalidProperties[] = "invalid value for 'last_name', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['last_name']) < 1)) { + if (!is_null($this->container['last_name']) && (mb_strlen($this->container['last_name']) < 1)) { $invalidProperties[] = "invalid value for 'last_name', the character length must be bigger than or equal to 1."; } if ($this->container['email'] === null) { $invalidProperties[] = "'email' can't be null"; } - if ((mb_strlen($this->container['email']) > 500)) { + if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) > 500)) { $invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['email']) < 0)) { + if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) < 0)) { $invalidProperties[] = "invalid value for 'email', the character length must be bigger than or equal to 0."; } - if (!preg_match("/^(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/", $this->container['email'])) { + if (!is_null($this->container['email']) && !preg_match("/^(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/", $this->container['email'])) { $invalidProperties[] = "invalid value for 'email', must be conform to the pattern /^(?:[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/."; } if ($this->container['phone_number'] === null) { $invalidProperties[] = "'phone_number' can't be null"; } - if ((mb_strlen($this->container['phone_number']) > 500)) { + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) > 500)) { $invalidProperties[] = "invalid value for 'phone_number', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['phone_number']) < 1)) { + if (!is_null($this->container['phone_number']) && (mb_strlen($this->container['phone_number']) < 1)) { $invalidProperties[] = "invalid value for 'phone_number', the character length must be bigger than or equal to 1."; } diff --git a/src/Model/CreateCall.php b/src/Model/CreateCall.php index 750e0810..9769ac9f 100644 --- a/src/Model/CreateCall.php +++ b/src/Model/CreateCall.php @@ -408,7 +408,7 @@ public function listInvalidProperties(): array if ($this->container['answer_url'] === null) { $invalidProperties[] = "'answer_url' can't be null"; } - if ((mb_strlen($this->container['answer_url']) > 2048)) { + if (!is_null($this->container['answer_url']) && (mb_strlen($this->container['answer_url']) > 2048)) { $invalidProperties[] = "invalid value for 'answer_url', the character length must be smaller than or equal to 2048."; } diff --git a/src/Model/MmsMessageContentFile.php b/src/Model/MmsMessageContentFile.php index d8fbec0c..51dc423f 100644 --- a/src/Model/MmsMessageContentFile.php +++ b/src/Model/MmsMessageContentFile.php @@ -255,7 +255,7 @@ public function listInvalidProperties(): array if ($this->container['file_url'] === null) { $invalidProperties[] = "'file_url' can't be null"; } - if ((mb_strlen($this->container['file_url']) > 1000)) { + if (!is_null($this->container['file_url']) && (mb_strlen($this->container['file_url']) > 1000)) { $invalidProperties[] = "invalid value for 'file_url', the character length must be smaller than or equal to 1000."; } diff --git a/src/Model/MultiChannelActionCalendarEvent.php b/src/Model/MultiChannelActionCalendarEvent.php index f549ea1d..cf89af24 100644 --- a/src/Model/MultiChannelActionCalendarEvent.php +++ b/src/Model/MultiChannelActionCalendarEvent.php @@ -300,7 +300,7 @@ public function listInvalidProperties(): array if ($this->container['text'] === null) { $invalidProperties[] = "'text' can't be null"; } - if ((mb_strlen($this->container['text']) > 25)) { + if (!is_null($this->container['text']) && (mb_strlen($this->container['text']) > 25)) { $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 25."; } @@ -310,7 +310,7 @@ public function listInvalidProperties(): array if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } - if ((mb_strlen($this->container['title']) > 100)) { + if (!is_null($this->container['title']) && (mb_strlen($this->container['title']) > 100)) { $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 100."; } diff --git a/src/Model/MultiChannelMessageRequest.php b/src/Model/MultiChannelMessageRequest.php index 71d66242..954514cf 100644 --- a/src/Model/MultiChannelMessageRequest.php +++ b/src/Model/MultiChannelMessageRequest.php @@ -287,7 +287,7 @@ public function listInvalidProperties(): array if ($this->container['channel_list'] === null) { $invalidProperties[] = "'channel_list' can't be null"; } - if ((count($this->container['channel_list']) > 4)) { + if (!is_null($this->container['channel_list']) && (count($this->container['channel_list']) > 4)) { $invalidProperties[] = "invalid value for 'channel_list', number of items must be less than or equal to 4."; } diff --git a/src/Model/MultiChannelMessageResponseData.php b/src/Model/MultiChannelMessageResponseData.php index a2d82308..b3da50fa 100644 --- a/src/Model/MultiChannelMessageResponseData.php +++ b/src/Model/MultiChannelMessageResponseData.php @@ -317,7 +317,7 @@ public function listInvalidProperties(): array if ($this->container['channel_list'] === null) { $invalidProperties[] = "'channel_list' can't be null"; } - if ((count($this->container['channel_list']) > 4)) { + if (!is_null($this->container['channel_list']) && (count($this->container['channel_list']) > 4)) { $invalidProperties[] = "invalid value for 'channel_list', number of items must be less than or equal to 4."; } diff --git a/src/Model/OptInWorkflow.php b/src/Model/OptInWorkflow.php index 5576b038..cf967efb 100644 --- a/src/Model/OptInWorkflow.php +++ b/src/Model/OptInWorkflow.php @@ -269,11 +269,11 @@ public function listInvalidProperties(): array if ($this->container['description'] === null) { $invalidProperties[] = "'description' can't be null"; } - if ((mb_strlen($this->container['description']) > 500)) { + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 500)) { $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['description']) < 1)) { + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) < 1)) { $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 1."; } diff --git a/src/Model/Page.php b/src/Model/Page.php index 1ebb9e07..7c1af6e6 100644 --- a/src/Model/Page.php +++ b/src/Model/Page.php @@ -276,7 +276,7 @@ public function listInvalidProperties(): array if ($this->container['page_size'] === null) { $invalidProperties[] = "'page_size' can't be null"; } - if (($this->container['page_size'] < 0)) { + if (!is_null($this->container['page_size']) && ($this->container['page_size'] < 0)) { $invalidProperties[] = "invalid value for 'page_size', must be bigger than or equal to 0."; } diff --git a/src/Model/RbmActionBase.php b/src/Model/RbmActionBase.php index 3afd1b0b..a1577c28 100644 --- a/src/Model/RbmActionBase.php +++ b/src/Model/RbmActionBase.php @@ -272,7 +272,7 @@ public function listInvalidProperties(): array if ($this->container['text'] === null) { $invalidProperties[] = "'text' can't be null"; } - if ((mb_strlen($this->container['text']) > 25)) { + if (!is_null($this->container['text']) && (mb_strlen($this->container['text']) > 25)) { $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 25."; } diff --git a/src/Model/RbmActionDial.php b/src/Model/RbmActionDial.php index d9aa4640..d59917d4 100644 --- a/src/Model/RbmActionDial.php +++ b/src/Model/RbmActionDial.php @@ -279,7 +279,7 @@ public function listInvalidProperties(): array if ($this->container['text'] === null) { $invalidProperties[] = "'text' can't be null"; } - if ((mb_strlen($this->container['text']) > 25)) { + if (!is_null($this->container['text']) && (mb_strlen($this->container['text']) > 25)) { $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 25."; } diff --git a/src/Model/RbmActionOpenUrl.php b/src/Model/RbmActionOpenUrl.php index f4a3eda4..9990edef 100644 --- a/src/Model/RbmActionOpenUrl.php +++ b/src/Model/RbmActionOpenUrl.php @@ -293,7 +293,7 @@ public function listInvalidProperties(): array if ($this->container['text'] === null) { $invalidProperties[] = "'text' can't be null"; } - if ((mb_strlen($this->container['text']) > 25)) { + if (!is_null($this->container['text']) && (mb_strlen($this->container['text']) > 25)) { $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 25."; } @@ -303,7 +303,7 @@ public function listInvalidProperties(): array if ($this->container['url'] === null) { $invalidProperties[] = "'url' can't be null"; } - if ((mb_strlen($this->container['url']) > 2048)) { + if (!is_null($this->container['url']) && (mb_strlen($this->container['url']) > 2048)) { $invalidProperties[] = "invalid value for 'url', the character length must be smaller than or equal to 2048."; } diff --git a/src/Model/RbmActionViewLocation.php b/src/Model/RbmActionViewLocation.php index b1137b55..dde4a169 100644 --- a/src/Model/RbmActionViewLocation.php +++ b/src/Model/RbmActionViewLocation.php @@ -293,7 +293,7 @@ public function listInvalidProperties(): array if ($this->container['text'] === null) { $invalidProperties[] = "'text' can't be null"; } - if ((mb_strlen($this->container['text']) > 25)) { + if (!is_null($this->container['text']) && (mb_strlen($this->container['text']) > 25)) { $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 25."; } diff --git a/src/Model/RbmCardContentMedia.php b/src/Model/RbmCardContentMedia.php index a2c0b478..42180b21 100644 --- a/src/Model/RbmCardContentMedia.php +++ b/src/Model/RbmCardContentMedia.php @@ -269,7 +269,7 @@ public function listInvalidProperties(): array if ($this->container['file_url'] === null) { $invalidProperties[] = "'file_url' can't be null"; } - if ((mb_strlen($this->container['file_url']) > 1000)) { + if (!is_null($this->container['file_url']) && (mb_strlen($this->container['file_url']) > 1000)) { $invalidProperties[] = "invalid value for 'file_url', the character length must be smaller than or equal to 1000."; } diff --git a/src/Model/RbmMessageCarouselCard.php b/src/Model/RbmMessageCarouselCard.php index 27a83e18..a917a227 100644 --- a/src/Model/RbmMessageCarouselCard.php +++ b/src/Model/RbmMessageCarouselCard.php @@ -272,11 +272,11 @@ public function listInvalidProperties(): array if ($this->container['card_contents'] === null) { $invalidProperties[] = "'card_contents' can't be null"; } - if ((count($this->container['card_contents']) > 10)) { + if (!is_null($this->container['card_contents']) && (count($this->container['card_contents']) > 10)) { $invalidProperties[] = "invalid value for 'card_contents', number of items must be less than or equal to 10."; } - if ((count($this->container['card_contents']) < 2)) { + if (!is_null($this->container['card_contents']) && (count($this->container['card_contents']) < 2)) { $invalidProperties[] = "invalid value for 'card_contents', number of items must be greater than or equal to 2."; } diff --git a/src/Model/RbmMessageContentFile.php b/src/Model/RbmMessageContentFile.php index 3ed416d3..1210afb4 100644 --- a/src/Model/RbmMessageContentFile.php +++ b/src/Model/RbmMessageContentFile.php @@ -262,7 +262,7 @@ public function listInvalidProperties(): array if ($this->container['file_url'] === null) { $invalidProperties[] = "'file_url' can't be null"; } - if ((mb_strlen($this->container['file_url']) > 1000)) { + if (!is_null($this->container['file_url']) && (mb_strlen($this->container['file_url']) > 1000)) { $invalidProperties[] = "invalid value for 'file_url', the character length must be smaller than or equal to 1000."; } diff --git a/src/Model/RbmMessageContentText.php b/src/Model/RbmMessageContentText.php index c2ad1fae..db91e9d5 100644 --- a/src/Model/RbmMessageContentText.php +++ b/src/Model/RbmMessageContentText.php @@ -262,7 +262,7 @@ public function listInvalidProperties(): array if ($this->container['text'] === null) { $invalidProperties[] = "'text' can't be null"; } - if ((mb_strlen($this->container['text']) > 3270)) { + if (!is_null($this->container['text']) && (mb_strlen($this->container['text']) > 3270)) { $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 3270."; } diff --git a/src/Model/SmsMessageContent.php b/src/Model/SmsMessageContent.php index 26bd4f58..da2232cc 100644 --- a/src/Model/SmsMessageContent.php +++ b/src/Model/SmsMessageContent.php @@ -255,7 +255,7 @@ public function listInvalidProperties(): array if ($this->container['text'] === null) { $invalidProperties[] = "'text' can't be null"; } - if ((mb_strlen($this->container['text']) > 2048)) { + if (!is_null($this->container['text']) && (mb_strlen($this->container['text']) > 2048)) { $invalidProperties[] = "invalid value for 'text', the character length must be smaller than or equal to 2048."; } diff --git a/src/Model/TfvBasicAuthentication.php b/src/Model/TfvBasicAuthentication.php index 346bf136..42a9ccba 100644 --- a/src/Model/TfvBasicAuthentication.php +++ b/src/Model/TfvBasicAuthentication.php @@ -262,14 +262,14 @@ public function listInvalidProperties(): array if ($this->container['username'] === null) { $invalidProperties[] = "'username' can't be null"; } - if ((mb_strlen($this->container['username']) > 100)) { + if (!is_null($this->container['username']) && (mb_strlen($this->container['username']) > 100)) { $invalidProperties[] = "invalid value for 'username', the character length must be smaller than or equal to 100."; } if ($this->container['password'] === null) { $invalidProperties[] = "'password' can't be null"; } - if ((mb_strlen($this->container['password']) > 200)) { + if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) > 200)) { $invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 200."; } diff --git a/src/Model/VerificationRequest.php b/src/Model/VerificationRequest.php index a7e9e50e..6b510e68 100644 --- a/src/Model/VerificationRequest.php +++ b/src/Model/VerificationRequest.php @@ -394,55 +394,55 @@ public function listInvalidProperties(): array if ($this->container['message_volume'] === null) { $invalidProperties[] = "'message_volume' can't be null"; } - if (($this->container['message_volume'] > 10000000)) { + if (!is_null($this->container['message_volume']) && ($this->container['message_volume'] > 10000000)) { $invalidProperties[] = "invalid value for 'message_volume', must be smaller than or equal to 10000000."; } - if (($this->container['message_volume'] < 10)) { + if (!is_null($this->container['message_volume']) && ($this->container['message_volume'] < 10)) { $invalidProperties[] = "invalid value for 'message_volume', must be bigger than or equal to 10."; } if ($this->container['phone_numbers'] === null) { $invalidProperties[] = "'phone_numbers' can't be null"; } - if ((count($this->container['phone_numbers']) > 10)) { + if (!is_null($this->container['phone_numbers']) && (count($this->container['phone_numbers']) > 10)) { $invalidProperties[] = "invalid value for 'phone_numbers', number of items must be less than or equal to 10."; } - if ((count($this->container['phone_numbers']) < 1)) { + if (!is_null($this->container['phone_numbers']) && (count($this->container['phone_numbers']) < 1)) { $invalidProperties[] = "invalid value for 'phone_numbers', number of items must be greater than or equal to 1."; } if ($this->container['use_case'] === null) { $invalidProperties[] = "'use_case' can't be null"; } - if ((mb_strlen($this->container['use_case']) > 500)) { + if (!is_null($this->container['use_case']) && (mb_strlen($this->container['use_case']) > 500)) { $invalidProperties[] = "invalid value for 'use_case', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['use_case']) < 0)) { + if (!is_null($this->container['use_case']) && (mb_strlen($this->container['use_case']) < 0)) { $invalidProperties[] = "invalid value for 'use_case', the character length must be bigger than or equal to 0."; } if ($this->container['use_case_summary'] === null) { $invalidProperties[] = "'use_case_summary' can't be null"; } - if ((mb_strlen($this->container['use_case_summary']) > 500)) { + if (!is_null($this->container['use_case_summary']) && (mb_strlen($this->container['use_case_summary']) > 500)) { $invalidProperties[] = "invalid value for 'use_case_summary', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['use_case_summary']) < 0)) { + if (!is_null($this->container['use_case_summary']) && (mb_strlen($this->container['use_case_summary']) < 0)) { $invalidProperties[] = "invalid value for 'use_case_summary', the character length must be bigger than or equal to 0."; } if ($this->container['production_message_content'] === null) { $invalidProperties[] = "'production_message_content' can't be null"; } - if ((mb_strlen($this->container['production_message_content']) > 500)) { + if (!is_null($this->container['production_message_content']) && (mb_strlen($this->container['production_message_content']) > 500)) { $invalidProperties[] = "invalid value for 'production_message_content', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['production_message_content']) < 0)) { + if (!is_null($this->container['production_message_content']) && (mb_strlen($this->container['production_message_content']) < 0)) { $invalidProperties[] = "invalid value for 'production_message_content', the character length must be bigger than or equal to 0."; } diff --git a/src/Model/VerificationUpdateRequest.php b/src/Model/VerificationUpdateRequest.php index 5b233305..53de8e19 100644 --- a/src/Model/VerificationUpdateRequest.php +++ b/src/Model/VerificationUpdateRequest.php @@ -387,44 +387,44 @@ public function listInvalidProperties(): array if ($this->container['message_volume'] === null) { $invalidProperties[] = "'message_volume' can't be null"; } - if (($this->container['message_volume'] > 10000000)) { + if (!is_null($this->container['message_volume']) && ($this->container['message_volume'] > 10000000)) { $invalidProperties[] = "invalid value for 'message_volume', must be smaller than or equal to 10000000."; } - if (($this->container['message_volume'] < 10)) { + if (!is_null($this->container['message_volume']) && ($this->container['message_volume'] < 10)) { $invalidProperties[] = "invalid value for 'message_volume', must be bigger than or equal to 10."; } if ($this->container['use_case'] === null) { $invalidProperties[] = "'use_case' can't be null"; } - if ((mb_strlen($this->container['use_case']) > 500)) { + if (!is_null($this->container['use_case']) && (mb_strlen($this->container['use_case']) > 500)) { $invalidProperties[] = "invalid value for 'use_case', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['use_case']) < 0)) { + if (!is_null($this->container['use_case']) && (mb_strlen($this->container['use_case']) < 0)) { $invalidProperties[] = "invalid value for 'use_case', the character length must be bigger than or equal to 0."; } if ($this->container['use_case_summary'] === null) { $invalidProperties[] = "'use_case_summary' can't be null"; } - if ((mb_strlen($this->container['use_case_summary']) > 500)) { + if (!is_null($this->container['use_case_summary']) && (mb_strlen($this->container['use_case_summary']) > 500)) { $invalidProperties[] = "invalid value for 'use_case_summary', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['use_case_summary']) < 0)) { + if (!is_null($this->container['use_case_summary']) && (mb_strlen($this->container['use_case_summary']) < 0)) { $invalidProperties[] = "invalid value for 'use_case_summary', the character length must be bigger than or equal to 0."; } if ($this->container['production_message_content'] === null) { $invalidProperties[] = "'production_message_content' can't be null"; } - if ((mb_strlen($this->container['production_message_content']) > 500)) { + if (!is_null($this->container['production_message_content']) && (mb_strlen($this->container['production_message_content']) > 500)) { $invalidProperties[] = "invalid value for 'production_message_content', the character length must be smaller than or equal to 500."; } - if ((mb_strlen($this->container['production_message_content']) < 0)) { + if (!is_null($this->container['production_message_content']) && (mb_strlen($this->container['production_message_content']) < 0)) { $invalidProperties[] = "invalid value for 'production_message_content', the character length must be bigger than or equal to 0."; } diff --git a/src/Model/VerifyCodeRequest.php b/src/Model/VerifyCodeRequest.php index ef2a7016..0b99a7b2 100644 --- a/src/Model/VerifyCodeRequest.php +++ b/src/Model/VerifyCodeRequest.php @@ -276,29 +276,29 @@ public function listInvalidProperties(): array if ($this->container['to'] === null) { $invalidProperties[] = "'to' can't be null"; } - if (!preg_match("/^\\+[1-9]\\d{1,14}$/", $this->container['to'])) { + if (!is_null($this->container['to']) && !preg_match("/^\\+[1-9]\\d{1,14}$/", $this->container['to'])) { $invalidProperties[] = "invalid value for 'to', must be conform to the pattern /^\\+[1-9]\\d{1,14}$/."; } if ($this->container['expiration_time_in_minutes'] === null) { $invalidProperties[] = "'expiration_time_in_minutes' can't be null"; } - if (($this->container['expiration_time_in_minutes'] > 15)) { + if (!is_null($this->container['expiration_time_in_minutes']) && ($this->container['expiration_time_in_minutes'] > 15)) { $invalidProperties[] = "invalid value for 'expiration_time_in_minutes', must be smaller than or equal to 15."; } - if (($this->container['expiration_time_in_minutes'] < 1)) { + if (!is_null($this->container['expiration_time_in_minutes']) && ($this->container['expiration_time_in_minutes'] < 1)) { $invalidProperties[] = "invalid value for 'expiration_time_in_minutes', must be bigger than or equal to 1."; } if ($this->container['code'] === null) { $invalidProperties[] = "'code' can't be null"; } - if ((mb_strlen($this->container['code']) > 8)) { + if (!is_null($this->container['code']) && (mb_strlen($this->container['code']) > 8)) { $invalidProperties[] = "invalid value for 'code', the character length must be smaller than or equal to 8."; } - if ((mb_strlen($this->container['code']) < 4)) { + if (!is_null($this->container['code']) && (mb_strlen($this->container['code']) < 4)) { $invalidProperties[] = "invalid value for 'code', the character length must be bigger than or equal to 4."; } diff --git a/src/Model/WebhookSubscriptionBasicAuthentication.php b/src/Model/WebhookSubscriptionBasicAuthentication.php index fa0887dd..35b39950 100644 --- a/src/Model/WebhookSubscriptionBasicAuthentication.php +++ b/src/Model/WebhookSubscriptionBasicAuthentication.php @@ -263,14 +263,14 @@ public function listInvalidProperties(): array if ($this->container['username'] === null) { $invalidProperties[] = "'username' can't be null"; } - if ((mb_strlen($this->container['username']) > 100)) { + if (!is_null($this->container['username']) && (mb_strlen($this->container['username']) > 100)) { $invalidProperties[] = "invalid value for 'username', the character length must be smaller than or equal to 100."; } if ($this->container['password'] === null) { $invalidProperties[] = "'password' can't be null"; } - if ((mb_strlen($this->container['password']) > 200)) { + if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) > 200)) { $invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 200."; } From fc90ea20ed2ccd483480b06faed46bc8e9c28081 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 26 Aug 2026 11:20:36 -0400 Subject: [PATCH 35/53] template for temporary null guard --- custom_templates/model_generic.mustache | 556 ++++++++++++++++++++++++ 1 file changed, 556 insertions(+) create mode 100644 custom_templates/model_generic.mustache diff --git a/custom_templates/model_generic.mustache b/custom_templates/model_generic.mustache new file mode 100644 index 00000000..6d3d5cd8 --- /dev/null +++ b/custom_templates/model_generic.mustache @@ -0,0 +1,556 @@ +class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess, JsonSerializable{{/parentSchema}} +{ + public const DISCRIMINATOR = {{#discriminator}}'{{discriminatorName}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}}; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = '{{name}}'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + {{#vars}}'{{name}}' => '{{{dataType}}}'{{^-last}}, + {{/-last}}{{/vars}} + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + {{#vars}}'{{name}}' => {{#dataFormat}}'{{{.}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}{{^-last}}, + {{/-last}}{{/vars}} + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + {{#vars}}'{{name}}' => {{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{^-last}}, + {{/-last}}{{/vars}} + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes{{#parentSchema}} + parent::openAPITypes(){{/parentSchema}}; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats{{#parentSchema}} + parent::openAPIFormats(){{/parentSchema}}; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables{{#parentSchema}} + parent::openAPINullables(){{/parentSchema}}; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + {{#vars}}'{{name}}' => '{{baseName}}'{{^-last}}, + {{/-last}}{{/vars}} + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + {{#vars}}'{{name}}' => '{{setter}}'{{^-last}}, + {{/-last}}{{/vars}} + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + {{#vars}}'{{name}}' => '{{getter}}'{{^-last}}, + {{/-last}}{{/vars}} + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return {{#parentSchema}}parent::attributeMap() + {{/parentSchema}}self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return {{#parentSchema}}parent::setters() + {{/parentSchema}}self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return {{#parentSchema}}parent::getters() + {{/parentSchema}}self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + +{{#discriminator}} +{{#discriminator.mappedModels}} + public const {{#lambda.uppercase}}{{discriminator.propertyName}}_{{#lambda.snakecase}}{{mappingName}}{{/lambda.snakecase}}{{/lambda.uppercase}} = '{{mappingName}}'; +{{/discriminator.mappedModels}} +{{/discriminator}} + {{#vars}} + {{#isEnum}} + {{^isDiscriminator}} + {{#allowableValues}} + {{#enumVars}} + public const {{enumName}}_{{{name}}} = {{{value}}}; + {{/enumVars}} + {{/allowableValues}} + {{/isDiscriminator}} + {{/isEnum}} + {{/vars}} + + {{#vars}} + {{#isEnum}} + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public static function {{getter}}AllowableValues() + { + return [ +{{#isDiscriminator}} +{{#discriminator.mappedModels}} + self::{{#lambda.uppercase}}{{discriminator.propertyName}}_{{#lambda.snakecase}}{{mappingName}}{{/lambda.snakecase}}{{/lambda.uppercase}},{{^-last}} +{{/-last}}{{/discriminator.mappedModels}} +{{/isDiscriminator}} +{{^isDiscriminator}} + {{#allowableValues}}{{#enumVars}}self::{{enumName}}_{{{name}}},{{^-last}} + {{/-last}}{{/enumVars}}{{/allowableValues}} +{{/isDiscriminator}} + ]; + } + + {{/isEnum}} + {{/vars}} + {{^parentSchema}} + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + {{/parentSchema}} + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + {{#discriminator}} + // Initialize discriminator property with the model name. + $this->container['{{discriminatorName}}'] = static::$openAPIModelName; + + {{/discriminator}} + {{#parentSchema}} + parent::__construct($data); + + {{/parentSchema}} + {{#vars}} + $this->setIfExists('{{name}}', $data ?? [], {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}); + {{/vars}} + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + {{#parentSchema}} + $invalidProperties = parent::listInvalidProperties(); + {{/parentSchema}} + {{^parentSchema}} + $invalidProperties = []; + {{/parentSchema}} + + {{#vars}} + {{#required}} + if ($this->container['{{name}}'] === null{{#isNullable}} && !$this->isNullableSetToNull('{{name}}'){{/isNullable}}) { + $invalidProperties[] = "'{{name}}' {{^isNullable}}can't be null"{{/isNullable}}{{#isNullable}}is required"{{/isNullable}}; + } + {{/required}} + {{#isEnum}} + {{^isContainer}} + $allowedValues = self::{{getter}}AllowableValues(); + if (!is_null($this->container['{{name}}']) && !in_array($this->container['{{name}}'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for '{{name}}', must be one of '%s'", + $this->container['{{name}}'], + implode("', '", $allowedValues) + ); + } + + {{/isContainer}} + {{/isEnum}} + {{#hasValidation}} +{{#isString}} + {{#maxLength}} + if (!is_null($this->container['{{name}}']) && (mb_strlen($this->container['{{name}}']) > {{maxLength}})) { + $invalidProperties[] = "invalid value for '{{name}}', the character length must be smaller than or equal to {{{maxLength}}}."; + } + + {{/maxLength}} + {{#minLength}} + if (!is_null($this->container['{{name}}']) && (mb_strlen($this->container['{{name}}']) < {{minLength}})) { + $invalidProperties[] = "invalid value for '{{name}}', the character length must be bigger than or equal to {{{minLength}}}."; + } + + {{/minLength}} +{{/isString}} + {{#maximum}} + if (!is_null($this->container['{{name}}']) && ($this->container['{{name}}'] >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}})) { + $invalidProperties[] = "invalid value for '{{name}}', must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}."; + } + + {{/maximum}} + {{#minimum}} + if (!is_null($this->container['{{name}}']) && ($this->container['{{name}}'] <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}})) { + $invalidProperties[] = "invalid value for '{{name}}', must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}."; + } + + {{/minimum}} + {{#pattern}} + if (!is_null($this->container['{{name}}']) && !preg_match("{{{pattern}}}", $this->container['{{name}}'])) { + $invalidProperties[] = "invalid value for '{{name}}', must be conform to the pattern {{{pattern}}}."; + } + + {{/pattern}} + {{#maxItems}} + if (!is_null($this->container['{{name}}']) && (count($this->container['{{name}}']) > {{maxItems}})) { + $invalidProperties[] = "invalid value for '{{name}}', number of items must be less than or equal to {{{maxItems}}}."; + } + + {{/maxItems}} + {{#minItems}} + if (!is_null($this->container['{{name}}']) && (count($this->container['{{name}}']) < {{minItems}})) { + $invalidProperties[] = "invalid value for '{{name}}', number of items must be greater than or equal to {{{minItems}}}."; + } + + {{/minItems}} + {{/hasValidation}} + {{/vars}} + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + {{#vars}} + + /** + * Gets {{name}} + * + * @return {{{exts.x-php-prop-doc-type}}} + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ + public function {{getter}}(): {{exts.x-php-prop-type}} + { + return $this->container['{{name}}']; + } + + /** + * Sets {{name}} + * + * @param {{{exts.x-php-prop-doc-type}}} ${{name}}{{#description}} {{{.}}}{{/description}}{{^description}} {{{name}}}{{/description}} + * + * @return $this + {{#deprecated}} + * @deprecated + {{/deprecated}} + */ + public function {{setter}}({{exts.x-php-prop-type}} ${{name}}): static + { + {{#isNullable}} + if (is_null(${{name}})) { + array_push($this->openAPINullablesSetToNull, '{{name}}'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('{{name}}', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + {{/isNullable}} + {{^isNullable}} + if (is_null(${{name}})) { + throw new InvalidArgumentException('non-nullable {{name}} cannot be null'); + } + {{/isNullable}} + {{#isEnum}} + $allowedValues = self::{{getter}}AllowableValues(); + {{^isContainer}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}!in_array(${{{name}}}, $allowedValues, true)) { + {{#enumUnknownDefaultCase}} + ${{name}} = {{#allowableValues}}{{#enumVars}}{{#-last}}self::{{enumName}}_{{{name}}};{{/-last}}{{/enumVars}}{{/allowableValues}} + {{/enumUnknownDefaultCase}} + {{^enumUnknownDefaultCase}} + throw new InvalidArgumentException( + sprintf( + "Invalid value '%s' for '{{name}}', must be one of '%s'", + ${{{name}}}, + implode("', '", $allowedValues) + ) + ); + {{/enumUnknownDefaultCase}} + } + {{/isContainer}} + {{#isContainer}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}array_diff(${{{name}}}, $allowedValues)) { + throw new InvalidArgumentException( + sprintf( + "Invalid value for '{{name}}', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + {{/isContainer}} + {{/isEnum}} + {{#hasValidation}} +{{#isString}} + {{#maxLength}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(mb_strlen(${{name}}) > {{maxLength}})) { + throw new InvalidArgumentException('invalid length for ${{name}} when calling {{classname}}.{{operationId}}, must be smaller than or equal to {{maxLength}}.'); + }{{/maxLength}} + {{#minLength}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(mb_strlen(${{name}}) < {{minLength}})) { + throw new InvalidArgumentException('invalid length for ${{name}} when calling {{classname}}.{{operationId}}, must be bigger than or equal to {{minLength}}.'); + } + {{/minLength}} +{{/isString}} + {{#maximum}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(${{name}} >{{#exclusiveMaximum}}={{/exclusiveMaximum}} {{maximum}})) { + throw new InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, must be smaller than {{^exclusiveMaximum}}or equal to {{/exclusiveMaximum}}{{maximum}}.'); + } + {{/maximum}} + {{#minimum}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(${{name}} <{{#exclusiveMinimum}}={{/exclusiveMinimum}} {{minimum}})) { + throw new InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, must be bigger than {{^exclusiveMinimum}}or equal to {{/exclusiveMinimum}}{{minimum}}.'); + } + {{/minimum}} + {{#pattern}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(!preg_match("{{{pattern}}}", ObjectSerializer::toString(${{name}})))) { + throw new InvalidArgumentException("invalid value for \${{name}} when calling {{classname}}.{{operationId}}, must conform to the pattern {{{pattern}}}."); + } + {{/pattern}} + {{#maxItems}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(count(${{name}}) > {{maxItems}})) { + throw new InvalidArgumentException('invalid value for ${{name}} when calling {{classname}}.{{operationId}}, number of items must be less than or equal to {{maxItems}}.'); + }{{/maxItems}} + {{#minItems}} + if ({{#isNullable}}!is_null(${{name}}) && {{/isNullable}}(count(${{name}}) < {{minItems}})) { + throw new InvalidArgumentException('invalid length for ${{name}} when calling {{classname}}.{{operationId}}, number of items must be greater than or equal to {{minItems}}.'); + } + {{/minItems}} + {{/hasValidation}} + $this->container['{{name}}'] = ${{name}}; + + return $this; + } + {{/vars}} + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} From 7b758e5da74b79fe1cc311627c24bd0f8d5b0a7e Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 26 Aug 2026 11:21:03 -0400 Subject: [PATCH 36/53] dont regenerate tests --- .openapi-generator-ignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 7484ee59..e01e7ca8 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -21,3 +21,5 @@ #docs/*.md # Then explicitly reverse the ignore rule for a single file: #!docs/README.md + +tests/ From 306688d26f5f8be74af410242f971877d339f0ac Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 26 Aug 2026 11:44:02 -0400 Subject: [PATCH 37/53] final model unit tests --- ...elChannelListRBMObjectAllOfContentTest.php | 81 +++++++++++++++---- .../Model/RbmMessageContentRichCardTest.php | 63 +++++++++++---- 2 files changed, 110 insertions(+), 34 deletions(-) diff --git a/tests/Unit/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php b/tests/Unit/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php index b61b965d..b231eb6c 100644 --- a/tests/Unit/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php +++ b/tests/Unit/Model/MultiChannelChannelListRBMObjectAllOfContentTest.php @@ -28,6 +28,14 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\MultiChannelChannelListRBMObjectAllOfContent; +use Bandwidth\Model\RbmMessageCarouselCard; +use Bandwidth\Model\RbmMessageContentRichCard; +use Bandwidth\Model\RbmMessageContentText; +use Bandwidth\Model\RbmMessageMedia; +use Bandwidth\Model\RbmStandaloneCard; +use Bandwidth\ObjectSerializer; + use PHPUnit\Framework\TestCase; /** @@ -40,41 +48,80 @@ */ class MultiChannelChannelListRBMObjectAllOfContentTest extends TestCase { - /** - * Setup before running any test case + * Test "MultiChannelChannelListRBMObjectAllOfContent" */ - public static function setUpBeforeClass(): void + public function testMultiChannelChannelListRBMObjectAllOfContent() { + $this->assertSame( + [ + RbmMessageContentText::class, + RbmMessageMedia::class, + RbmMessageContentRichCard::class + ], + array_map( + fn($type) => ltrim($type, '\\'), + MultiChannelChannelListRBMObjectAllOfContent::getOneOfTypes() + ) + ); + $this->assertNull(MultiChannelChannelListRBMObjectAllOfContent::getOneOfDiscriminator()); + $this->assertSame([], MultiChannelChannelListRBMObjectAllOfContent::getOneOfDiscriminatorMappings()); } /** - * Setup before running each test case + * Test that a payload resolves to the member type its shape matches. + * + * With no discriminator, resolution walks the member types in declaration order and takes the + * first one that deserializes to a valid model. A rich card resolves to the concrete card type + * rather than to RbmMessageContentRichCard, since the nested oneOf resolves to its own member. + * + * @dataProvider payloadProvider */ - public function setUp(): void + public function testDeserializeResolvesByShape(array $payload, string $expected) { - } + $result = ObjectSerializer::deserialize( + (object) $payload, + MultiChannelChannelListRBMObjectAllOfContent::class + ); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { + $this->assertInstanceOf($expected, $result); } /** - * Clean up after running all test cases + * Test that a payload matching no member type is rejected */ - public static function tearDownAfterClass(): void + public function testDeserializeRejectsUnmatchedPayload() { + $this->expectException(\InvalidArgumentException::class); + + ObjectSerializer::deserialize( + (object) ['notARbmContentField' => 1], + MultiChannelChannelListRBMObjectAllOfContent::class + ); } /** - * Test "MultiChannelChannelListRBMObjectAllOfContent" + * @return array, 1: class-string}> */ - public function testMultiChannelChannelListRBMObjectAllOfContent() + public static function payloadProvider(): array { - // TODO: implement - self::markTestIncomplete('Not implemented'); + return [ + 'text' => [ + ['text' => 'Hello World!'], + RbmMessageContentText::class + ], + 'media' => [ + ['media' => [['fileUrl' => 'https://example.com/image.png']]], + RbmMessageMedia::class + ], + 'standalone card' => [ + ['orientation' => 'HORIZONTAL', 'cardContent' => (object) []], + RbmStandaloneCard::class + ], + 'carousel card' => [ + ['cardWidth' => 'SMALL', 'cardContents' => [(object) [], (object) []]], + RbmMessageCarouselCard::class + ] + ]; } } diff --git a/tests/Unit/Model/RbmMessageContentRichCardTest.php b/tests/Unit/Model/RbmMessageContentRichCardTest.php index efb0de9f..130edeec 100644 --- a/tests/Unit/Model/RbmMessageContentRichCardTest.php +++ b/tests/Unit/Model/RbmMessageContentRichCardTest.php @@ -28,6 +28,11 @@ namespace Bandwidth\Test\Unit\Model; +use Bandwidth\Model\RbmMessageCarouselCard; +use Bandwidth\Model\RbmMessageContentRichCard; +use Bandwidth\Model\RbmStandaloneCard; +use Bandwidth\ObjectSerializer; + use PHPUnit\Framework\TestCase; /** @@ -40,41 +45,65 @@ */ class RbmMessageContentRichCardTest extends TestCase { - /** - * Setup before running any test case + * Test "RbmMessageContentRichCard" */ - public static function setUpBeforeClass(): void + public function testRbmMessageContentRichCard() { + $this->assertSame( + [ + RbmStandaloneCard::class, + RbmMessageCarouselCard::class + ], + array_map(fn($type) => ltrim($type, '\\'), RbmMessageContentRichCard::getOneOfTypes()) + ); + $this->assertNull(RbmMessageContentRichCard::getOneOfDiscriminator()); + $this->assertSame([], RbmMessageContentRichCard::getOneOfDiscriminatorMappings()); } /** - * Setup before running each test case + * Test that a payload resolves to the member type its shape matches. + * + * With no discriminator, resolution walks the member types in declaration order and takes the + * first one that deserializes to a valid model. A standalone card requires orientation and + * cardContent; a carousel card requires cardWidth and at least two cardContents. + * + * @dataProvider payloadProvider */ - public function setUp(): void + public function testDeserializeResolvesByShape(array $payload, string $expected) { - } + $result = ObjectSerializer::deserialize((object) $payload, RbmMessageContentRichCard::class); - /** - * Clean up after running each test case - */ - public function tearDown(): void - { + $this->assertInstanceOf($expected, $result); } /** - * Clean up after running all test cases + * Test that a payload matching no member type is rejected */ - public static function tearDownAfterClass(): void + public function testDeserializeRejectsUnmatchedPayload() { + $this->expectException(\InvalidArgumentException::class); + + ObjectSerializer::deserialize( + (object) ['notACardField' => 1], + RbmMessageContentRichCard::class + ); } /** - * Test "RbmMessageContentRichCard" + * @return array, 1: class-string}> */ - public function testRbmMessageContentRichCard() + public static function payloadProvider(): array { - // TODO: implement - self::markTestIncomplete('Not implemented'); + return [ + 'standalone card' => [ + ['orientation' => 'HORIZONTAL', 'cardContent' => (object) []], + RbmStandaloneCard::class + ], + 'carousel card' => [ + ['cardWidth' => 'SMALL', 'cardContents' => [(object) [], (object) []]], + RbmMessageCarouselCard::class + ] + ]; } } From 81f2f84641bcb877658cae3e5514da6e0439e999 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 26 Aug 2026 14:00:05 -0400 Subject: [PATCH 38/53] use 7.25 --- .openapi-generator/VERSION | 2 +- README.md | 2 +- git_push.sh | 31 ++++++------ openapitools.json | 2 +- phpunit.xml.dist | 3 +- src/APIException.php | 2 +- src/Api/CallsApi.php | 38 +++++++++++--- src/Api/ConferencesApi.php | 38 +++++++++++--- src/Api/EndpointsApi.php | 26 ++++++++-- src/Api/MFAApi.php | 38 +++++++++++--- src/Api/MediaApi.php | 14 ++++-- src/Api/MessagesApi.php | 14 ++++-- src/Api/MultiChannelApi.php | 14 ++++-- src/Api/PhoneNumberLookupApi.php | 26 ++++++++-- src/Api/RecordingsApi.php | 26 ++++++++-- src/Api/StatisticsApi.php | 2 +- src/Api/TollFreeVerificationApi.php | 50 +++++++++++++++---- src/Api/TranscriptionsApi.php | 2 +- src/Configuration.php | 2 +- src/FormDataProcessor.php | 2 +- src/HeaderSelector.php | 2 +- src/Model/AccountStatistics.php | 2 +- src/Model/AdditionalDenialReason.php | 2 +- src/Model/Address.php | 2 +- src/Model/AnswerCallback.php | 2 +- src/Model/AnyOfInterface.php | 2 +- src/Model/AsyncLookupRequest.php | 2 +- src/Model/BlockedWebhook.php | 2 +- src/Model/BridgeCompleteCallback.php | 2 +- src/Model/BridgeTargetCompleteCallback.php | 2 +- src/Model/BrtcError.php | 2 +- src/Model/BrtcErrorResponse.php | 2 +- src/Model/BrtcErrorSource.php | 2 +- src/Model/BrtcLink.php | 2 +- src/Model/BusinessEntityTypeEnum.php | 2 +- src/Model/BusinessRegistrationTypeEnum.php | 2 +- src/Model/CallDirectionEnum.php | 2 +- src/Model/CallRecordingMetadata.php | 2 +- src/Model/CallState.php | 2 +- src/Model/CallStateEnum.php | 2 +- src/Model/CallTranscription.php | 2 +- .../CallTranscriptionDetectedLanguageEnum.php | 2 +- src/Model/CallTranscriptionMetadata.php | 2 +- src/Model/CallTranscriptionResponse.php | 2 +- src/Model/CallTranscriptionTrackEnum.php | 2 +- src/Model/Callback.php | 2 +- src/Model/CallbackMethodEnum.php | 2 +- src/Model/CardWidthEnum.php | 2 +- src/Model/CodeRequest.php | 2 +- src/Model/CompletedLookupStatusEnum.php | 2 +- src/Model/Conference.php | 2 +- src/Model/ConferenceCompletedCallback.php | 2 +- src/Model/ConferenceCreatedCallback.php | 2 +- src/Model/ConferenceMember.php | 2 +- src/Model/ConferenceMemberExitCallback.php | 2 +- src/Model/ConferenceMemberJoinCallback.php | 2 +- .../ConferenceRecordingAvailableCallback.php | 2 +- src/Model/ConferenceRecordingMetadata.php | 2 +- src/Model/ConferenceRedirectCallback.php | 2 +- src/Model/ConferenceStateEnum.php | 2 +- src/Model/Contact.php | 2 +- src/Model/CreateAsyncBulkLookupResponse.php | 2 +- .../CreateAsyncBulkLookupResponseData.php | 2 +- src/Model/CreateCall.php | 2 +- src/Model/CreateCallResponse.php | 2 +- src/Model/CreateEndpointRequestBase.php | 2 +- src/Model/CreateEndpointResponse.php | 2 +- src/Model/CreateEndpointResponseData.php | 2 +- src/Model/CreateMessageRequestError.php | 2 +- .../CreateMultiChannelMessageResponse.php | 2 +- src/Model/CreateSyncLookupResponse.php | 2 +- src/Model/CreateSyncLookupResponseData.php | 2 +- src/Model/CreateWebRtcConnectionRequest.php | 2 +- src/Model/DeactivationEventEnum.php | 2 +- src/Model/Device.php | 2 +- src/Model/DeviceStatusEnum.php | 2 +- src/Model/DisconnectCallback.php | 2 +- src/Model/Diversion.php | 2 +- src/Model/DtmfCallback.php | 2 +- src/Model/Endpoint.php | 2 +- src/Model/EndpointDirectionEnum.php | 2 +- src/Model/EndpointEvent.php | 2 +- src/Model/EndpointEventTypeEnum.php | 2 +- src/Model/EndpointResponse.php | 2 +- src/Model/EndpointStatusEnum.php | 2 +- src/Model/EndpointTypeEnum.php | 2 +- src/Model/Endpoints.php | 2 +- src/Model/ErrorObject.php | 2 +- src/Model/ErrorSource.php | 2 +- src/Model/FailureWebhook.php | 2 +- src/Model/FieldError.php | 2 +- src/Model/FileFormatEnum.php | 2 +- src/Model/GatherCallback.php | 2 +- src/Model/GetAsyncBulkLookupResponse.php | 2 +- src/Model/GetAsyncBulkLookupResponseData.php | 2 +- src/Model/InProgressLookupStatusEnum.php | 2 +- src/Model/InboundCallback.php | 2 +- src/Model/InboundCallbackMessage.php | 2 +- src/Model/InboundCallbackTypeEnum.php | 2 +- src/Model/InitiateCallback.php | 2 +- src/Model/LatestMessageDeliveryStatusEnum.php | 2 +- src/Model/LineTypeEnum.php | 2 +- src/Model/Link.php | 2 +- src/Model/LinkSchema.php | 2 +- src/Model/LinksObject.php | 2 +- src/Model/ListEndpointsResponse.php | 2 +- src/Model/ListMessageDirectionEnum.php | 2 +- src/Model/ListMessageItem.php | 2 +- src/Model/LookupErrorResponse.php | 2 +- src/Model/LookupErrorSchema.php | 2 +- src/Model/LookupErrorSchemaMeta.php | 2 +- src/Model/LookupResult.php | 2 +- .../MachineDetectionCompleteCallback.php | 2 +- src/Model/MachineDetectionConfiguration.php | 2 +- src/Model/MachineDetectionModeEnum.php | 2 +- src/Model/MachineDetectionResult.php | 2 +- src/Model/Media.php | 2 +- src/Model/Message.php | 2 +- src/Model/MessageDirectionEnum.php | 2 +- src/Model/MessageRequest.php | 2 +- src/Model/MessageStatusEnum.php | 2 +- src/Model/MessageTypeEnum.php | 2 +- src/Model/MessagesList.php | 2 +- src/Model/MessagingCodeResponse.php | 2 +- src/Model/MessagingRequestError.php | 2 +- src/Model/MfaForbiddenRequestError.php | 2 +- src/Model/MfaRequestError.php | 2 +- src/Model/MfaUnauthorizedRequestError.php | 2 +- src/Model/MmsMessageContent.php | 2 +- src/Model/MmsMessageContentFile.php | 2 +- src/Model/ModelInterface.php | 2 +- src/Model/MultiChannelAction.php | 2 +- src/Model/MultiChannelActionCalendarEvent.php | 2 +- .../MultiChannelChannelListMMSObject.php | 2 +- ...ltiChannelChannelListMMSResponseObject.php | 2 +- .../MultiChannelChannelListObjectBase.php | 2 +- .../MultiChannelChannelListOwnerObject.php | 2 +- .../MultiChannelChannelListRBMObject.php | 2 +- ...hannelChannelListRBMObjectAllOfContent.php | 2 +- ...ltiChannelChannelListRBMResponseObject.php | 2 +- .../MultiChannelChannelListRequestObject.php | 2 +- .../MultiChannelChannelListResponseObject.php | 2 +- .../MultiChannelChannelListSMSObject.php | 2 +- ...ltiChannelChannelListSMSResponseObject.php | 2 +- src/Model/MultiChannelError.php | 2 +- src/Model/MultiChannelMessageChannelEnum.php | 2 +- src/Model/MultiChannelMessageContent.php | 2 +- src/Model/MultiChannelMessageRequest.php | 2 +- src/Model/MultiChannelMessageResponseData.php | 2 +- src/Model/OneOfInterface.php | 2 +- src/Model/OptInWorkflow.php | 2 +- src/Model/Page.php | 2 +- src/Model/PageInfo.php | 2 +- src/Model/PriorityEnum.php | 2 +- src/Model/ProductTypeEnum.php | 2 +- src/Model/RbmActionBase.php | 2 +- src/Model/RbmActionDial.php | 2 +- src/Model/RbmActionOpenUrl.php | 2 +- src/Model/RbmActionTypeEnum.php | 2 +- src/Model/RbmActionViewLocation.php | 2 +- src/Model/RbmCardContent.php | 2 +- src/Model/RbmCardContentMedia.php | 2 +- src/Model/RbmLocationResponse.php | 2 +- src/Model/RbmMediaHeightEnum.php | 2 +- src/Model/RbmMessageCarouselCard.php | 2 +- src/Model/RbmMessageContentFile.php | 2 +- src/Model/RbmMessageContentRichCard.php | 2 +- src/Model/RbmMessageContentText.php | 2 +- src/Model/RbmMessageMedia.php | 2 +- src/Model/RbmOpenUrlEnum.php | 2 +- src/Model/RbmStandaloneCard.php | 2 +- src/Model/RbmSuggestionResponse.php | 2 +- src/Model/RbmWebViewEnum.php | 2 +- src/Model/RecordingAvailableCallback.php | 2 +- src/Model/RecordingCompleteCallback.php | 2 +- src/Model/RecordingStateEnum.php | 2 +- src/Model/RecordingTranscriptionClip.php | 2 +- src/Model/RecordingTranscriptionMetadata.php | 2 +- src/Model/RecordingTranscriptions.php | 2 +- src/Model/RedirectCallback.php | 2 +- src/Model/RedirectMethodEnum.php | 2 +- src/Model/SipConnectionMetadata.php | 2 +- src/Model/SipCredentials.php | 2 +- src/Model/SmsMessageContent.php | 2 +- src/Model/StandaloneCardOrientationEnum.php | 2 +- src/Model/StatusCallback.php | 2 +- src/Model/StatusCallbackMessage.php | 2 +- src/Model/StatusCallbackTypeEnum.php | 2 +- src/Model/StirShaken.php | 2 +- src/Model/SyncLookupRequest.php | 2 +- src/Model/TelephoneNumber.php | 2 +- src/Model/TfvBasicAuthentication.php | 2 +- src/Model/TfvCallbackStatusEnum.php | 2 +- src/Model/TfvError.php | 2 +- src/Model/TfvStatus.php | 2 +- src/Model/TfvStatusEnum.php | 2 +- src/Model/TfvSubmissionInfo.php | 2 +- src/Model/TfvSubmissionWrapper.php | 2 +- src/Model/ThumbnailAlignmentEnum.php | 2 +- src/Model/TranscribeRecording.php | 2 +- src/Model/Transcription.php | 2 +- src/Model/TranscriptionAvailableCallback.php | 2 +- src/Model/TransferAnswerCallback.php | 2 +- src/Model/TransferCompleteCallback.php | 2 +- src/Model/TransferDisconnectCallback.php | 2 +- src/Model/UpdateCall.php | 2 +- src/Model/UpdateCallRecording.php | 2 +- src/Model/UpdateConference.php | 2 +- src/Model/UpdateConferenceMember.php | 2 +- src/Model/VerificationDenialWebhook.php | 2 +- src/Model/VerificationRequest.php | 2 +- src/Model/VerificationUpdateRequest.php | 2 +- src/Model/VerificationWebhook.php | 2 +- src/Model/VerifyCodeRequest.php | 2 +- src/Model/VerifyCodeResponse.php | 2 +- src/Model/VoiceApiError.php | 2 +- src/Model/VoiceCodeResponse.php | 2 +- src/Model/WebhookSubscription.php | 2 +- ...WebhookSubscriptionBasicAuthentication.php | 2 +- src/Model/WebhookSubscriptionError.php | 2 +- .../WebhookSubscriptionRequestSchema.php | 2 +- src/Model/WebhookSubscriptionTypeEnum.php | 2 +- src/Model/WebhookSubscriptionsListBody.php | 2 +- src/ObjectSerializer.php | 40 ++++++++++++++- 224 files changed, 494 insertions(+), 286 deletions(-) diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 8fc8df61..bc34d812 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.25.0-SNAPSHOT +7.25.0 diff --git a/README.md b/README.md index 866a9a56..dbdb0ec6 100644 --- a/README.md +++ b/README.md @@ -372,5 +372,5 @@ letstalk@bandwidth.com This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `1.0.0` - - Generator version: `7.25.0-SNAPSHOT` + - Generator version: `7.25.0` - Build package: `org.openapitools.codegen.languages.PhpNextgenClientCodegen` diff --git a/git_push.sh b/git_push.sh index b15db011..5b9410d9 100644 --- a/git_push.sh +++ b/git_push.sh @@ -8,24 +8,24 @@ git_repo_id=$2 release_note=$3 git_host=$4 -if [ "$git_host" = "" ]; then +if [ -z "${git_host}" ]; then git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" fi -if [ "$git_user_id" = "" ]; then +if [ -z "${git_user_id}" ]; then git_user_id="bandwidth" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" fi -if [ "$git_repo_id" = "" ]; then +if [ -z "${git_repo_id}" ]; then git_repo_id="php-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" fi -if [ "$release_note" = "" ]; then +if [ -z "${release_note}" ]; then release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" fi # Initialize the local directory as a Git repository @@ -35,19 +35,16 @@ git init git add . # Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" +git commit -m "${release_note}" # Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" fi - fi git pull origin master diff --git a/openapitools.json b/openapitools.json index f3237adc..8dd0d745 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,6 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "7.23.0" + "version": "7.25.0" } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1135449a..fff90cbd 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -8,8 +8,7 @@ - ./tests/Api - ./tests/Model + ./tests diff --git a/src/APIException.php b/src/APIException.php index 9de75086..7ddee49c 100644 --- a/src/APIException.php +++ b/src/APIException.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Api/CallsApi.php b/src/Api/CallsApi.php index c1ffdfd1..9931fd63 100644 --- a/src/Api/CallsApi.php +++ b/src/Api/CallsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** @@ -538,7 +538,11 @@ public function createCallRequest( if (isset($create_call)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($create_call)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($create_call), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $create_call; } @@ -559,7 +563,11 @@ public function createCallRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2013,7 +2021,11 @@ public function updateCallRequest( if (isset($update_call)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_call)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($update_call), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $update_call; } @@ -2034,7 +2046,11 @@ public function updateCallRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2441,7 +2457,11 @@ public function updateCallBxmlRequest( if (isset($body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($body), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $body; } @@ -2462,7 +2482,11 @@ public function updateCallBxmlRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); diff --git a/src/Api/ConferencesApi.php b/src/Api/ConferencesApi.php index b90c9fe4..f0822d7d 100644 --- a/src/Api/ConferencesApi.php +++ b/src/Api/ConferencesApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** @@ -3425,7 +3425,11 @@ public function updateConferenceRequest( if (isset($update_conference)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_conference)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($update_conference), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $update_conference; } @@ -3446,7 +3450,11 @@ public function updateConferenceRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -3845,7 +3853,11 @@ public function updateConferenceBxmlRequest( if (isset($body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($body), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $body; } @@ -3866,7 +3878,11 @@ public function updateConferenceBxmlRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -4289,7 +4305,11 @@ public function updateConferenceMemberRequest( if (isset($update_conference_member)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_conference_member)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($update_conference_member), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $update_conference_member; } @@ -4310,7 +4330,11 @@ public function updateConferenceMemberRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); diff --git a/src/Api/EndpointsApi.php b/src/Api/EndpointsApi.php index 30ee44cb..c0a572d7 100644 --- a/src/Api/EndpointsApi.php +++ b/src/Api/EndpointsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** @@ -538,7 +538,11 @@ public function createEndpointRequest( if (isset($body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($body), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $body; } @@ -559,7 +563,11 @@ public function createEndpointRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -2320,7 +2328,11 @@ public function updateEndpointBxmlRequest( if (isset($body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($body), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $body; } @@ -2341,7 +2353,11 @@ public function updateEndpointBxmlRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); diff --git a/src/Api/MFAApi.php b/src/Api/MFAApi.php index 52947ec4..9cdefe3f 100644 --- a/src/Api/MFAApi.php +++ b/src/Api/MFAApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** @@ -476,7 +476,11 @@ public function generateMessagingCodeRequest( if (isset($code_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($code_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($code_request), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $code_request; } @@ -497,7 +501,11 @@ public function generateMessagingCodeRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -910,7 +918,11 @@ public function generateVoiceCodeRequest( if (isset($code_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($code_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($code_request), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $code_request; } @@ -931,7 +943,11 @@ public function generateVoiceCodeRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -1358,7 +1374,11 @@ public function verifyCodeRequest( if (isset($verify_code_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($verify_code_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($verify_code_request), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $verify_code_request; } @@ -1379,7 +1399,11 @@ public function verifyCodeRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); diff --git a/src/Api/MediaApi.php b/src/Api/MediaApi.php index 2bfc4dd5..b0a33ef1 100644 --- a/src/Api/MediaApi.php +++ b/src/Api/MediaApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** @@ -1834,7 +1834,11 @@ public function uploadMediaRequest( if (isset($body)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($body)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($body), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $body; } @@ -1855,7 +1859,11 @@ public function uploadMediaRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); diff --git a/src/Api/MessagesApi.php b/src/Api/MessagesApi.php index bab49b32..ff9227ab 100644 --- a/src/Api/MessagesApi.php +++ b/src/Api/MessagesApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** @@ -543,7 +543,11 @@ public function createMessageRequest( if (isset($message_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($message_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($message_request), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $message_request; } @@ -564,7 +568,11 @@ public function createMessageRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); diff --git a/src/Api/MultiChannelApi.php b/src/Api/MultiChannelApi.php index 46f92142..aea7aef0 100644 --- a/src/Api/MultiChannelApi.php +++ b/src/Api/MultiChannelApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** @@ -526,7 +526,11 @@ public function createMultiChannelMessageRequest( if (isset($multi_channel_message_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($multi_channel_message_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($multi_channel_message_request), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $multi_channel_message_request; } @@ -547,7 +551,11 @@ public function createMultiChannelMessageRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); diff --git a/src/Api/PhoneNumberLookupApi.php b/src/Api/PhoneNumberLookupApi.php index 845ee9c0..a7cd8be9 100644 --- a/src/Api/PhoneNumberLookupApi.php +++ b/src/Api/PhoneNumberLookupApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** @@ -434,7 +434,11 @@ public function createAsyncBulkLookupRequest( if (isset($async_lookup_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($async_lookup_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($async_lookup_request), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $async_lookup_request; } @@ -455,7 +459,11 @@ public function createAsyncBulkLookupRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -826,7 +834,11 @@ public function createSyncLookupRequest( if (isset($sync_lookup_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($sync_lookup_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($sync_lookup_request), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $sync_lookup_request; } @@ -847,7 +859,11 @@ public function createSyncLookupRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); diff --git a/src/Api/RecordingsApi.php b/src/Api/RecordingsApi.php index e7ebef61..82bec4bd 100644 --- a/src/Api/RecordingsApi.php +++ b/src/Api/RecordingsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** @@ -4149,7 +4149,11 @@ public function transcribeCallRecordingRequest( if (isset($transcribe_recording)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($transcribe_recording)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($transcribe_recording), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $transcribe_recording; } @@ -4170,7 +4174,11 @@ public function transcribeCallRecordingRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -4569,7 +4577,11 @@ public function updateCallRecordingStateRequest( if (isset($update_call_recording)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($update_call_recording)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($update_call_recording), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $update_call_recording; } @@ -4590,7 +4602,11 @@ public function updateCallRecordingStateRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); diff --git a/src/Api/StatisticsApi.php b/src/Api/StatisticsApi.php index 08d9a226..81e29c25 100644 --- a/src/Api/StatisticsApi.php +++ b/src/Api/StatisticsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Api/TollFreeVerificationApi.php b/src/Api/TollFreeVerificationApi.php index 7acaa4e6..95efd653 100644 --- a/src/Api/TollFreeVerificationApi.php +++ b/src/Api/TollFreeVerificationApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** @@ -550,7 +550,11 @@ public function createWebhookSubscriptionRequest( if (isset($webhook_subscription_request_schema)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($webhook_subscription_request_schema)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($webhook_subscription_request_schema), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $webhook_subscription_request_schema; } @@ -571,7 +575,11 @@ public function createWebhookSubscriptionRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -3012,7 +3020,11 @@ public function requestTollFreeVerificationRequest( if (isset($verification_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($verification_request)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($verification_request), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $verification_request; } @@ -3033,7 +3045,11 @@ public function requestTollFreeVerificationRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -3433,7 +3449,11 @@ public function updateTollFreeVerificationRequestRequest( if (isset($tfv_submission_wrapper)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($tfv_submission_wrapper)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($tfv_submission_wrapper), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $tfv_submission_wrapper; } @@ -3454,7 +3474,11 @@ public function updateTollFreeVerificationRequestRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); @@ -3947,7 +3971,11 @@ public function updateWebhookSubscriptionRequest( if (isset($webhook_subscription_request_schema)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($webhook_subscription_request_schema)); + try { + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($webhook_subscription_request_schema), JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { $httpBody = $webhook_subscription_request_schema; } @@ -3968,7 +3996,11 @@ public function updateWebhookSubscriptionRequest( } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + try { + $httpBody = json_encode($formParams, JSON_THROW_ON_ERROR); + } catch (\JsonException $e) { + throw new \InvalidArgumentException('json_encode error: ' . $e->getMessage(), 0, $e); + } } else { // for HTTP post (form) $httpBody = ObjectSerializer::buildQuery($formParams); diff --git a/src/Api/TranscriptionsApi.php b/src/Api/TranscriptionsApi.php index 424402d3..c9b7e8a0 100644 --- a/src/Api/TranscriptionsApi.php +++ b/src/Api/TranscriptionsApi.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Configuration.php b/src/Configuration.php index 7b638c85..1f721142 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/FormDataProcessor.php b/src/FormDataProcessor.php index b409cf99..ea8e8995 100644 --- a/src/FormDataProcessor.php +++ b/src/FormDataProcessor.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/HeaderSelector.php b/src/HeaderSelector.php index 4884754d..b5ca03f2 100644 --- a/src/HeaderSelector.php +++ b/src/HeaderSelector.php @@ -16,7 +16,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/AccountStatistics.php b/src/Model/AccountStatistics.php index a4a65fa1..b8f1511f 100644 --- a/src/Model/AccountStatistics.php +++ b/src/Model/AccountStatistics.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/AdditionalDenialReason.php b/src/Model/AdditionalDenialReason.php index 9da7a3b4..1d77c85c 100644 --- a/src/Model/AdditionalDenialReason.php +++ b/src/Model/AdditionalDenialReason.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/Address.php b/src/Model/Address.php index 30984ff7..ed99fc2d 100644 --- a/src/Model/Address.php +++ b/src/Model/Address.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/AnswerCallback.php b/src/Model/AnswerCallback.php index 838124e0..4584b78f 100644 --- a/src/Model/AnswerCallback.php +++ b/src/Model/AnswerCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/AnyOfInterface.php b/src/Model/AnyOfInterface.php index 9c010101..763f7e9f 100644 --- a/src/Model/AnyOfInterface.php +++ b/src/Model/AnyOfInterface.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/AsyncLookupRequest.php b/src/Model/AsyncLookupRequest.php index 03705e02..95977865 100644 --- a/src/Model/AsyncLookupRequest.php +++ b/src/Model/AsyncLookupRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/BlockedWebhook.php b/src/Model/BlockedWebhook.php index b0a0c648..31e2ecf7 100644 --- a/src/Model/BlockedWebhook.php +++ b/src/Model/BlockedWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/BridgeCompleteCallback.php b/src/Model/BridgeCompleteCallback.php index 73601fec..45d8a753 100644 --- a/src/Model/BridgeCompleteCallback.php +++ b/src/Model/BridgeCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/BridgeTargetCompleteCallback.php b/src/Model/BridgeTargetCompleteCallback.php index 3abf34e4..c63cc6ed 100644 --- a/src/Model/BridgeTargetCompleteCallback.php +++ b/src/Model/BridgeTargetCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/BrtcError.php b/src/Model/BrtcError.php index 9d787bb7..2ba0b928 100644 --- a/src/Model/BrtcError.php +++ b/src/Model/BrtcError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/BrtcErrorResponse.php b/src/Model/BrtcErrorResponse.php index 34ac11b9..cd0f4e65 100644 --- a/src/Model/BrtcErrorResponse.php +++ b/src/Model/BrtcErrorResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/BrtcErrorSource.php b/src/Model/BrtcErrorSource.php index 4398ef91..e78a8fd7 100644 --- a/src/Model/BrtcErrorSource.php +++ b/src/Model/BrtcErrorSource.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/BrtcLink.php b/src/Model/BrtcLink.php index edb329c2..dca3a58f 100644 --- a/src/Model/BrtcLink.php +++ b/src/Model/BrtcLink.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/BusinessEntityTypeEnum.php b/src/Model/BusinessEntityTypeEnum.php index 4ef0d953..f2fb682d 100644 --- a/src/Model/BusinessEntityTypeEnum.php +++ b/src/Model/BusinessEntityTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/BusinessRegistrationTypeEnum.php b/src/Model/BusinessRegistrationTypeEnum.php index 3f7f31e3..c639cde9 100644 --- a/src/Model/BusinessRegistrationTypeEnum.php +++ b/src/Model/BusinessRegistrationTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CallDirectionEnum.php b/src/Model/CallDirectionEnum.php index fd0ed197..1480c341 100644 --- a/src/Model/CallDirectionEnum.php +++ b/src/Model/CallDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CallRecordingMetadata.php b/src/Model/CallRecordingMetadata.php index 640021fa..f32de9e4 100644 --- a/src/Model/CallRecordingMetadata.php +++ b/src/Model/CallRecordingMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CallState.php b/src/Model/CallState.php index e7881a9d..2e02a3ad 100644 --- a/src/Model/CallState.php +++ b/src/Model/CallState.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CallStateEnum.php b/src/Model/CallStateEnum.php index 8213f29c..676e6bed 100644 --- a/src/Model/CallStateEnum.php +++ b/src/Model/CallStateEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CallTranscription.php b/src/Model/CallTranscription.php index ed8c14c8..09b601bc 100644 --- a/src/Model/CallTranscription.php +++ b/src/Model/CallTranscription.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CallTranscriptionDetectedLanguageEnum.php b/src/Model/CallTranscriptionDetectedLanguageEnum.php index d903c3a5..4d1676c3 100644 --- a/src/Model/CallTranscriptionDetectedLanguageEnum.php +++ b/src/Model/CallTranscriptionDetectedLanguageEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CallTranscriptionMetadata.php b/src/Model/CallTranscriptionMetadata.php index 56babc4e..256b2e3f 100644 --- a/src/Model/CallTranscriptionMetadata.php +++ b/src/Model/CallTranscriptionMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CallTranscriptionResponse.php b/src/Model/CallTranscriptionResponse.php index 324e514c..1641db4f 100644 --- a/src/Model/CallTranscriptionResponse.php +++ b/src/Model/CallTranscriptionResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CallTranscriptionTrackEnum.php b/src/Model/CallTranscriptionTrackEnum.php index a6c40fb3..d8d6afd6 100644 --- a/src/Model/CallTranscriptionTrackEnum.php +++ b/src/Model/CallTranscriptionTrackEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/Callback.php b/src/Model/Callback.php index 9cd50bb9..510aab93 100644 --- a/src/Model/Callback.php +++ b/src/Model/Callback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CallbackMethodEnum.php b/src/Model/CallbackMethodEnum.php index db853ac9..d30884e1 100644 --- a/src/Model/CallbackMethodEnum.php +++ b/src/Model/CallbackMethodEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CardWidthEnum.php b/src/Model/CardWidthEnum.php index 853891ff..f07570ca 100644 --- a/src/Model/CardWidthEnum.php +++ b/src/Model/CardWidthEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CodeRequest.php b/src/Model/CodeRequest.php index b62c8714..c493823f 100644 --- a/src/Model/CodeRequest.php +++ b/src/Model/CodeRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CompletedLookupStatusEnum.php b/src/Model/CompletedLookupStatusEnum.php index 4dd73acc..a5d7f396 100644 --- a/src/Model/CompletedLookupStatusEnum.php +++ b/src/Model/CompletedLookupStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/Conference.php b/src/Model/Conference.php index 1ac69dd8..12a3cc54 100644 --- a/src/Model/Conference.php +++ b/src/Model/Conference.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ConferenceCompletedCallback.php b/src/Model/ConferenceCompletedCallback.php index 9a6c2245..ed8747a2 100644 --- a/src/Model/ConferenceCompletedCallback.php +++ b/src/Model/ConferenceCompletedCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ConferenceCreatedCallback.php b/src/Model/ConferenceCreatedCallback.php index 1775bf46..e6d43abb 100644 --- a/src/Model/ConferenceCreatedCallback.php +++ b/src/Model/ConferenceCreatedCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ConferenceMember.php b/src/Model/ConferenceMember.php index a27a4327..8597d3d8 100644 --- a/src/Model/ConferenceMember.php +++ b/src/Model/ConferenceMember.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ConferenceMemberExitCallback.php b/src/Model/ConferenceMemberExitCallback.php index 2083caf2..e6aa9c8c 100644 --- a/src/Model/ConferenceMemberExitCallback.php +++ b/src/Model/ConferenceMemberExitCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ConferenceMemberJoinCallback.php b/src/Model/ConferenceMemberJoinCallback.php index 52245c14..a7af8376 100644 --- a/src/Model/ConferenceMemberJoinCallback.php +++ b/src/Model/ConferenceMemberJoinCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ConferenceRecordingAvailableCallback.php b/src/Model/ConferenceRecordingAvailableCallback.php index 3167bb22..c23f5500 100644 --- a/src/Model/ConferenceRecordingAvailableCallback.php +++ b/src/Model/ConferenceRecordingAvailableCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ConferenceRecordingMetadata.php b/src/Model/ConferenceRecordingMetadata.php index 0131bead..2800e586 100644 --- a/src/Model/ConferenceRecordingMetadata.php +++ b/src/Model/ConferenceRecordingMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ConferenceRedirectCallback.php b/src/Model/ConferenceRedirectCallback.php index e4f451b2..c3bae887 100644 --- a/src/Model/ConferenceRedirectCallback.php +++ b/src/Model/ConferenceRedirectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ConferenceStateEnum.php b/src/Model/ConferenceStateEnum.php index 2e7b893d..b7c7b2c4 100644 --- a/src/Model/ConferenceStateEnum.php +++ b/src/Model/ConferenceStateEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 202d2d4c..2bfca2f9 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CreateAsyncBulkLookupResponse.php b/src/Model/CreateAsyncBulkLookupResponse.php index 24cd2267..35feaa52 100644 --- a/src/Model/CreateAsyncBulkLookupResponse.php +++ b/src/Model/CreateAsyncBulkLookupResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CreateAsyncBulkLookupResponseData.php b/src/Model/CreateAsyncBulkLookupResponseData.php index 11b00283..13af4dec 100644 --- a/src/Model/CreateAsyncBulkLookupResponseData.php +++ b/src/Model/CreateAsyncBulkLookupResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CreateCall.php b/src/Model/CreateCall.php index 9769ac9f..b0e001f2 100644 --- a/src/Model/CreateCall.php +++ b/src/Model/CreateCall.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CreateCallResponse.php b/src/Model/CreateCallResponse.php index 01008a11..6780e34e 100644 --- a/src/Model/CreateCallResponse.php +++ b/src/Model/CreateCallResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CreateEndpointRequestBase.php b/src/Model/CreateEndpointRequestBase.php index 7555d3e6..50160e34 100644 --- a/src/Model/CreateEndpointRequestBase.php +++ b/src/Model/CreateEndpointRequestBase.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CreateEndpointResponse.php b/src/Model/CreateEndpointResponse.php index cf0f91ae..ecf91b43 100644 --- a/src/Model/CreateEndpointResponse.php +++ b/src/Model/CreateEndpointResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CreateEndpointResponseData.php b/src/Model/CreateEndpointResponseData.php index a1e29923..4e6064da 100644 --- a/src/Model/CreateEndpointResponseData.php +++ b/src/Model/CreateEndpointResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CreateMessageRequestError.php b/src/Model/CreateMessageRequestError.php index 7d1ea431..437330c2 100644 --- a/src/Model/CreateMessageRequestError.php +++ b/src/Model/CreateMessageRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CreateMultiChannelMessageResponse.php b/src/Model/CreateMultiChannelMessageResponse.php index 12ebcb36..dd8bd1a8 100644 --- a/src/Model/CreateMultiChannelMessageResponse.php +++ b/src/Model/CreateMultiChannelMessageResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CreateSyncLookupResponse.php b/src/Model/CreateSyncLookupResponse.php index 6430c4a9..57928842 100644 --- a/src/Model/CreateSyncLookupResponse.php +++ b/src/Model/CreateSyncLookupResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CreateSyncLookupResponseData.php b/src/Model/CreateSyncLookupResponseData.php index f0594e0e..9f5d3a24 100644 --- a/src/Model/CreateSyncLookupResponseData.php +++ b/src/Model/CreateSyncLookupResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/CreateWebRtcConnectionRequest.php b/src/Model/CreateWebRtcConnectionRequest.php index 79a1fc12..40deedfc 100644 --- a/src/Model/CreateWebRtcConnectionRequest.php +++ b/src/Model/CreateWebRtcConnectionRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/DeactivationEventEnum.php b/src/Model/DeactivationEventEnum.php index c8911631..c391a7c0 100644 --- a/src/Model/DeactivationEventEnum.php +++ b/src/Model/DeactivationEventEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/Device.php b/src/Model/Device.php index e75d5934..c1197973 100644 --- a/src/Model/Device.php +++ b/src/Model/Device.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/DeviceStatusEnum.php b/src/Model/DeviceStatusEnum.php index c89e8123..0e24921e 100644 --- a/src/Model/DeviceStatusEnum.php +++ b/src/Model/DeviceStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/DisconnectCallback.php b/src/Model/DisconnectCallback.php index 93562ca6..7c489ef7 100644 --- a/src/Model/DisconnectCallback.php +++ b/src/Model/DisconnectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/Diversion.php b/src/Model/Diversion.php index 4dd3c582..7b4c48d4 100644 --- a/src/Model/Diversion.php +++ b/src/Model/Diversion.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/DtmfCallback.php b/src/Model/DtmfCallback.php index edfa9265..7d262c66 100644 --- a/src/Model/DtmfCallback.php +++ b/src/Model/DtmfCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/Endpoint.php b/src/Model/Endpoint.php index 52a3a3d6..6a6d8458 100644 --- a/src/Model/Endpoint.php +++ b/src/Model/Endpoint.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/EndpointDirectionEnum.php b/src/Model/EndpointDirectionEnum.php index aa3b79c1..a287b288 100644 --- a/src/Model/EndpointDirectionEnum.php +++ b/src/Model/EndpointDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/EndpointEvent.php b/src/Model/EndpointEvent.php index 3eaa8f0a..2876aa9f 100644 --- a/src/Model/EndpointEvent.php +++ b/src/Model/EndpointEvent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/EndpointEventTypeEnum.php b/src/Model/EndpointEventTypeEnum.php index 0ea0a93a..f3e28543 100644 --- a/src/Model/EndpointEventTypeEnum.php +++ b/src/Model/EndpointEventTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/EndpointResponse.php b/src/Model/EndpointResponse.php index 71c77a50..fd7cdeca 100644 --- a/src/Model/EndpointResponse.php +++ b/src/Model/EndpointResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/EndpointStatusEnum.php b/src/Model/EndpointStatusEnum.php index 84eb986c..34156893 100644 --- a/src/Model/EndpointStatusEnum.php +++ b/src/Model/EndpointStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/EndpointTypeEnum.php b/src/Model/EndpointTypeEnum.php index 73fe7daf..f26eed1b 100644 --- a/src/Model/EndpointTypeEnum.php +++ b/src/Model/EndpointTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/Endpoints.php b/src/Model/Endpoints.php index e72b5f41..52706408 100644 --- a/src/Model/Endpoints.php +++ b/src/Model/Endpoints.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ErrorObject.php b/src/Model/ErrorObject.php index fd2d2bf1..2a78b712 100644 --- a/src/Model/ErrorObject.php +++ b/src/Model/ErrorObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ErrorSource.php b/src/Model/ErrorSource.php index 39f57425..e8307626 100644 --- a/src/Model/ErrorSource.php +++ b/src/Model/ErrorSource.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/FailureWebhook.php b/src/Model/FailureWebhook.php index 152f246b..d1cfda77 100644 --- a/src/Model/FailureWebhook.php +++ b/src/Model/FailureWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/FieldError.php b/src/Model/FieldError.php index ef837d40..cd9adc48 100644 --- a/src/Model/FieldError.php +++ b/src/Model/FieldError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/FileFormatEnum.php b/src/Model/FileFormatEnum.php index 0eb6d1b8..65046bb9 100644 --- a/src/Model/FileFormatEnum.php +++ b/src/Model/FileFormatEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/GatherCallback.php b/src/Model/GatherCallback.php index 553b810b..c7fab9bf 100644 --- a/src/Model/GatherCallback.php +++ b/src/Model/GatherCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/GetAsyncBulkLookupResponse.php b/src/Model/GetAsyncBulkLookupResponse.php index 5f29a028..92cf16e0 100644 --- a/src/Model/GetAsyncBulkLookupResponse.php +++ b/src/Model/GetAsyncBulkLookupResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/GetAsyncBulkLookupResponseData.php b/src/Model/GetAsyncBulkLookupResponseData.php index 3bc9d5c3..0d3cf887 100644 --- a/src/Model/GetAsyncBulkLookupResponseData.php +++ b/src/Model/GetAsyncBulkLookupResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/InProgressLookupStatusEnum.php b/src/Model/InProgressLookupStatusEnum.php index b54a8ff6..893ec79f 100644 --- a/src/Model/InProgressLookupStatusEnum.php +++ b/src/Model/InProgressLookupStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/InboundCallback.php b/src/Model/InboundCallback.php index a995fa7f..52171cb7 100644 --- a/src/Model/InboundCallback.php +++ b/src/Model/InboundCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/InboundCallbackMessage.php b/src/Model/InboundCallbackMessage.php index a984eb3c..c45b43e6 100644 --- a/src/Model/InboundCallbackMessage.php +++ b/src/Model/InboundCallbackMessage.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/InboundCallbackTypeEnum.php b/src/Model/InboundCallbackTypeEnum.php index b0c94631..d936cc38 100644 --- a/src/Model/InboundCallbackTypeEnum.php +++ b/src/Model/InboundCallbackTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/InitiateCallback.php b/src/Model/InitiateCallback.php index ea3e58ad..d7c427d3 100644 --- a/src/Model/InitiateCallback.php +++ b/src/Model/InitiateCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/LatestMessageDeliveryStatusEnum.php b/src/Model/LatestMessageDeliveryStatusEnum.php index aa02724c..8ea60994 100644 --- a/src/Model/LatestMessageDeliveryStatusEnum.php +++ b/src/Model/LatestMessageDeliveryStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/LineTypeEnum.php b/src/Model/LineTypeEnum.php index 9f10386d..ef1267c0 100644 --- a/src/Model/LineTypeEnum.php +++ b/src/Model/LineTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/Link.php b/src/Model/Link.php index d06f11b0..a287f36d 100644 --- a/src/Model/Link.php +++ b/src/Model/Link.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/LinkSchema.php b/src/Model/LinkSchema.php index 3bb93a7c..06db5c1a 100644 --- a/src/Model/LinkSchema.php +++ b/src/Model/LinkSchema.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/LinksObject.php b/src/Model/LinksObject.php index 941a1c1e..b6a14870 100644 --- a/src/Model/LinksObject.php +++ b/src/Model/LinksObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ListEndpointsResponse.php b/src/Model/ListEndpointsResponse.php index d34df680..3c02a7a1 100644 --- a/src/Model/ListEndpointsResponse.php +++ b/src/Model/ListEndpointsResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ListMessageDirectionEnum.php b/src/Model/ListMessageDirectionEnum.php index 08728775..b8c8b117 100644 --- a/src/Model/ListMessageDirectionEnum.php +++ b/src/Model/ListMessageDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ListMessageItem.php b/src/Model/ListMessageItem.php index a2574f33..d7051fe0 100644 --- a/src/Model/ListMessageItem.php +++ b/src/Model/ListMessageItem.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/LookupErrorResponse.php b/src/Model/LookupErrorResponse.php index 56544afa..38fe4eef 100644 --- a/src/Model/LookupErrorResponse.php +++ b/src/Model/LookupErrorResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/LookupErrorSchema.php b/src/Model/LookupErrorSchema.php index d11ec7dc..7192fafe 100644 --- a/src/Model/LookupErrorSchema.php +++ b/src/Model/LookupErrorSchema.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/LookupErrorSchemaMeta.php b/src/Model/LookupErrorSchemaMeta.php index acf43a91..bb9ad8d0 100644 --- a/src/Model/LookupErrorSchemaMeta.php +++ b/src/Model/LookupErrorSchemaMeta.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/LookupResult.php b/src/Model/LookupResult.php index de8a322f..c020971d 100644 --- a/src/Model/LookupResult.php +++ b/src/Model/LookupResult.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MachineDetectionCompleteCallback.php b/src/Model/MachineDetectionCompleteCallback.php index 3143a5bc..d92a740d 100644 --- a/src/Model/MachineDetectionCompleteCallback.php +++ b/src/Model/MachineDetectionCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MachineDetectionConfiguration.php b/src/Model/MachineDetectionConfiguration.php index 7f108218..18fc0e8b 100644 --- a/src/Model/MachineDetectionConfiguration.php +++ b/src/Model/MachineDetectionConfiguration.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MachineDetectionModeEnum.php b/src/Model/MachineDetectionModeEnum.php index e02b887d..d74e693f 100644 --- a/src/Model/MachineDetectionModeEnum.php +++ b/src/Model/MachineDetectionModeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MachineDetectionResult.php b/src/Model/MachineDetectionResult.php index 3250d00d..267329c9 100644 --- a/src/Model/MachineDetectionResult.php +++ b/src/Model/MachineDetectionResult.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/Media.php b/src/Model/Media.php index 2dc01f5f..8a9eefc4 100644 --- a/src/Model/Media.php +++ b/src/Model/Media.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/Message.php b/src/Model/Message.php index 342c4a4d..c2eddc79 100644 --- a/src/Model/Message.php +++ b/src/Model/Message.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MessageDirectionEnum.php b/src/Model/MessageDirectionEnum.php index d94ab974..117ddf26 100644 --- a/src/Model/MessageDirectionEnum.php +++ b/src/Model/MessageDirectionEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MessageRequest.php b/src/Model/MessageRequest.php index 3280c588..b8fbf90e 100644 --- a/src/Model/MessageRequest.php +++ b/src/Model/MessageRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MessageStatusEnum.php b/src/Model/MessageStatusEnum.php index 127429bd..aeb83039 100644 --- a/src/Model/MessageStatusEnum.php +++ b/src/Model/MessageStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MessageTypeEnum.php b/src/Model/MessageTypeEnum.php index 55d9b5de..970ce65c 100644 --- a/src/Model/MessageTypeEnum.php +++ b/src/Model/MessageTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MessagesList.php b/src/Model/MessagesList.php index 6a32eef8..5edbe71a 100644 --- a/src/Model/MessagesList.php +++ b/src/Model/MessagesList.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MessagingCodeResponse.php b/src/Model/MessagingCodeResponse.php index c13a2094..bbbb5d29 100644 --- a/src/Model/MessagingCodeResponse.php +++ b/src/Model/MessagingCodeResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MessagingRequestError.php b/src/Model/MessagingRequestError.php index 604027f7..14e445f2 100644 --- a/src/Model/MessagingRequestError.php +++ b/src/Model/MessagingRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MfaForbiddenRequestError.php b/src/Model/MfaForbiddenRequestError.php index 464e0a8d..4a410060 100644 --- a/src/Model/MfaForbiddenRequestError.php +++ b/src/Model/MfaForbiddenRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MfaRequestError.php b/src/Model/MfaRequestError.php index df92c8e0..1576fbe0 100644 --- a/src/Model/MfaRequestError.php +++ b/src/Model/MfaRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MfaUnauthorizedRequestError.php b/src/Model/MfaUnauthorizedRequestError.php index efff3de9..dcf8d674 100644 --- a/src/Model/MfaUnauthorizedRequestError.php +++ b/src/Model/MfaUnauthorizedRequestError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MmsMessageContent.php b/src/Model/MmsMessageContent.php index 52be96e2..014a2854 100644 --- a/src/Model/MmsMessageContent.php +++ b/src/Model/MmsMessageContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MmsMessageContentFile.php b/src/Model/MmsMessageContentFile.php index 51dc423f..da7c234d 100644 --- a/src/Model/MmsMessageContentFile.php +++ b/src/Model/MmsMessageContentFile.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ModelInterface.php b/src/Model/ModelInterface.php index 7e84d058..4344f631 100644 --- a/src/Model/ModelInterface.php +++ b/src/Model/ModelInterface.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelAction.php b/src/Model/MultiChannelAction.php index 13fe978e..ad0942e1 100644 --- a/src/Model/MultiChannelAction.php +++ b/src/Model/MultiChannelAction.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelActionCalendarEvent.php b/src/Model/MultiChannelActionCalendarEvent.php index cf89af24..fba5f1b7 100644 --- a/src/Model/MultiChannelActionCalendarEvent.php +++ b/src/Model/MultiChannelActionCalendarEvent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelChannelListMMSObject.php b/src/Model/MultiChannelChannelListMMSObject.php index 9029f7cb..d29f5381 100644 --- a/src/Model/MultiChannelChannelListMMSObject.php +++ b/src/Model/MultiChannelChannelListMMSObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelChannelListMMSResponseObject.php b/src/Model/MultiChannelChannelListMMSResponseObject.php index 5ee73f5f..171990c7 100644 --- a/src/Model/MultiChannelChannelListMMSResponseObject.php +++ b/src/Model/MultiChannelChannelListMMSResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelChannelListObjectBase.php b/src/Model/MultiChannelChannelListObjectBase.php index 7b8f574c..34b86296 100644 --- a/src/Model/MultiChannelChannelListObjectBase.php +++ b/src/Model/MultiChannelChannelListObjectBase.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelChannelListOwnerObject.php b/src/Model/MultiChannelChannelListOwnerObject.php index 40f6d0ae..6ffa55ca 100644 --- a/src/Model/MultiChannelChannelListOwnerObject.php +++ b/src/Model/MultiChannelChannelListOwnerObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelChannelListRBMObject.php b/src/Model/MultiChannelChannelListRBMObject.php index 98b31beb..d4b341ad 100644 --- a/src/Model/MultiChannelChannelListRBMObject.php +++ b/src/Model/MultiChannelChannelListRBMObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php b/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php index 130515ae..ddee0ca0 100644 --- a/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php +++ b/src/Model/MultiChannelChannelListRBMObjectAllOfContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelChannelListRBMResponseObject.php b/src/Model/MultiChannelChannelListRBMResponseObject.php index 59de2d1c..f6053b0b 100644 --- a/src/Model/MultiChannelChannelListRBMResponseObject.php +++ b/src/Model/MultiChannelChannelListRBMResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelChannelListRequestObject.php b/src/Model/MultiChannelChannelListRequestObject.php index 3d4fe321..2f429a9d 100644 --- a/src/Model/MultiChannelChannelListRequestObject.php +++ b/src/Model/MultiChannelChannelListRequestObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelChannelListResponseObject.php b/src/Model/MultiChannelChannelListResponseObject.php index 64ef5a1f..f02ad828 100644 --- a/src/Model/MultiChannelChannelListResponseObject.php +++ b/src/Model/MultiChannelChannelListResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelChannelListSMSObject.php b/src/Model/MultiChannelChannelListSMSObject.php index 787223ab..44557927 100644 --- a/src/Model/MultiChannelChannelListSMSObject.php +++ b/src/Model/MultiChannelChannelListSMSObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelChannelListSMSResponseObject.php b/src/Model/MultiChannelChannelListSMSResponseObject.php index 8f768780..7079a17d 100644 --- a/src/Model/MultiChannelChannelListSMSResponseObject.php +++ b/src/Model/MultiChannelChannelListSMSResponseObject.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelError.php b/src/Model/MultiChannelError.php index 128e9a15..71bff87c 100644 --- a/src/Model/MultiChannelError.php +++ b/src/Model/MultiChannelError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelMessageChannelEnum.php b/src/Model/MultiChannelMessageChannelEnum.php index 75b88658..51e128f8 100644 --- a/src/Model/MultiChannelMessageChannelEnum.php +++ b/src/Model/MultiChannelMessageChannelEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelMessageContent.php b/src/Model/MultiChannelMessageContent.php index 34c8fed3..d6e67626 100644 --- a/src/Model/MultiChannelMessageContent.php +++ b/src/Model/MultiChannelMessageContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelMessageRequest.php b/src/Model/MultiChannelMessageRequest.php index 954514cf..4664be4b 100644 --- a/src/Model/MultiChannelMessageRequest.php +++ b/src/Model/MultiChannelMessageRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/MultiChannelMessageResponseData.php b/src/Model/MultiChannelMessageResponseData.php index b3da50fa..c42a9c90 100644 --- a/src/Model/MultiChannelMessageResponseData.php +++ b/src/Model/MultiChannelMessageResponseData.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/OneOfInterface.php b/src/Model/OneOfInterface.php index b01b20b7..8998af40 100644 --- a/src/Model/OneOfInterface.php +++ b/src/Model/OneOfInterface.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/OptInWorkflow.php b/src/Model/OptInWorkflow.php index cf967efb..edab2dbd 100644 --- a/src/Model/OptInWorkflow.php +++ b/src/Model/OptInWorkflow.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/Page.php b/src/Model/Page.php index 7c1af6e6..17ce2ac1 100644 --- a/src/Model/Page.php +++ b/src/Model/Page.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/PageInfo.php b/src/Model/PageInfo.php index 53cee021..7261321e 100644 --- a/src/Model/PageInfo.php +++ b/src/Model/PageInfo.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/PriorityEnum.php b/src/Model/PriorityEnum.php index 9791454c..02191f08 100644 --- a/src/Model/PriorityEnum.php +++ b/src/Model/PriorityEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ProductTypeEnum.php b/src/Model/ProductTypeEnum.php index 5a32ba70..4e93817a 100644 --- a/src/Model/ProductTypeEnum.php +++ b/src/Model/ProductTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmActionBase.php b/src/Model/RbmActionBase.php index a1577c28..4efb02c4 100644 --- a/src/Model/RbmActionBase.php +++ b/src/Model/RbmActionBase.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmActionDial.php b/src/Model/RbmActionDial.php index d59917d4..23fa9998 100644 --- a/src/Model/RbmActionDial.php +++ b/src/Model/RbmActionDial.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmActionOpenUrl.php b/src/Model/RbmActionOpenUrl.php index 9990edef..66aa7a6b 100644 --- a/src/Model/RbmActionOpenUrl.php +++ b/src/Model/RbmActionOpenUrl.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmActionTypeEnum.php b/src/Model/RbmActionTypeEnum.php index 926da025..4b87580d 100644 --- a/src/Model/RbmActionTypeEnum.php +++ b/src/Model/RbmActionTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmActionViewLocation.php b/src/Model/RbmActionViewLocation.php index dde4a169..50ced2af 100644 --- a/src/Model/RbmActionViewLocation.php +++ b/src/Model/RbmActionViewLocation.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmCardContent.php b/src/Model/RbmCardContent.php index 17e3dddc..9812f56f 100644 --- a/src/Model/RbmCardContent.php +++ b/src/Model/RbmCardContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmCardContentMedia.php b/src/Model/RbmCardContentMedia.php index 42180b21..4d216ad2 100644 --- a/src/Model/RbmCardContentMedia.php +++ b/src/Model/RbmCardContentMedia.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmLocationResponse.php b/src/Model/RbmLocationResponse.php index 9417565d..1146cbba 100644 --- a/src/Model/RbmLocationResponse.php +++ b/src/Model/RbmLocationResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmMediaHeightEnum.php b/src/Model/RbmMediaHeightEnum.php index d09e05a7..f9a622f3 100644 --- a/src/Model/RbmMediaHeightEnum.php +++ b/src/Model/RbmMediaHeightEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmMessageCarouselCard.php b/src/Model/RbmMessageCarouselCard.php index a917a227..8aae102c 100644 --- a/src/Model/RbmMessageCarouselCard.php +++ b/src/Model/RbmMessageCarouselCard.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmMessageContentFile.php b/src/Model/RbmMessageContentFile.php index 1210afb4..3146ff91 100644 --- a/src/Model/RbmMessageContentFile.php +++ b/src/Model/RbmMessageContentFile.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmMessageContentRichCard.php b/src/Model/RbmMessageContentRichCard.php index 5dcc0700..1b17fb81 100644 --- a/src/Model/RbmMessageContentRichCard.php +++ b/src/Model/RbmMessageContentRichCard.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmMessageContentText.php b/src/Model/RbmMessageContentText.php index db91e9d5..426321b3 100644 --- a/src/Model/RbmMessageContentText.php +++ b/src/Model/RbmMessageContentText.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmMessageMedia.php b/src/Model/RbmMessageMedia.php index 2583688d..f4c648e5 100644 --- a/src/Model/RbmMessageMedia.php +++ b/src/Model/RbmMessageMedia.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmOpenUrlEnum.php b/src/Model/RbmOpenUrlEnum.php index 4b2c943f..bcf028a7 100644 --- a/src/Model/RbmOpenUrlEnum.php +++ b/src/Model/RbmOpenUrlEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmStandaloneCard.php b/src/Model/RbmStandaloneCard.php index d63a0d43..9e19bf21 100644 --- a/src/Model/RbmStandaloneCard.php +++ b/src/Model/RbmStandaloneCard.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmSuggestionResponse.php b/src/Model/RbmSuggestionResponse.php index 97058c53..5ab5bd2b 100644 --- a/src/Model/RbmSuggestionResponse.php +++ b/src/Model/RbmSuggestionResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RbmWebViewEnum.php b/src/Model/RbmWebViewEnum.php index ffdbf347..b3e33e31 100644 --- a/src/Model/RbmWebViewEnum.php +++ b/src/Model/RbmWebViewEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RecordingAvailableCallback.php b/src/Model/RecordingAvailableCallback.php index 6693846d..bcc108a0 100644 --- a/src/Model/RecordingAvailableCallback.php +++ b/src/Model/RecordingAvailableCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RecordingCompleteCallback.php b/src/Model/RecordingCompleteCallback.php index 774f8e61..f7953f20 100644 --- a/src/Model/RecordingCompleteCallback.php +++ b/src/Model/RecordingCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RecordingStateEnum.php b/src/Model/RecordingStateEnum.php index 2215ba67..ce24ee14 100644 --- a/src/Model/RecordingStateEnum.php +++ b/src/Model/RecordingStateEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RecordingTranscriptionClip.php b/src/Model/RecordingTranscriptionClip.php index e27a37df..ad21e256 100644 --- a/src/Model/RecordingTranscriptionClip.php +++ b/src/Model/RecordingTranscriptionClip.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RecordingTranscriptionMetadata.php b/src/Model/RecordingTranscriptionMetadata.php index 9eafcda4..f0dc07f3 100644 --- a/src/Model/RecordingTranscriptionMetadata.php +++ b/src/Model/RecordingTranscriptionMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RecordingTranscriptions.php b/src/Model/RecordingTranscriptions.php index 7e9fa6b8..b60559f6 100644 --- a/src/Model/RecordingTranscriptions.php +++ b/src/Model/RecordingTranscriptions.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RedirectCallback.php b/src/Model/RedirectCallback.php index 602c5e39..ab5f2d8c 100644 --- a/src/Model/RedirectCallback.php +++ b/src/Model/RedirectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/RedirectMethodEnum.php b/src/Model/RedirectMethodEnum.php index 724269be..a9016fc0 100644 --- a/src/Model/RedirectMethodEnum.php +++ b/src/Model/RedirectMethodEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/SipConnectionMetadata.php b/src/Model/SipConnectionMetadata.php index 803312f8..1c99a780 100644 --- a/src/Model/SipConnectionMetadata.php +++ b/src/Model/SipConnectionMetadata.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/SipCredentials.php b/src/Model/SipCredentials.php index 4818b042..8321d18f 100644 --- a/src/Model/SipCredentials.php +++ b/src/Model/SipCredentials.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/SmsMessageContent.php b/src/Model/SmsMessageContent.php index da2232cc..c9518bec 100644 --- a/src/Model/SmsMessageContent.php +++ b/src/Model/SmsMessageContent.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/StandaloneCardOrientationEnum.php b/src/Model/StandaloneCardOrientationEnum.php index 5494299d..89cb0571 100644 --- a/src/Model/StandaloneCardOrientationEnum.php +++ b/src/Model/StandaloneCardOrientationEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/StatusCallback.php b/src/Model/StatusCallback.php index be170724..b0de4eb6 100644 --- a/src/Model/StatusCallback.php +++ b/src/Model/StatusCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/StatusCallbackMessage.php b/src/Model/StatusCallbackMessage.php index 1c4ac053..4f117172 100644 --- a/src/Model/StatusCallbackMessage.php +++ b/src/Model/StatusCallbackMessage.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/StatusCallbackTypeEnum.php b/src/Model/StatusCallbackTypeEnum.php index 20ead8e1..8b7d715e 100644 --- a/src/Model/StatusCallbackTypeEnum.php +++ b/src/Model/StatusCallbackTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/StirShaken.php b/src/Model/StirShaken.php index c8dcaa9c..1c0946a0 100644 --- a/src/Model/StirShaken.php +++ b/src/Model/StirShaken.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/SyncLookupRequest.php b/src/Model/SyncLookupRequest.php index e1e136d1..273a3d3e 100644 --- a/src/Model/SyncLookupRequest.php +++ b/src/Model/SyncLookupRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/TelephoneNumber.php b/src/Model/TelephoneNumber.php index 35562bb7..d7561109 100644 --- a/src/Model/TelephoneNumber.php +++ b/src/Model/TelephoneNumber.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/TfvBasicAuthentication.php b/src/Model/TfvBasicAuthentication.php index 42a9ccba..148d96d5 100644 --- a/src/Model/TfvBasicAuthentication.php +++ b/src/Model/TfvBasicAuthentication.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/TfvCallbackStatusEnum.php b/src/Model/TfvCallbackStatusEnum.php index 741c029b..a487e8bf 100644 --- a/src/Model/TfvCallbackStatusEnum.php +++ b/src/Model/TfvCallbackStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/TfvError.php b/src/Model/TfvError.php index 141962ca..23f5511c 100644 --- a/src/Model/TfvError.php +++ b/src/Model/TfvError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/TfvStatus.php b/src/Model/TfvStatus.php index 9b1dde49..617dd0a9 100644 --- a/src/Model/TfvStatus.php +++ b/src/Model/TfvStatus.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/TfvStatusEnum.php b/src/Model/TfvStatusEnum.php index 4cf5fd41..e0c6a976 100644 --- a/src/Model/TfvStatusEnum.php +++ b/src/Model/TfvStatusEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/TfvSubmissionInfo.php b/src/Model/TfvSubmissionInfo.php index 1c26a1cf..0007e413 100644 --- a/src/Model/TfvSubmissionInfo.php +++ b/src/Model/TfvSubmissionInfo.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/TfvSubmissionWrapper.php b/src/Model/TfvSubmissionWrapper.php index ceda5ba4..fcf571b0 100644 --- a/src/Model/TfvSubmissionWrapper.php +++ b/src/Model/TfvSubmissionWrapper.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/ThumbnailAlignmentEnum.php b/src/Model/ThumbnailAlignmentEnum.php index 20a76b5a..d229dd88 100644 --- a/src/Model/ThumbnailAlignmentEnum.php +++ b/src/Model/ThumbnailAlignmentEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/TranscribeRecording.php b/src/Model/TranscribeRecording.php index 4510b45a..2985c213 100644 --- a/src/Model/TranscribeRecording.php +++ b/src/Model/TranscribeRecording.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/Transcription.php b/src/Model/Transcription.php index 5365b640..366e03bd 100644 --- a/src/Model/Transcription.php +++ b/src/Model/Transcription.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/TranscriptionAvailableCallback.php b/src/Model/TranscriptionAvailableCallback.php index 23f12198..32a13c07 100644 --- a/src/Model/TranscriptionAvailableCallback.php +++ b/src/Model/TranscriptionAvailableCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/TransferAnswerCallback.php b/src/Model/TransferAnswerCallback.php index 8a81490f..2a06b2fd 100644 --- a/src/Model/TransferAnswerCallback.php +++ b/src/Model/TransferAnswerCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/TransferCompleteCallback.php b/src/Model/TransferCompleteCallback.php index f36d92fb..fb4ae2a0 100644 --- a/src/Model/TransferCompleteCallback.php +++ b/src/Model/TransferCompleteCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/TransferDisconnectCallback.php b/src/Model/TransferDisconnectCallback.php index c9611035..3d472b28 100644 --- a/src/Model/TransferDisconnectCallback.php +++ b/src/Model/TransferDisconnectCallback.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/UpdateCall.php b/src/Model/UpdateCall.php index 1f0f1a8e..2ced54a4 100644 --- a/src/Model/UpdateCall.php +++ b/src/Model/UpdateCall.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/UpdateCallRecording.php b/src/Model/UpdateCallRecording.php index b7e64fcd..d67764b6 100644 --- a/src/Model/UpdateCallRecording.php +++ b/src/Model/UpdateCallRecording.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/UpdateConference.php b/src/Model/UpdateConference.php index aacaf8a9..5a6bfd35 100644 --- a/src/Model/UpdateConference.php +++ b/src/Model/UpdateConference.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/UpdateConferenceMember.php b/src/Model/UpdateConferenceMember.php index d2e400d5..6ab5eda2 100644 --- a/src/Model/UpdateConferenceMember.php +++ b/src/Model/UpdateConferenceMember.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/VerificationDenialWebhook.php b/src/Model/VerificationDenialWebhook.php index 64e176bb..1523294b 100644 --- a/src/Model/VerificationDenialWebhook.php +++ b/src/Model/VerificationDenialWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/VerificationRequest.php b/src/Model/VerificationRequest.php index 6b510e68..ec206e08 100644 --- a/src/Model/VerificationRequest.php +++ b/src/Model/VerificationRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/VerificationUpdateRequest.php b/src/Model/VerificationUpdateRequest.php index 53de8e19..c213ac3f 100644 --- a/src/Model/VerificationUpdateRequest.php +++ b/src/Model/VerificationUpdateRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/VerificationWebhook.php b/src/Model/VerificationWebhook.php index 96cd3926..b0198d31 100644 --- a/src/Model/VerificationWebhook.php +++ b/src/Model/VerificationWebhook.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/VerifyCodeRequest.php b/src/Model/VerifyCodeRequest.php index 0b99a7b2..92dd0201 100644 --- a/src/Model/VerifyCodeRequest.php +++ b/src/Model/VerifyCodeRequest.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/VerifyCodeResponse.php b/src/Model/VerifyCodeResponse.php index 88364742..bc1912cd 100644 --- a/src/Model/VerifyCodeResponse.php +++ b/src/Model/VerifyCodeResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/VoiceApiError.php b/src/Model/VoiceApiError.php index 304c7673..21a91202 100644 --- a/src/Model/VoiceApiError.php +++ b/src/Model/VoiceApiError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/VoiceCodeResponse.php b/src/Model/VoiceCodeResponse.php index 5313288e..03a8a651 100644 --- a/src/Model/VoiceCodeResponse.php +++ b/src/Model/VoiceCodeResponse.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/WebhookSubscription.php b/src/Model/WebhookSubscription.php index 395c5c80..8e4d166d 100644 --- a/src/Model/WebhookSubscription.php +++ b/src/Model/WebhookSubscription.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/WebhookSubscriptionBasicAuthentication.php b/src/Model/WebhookSubscriptionBasicAuthentication.php index 35b39950..97999e6a 100644 --- a/src/Model/WebhookSubscriptionBasicAuthentication.php +++ b/src/Model/WebhookSubscriptionBasicAuthentication.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/WebhookSubscriptionError.php b/src/Model/WebhookSubscriptionError.php index ba0a9a76..86ea132f 100644 --- a/src/Model/WebhookSubscriptionError.php +++ b/src/Model/WebhookSubscriptionError.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/WebhookSubscriptionRequestSchema.php b/src/Model/WebhookSubscriptionRequestSchema.php index 91d39445..bccbace0 100644 --- a/src/Model/WebhookSubscriptionRequestSchema.php +++ b/src/Model/WebhookSubscriptionRequestSchema.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/WebhookSubscriptionTypeEnum.php b/src/Model/WebhookSubscriptionTypeEnum.php index f89beaee..378459f1 100644 --- a/src/Model/WebhookSubscriptionTypeEnum.php +++ b/src/Model/WebhookSubscriptionTypeEnum.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/Model/WebhookSubscriptionsListBody.php b/src/Model/WebhookSubscriptionsListBody.php index e9df3577..f7f80d97 100644 --- a/src/Model/WebhookSubscriptionsListBody.php +++ b/src/Model/WebhookSubscriptionsListBody.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** diff --git a/src/ObjectSerializer.php b/src/ObjectSerializer.php index 0bfa45e5..0984d24d 100644 --- a/src/ObjectSerializer.php +++ b/src/ObjectSerializer.php @@ -17,7 +17,7 @@ * The version of the OpenAPI document: 1.0.0 * Contact: letstalk@bandwidth.com * @generated Generated by: https://openapi-generator.tech - * Generator version: 7.25.0-SNAPSHOT + * Generator version: 7.25.0 */ /** @@ -207,6 +207,31 @@ private static function isEmptyValue(mixed $value, string $openApiType): bool }; } + /** + * Convert objects into arrays, recursively. + * + * sanitizeForSerialization() returns an object per model, but query parameters + * are flattened from arrays. + * + * @param mixed $data + * + * @return mixed the data with every object converted to an array + */ + private static function toArrayRecursive(mixed $data): mixed + { + if (is_array($data) || is_object($data)) { + $result = []; + + foreach ($data as $key => $value) { + $result[$key] = self::toArrayRecursive($value); + } + + return $result; + } + + return $data; + } + /** * Take query parameter properties and turn it into an array suitable for * native http_build_query or GuzzleHttp\Psr7\Query::build. @@ -246,8 +271,19 @@ public static function toQueryValue( return ["{$paramName}" => $value->format(self::$dateTimeFormat)]; } + // A model is typed with its class name rather than "object", but serializes as one. + if ($value instanceof ModelInterface) { + $openApiType = 'object'; + } + $query = []; - $value = (in_array($openApiType, ['object', 'array'], true)) ? (array)$value : $value; + if ($openApiType === 'object' && is_object($value)) { + // Read the model's values through its getters; a plain (array) cast + // would expose only the protected $container holding them. + $value = self::toArrayRecursive(self::sanitizeForSerialization($value)); + } elseif (in_array($openApiType, ['object', 'array'], true)) { + $value = (array) $value; + } // since \GuzzleHttp\Psr7\Query::build fails with nested arrays // need to flatten array first From 77be15dd651a41f5342b7027a9d4010f4dc16a07 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 26 Aug 2026 14:21:02 -0400 Subject: [PATCH 39/53] sleep longer to let prism start --- .github/workflows/test-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index d0789fae..e4692cae 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -48,5 +48,5 @@ jobs: run: | npm install -g @stoplight/prism-cli composer install - prism mock ./bandwidth.yml & (sleep 4; ./vendor/bin/phpunit tests/Unit) + prism mock ./bandwidth.yml & (sleep 6; ./vendor/bin/phpunit tests/Unit) shell: bash From 0190ca7dce84d544975882208e346b5806441043 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 26 Aug 2026 14:32:54 -0400 Subject: [PATCH 40/53] try new loop to wait on prism --- .github/workflows/test-pr.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index e4692cae..c9e80721 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -48,5 +48,10 @@ jobs: run: | npm install -g @stoplight/prism-cli composer install - prism mock ./bandwidth.yml & (sleep 6; ./vendor/bin/phpunit tests/Unit) + prism mock ./bandwidth.yml > prism.log 2>&1 & + for i in $(seq 10); do # wait for prism to start + curl -s -o /dev/null http://127.0.0.1:4010 && break + [ "$i" -eq 10 ] && { echo "::error::prism failed to start"; cat prism.log; exit 1; } + sleep 1 + done shell: bash From 90ee38c612710f68edb10fe08f2ae45deab0d0be Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 26 Aug 2026 14:48:41 -0400 Subject: [PATCH 41/53] fix old APIException still existing --- src/{APIException.php => ApiException.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{APIException.php => ApiException.php} (100%) diff --git a/src/APIException.php b/src/ApiException.php similarity index 100% rename from src/APIException.php rename to src/ApiException.php From 25285b8fc013cc3bc98a39300fda86af68c96d18 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 26 Aug 2026 14:48:49 -0400 Subject: [PATCH 42/53] remove some unused vars --- .github/workflows/test-smoke.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test-smoke.yml b/.github/workflows/test-smoke.yml index 44550a5d..10ae1854 100644 --- a/.github/workflows/test-smoke.yml +++ b/.github/workflows/test-smoke.yml @@ -17,8 +17,6 @@ env: BW_PASSWORD: ${{ secrets.BW_PASSWORD }} BW_CLIENT_ID: ${{ secrets.BW_CLIENT_ID }} BW_CLIENT_SECRET: ${{ secrets.BW_CLIENT_SECRET }} - BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }} - BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }} USER_NUMBER: ${{ secrets.USER_NUMBER }} BASE_CALLBACK_URL: ${{ secrets.BASE_CALLBACK_URL }} MANTECA_BASE_URL: ${{ secrets.MANTECA_BASE_URL }} From f62ef70cfb6a5bc8385116ae3d3cdb34880b8567 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 26 Aug 2026 14:51:18 -0400 Subject: [PATCH 43/53] unused vars --- .github/workflows/test-pr.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index c9e80721..e27e7f61 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -15,8 +15,6 @@ env: BW_PASSWORD: ${{ secrets.BW_PASSWORD }} BW_CLIENT_ID: ${{ secrets.BW_CLIENT_ID }} BW_CLIENT_SECRET: ${{ secrets.BW_CLIENT_SECRET }} - BW_USERNAME_FORBIDDEN: ${{ secrets.BW_USERNAME_FORBIDDEN }} - BW_PASSWORD_FORBIDDEN: ${{ secrets.BW_PASSWORD_FORBIDDEN }} BW_VOICE_APPLICATION_ID: ${{ secrets.BW_VOICE_APPLICATION_ID }} BW_MESSAGING_APPLICATION_ID: ${{ secrets.BW_MESSAGING_APPLICATION_ID }} BW_NUMBER: ${{ secrets.BW_NUMBER }} From 7cf8c8afc8ce1fa3dc6b14ec51b7c33c6d2e3865 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 26 Aug 2026 14:51:59 -0400 Subject: [PATCH 44/53] bring unit tests back --- .github/workflows/test-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index e27e7f61..327a6bf0 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -52,4 +52,5 @@ jobs: [ "$i" -eq 10 ] && { echo "::error::prism failed to start"; cat prism.log; exit 1; } sleep 1 done + ./vendor/bin/phpunit tests/Unit shell: bash From 84125e0d7acf0e12dbe545667be77073c52a4239 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Wed, 26 Aug 2026 15:01:05 -0400 Subject: [PATCH 45/53] use fresh config for tests --- tests/Smoke/CallsApiTest.php | 2 +- tests/Smoke/ConferencesApiTest.php | 2 +- tests/Smoke/EndpointsApiTest.php | 2 +- tests/Smoke/MFAApiTest.php | 2 +- tests/Smoke/MediaApiTest.php | 2 +- tests/Smoke/MessagesApiTest.php | 2 +- tests/Smoke/MultiChannelApiTest.php | 2 +- tests/Smoke/PhoneNumberLookupApiTest.php | 2 +- tests/Smoke/RecordingsApiTest.php | 2 +- tests/Smoke/StatisticsApiTest.php | 2 +- tests/Smoke/TollFreeVerificationApiTest.php | 2 +- tests/Smoke/TranscriptionsApiTest.php | 2 +- tests/Unit/Api/CallsApiTest.php | 2 +- tests/Unit/Api/ConferencesApiTest.php | 2 +- tests/Unit/Api/EndpointsApiTest.php | 2 +- tests/Unit/Api/MFAApiTest.php | 2 +- tests/Unit/Api/MediaApiTest.php | 2 +- tests/Unit/Api/MessagesApiTest.php | 2 +- tests/Unit/Api/MultiChannelApiTest.php | 2 +- tests/Unit/Api/PhoneNumberLookupApiTest.php | 2 +- tests/Unit/Api/RecordingsApiTest.php | 2 +- tests/Unit/Api/StatisticsApiTest.php | 2 +- tests/Unit/Api/TollFreeVerificationApiTest.php | 2 +- tests/Unit/Api/TranscriptionsApiTest.php | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/Smoke/CallsApiTest.php b/tests/Smoke/CallsApiTest.php index 44056c27..61e4f441 100644 --- a/tests/Smoke/CallsApiTest.php +++ b/tests/Smoke/CallsApiTest.php @@ -74,7 +74,7 @@ class CallsApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setClientId(getenv("BW_CLIENT_ID")) ->setClientSecret(getenv("BW_CLIENT_SECRET")); diff --git a/tests/Smoke/ConferencesApiTest.php b/tests/Smoke/ConferencesApiTest.php index 3d8d7a23..fef44b19 100644 --- a/tests/Smoke/ConferencesApiTest.php +++ b/tests/Smoke/ConferencesApiTest.php @@ -72,7 +72,7 @@ class ConferencesApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setClientId(getenv("BW_CLIENT_ID")) ->setClientSecret(getenv("BW_CLIENT_SECRET")); diff --git a/tests/Smoke/EndpointsApiTest.php b/tests/Smoke/EndpointsApiTest.php index 81778000..e1d27b07 100644 --- a/tests/Smoke/EndpointsApiTest.php +++ b/tests/Smoke/EndpointsApiTest.php @@ -62,7 +62,7 @@ class EndpointsApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setClientId(getenv("BW_CLIENT_ID")) ->setClientSecret(getenv("BW_CLIENT_SECRET")); diff --git a/tests/Smoke/MFAApiTest.php b/tests/Smoke/MFAApiTest.php index d5db3154..65d99dbe 100644 --- a/tests/Smoke/MFAApiTest.php +++ b/tests/Smoke/MFAApiTest.php @@ -58,7 +58,7 @@ class MFAApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setUsername(getenv("BW_USERNAME")) ->setPassword(getenv("BW_PASSWORD")); diff --git a/tests/Smoke/MediaApiTest.php b/tests/Smoke/MediaApiTest.php index a0eb8176..7f7ba5b3 100644 --- a/tests/Smoke/MediaApiTest.php +++ b/tests/Smoke/MediaApiTest.php @@ -55,7 +55,7 @@ class MediaApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setUsername(getenv("BW_USERNAME")) ->setPassword(getenv("BW_PASSWORD")); diff --git a/tests/Smoke/MessagesApiTest.php b/tests/Smoke/MessagesApiTest.php index 48fef681..b43def32 100644 --- a/tests/Smoke/MessagesApiTest.php +++ b/tests/Smoke/MessagesApiTest.php @@ -56,7 +56,7 @@ class MessagesApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setUsername(getenv("BW_USERNAME")) ->setPassword(getenv("BW_PASSWORD")); diff --git a/tests/Smoke/MultiChannelApiTest.php b/tests/Smoke/MultiChannelApiTest.php index cd6798be..f1d244fe 100644 --- a/tests/Smoke/MultiChannelApiTest.php +++ b/tests/Smoke/MultiChannelApiTest.php @@ -80,7 +80,7 @@ class MultiChannelApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setUsername(getenv("BW_USERNAME")) ->setPassword(getenv("BW_PASSWORD")); diff --git a/tests/Smoke/PhoneNumberLookupApiTest.php b/tests/Smoke/PhoneNumberLookupApiTest.php index a2a3270f..9397b459 100644 --- a/tests/Smoke/PhoneNumberLookupApiTest.php +++ b/tests/Smoke/PhoneNumberLookupApiTest.php @@ -63,7 +63,7 @@ class PhoneNumberLookupApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setClientId(getenv("BW_CLIENT_ID")) ->setClientSecret(getenv("BW_CLIENT_SECRET")); diff --git a/tests/Smoke/RecordingsApiTest.php b/tests/Smoke/RecordingsApiTest.php index 76b246c2..9fe5c587 100644 --- a/tests/Smoke/RecordingsApiTest.php +++ b/tests/Smoke/RecordingsApiTest.php @@ -68,7 +68,7 @@ class RecordingsApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setClientId(getenv("BW_CLIENT_ID")) ->setClientSecret(getenv("BW_CLIENT_SECRET")); diff --git a/tests/Smoke/StatisticsApiTest.php b/tests/Smoke/StatisticsApiTest.php index 1bae5142..7b43091f 100644 --- a/tests/Smoke/StatisticsApiTest.php +++ b/tests/Smoke/StatisticsApiTest.php @@ -50,7 +50,7 @@ class StatisticsApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setClientId(getenv("BW_CLIENT_ID")) ->setClientSecret(getenv("BW_CLIENT_SECRET")); diff --git a/tests/Smoke/TollFreeVerificationApiTest.php b/tests/Smoke/TollFreeVerificationApiTest.php index a798bd7d..52758cd6 100644 --- a/tests/Smoke/TollFreeVerificationApiTest.php +++ b/tests/Smoke/TollFreeVerificationApiTest.php @@ -48,7 +48,7 @@ class TollFreeVerificationApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setClientId(getenv("BW_CLIENT_ID")) ->setClientSecret(getenv("BW_CLIENT_SECRET")); diff --git a/tests/Smoke/TranscriptionsApiTest.php b/tests/Smoke/TranscriptionsApiTest.php index eda18db9..7c4100d1 100644 --- a/tests/Smoke/TranscriptionsApiTest.php +++ b/tests/Smoke/TranscriptionsApiTest.php @@ -63,7 +63,7 @@ class TranscriptionsApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setClientId(getenv("BW_CLIENT_ID")) ->setClientSecret(getenv("BW_CLIENT_SECRET")); diff --git a/tests/Unit/Api/CallsApiTest.php b/tests/Unit/Api/CallsApiTest.php index fc233d03..d497838c 100644 --- a/tests/Unit/Api/CallsApiTest.php +++ b/tests/Unit/Api/CallsApiTest.php @@ -71,7 +71,7 @@ class CallsApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setAccessToken("abcd1234") ->setIgnoreOperationHosts(true) ->setHost("http://127.0.0.1:4010"); diff --git a/tests/Unit/Api/ConferencesApiTest.php b/tests/Unit/Api/ConferencesApiTest.php index 09450ab8..ba3f6a03 100644 --- a/tests/Unit/Api/ConferencesApiTest.php +++ b/tests/Unit/Api/ConferencesApiTest.php @@ -64,7 +64,7 @@ class ConferencesApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setAccessToken("abcd1234") ->setIgnoreOperationHosts(true) ->setHost("http://127.0.0.1:4010"); diff --git a/tests/Unit/Api/EndpointsApiTest.php b/tests/Unit/Api/EndpointsApiTest.php index abb5fcdd..2157e7a2 100644 --- a/tests/Unit/Api/EndpointsApiTest.php +++ b/tests/Unit/Api/EndpointsApiTest.php @@ -64,7 +64,7 @@ class EndpointsApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setAccessToken("abcd1234") ->setIgnoreOperationHosts(true) ->setHost("http://127.0.0.1:4010"); diff --git a/tests/Unit/Api/MFAApiTest.php b/tests/Unit/Api/MFAApiTest.php index 60c41ca1..f0dc5a7f 100644 --- a/tests/Unit/Api/MFAApiTest.php +++ b/tests/Unit/Api/MFAApiTest.php @@ -62,7 +62,7 @@ class MFAApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setAccessToken("abcd1234") ->setIgnoreOperationHosts(true) ->setHost("http://127.0.0.1:4010"); diff --git a/tests/Unit/Api/MediaApiTest.php b/tests/Unit/Api/MediaApiTest.php index 0e9c1f9c..48e23d56 100644 --- a/tests/Unit/Api/MediaApiTest.php +++ b/tests/Unit/Api/MediaApiTest.php @@ -55,7 +55,7 @@ class MediaApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setAccessToken("abcd1234") ->setIgnoreOperationHosts(true) ->setHost("http://127.0.0.1:4010"); diff --git a/tests/Unit/Api/MessagesApiTest.php b/tests/Unit/Api/MessagesApiTest.php index 693bee7a..c0aac1b9 100644 --- a/tests/Unit/Api/MessagesApiTest.php +++ b/tests/Unit/Api/MessagesApiTest.php @@ -66,7 +66,7 @@ class MessagesApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setAccessToken("abcd1234") ->setIgnoreOperationHosts(true) ->setHost("http://127.0.0.1:4010"); diff --git a/tests/Unit/Api/MultiChannelApiTest.php b/tests/Unit/Api/MultiChannelApiTest.php index d475512f..219744e6 100644 --- a/tests/Unit/Api/MultiChannelApiTest.php +++ b/tests/Unit/Api/MultiChannelApiTest.php @@ -62,7 +62,7 @@ class MultiChannelApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setAccessToken("abcd1234") ->setIgnoreOperationHosts(true) ->setHost("http://127.0.0.1:4010"); diff --git a/tests/Unit/Api/PhoneNumberLookupApiTest.php b/tests/Unit/Api/PhoneNumberLookupApiTest.php index 329b38dd..95f8c043 100644 --- a/tests/Unit/Api/PhoneNumberLookupApiTest.php +++ b/tests/Unit/Api/PhoneNumberLookupApiTest.php @@ -69,7 +69,7 @@ class PhoneNumberLookupApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setAccessToken("abcd1234") ->setIgnoreOperationHosts(true) ->setHost("http://127.0.0.1:4010"); diff --git a/tests/Unit/Api/RecordingsApiTest.php b/tests/Unit/Api/RecordingsApiTest.php index f0321910..8ef4d11c 100644 --- a/tests/Unit/Api/RecordingsApiTest.php +++ b/tests/Unit/Api/RecordingsApiTest.php @@ -64,7 +64,7 @@ class RecordingsApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setAccessToken("abcd1234") ->setIgnoreOperationHosts(true) ->setHost("http://127.0.0.1:4010"); diff --git a/tests/Unit/Api/StatisticsApiTest.php b/tests/Unit/Api/StatisticsApiTest.php index a606274a..bc158a38 100644 --- a/tests/Unit/Api/StatisticsApiTest.php +++ b/tests/Unit/Api/StatisticsApiTest.php @@ -51,7 +51,7 @@ class StatisticsApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setAccessToken("abcd1234") ->setIgnoreOperationHosts(true) ->setHost("http://127.0.0.1:4010"); diff --git a/tests/Unit/Api/TollFreeVerificationApiTest.php b/tests/Unit/Api/TollFreeVerificationApiTest.php index 4cd6e059..b4cea257 100644 --- a/tests/Unit/Api/TollFreeVerificationApiTest.php +++ b/tests/Unit/Api/TollFreeVerificationApiTest.php @@ -72,7 +72,7 @@ class TollFreeVerificationApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setAccessToken("abcd1234") ->setIgnoreOperationHosts(true) ->setHost("http://127.0.0.1:4010"); diff --git a/tests/Unit/Api/TranscriptionsApiTest.php b/tests/Unit/Api/TranscriptionsApiTest.php index c1843096..6036a758 100644 --- a/tests/Unit/Api/TranscriptionsApiTest.php +++ b/tests/Unit/Api/TranscriptionsApiTest.php @@ -58,7 +58,7 @@ class TranscriptionsApiTest extends TestCase */ public static function setUpBeforeClass(): void { - $config = Configuration::getDefaultConfiguration() + $config = (new Configuration()) ->setAccessToken("abcd1234") ->setIgnoreOperationHosts(true) ->setHost("http://127.0.0.1:4010"); From 8dbc180fb5c3c9ee1be1a5cfcb67971af89cc848 Mon Sep 17 00:00:00 2001 From: Cameron Koegel <53310569+ckoegel@users.noreply.github.com> Date: Wed, 9 Sep 2026 15:04:39 -0400 Subject: [PATCH 46/53] SWI-12291 Add BXML (#92) * SWI-11736: sync bandwidth.com/languages annotation ((none) -> PHP) (#90) * add bxml --------- Co-authored-by: Javier Gutierrez Gonzalez <83696425+jgutierrezglez@users.noreply.github.com> --- .bandwidth/component.yaml | 1 + composer.json | 1 + src/Model/Bxml/AudioProducer.php | 10 ++ src/Model/Bxml/Bridge.php | 60 ++++++++++ src/Model/Bxml/Bxml.php | 14 +++ src/Model/Bxml/Conference.php | 60 ++++++++++ src/Model/Bxml/Connect.php | 32 ++++++ src/Model/Bxml/CustomParam.php | 25 +++++ src/Model/Bxml/DiversionReason.php | 18 +++ src/Model/Bxml/DiversionTreatment.php | 10 ++ src/Model/Bxml/Endpoint.php | 20 ++++ src/Model/Bxml/FileFormat.php | 9 ++ src/Model/Bxml/Forward.php | 44 ++++++++ src/Model/Bxml/Gather.php | 92 ++++++++++++++++ src/Model/Bxml/GatherInput.php | 10 ++ src/Model/Bxml/Hangup.php | 16 +++ src/Model/Bxml/HttpMethod.php | 9 ++ src/Model/Bxml/NestableVerb.php | 89 +++++++++++++++ src/Model/Bxml/OutboundDestination.php | 10 ++ src/Model/Bxml/Pause.php | 22 ++++ src/Model/Bxml/PauseRecording.php | 16 +++ src/Model/Bxml/PhoneNumber.php | 57 ++++++++++ src/Model/Bxml/PlayAudio.php | 27 +++++ src/Model/Bxml/Record.php | 80 ++++++++++++++ src/Model/Bxml/Redirect.php | 46 ++++++++ src/Model/Bxml/Refer.php | 35 ++++++ src/Model/Bxml/Response.php | 14 +++ src/Model/Bxml/ResumeRecording.php | 16 +++ src/Model/Bxml/Ring.php | 26 +++++ src/Model/Bxml/Root.php | 42 +++++++ src/Model/Bxml/SendDtmf.php | 27 +++++ src/Model/Bxml/SipUri.php | 57 ++++++++++ src/Model/Bxml/SpeakSentence.php | 49 +++++++++ src/Model/Bxml/StartGather.php | 34 ++++++ src/Model/Bxml/StartRecording.php | 56 ++++++++++ src/Model/Bxml/StartStream.php | 56 ++++++++++ src/Model/Bxml/StartTranscription.php | 57 ++++++++++ src/Model/Bxml/StopGather.php | 16 +++ src/Model/Bxml/StopRecording.php | 16 +++ src/Model/Bxml/StopStream.php | 28 +++++ src/Model/Bxml/StopTranscription.php | 26 +++++ src/Model/Bxml/StreamMode.php | 9 ++ src/Model/Bxml/StreamParam.php | 25 +++++ src/Model/Bxml/Tag.php | 21 ++++ src/Model/Bxml/Tracks.php | 10 ++ src/Model/Bxml/Transfer.php | 71 ++++++++++++ src/Model/Bxml/Verb.php | 64 +++++++++++ tests/Unit/Model/Bxml/BridgeTest.php | 47 ++++++++ tests/Unit/Model/Bxml/ConferenceTest.php | 46 ++++++++ tests/Unit/Model/Bxml/ConnectTest.php | 73 ++++++++++++ tests/Unit/Model/Bxml/CustomParamTest.php | 25 +++++ tests/Unit/Model/Bxml/EndpointTest.php | 20 ++++ tests/Unit/Model/Bxml/EnumTest.php | 69 ++++++++++++ tests/Unit/Model/Bxml/ForwardTest.php | 39 +++++++ tests/Unit/Model/Bxml/GatherTest.php | 104 ++++++++++++++++++ tests/Unit/Model/Bxml/HangupTest.php | 20 ++++ tests/Unit/Model/Bxml/PauseRecordingTest.php | 20 ++++ tests/Unit/Model/Bxml/PauseTest.php | 22 ++++ tests/Unit/Model/Bxml/PhoneNumberTest.php | 49 +++++++++ tests/Unit/Model/Bxml/PlayAudioTest.php | 43 ++++++++ tests/Unit/Model/Bxml/RecordTest.php | 56 ++++++++++ tests/Unit/Model/Bxml/RedirectTest.php | 38 +++++++ tests/Unit/Model/Bxml/ReferTest.php | 72 ++++++++++++ tests/Unit/Model/Bxml/ResumeRecordingTest.php | 20 ++++ tests/Unit/Model/Bxml/RingTest.php | 25 +++++ tests/Unit/Model/Bxml/RootTest.php | 66 +++++++++++ tests/Unit/Model/Bxml/SendDtmfTest.php | 29 +++++ tests/Unit/Model/Bxml/SipUriTest.php | 49 +++++++++ tests/Unit/Model/Bxml/SpeakSentenceTest.php | 71 ++++++++++++ tests/Unit/Model/Bxml/StartGatherTest.php | 33 ++++++ tests/Unit/Model/Bxml/StartRecordingTest.php | 44 ++++++++ tests/Unit/Model/Bxml/StartStreamTest.php | 88 +++++++++++++++ .../Model/Bxml/StartTranscriptionTest.php | 87 +++++++++++++++ tests/Unit/Model/Bxml/StopGatherTest.php | 20 ++++ tests/Unit/Model/Bxml/StopRecordingTest.php | 20 ++++ tests/Unit/Model/Bxml/StopStreamTest.php | 25 +++++ .../Unit/Model/Bxml/StopTranscriptionTest.php | 25 +++++ tests/Unit/Model/Bxml/StreamParamTest.php | 25 +++++ tests/Unit/Model/Bxml/TagTest.php | 20 ++++ tests/Unit/Model/Bxml/TransferTest.php | 97 ++++++++++++++++ 80 files changed, 3020 insertions(+) create mode 100644 src/Model/Bxml/AudioProducer.php create mode 100644 src/Model/Bxml/Bridge.php create mode 100644 src/Model/Bxml/Bxml.php create mode 100644 src/Model/Bxml/Conference.php create mode 100644 src/Model/Bxml/Connect.php create mode 100644 src/Model/Bxml/CustomParam.php create mode 100644 src/Model/Bxml/DiversionReason.php create mode 100644 src/Model/Bxml/DiversionTreatment.php create mode 100644 src/Model/Bxml/Endpoint.php create mode 100644 src/Model/Bxml/FileFormat.php create mode 100644 src/Model/Bxml/Forward.php create mode 100644 src/Model/Bxml/Gather.php create mode 100644 src/Model/Bxml/GatherInput.php create mode 100644 src/Model/Bxml/Hangup.php create mode 100644 src/Model/Bxml/HttpMethod.php create mode 100644 src/Model/Bxml/NestableVerb.php create mode 100644 src/Model/Bxml/OutboundDestination.php create mode 100644 src/Model/Bxml/Pause.php create mode 100644 src/Model/Bxml/PauseRecording.php create mode 100644 src/Model/Bxml/PhoneNumber.php create mode 100644 src/Model/Bxml/PlayAudio.php create mode 100644 src/Model/Bxml/Record.php create mode 100644 src/Model/Bxml/Redirect.php create mode 100644 src/Model/Bxml/Refer.php create mode 100644 src/Model/Bxml/Response.php create mode 100644 src/Model/Bxml/ResumeRecording.php create mode 100644 src/Model/Bxml/Ring.php create mode 100644 src/Model/Bxml/Root.php create mode 100644 src/Model/Bxml/SendDtmf.php create mode 100644 src/Model/Bxml/SipUri.php create mode 100644 src/Model/Bxml/SpeakSentence.php create mode 100644 src/Model/Bxml/StartGather.php create mode 100644 src/Model/Bxml/StartRecording.php create mode 100644 src/Model/Bxml/StartStream.php create mode 100644 src/Model/Bxml/StartTranscription.php create mode 100644 src/Model/Bxml/StopGather.php create mode 100644 src/Model/Bxml/StopRecording.php create mode 100644 src/Model/Bxml/StopStream.php create mode 100644 src/Model/Bxml/StopTranscription.php create mode 100644 src/Model/Bxml/StreamMode.php create mode 100644 src/Model/Bxml/StreamParam.php create mode 100644 src/Model/Bxml/Tag.php create mode 100644 src/Model/Bxml/Tracks.php create mode 100644 src/Model/Bxml/Transfer.php create mode 100644 src/Model/Bxml/Verb.php create mode 100644 tests/Unit/Model/Bxml/BridgeTest.php create mode 100644 tests/Unit/Model/Bxml/ConferenceTest.php create mode 100644 tests/Unit/Model/Bxml/ConnectTest.php create mode 100644 tests/Unit/Model/Bxml/CustomParamTest.php create mode 100644 tests/Unit/Model/Bxml/EndpointTest.php create mode 100644 tests/Unit/Model/Bxml/EnumTest.php create mode 100644 tests/Unit/Model/Bxml/ForwardTest.php create mode 100644 tests/Unit/Model/Bxml/GatherTest.php create mode 100644 tests/Unit/Model/Bxml/HangupTest.php create mode 100644 tests/Unit/Model/Bxml/PauseRecordingTest.php create mode 100644 tests/Unit/Model/Bxml/PauseTest.php create mode 100644 tests/Unit/Model/Bxml/PhoneNumberTest.php create mode 100644 tests/Unit/Model/Bxml/PlayAudioTest.php create mode 100644 tests/Unit/Model/Bxml/RecordTest.php create mode 100644 tests/Unit/Model/Bxml/RedirectTest.php create mode 100644 tests/Unit/Model/Bxml/ReferTest.php create mode 100644 tests/Unit/Model/Bxml/ResumeRecordingTest.php create mode 100644 tests/Unit/Model/Bxml/RingTest.php create mode 100644 tests/Unit/Model/Bxml/RootTest.php create mode 100644 tests/Unit/Model/Bxml/SendDtmfTest.php create mode 100644 tests/Unit/Model/Bxml/SipUriTest.php create mode 100644 tests/Unit/Model/Bxml/SpeakSentenceTest.php create mode 100644 tests/Unit/Model/Bxml/StartGatherTest.php create mode 100644 tests/Unit/Model/Bxml/StartRecordingTest.php create mode 100644 tests/Unit/Model/Bxml/StartStreamTest.php create mode 100644 tests/Unit/Model/Bxml/StartTranscriptionTest.php create mode 100644 tests/Unit/Model/Bxml/StopGatherTest.php create mode 100644 tests/Unit/Model/Bxml/StopRecordingTest.php create mode 100644 tests/Unit/Model/Bxml/StopStreamTest.php create mode 100644 tests/Unit/Model/Bxml/StopTranscriptionTest.php create mode 100644 tests/Unit/Model/Bxml/StreamParamTest.php create mode 100644 tests/Unit/Model/Bxml/TagTest.php create mode 100644 tests/Unit/Model/Bxml/TransferTest.php diff --git a/.bandwidth/component.yaml b/.bandwidth/component.yaml index e3177943..b2df26dc 100644 --- a/.bandwidth/component.yaml +++ b/.bandwidth/component.yaml @@ -6,6 +6,7 @@ metadata: description: Bandwidth PHP SDK annotations: github.com/project-slug: Bandwidth/php-sdk + bandwidth.com/languages: PHP organization: BW costCenter: Development - Software Infra buildPlatform: GitHub Actions diff --git a/composer.json b/composer.json index 8291a2d4..1bf77215 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,7 @@ "require": { "php": "^8.1", "ext-curl": "*", + "ext-dom": "*", "ext-json": "*", "ext-mbstring": "*", "guzzlehttp/guzzle": "^7.4.5", diff --git a/src/Model/Bxml/AudioProducer.php b/src/Model/Bxml/AudioProducer.php new file mode 100644 index 00000000..4435e658 --- /dev/null +++ b/src/Model/Bxml/AudioProducer.php @@ -0,0 +1,10 @@ +: SpeakSentence and PlayAudio. + */ +interface AudioProducer +{ +} diff --git a/src/Model/Bxml/Bridge.php b/src/Model/Bxml/Bridge.php new file mode 100644 index 00000000..a7ec058b --- /dev/null +++ b/src/Model/Bxml/Bridge.php @@ -0,0 +1,60 @@ + $this->bridgeCompleteUrl, + 'bridgeCompleteMethod' => $this->bridgeCompleteMethod, + 'bridgeCompleteFallbackUrl' => $this->bridgeCompleteFallbackUrl, + 'bridgeCompleteFallbackMethod' => $this->bridgeCompleteFallbackMethod, + 'bridgeTargetCompleteUrl' => $this->bridgeTargetCompleteUrl, + 'bridgeTargetCompleteMethod' => $this->bridgeTargetCompleteMethod, + 'bridgeTargetCompleteFallbackUrl' => $this->bridgeTargetCompleteFallbackUrl, + 'bridgeTargetCompleteFallbackMethod' => $this->bridgeTargetCompleteFallbackMethod, + 'username' => $this->username, + 'password' => $this->password, + 'fallbackUsername' => $this->fallbackUsername, + 'fallbackPassword' => $this->fallbackPassword, + 'tag' => $this->tag, + ]; + } +} diff --git a/src/Model/Bxml/Bxml.php b/src/Model/Bxml/Bxml.php new file mode 100644 index 00000000..cc059bba --- /dev/null +++ b/src/Model/Bxml/Bxml.php @@ -0,0 +1,14 @@ + $this->mute, + 'hold' => $this->hold, + 'callIdsToCoach' => $this->callIdsToCoach, + 'conferenceEventUrl' => $this->conferenceEventUrl, + 'conferenceEventMethod' => $this->conferenceEventMethod, + 'conferenceEventFallbackUrl' => $this->conferenceEventFallbackUrl, + 'conferenceEventFallbackMethod' => $this->conferenceEventFallbackMethod, + 'username' => $this->username, + 'password' => $this->password, + 'fallbackUsername' => $this->fallbackUsername, + 'fallbackPassword' => $this->fallbackPassword, + 'tag' => $this->tag, + 'callbackTimeout' => $this->callbackTimeout, + ]; + } +} diff --git a/src/Model/Bxml/Connect.php b/src/Model/Bxml/Connect.php new file mode 100644 index 00000000..69c7faaa --- /dev/null +++ b/src/Model/Bxml/Connect.php @@ -0,0 +1,32 @@ + $this->eventCallbackUrl, + 'eventFallbackUrl' => $this->eventFallbackUrl, + ]; + } +} diff --git a/src/Model/Bxml/CustomParam.php b/src/Model/Bxml/CustomParam.php new file mode 100644 index 00000000..d2c737e0 --- /dev/null +++ b/src/Model/Bxml/CustomParam.php @@ -0,0 +1,25 @@ + $this->name, + 'value' => $this->value, + ]; + } +} diff --git a/src/Model/Bxml/DiversionReason.php b/src/Model/Bxml/DiversionReason.php new file mode 100644 index 00000000..a55ec748 --- /dev/null +++ b/src/Model/Bxml/DiversionReason.php @@ -0,0 +1,18 @@ + $this->to, + 'from' => $this->from, + 'privacy' => $this->privacy, + 'callerDisplayName' => $this->callerDisplayName, + 'callTimeout' => $this->callTimeout, + 'diversionTreatment' => $this->diversionTreatment, + 'diversionReason' => $this->diversionReason, + 'uui' => $this->uui, + ]; + } +} diff --git a/src/Model/Bxml/Gather.php b/src/Model/Bxml/Gather.php new file mode 100644 index 00000000..db25ccd9 --- /dev/null +++ b/src/Model/Bxml/Gather.php @@ -0,0 +1,92 @@ + $this->gatherUrl, + 'gatherMethod' => $this->gatherMethod, + 'gatherFallbackUrl' => $this->gatherFallbackUrl, + 'gatherFallbackMethod' => $this->gatherFallbackMethod, + 'username' => $this->username, + 'password' => $this->password, + 'fallbackUsername' => $this->fallbackUsername, + 'fallbackPassword' => $this->fallbackPassword, + 'tag' => $this->tag, + 'terminatingDigits' => $this->terminatingDigits, + 'maxDigits' => $this->maxDigits, + 'interDigitTimeout' => $this->interDigitTimeout, + 'firstDigitTimeout' => $this->firstDigitTimeout, + 'repeatCount' => $this->repeatCount, + 'input' => $this->input, + 'hints' => $this->hints, + 'language' => $this->language, + 'partialResultCallback' => $this->partialResultCallback, + 'partialResultCallbackMethod' => $this->partialResultCallbackMethod, + 'profanityFilter' => $this->profanityFilter, + 'speechModel' => $this->speechModel, + 'speechTimeout' => $this->speechTimeout, + ]; + } +} diff --git a/src/Model/Bxml/GatherInput.php b/src/Model/Bxml/GatherInput.php new file mode 100644 index 00000000..ebf9fcfa --- /dev/null +++ b/src/Model/Bxml/GatherInput.php @@ -0,0 +1,10 @@ +assertAllowed($children); + + $this->children = $children; + } + + /** + * The class or interface every child must satisfy, paired with the class names to list in + * error messages. Return null to accept any Verb. + * + * @return array{0: class-string, 1: string[]}|null + */ + abstract protected function childConstraint(): ?array; + + public function toElement(DOMDocument $doc): DOMElement + { + $element = parent::toElement($doc); + + foreach ($this->children as $child) { + $element->appendChild($child->toElement($doc)); + } + + return $element; + } + + public function addVerb(Verb ...$verbs): void + { + $this->assertAllowed($verbs); + + foreach ($verbs as $verb) { + $this->children[] = $verb; + } + } + + /** + * @param Verb[] $verbs + */ + private function assertAllowed(array $verbs): void + { + $constraint = $this->childConstraint(); + + if ($constraint === null) { + return; + } + + [$type, $accepted] = $constraint; + + foreach (array_values($verbs) as $index => $verb) { + if ($verb instanceof $type) { + continue; + } + + throw new InvalidArgumentException(\sprintf( + '%s accepts only %s; got %s at index %d', + $this->tagName, + implode(', ', $accepted), + \is_object($verb) ? self::shortName($verb) : get_debug_type($verb), + $index, + )); + } + } + + protected static function shortName(object $object): string + { + $parts = explode('\\', $object::class); + + return end($parts); + } +} diff --git a/src/Model/Bxml/OutboundDestination.php b/src/Model/Bxml/OutboundDestination.php new file mode 100644 index 00000000..fc328bb4 --- /dev/null +++ b/src/Model/Bxml/OutboundDestination.php @@ -0,0 +1,10 @@ +: PhoneNumber and SipUri. + */ +interface OutboundDestination +{ +} diff --git a/src/Model/Bxml/Pause.php b/src/Model/Bxml/Pause.php new file mode 100644 index 00000000..35bdaaad --- /dev/null +++ b/src/Model/Bxml/Pause.php @@ -0,0 +1,22 @@ + $this->duration, + ]; + } +} diff --git a/src/Model/Bxml/PauseRecording.php b/src/Model/Bxml/PauseRecording.php new file mode 100644 index 00000000..b7976bb1 --- /dev/null +++ b/src/Model/Bxml/PauseRecording.php @@ -0,0 +1,16 @@ + $this->transferAnswerUrl, + 'transferAnswerMethod' => $this->transferAnswerMethod, + 'transferAnswerFallbackUrl' => $this->transferAnswerFallbackUrl, + 'transferAnswerFallbackMethod' => $this->transferAnswerFallbackMethod, + 'transferDisconnectUrl' => $this->transferDisconnectUrl, + 'transferDisconnectMethod' => $this->transferDisconnectMethod, + 'username' => $this->username, + 'password' => $this->password, + 'fallbackUsername' => $this->fallbackUsername, + 'fallbackPassword' => $this->fallbackPassword, + 'tag' => $this->tag, + 'uui' => $this->uui, + ]; + } +} diff --git a/src/Model/Bxml/PlayAudio.php b/src/Model/Bxml/PlayAudio.php new file mode 100644 index 00000000..993416de --- /dev/null +++ b/src/Model/Bxml/PlayAudio.php @@ -0,0 +1,27 @@ + $this->username, + 'password' => $this->password, + ]; + } +} diff --git a/src/Model/Bxml/Record.php b/src/Model/Bxml/Record.php new file mode 100644 index 00000000..c2809162 --- /dev/null +++ b/src/Model/Bxml/Record.php @@ -0,0 +1,80 @@ + $this->recordCompleteUrl, + 'recordCompleteMethod' => $this->recordCompleteMethod, + 'recordCompleteFallbackUrl' => $this->recordCompleteFallbackUrl, + 'recordCompleteFallbackMethod' => $this->recordCompleteFallbackMethod, + 'recordingAvailableUrl' => $this->recordingAvailableUrl, + 'recordingAvailableMethod' => $this->recordingAvailableMethod, + 'transcribe' => $this->transcribe, + 'detectLanguage' => $this->detectLanguage, + 'transcriptionAvailableUrl' => $this->transcriptionAvailableUrl, + 'transcriptionAvailableMethod' => $this->transcriptionAvailableMethod, + 'username' => $this->username, + 'password' => $this->password, + 'fallbackUsername' => $this->fallbackUsername, + 'fallbackPassword' => $this->fallbackPassword, + 'tag' => $this->tag, + 'terminatingDigits' => $this->terminatingDigits, + 'maxDuration' => $this->maxDuration, + 'silenceTimeout' => $this->silenceTimeout, + 'fileFormat' => $this->fileFormat, + 'recordingName' => $this->recordingName, + ]; + } +} diff --git a/src/Model/Bxml/Redirect.php b/src/Model/Bxml/Redirect.php new file mode 100644 index 00000000..6e4e19a9 --- /dev/null +++ b/src/Model/Bxml/Redirect.php @@ -0,0 +1,46 @@ + $this->redirectUrl, + 'redirectMethod' => $this->redirectMethod, + 'redirectFallbackUrl' => $this->redirectFallbackUrl, + 'redirectFallbackMethod' => $this->redirectFallbackMethod, + 'username' => $this->username, + 'password' => $this->password, + 'fallbackUsername' => $this->fallbackUsername, + 'fallbackPassword' => $this->fallbackPassword, + 'tag' => $this->tag, + ]; + } +} diff --git a/src/Model/Bxml/Refer.php b/src/Model/Bxml/Refer.php new file mode 100644 index 00000000..4c3ee280 --- /dev/null +++ b/src/Model/Bxml/Refer.php @@ -0,0 +1,35 @@ + $this->referCompleteUrl, + 'referCompleteMethod' => $this->referCompleteMethod, + 'tag' => $this->tag, + ]; + } +} diff --git a/src/Model/Bxml/Response.php b/src/Model/Bxml/Response.php new file mode 100644 index 00000000..ffe9fba7 --- /dev/null +++ b/src/Model/Bxml/Response.php @@ -0,0 +1,14 @@ + $this->duration, + 'answerCall' => $this->answerCall, + ]; + } +} diff --git a/src/Model/Bxml/Root.php b/src/Model/Bxml/Root.php new file mode 100644 index 00000000..5d3b7c54 --- /dev/null +++ b/src/Model/Bxml/Root.php @@ -0,0 +1,42 @@ +addVerb(...array_values($verbs)); + } + + public function addVerb(Verb ...$verbs): void + { + foreach ($verbs as $verb) { + $this->verbs[] = $verb; + } + } + + public function toBxml(): string + { + $doc = new DOMDocument('1.0', 'UTF-8'); + $root = $doc->createElement($this->tagName); + + foreach ($this->verbs as $verb) { + $root->appendChild($verb->toElement($doc)); + } + + $doc->appendChild($root); + + return rtrim($doc->saveXML(), "\n"); + } +} diff --git a/src/Model/Bxml/SendDtmf.php b/src/Model/Bxml/SendDtmf.php new file mode 100644 index 00000000..c426f370 --- /dev/null +++ b/src/Model/Bxml/SendDtmf.php @@ -0,0 +1,27 @@ + $this->toneDuration, + 'toneInterval' => $this->toneInterval, + ]; + } +} diff --git a/src/Model/Bxml/SipUri.php b/src/Model/Bxml/SipUri.php new file mode 100644 index 00000000..5962d4ff --- /dev/null +++ b/src/Model/Bxml/SipUri.php @@ -0,0 +1,57 @@ + $this->uui, + 'transferAnswerUrl' => $this->transferAnswerUrl, + 'transferAnswerMethod' => $this->transferAnswerMethod, + 'transferAnswerFallbackUrl' => $this->transferAnswerFallbackUrl, + 'transferAnswerFallbackMethod' => $this->transferAnswerFallbackMethod, + 'transferDisconnectUrl' => $this->transferDisconnectUrl, + 'transferDisconnectMethod' => $this->transferDisconnectMethod, + 'username' => $this->username, + 'password' => $this->password, + 'fallbackUsername' => $this->fallbackUsername, + 'fallbackPassword' => $this->fallbackPassword, + 'tag' => $this->tag, + ]; + } +} diff --git a/src/Model/Bxml/SpeakSentence.php b/src/Model/Bxml/SpeakSentence.php new file mode 100644 index 00000000..9548fc2a --- /dev/null +++ b/src/Model/Bxml/SpeakSentence.php @@ -0,0 +1,49 @@ + $this->voice, + 'gender' => $this->gender, + 'locale' => $this->locale, + ]; + } + + protected function appendContent(DOMDocument $doc, DOMElement $element): void + { + $fragment = $doc->createDocumentFragment(); + + // SSML tags must reach Bandwidth as real elements, not escaped text. + if (@$fragment->appendXML($this->text)) { + $element->appendChild($fragment); + + return; + } + + $element->textContent = $this->text; + } +} diff --git a/src/Model/Bxml/StartGather.php b/src/Model/Bxml/StartGather.php new file mode 100644 index 00000000..d04096bd --- /dev/null +++ b/src/Model/Bxml/StartGather.php @@ -0,0 +1,34 @@ + $this->dtmfUrl, + 'dtmfMethod' => $this->dtmfMethod, + 'username' => $this->username, + 'password' => $this->password, + 'tag' => $this->tag, + ]; + } +} diff --git a/src/Model/Bxml/StartRecording.php b/src/Model/Bxml/StartRecording.php new file mode 100644 index 00000000..283e9025 --- /dev/null +++ b/src/Model/Bxml/StartRecording.php @@ -0,0 +1,56 @@ + $this->recordingAvailableUrl, + 'recordingAvailableMethod' => $this->recordingAvailableMethod, + 'transcribe' => $this->transcribe, + 'detectLanguage' => $this->detectLanguage, + 'transcriptionAvailableUrl' => $this->transcriptionAvailableUrl, + 'transcriptionAvailableMethod' => $this->transcriptionAvailableMethod, + 'username' => $this->username, + 'password' => $this->password, + 'tag' => $this->tag, + 'fileFormat' => $this->fileFormat, + 'multiChannel' => $this->multiChannel, + 'recordingName' => $this->recordingName, + ]; + } +} diff --git a/src/Model/Bxml/StartStream.php b/src/Model/Bxml/StartStream.php new file mode 100644 index 00000000..aced859b --- /dev/null +++ b/src/Model/Bxml/StartStream.php @@ -0,0 +1,56 @@ + $this->name, + 'mode' => $this->mode, + 'tracks' => $this->tracks, + 'destination' => $this->destination, + 'destinationUsername' => $this->destinationUsername, + 'destinationPassword' => $this->destinationPassword, + 'streamEventUrl' => $this->streamEventUrl, + 'streamEventMethod' => $this->streamEventMethod, + 'username' => $this->username, + 'password' => $this->password, + ]; + } +} diff --git a/src/Model/Bxml/StartTranscription.php b/src/Model/Bxml/StartTranscription.php new file mode 100644 index 00000000..dbf85348 --- /dev/null +++ b/src/Model/Bxml/StartTranscription.php @@ -0,0 +1,57 @@ + $this->name, + 'tracks' => $this->tracks, + 'transcriptionEventUrl' => $this->transcriptionEventUrl, + 'transcriptionEventMethod' => $this->transcriptionEventMethod, + 'username' => $this->username, + 'password' => $this->password, + 'destination' => $this->destination, + 'stabilized' => $this->stabilized, + 'detectLanguage' => $this->detectLanguage, + 'preferredLanguages' => $this->preferredLanguages, + ]; + } +} diff --git a/src/Model/Bxml/StopGather.php b/src/Model/Bxml/StopGather.php new file mode 100644 index 00000000..12ec79f9 --- /dev/null +++ b/src/Model/Bxml/StopGather.php @@ -0,0 +1,16 @@ + $this->name, + 'wait' => $this->wait, + ]; + } +} diff --git a/src/Model/Bxml/StopTranscription.php b/src/Model/Bxml/StopTranscription.php new file mode 100644 index 00000000..1086cf9d --- /dev/null +++ b/src/Model/Bxml/StopTranscription.php @@ -0,0 +1,26 @@ + $this->name, + ]; + } +} diff --git a/src/Model/Bxml/StreamMode.php b/src/Model/Bxml/StreamMode.php new file mode 100644 index 00000000..ed082c18 --- /dev/null +++ b/src/Model/Bxml/StreamMode.php @@ -0,0 +1,9 @@ + $this->name, + 'value' => $this->value, + ]; + } +} diff --git a/src/Model/Bxml/Tag.php b/src/Model/Bxml/Tag.php new file mode 100644 index 00000000..973e4ca1 --- /dev/null +++ b/src/Model/Bxml/Tag.php @@ -0,0 +1,21 @@ + $this->transferCallerId, + 'privacy' => $this->privacy, + 'transferCallerDisplayName' => $this->transferCallerDisplayName, + 'callTimeout' => $this->callTimeout, + 'transferCompleteUrl' => $this->transferCompleteUrl, + 'transferCompleteMethod' => $this->transferCompleteMethod, + 'transferCompleteFallbackUrl' => $this->transferCompleteFallbackUrl, + 'transferCompleteFallbackMethod' => $this->transferCompleteFallbackMethod, + 'username' => $this->username, + 'password' => $this->password, + 'fallbackUsername' => $this->fallbackUsername, + 'fallbackPassword' => $this->fallbackPassword, + 'tag' => $this->tag, + 'diversionTreatment' => $this->diversionTreatment, + 'diversionReason' => $this->diversionReason, + ]; + } +} diff --git a/src/Model/Bxml/Verb.php b/src/Model/Bxml/Verb.php new file mode 100644 index 00000000..7b650170 --- /dev/null +++ b/src/Model/Bxml/Verb.php @@ -0,0 +1,64 @@ + value. Null values are omitted from output. + * + * @return array + */ + abstract protected function attributes(): array; + + public function toElement(DOMDocument $doc): DOMElement + { + $element = $doc->createElement($this->tagName); + + $this->appendContent($doc, $element); + + foreach ($this->attributes() as $name => $value) { + $normalized = self::normalize($value); + if ($normalized !== null) { + $element->setAttribute($name, $normalized); + } + } + + return $element; + } + + public function toBxml(): string + { + $doc = new DOMDocument('1.0', 'UTF-8'); + $doc->appendChild($this->toElement($doc)); + + return $doc->saveXML($doc->documentElement); + } + + protected function appendContent(DOMDocument $doc, DOMElement $element): void + { + if ($this->textContent !== null) { + $element->textContent = $this->textContent; + } + } + + protected static function normalize(mixed $value): ?string + { + return match (true) { + $value === null => null, + $value instanceof BackedEnum => (string) $value->value, + \is_bool($value) => $value ? 'true' : 'false', + default => (string) $value, + }; + } +} diff --git a/tests/Unit/Model/Bxml/BridgeTest.php b/tests/Unit/Model/Bxml/BridgeTest.php new file mode 100644 index 00000000..27a80cb0 --- /dev/null +++ b/tests/Unit/Model/Bxml/BridgeTest.php @@ -0,0 +1,47 @@ +assertInstanceOf(Verb::class, new Bridge('call-1')); + } + + public function testAllAttributes(): void + { + $bridge = new Bridge( + 'call-1', + bridgeCompleteUrl: '/complete', + bridgeCompleteMethod: HttpMethod::POST, + bridgeCompleteFallbackUrl: '/completeFallback', + bridgeCompleteFallbackMethod: HttpMethod::GET, + bridgeTargetCompleteUrl: '/targetComplete', + bridgeTargetCompleteMethod: HttpMethod::POST, + bridgeTargetCompleteFallbackUrl: '/targetCompleteFallback', + bridgeTargetCompleteFallbackMethod: HttpMethod::GET, + username: 'user', + password: 'pass', + fallbackUsername: 'fallbackUser', + fallbackPassword: 'fallbackPass', + tag: 'my-tag' + ); + + $this->assertSame( + 'call-1', + $bridge->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/ConferenceTest.php b/tests/Unit/Model/Bxml/ConferenceTest.php new file mode 100644 index 00000000..dd821e7e --- /dev/null +++ b/tests/Unit/Model/Bxml/ConferenceTest.php @@ -0,0 +1,46 @@ +assertInstanceOf(Verb::class, new Conference('my-conference')); + } + + public function testAllAttributes(): void + { + $conference = new Conference( + 'my-conference', + mute: true, + hold: false, + callIdsToCoach: 'call-1,call-2', + conferenceEventUrl: '/event', + conferenceEventMethod: HttpMethod::POST, + conferenceEventFallbackUrl: '/eventFallback', + conferenceEventFallbackMethod: HttpMethod::GET, + username: 'user', + password: 'pass', + fallbackUsername: 'fallbackUser', + fallbackPassword: 'fallbackPass', + tag: 'my-tag', + callbackTimeout: 12.5 + ); + + $this->assertSame( + 'my-conference', + $conference->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/ConnectTest.php b/tests/Unit/Model/Bxml/ConnectTest.php new file mode 100644 index 00000000..d5da9f7c --- /dev/null +++ b/tests/Unit/Model/Bxml/ConnectTest.php @@ -0,0 +1,73 @@ +assertInstanceOf(NestableVerb::class, new Connect()); + } + + public function testAllAttributes(): void + { + $connect = new Connect( + eventCallbackUrl: '/events', + eventFallbackUrl: '/eventsFallback' + ); + + $this->assertSame( + '', + $connect->toBxml() + ); + } + + public function testWithNestedEndpoints(): void + { + $connect = new Connect([ + new Endpoint('endpoint-1'), + new Endpoint('endpoint-2'), + ]); + + $this->assertSame( + 'endpoint-1endpoint-2', + $connect->toBxml() + ); + } + + public function testAddVerb(): void + { + $connect = new Connect(); + $connect->addVerb(new Endpoint('endpoint-1')); + + $this->assertSame( + 'endpoint-1', + $connect->toBxml() + ); + } + + public function testRejectsNonEndpoint(): void + { + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Connect accepts only Endpoint; got Hangup at index 0'); + + new Connect([new Hangup()]); + } + + public function testAddVerbRejectsNonEndpoint(): void + { + $connect = new Connect(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Connect accepts only Endpoint; got Hangup at index 0'); + + $connect->addVerb(new Hangup()); + } +} diff --git a/tests/Unit/Model/Bxml/CustomParamTest.php b/tests/Unit/Model/Bxml/CustomParamTest.php new file mode 100644 index 00000000..6c66bd55 --- /dev/null +++ b/tests/Unit/Model/Bxml/CustomParamTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(Verb::class, new CustomParam()); + } + + public function testAllAttributes(): void + { + $customParam = new CustomParam( + name: 'key', + value: 'val' + ); + + $this->assertSame('', $customParam->toBxml()); + } +} diff --git a/tests/Unit/Model/Bxml/EndpointTest.php b/tests/Unit/Model/Bxml/EndpointTest.php new file mode 100644 index 00000000..a44f76ab --- /dev/null +++ b/tests/Unit/Model/Bxml/EndpointTest.php @@ -0,0 +1,20 @@ +assertInstanceOf(Verb::class, new Endpoint('endpoint-1')); + } + + public function testToBxml(): void + { + $this->assertSame('endpoint-1', (new Endpoint('endpoint-1'))->toBxml()); + } +} diff --git a/tests/Unit/Model/Bxml/EnumTest.php b/tests/Unit/Model/Bxml/EnumTest.php new file mode 100644 index 00000000..4deda508 --- /dev/null +++ b/tests/Unit/Model/Bxml/EnumTest.php @@ -0,0 +1,69 @@ +assertSame('GET', HttpMethod::GET->value); + $this->assertSame('POST', HttpMethod::POST->value); + } + + public function testTracksValues(): void + { + $this->assertSame('inbound', Tracks::INBOUND->value); + $this->assertSame('outbound', Tracks::OUTBOUND->value); + $this->assertSame('both', Tracks::BOTH->value); + } + + public function testGatherInputValues(): void + { + $this->assertSame('dtmf', GatherInput::DTMF->value); + $this->assertSame('speech', GatherInput::SPEECH->value); + $this->assertSame('dtmf_speech', GatherInput::DTMF_SPEECH->value); + } + + public function testStreamModeValues(): void + { + $this->assertSame('unidirectional', StreamMode::UNIDIRECTIONAL->value); + $this->assertSame('bidirectional', StreamMode::BIDIRECTIONAL->value); + } + + public function testFileFormatValues(): void + { + $this->assertSame('mp3', FileFormat::MP3->value); + $this->assertSame('wav', FileFormat::WAV->value); + } + + public function testDiversionTreatmentValues(): void + { + $this->assertSame('none', DiversionTreatment::NONE->value); + $this->assertSame('propagate', DiversionTreatment::PROPAGATE->value); + $this->assertSame('stack', DiversionTreatment::STACK->value); + } + + public function testDiversionReasonValues(): void + { + $this->assertSame('unknown', DiversionReason::UNKNOWN->value); + $this->assertSame('user-busy', DiversionReason::USER_BUSY->value); + $this->assertSame('no-answer', DiversionReason::NO_ANSWER->value); + $this->assertSame('unavailable', DiversionReason::UNAVAILABLE->value); + $this->assertSame('unconditional', DiversionReason::UNCONDITIONAL->value); + $this->assertSame('time-of-day', DiversionReason::TIME_OF_DAY->value); + $this->assertSame('do-not-disturb', DiversionReason::DO_NOT_DISTURB->value); + $this->assertSame('deflection', DiversionReason::DEFLECTION->value); + $this->assertSame('follow-me', DiversionReason::FOLLOW_ME->value); + $this->assertSame('out-of-service', DiversionReason::OUT_OF_SERVICE->value); + $this->assertSame('away', DiversionReason::AWAY->value); + } +} diff --git a/tests/Unit/Model/Bxml/ForwardTest.php b/tests/Unit/Model/Bxml/ForwardTest.php new file mode 100644 index 00000000..f778f07f --- /dev/null +++ b/tests/Unit/Model/Bxml/ForwardTest.php @@ -0,0 +1,39 @@ +assertInstanceOf(Verb::class, new Forward()); + } + + public function testAllAttributes(): void + { + $forward = new Forward( + to: '+15555555555', + from: '+15551234567', + privacy: true, + callerDisplayName: 'Anonymous', + callTimeout: 30.5, + diversionTreatment: DiversionTreatment::STACK, + diversionReason: DiversionReason::USER_BUSY, + uui: 'abc;encoding=base64' + ); + + $this->assertSame( + '', + $forward->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/GatherTest.php b/tests/Unit/Model/Bxml/GatherTest.php new file mode 100644 index 00000000..72f0e7bc --- /dev/null +++ b/tests/Unit/Model/Bxml/GatherTest.php @@ -0,0 +1,104 @@ +assertInstanceOf(NestableVerb::class, new Gather()); + } + + public function testAllAttributes(): void + { + $gather = new Gather( + gatherUrl: '/gather', + gatherMethod: HttpMethod::POST, + gatherFallbackUrl: '/fallback', + gatherFallbackMethod: HttpMethod::GET, + username: 'user', + password: 'pass', + fallbackUsername: 'fbuser', + fallbackPassword: 'fbpass', + tag: 'my-tag', + terminatingDigits: '#', + maxDigits: 5, + interDigitTimeout: 3.5, + firstDigitTimeout: 5.5, + repeatCount: 2, + input: GatherInput::DTMF_SPEECH, + hints: 'yes, no', + language: 'en-US', + partialResultCallback: '/partial', + partialResultCallbackMethod: HttpMethod::POST, + profanityFilter: false, + speechModel: 'default', + speechTimeout: 10, + ); + + $this->assertSame( + '', + $gather->toBxml() + ); + } + + public function testWithNestedAudioVerbs(): void + { + $gather = new Gather([ + new SpeakSentence('Press 1'), + new PlayAudio('https://example.com/a.wav'), + ]); + + $this->assertSame( + 'Press 1' + . 'https://example.com/a.wav', + $gather->toBxml() + ); + } + + public function testAddVerb(): void + { + $gather = new Gather(); + $gather->addVerb(new SpeakSentence('Press 1')); + + $this->assertSame( + 'Press 1', + $gather->toBxml() + ); + } + + public function testRejectsNonAudioVerb(): void + { + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Gather accepts only SpeakSentence, PlayAudio; got Hangup at index 1'); + + new Gather([new SpeakSentence('Press 1'), new Hangup()]); + } + + public function testAddVerbRejectsNonAudioVerb(): void + { + $gather = new Gather(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Gather accepts only SpeakSentence, PlayAudio; got Hangup at index 0'); + + $gather->addVerb(new Hangup()); + } +} diff --git a/tests/Unit/Model/Bxml/HangupTest.php b/tests/Unit/Model/Bxml/HangupTest.php new file mode 100644 index 00000000..9dab0e51 --- /dev/null +++ b/tests/Unit/Model/Bxml/HangupTest.php @@ -0,0 +1,20 @@ +assertInstanceOf(Verb::class, new Hangup()); + } + + public function testToBxml(): void + { + $this->assertSame('', (new Hangup())->toBxml()); + } +} diff --git a/tests/Unit/Model/Bxml/PauseRecordingTest.php b/tests/Unit/Model/Bxml/PauseRecordingTest.php new file mode 100644 index 00000000..77b020ec --- /dev/null +++ b/tests/Unit/Model/Bxml/PauseRecordingTest.php @@ -0,0 +1,20 @@ +assertInstanceOf(Verb::class, new PauseRecording()); + } + + public function testToBxml(): void + { + $this->assertSame('', (new PauseRecording())->toBxml()); + } +} diff --git a/tests/Unit/Model/Bxml/PauseTest.php b/tests/Unit/Model/Bxml/PauseTest.php new file mode 100644 index 00000000..2a8e0944 --- /dev/null +++ b/tests/Unit/Model/Bxml/PauseTest.php @@ -0,0 +1,22 @@ +assertInstanceOf(Verb::class, new Pause()); + } + + public function testAllAttributes(): void + { + $pause = new Pause(5.5); + + $this->assertSame('', $pause->toBxml()); + } +} diff --git a/tests/Unit/Model/Bxml/PhoneNumberTest.php b/tests/Unit/Model/Bxml/PhoneNumberTest.php new file mode 100644 index 00000000..b7a927d4 --- /dev/null +++ b/tests/Unit/Model/Bxml/PhoneNumberTest.php @@ -0,0 +1,49 @@ +assertInstanceOf(Verb::class, $verb); + $this->assertInstanceOf(OutboundDestination::class, $verb); + } + + public function testAllAttributes(): void + { + $phoneNumber = new PhoneNumber( + '+15555555555', + transferAnswerUrl: '/answer', + transferAnswerMethod: HttpMethod::POST, + transferAnswerFallbackUrl: '/answerFallback', + transferAnswerFallbackMethod: HttpMethod::GET, + transferDisconnectUrl: '/disconnect', + transferDisconnectMethod: HttpMethod::POST, + username: 'user', + password: 'pass', + fallbackUsername: 'fallbackUser', + fallbackPassword: 'fallbackPass', + tag: 'my-tag', + uui: 'abc;encoding=base64' + ); + + $this->assertSame( + '+15555555555', + $phoneNumber->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/PlayAudioTest.php b/tests/Unit/Model/Bxml/PlayAudioTest.php new file mode 100644 index 00000000..9ebcbf08 --- /dev/null +++ b/tests/Unit/Model/Bxml/PlayAudioTest.php @@ -0,0 +1,43 @@ +assertInstanceOf(Verb::class, $verb); + $this->assertInstanceOf(AudioProducer::class, $verb); + } + + public function testAllAttributes(): void + { + $playAudio = new PlayAudio( + 'https://example.com/a.wav', + username: 'user', + password: 'pass' + ); + + $this->assertSame( + 'https://example.com/a.wav', + $playAudio->toBxml() + ); + } + + public function testUrlWithQueryStringIsEscaped(): void + { + $playAudio = new PlayAudio('https://example.com/audio.wav?greeting=hi&lang=en'); + + $this->assertSame( + 'https://example.com/audio.wav?greeting=hi&lang=en', + $playAudio->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/RecordTest.php b/tests/Unit/Model/Bxml/RecordTest.php new file mode 100644 index 00000000..fc09b3aa --- /dev/null +++ b/tests/Unit/Model/Bxml/RecordTest.php @@ -0,0 +1,56 @@ +assertInstanceOf(Verb::class, new Record()); + } + + public function testAllAttributes(): void + { + $record = new Record( + recordCompleteUrl: '/complete', + recordCompleteMethod: HttpMethod::POST, + recordCompleteFallbackUrl: '/completeFallback', + recordCompleteFallbackMethod: HttpMethod::GET, + recordingAvailableUrl: '/available', + recordingAvailableMethod: HttpMethod::POST, + transcribe: false, + detectLanguage: true, + transcriptionAvailableUrl: '/transcription', + transcriptionAvailableMethod: HttpMethod::GET, + username: 'user', + password: 'pass', + fallbackUsername: 'fallbackUser', + fallbackPassword: 'fallbackPass', + tag: 'my-tag', + terminatingDigits: '#', + maxDuration: 120, + silenceTimeout: 5.5, + fileFormat: FileFormat::MP3, + recordingName: 'my-recording' + ); + + $this->assertSame( + '', + $record->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/RedirectTest.php b/tests/Unit/Model/Bxml/RedirectTest.php new file mode 100644 index 00000000..5881bc5e --- /dev/null +++ b/tests/Unit/Model/Bxml/RedirectTest.php @@ -0,0 +1,38 @@ +assertInstanceOf(Verb::class, new Redirect()); + } + + public function testAllAttributes(): void + { + $redirect = new Redirect( + redirectUrl: '/next', + redirectMethod: HttpMethod::POST, + redirectFallbackUrl: '/fallback', + redirectFallbackMethod: HttpMethod::GET, + username: 'user', + password: 'pass', + fallbackUsername: 'fallbackUser', + fallbackPassword: 'fallbackPass', + tag: 'my-tag' + ); + + $this->assertSame( + '', + $redirect->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/ReferTest.php b/tests/Unit/Model/Bxml/ReferTest.php new file mode 100644 index 00000000..032d2682 --- /dev/null +++ b/tests/Unit/Model/Bxml/ReferTest.php @@ -0,0 +1,72 @@ +assertInstanceOf(NestableVerb::class, new Refer()); + } + + public function testAllAttributes(): void + { + $refer = new Refer( + referCompleteUrl: '/complete', + referCompleteMethod: HttpMethod::POST, + tag: 'my-tag' + ); + + $this->assertSame( + '', + $refer->toBxml() + ); + } + + public function testWithNestedSipUri(): void + { + $refer = new Refer(new SipUri('sip:user@example.com')); + + $this->assertSame( + 'sip:user@example.com', + $refer->toBxml() + ); + } + + public function testAddVerb(): void + { + $refer = new Refer(); + $refer->addVerb(new SipUri('sip:user@example.com')); + + $this->assertSame( + 'sip:user@example.com', + $refer->toBxml() + ); + } + + public function testRejectsNonSipUri(): void + { + $this->expectException(TypeError::class); + + new Refer(new Hangup()); + } + + public function testAddVerbRejectsNonSipUri(): void + { + $refer = new Refer(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Refer accepts only SipUri; got Hangup at index 0'); + + $refer->addVerb(new Hangup()); + } +} diff --git a/tests/Unit/Model/Bxml/ResumeRecordingTest.php b/tests/Unit/Model/Bxml/ResumeRecordingTest.php new file mode 100644 index 00000000..e0a6bf0b --- /dev/null +++ b/tests/Unit/Model/Bxml/ResumeRecordingTest.php @@ -0,0 +1,20 @@ +assertInstanceOf(Verb::class, new ResumeRecording()); + } + + public function testToBxml(): void + { + $this->assertSame('', (new ResumeRecording())->toBxml()); + } +} diff --git a/tests/Unit/Model/Bxml/RingTest.php b/tests/Unit/Model/Bxml/RingTest.php new file mode 100644 index 00000000..fb3bed04 --- /dev/null +++ b/tests/Unit/Model/Bxml/RingTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(Verb::class, new Ring()); + } + + public function testAllAttributes(): void + { + $ring = new Ring( + duration: 5.5, + answerCall: false + ); + + $this->assertSame('', $ring->toBxml()); + } +} diff --git a/tests/Unit/Model/Bxml/RootTest.php b/tests/Unit/Model/Bxml/RootTest.php new file mode 100644 index 00000000..e943ad1f --- /dev/null +++ b/tests/Unit/Model/Bxml/RootTest.php @@ -0,0 +1,66 @@ +' . "\n"; + + public function testInstance(): void + { + $this->assertInstanceOf(Root::class, new Response()); + $this->assertInstanceOf(Root::class, new Bxml()); + } + + public function testEmpty(): void + { + $this->assertSame(self::DECLARATION . '', (new Response())->toBxml()); + $this->assertSame(self::DECLARATION . '', (new Bxml())->toBxml()); + } + + public function testConstructorWithVerbs(): void + { + $response = new Response([new Hangup()]); + + $this->assertSame( + self::DECLARATION . '', + $response->toBxml() + ); + } + + public function testAddVerb(): void + { + $response = new Response(); + $response->addVerb(new Pause(duration: 3)); + $response->addVerb(new SpeakSentence('Goodbye'), new Hangup()); + + $this->assertSame( + self::DECLARATION . '' + . 'Goodbye', + $response->toBxml() + ); + } + + public function testNestedVerbs(): void + { + $response = new Response([ + new Gather([new SpeakSentence('Press 1')], gatherUrl: '/gather'), + new Hangup(), + ]); + + $this->assertSame( + self::DECLARATION . '' + . 'Press 1', + $response->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/SendDtmfTest.php b/tests/Unit/Model/Bxml/SendDtmfTest.php new file mode 100644 index 00000000..59fbf9a6 --- /dev/null +++ b/tests/Unit/Model/Bxml/SendDtmfTest.php @@ -0,0 +1,29 @@ +assertInstanceOf(Verb::class, new SendDtmf('123')); + } + + public function testAllAttributes(): void + { + $sendDtmf = new SendDtmf( + '123', + toneDuration: 200, + toneInterval: 400 + ); + + $this->assertSame( + '123', + $sendDtmf->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/SipUriTest.php b/tests/Unit/Model/Bxml/SipUriTest.php new file mode 100644 index 00000000..07d241a7 --- /dev/null +++ b/tests/Unit/Model/Bxml/SipUriTest.php @@ -0,0 +1,49 @@ +assertInstanceOf(Verb::class, $verb); + $this->assertInstanceOf(OutboundDestination::class, $verb); + } + + public function testAllAttributes(): void + { + $sipUri = new SipUri( + 'sip:user@example.com', + uui: 'abc;encoding=base64', + transferAnswerUrl: '/answer', + transferAnswerMethod: HttpMethod::POST, + transferAnswerFallbackUrl: '/answerFallback', + transferAnswerFallbackMethod: HttpMethod::GET, + transferDisconnectUrl: '/disconnect', + transferDisconnectMethod: HttpMethod::POST, + username: 'user', + password: 'pass', + fallbackUsername: 'fallbackUser', + fallbackPassword: 'fallbackPass', + tag: 'my-tag' + ); + + $this->assertSame( + 'sip:user@example.com', + $sipUri->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/SpeakSentenceTest.php b/tests/Unit/Model/Bxml/SpeakSentenceTest.php new file mode 100644 index 00000000..8caa4428 --- /dev/null +++ b/tests/Unit/Model/Bxml/SpeakSentenceTest.php @@ -0,0 +1,71 @@ +assertInstanceOf(Verb::class, $verb); + $this->assertInstanceOf(AudioProducer::class, $verb); + } + + public function testAllAttributes(): void + { + $verb = new SpeakSentence( + text: 'Hello', + voice: 'julie', + gender: 'female', + locale: 'en_US', + ); + + $this->assertSame( + 'Hello', + $verb->toBxml() + ); + } + + public function testSsmlIsPreserved(): void + { + $verb = new SpeakSentence( + 'Hello your number is' + . ' 5555555555.' + ); + + $this->assertSame( + 'Hello your number is' + . ' 5555555555.', + $verb->toBxml() + ); + } + + public function testSpecialCharactersAreEscaped(): void + { + $verb = new SpeakSentence('Tom & Jerry: x w, prices from <100 to 50'); + + $this->assertSame( + 'Tom & Jerry: x <y and z> w,' + . ' prices from <100 to 50', + $verb->toBxml() + ); + } + + public function testSsmlInsideResponse(): void + { + $response = new Response([new SpeakSentence('Hi ', voice: 'julie')]); + + $this->assertSame( + '' . "\n" + . 'Hi ', + $response->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/StartGatherTest.php b/tests/Unit/Model/Bxml/StartGatherTest.php new file mode 100644 index 00000000..7180a2a9 --- /dev/null +++ b/tests/Unit/Model/Bxml/StartGatherTest.php @@ -0,0 +1,33 @@ +assertInstanceOf(Verb::class, new StartGather()); + } + + public function testAllAttributes(): void + { + $startGather = new StartGather( + dtmfUrl: '/dtmf', + dtmfMethod: HttpMethod::POST, + username: 'user', + password: 'pass', + tag: 'my-tag' + ); + + $this->assertSame( + '', + $startGather->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/StartRecordingTest.php b/tests/Unit/Model/Bxml/StartRecordingTest.php new file mode 100644 index 00000000..0420022f --- /dev/null +++ b/tests/Unit/Model/Bxml/StartRecordingTest.php @@ -0,0 +1,44 @@ +assertInstanceOf(Verb::class, new StartRecording()); + } + + public function testAllAttributes(): void + { + $startRecording = new StartRecording( + recordingAvailableUrl: '/available', + recordingAvailableMethod: HttpMethod::POST, + transcribe: false, + detectLanguage: true, + transcriptionAvailableUrl: '/transcription', + transcriptionAvailableMethod: HttpMethod::GET, + username: 'user', + password: 'pass', + tag: 'my-tag', + fileFormat: FileFormat::WAV, + multiChannel: true, + recordingName: 'my-recording' + ); + + $this->assertSame( + '', + $startRecording->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/StartStreamTest.php b/tests/Unit/Model/Bxml/StartStreamTest.php new file mode 100644 index 00000000..29a8e7ad --- /dev/null +++ b/tests/Unit/Model/Bxml/StartStreamTest.php @@ -0,0 +1,88 @@ +assertInstanceOf(NestableVerb::class, new StartStream()); + } + + public function testAllAttributes(): void + { + $startStream = new StartStream( + name: 'my-stream', + mode: StreamMode::BIDIRECTIONAL, + tracks: Tracks::BOTH, + destination: 'wss://example.com', + destinationUsername: 'destUser', + destinationPassword: 'destPass', + streamEventUrl: '/events', + streamEventMethod: HttpMethod::POST, + username: 'user', + password: 'pass' + ); + + $this->assertSame( + '', + $startStream->toBxml() + ); + } + + public function testWithNestedStreamParams(): void + { + $startStream = new StartStream([ + new StreamParam(name: 'key1', value: 'val1'), + new StreamParam(name: 'key2', value: 'val2'), + ]); + + $this->assertSame( + '' + . '', + $startStream->toBxml() + ); + } + + public function testAddVerb(): void + { + $startStream = new StartStream(); + $startStream->addVerb(new StreamParam(name: 'key1', value: 'val1')); + + $this->assertSame( + '', + $startStream->toBxml() + ); + } + + public function testRejectsNonStreamParam(): void + { + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('StartStream accepts only StreamParam; got Hangup at index 0'); + + new StartStream([new Hangup()]); + } + + public function testAddVerbRejectsNonStreamParam(): void + { + $startStream = new StartStream(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('StartStream accepts only StreamParam; got Hangup at index 0'); + + $startStream->addVerb(new Hangup()); + } +} diff --git a/tests/Unit/Model/Bxml/StartTranscriptionTest.php b/tests/Unit/Model/Bxml/StartTranscriptionTest.php new file mode 100644 index 00000000..811b271b --- /dev/null +++ b/tests/Unit/Model/Bxml/StartTranscriptionTest.php @@ -0,0 +1,87 @@ +assertInstanceOf(NestableVerb::class, new StartTranscription()); + } + + public function testAllAttributes(): void + { + $startTranscription = new StartTranscription( + name: 'my-transcription', + tracks: Tracks::INBOUND, + transcriptionEventUrl: '/events', + transcriptionEventMethod: HttpMethod::POST, + username: 'user', + password: 'pass', + destination: 'wss://example.com', + stabilized: false, + detectLanguage: false, + preferredLanguages: 'en-US,fr-FR' + ); + + $this->assertSame( + '', + $startTranscription->toBxml() + ); + } + + public function testWithNestedCustomParams(): void + { + $startTranscription = new StartTranscription([ + new CustomParam(name: 'key1', value: 'val1'), + new CustomParam(name: 'key2', value: 'val2'), + ]); + + $this->assertSame( + '' + . '', + $startTranscription->toBxml() + ); + } + + public function testAddVerb(): void + { + $startTranscription = new StartTranscription(); + $startTranscription->addVerb(new CustomParam(name: 'key1', value: 'val1')); + + $this->assertSame( + '', + $startTranscription->toBxml() + ); + } + + public function testRejectsNonCustomParam(): void + { + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('StartTranscription accepts only CustomParam; got Hangup at index 0'); + + new StartTranscription([new Hangup()]); + } + + public function testAddVerbRejectsNonCustomParam(): void + { + $startTranscription = new StartTranscription(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('StartTranscription accepts only CustomParam; got Hangup at index 0'); + + $startTranscription->addVerb(new Hangup()); + } +} diff --git a/tests/Unit/Model/Bxml/StopGatherTest.php b/tests/Unit/Model/Bxml/StopGatherTest.php new file mode 100644 index 00000000..f1bb1925 --- /dev/null +++ b/tests/Unit/Model/Bxml/StopGatherTest.php @@ -0,0 +1,20 @@ +assertInstanceOf(Verb::class, new StopGather()); + } + + public function testToBxml(): void + { + $this->assertSame('', (new StopGather())->toBxml()); + } +} diff --git a/tests/Unit/Model/Bxml/StopRecordingTest.php b/tests/Unit/Model/Bxml/StopRecordingTest.php new file mode 100644 index 00000000..51d564fa --- /dev/null +++ b/tests/Unit/Model/Bxml/StopRecordingTest.php @@ -0,0 +1,20 @@ +assertInstanceOf(Verb::class, new StopRecording()); + } + + public function testToBxml(): void + { + $this->assertSame('', (new StopRecording())->toBxml()); + } +} diff --git a/tests/Unit/Model/Bxml/StopStreamTest.php b/tests/Unit/Model/Bxml/StopStreamTest.php new file mode 100644 index 00000000..d10e1b5a --- /dev/null +++ b/tests/Unit/Model/Bxml/StopStreamTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(Verb::class, new StopStream()); + } + + public function testAllAttributes(): void + { + $stopStream = new StopStream( + name: 'my-stream', + wait: true + ); + + $this->assertSame('', $stopStream->toBxml()); + } +} diff --git a/tests/Unit/Model/Bxml/StopTranscriptionTest.php b/tests/Unit/Model/Bxml/StopTranscriptionTest.php new file mode 100644 index 00000000..3aa13e73 --- /dev/null +++ b/tests/Unit/Model/Bxml/StopTranscriptionTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(Verb::class, new StopTranscription()); + } + + public function testAllAttributes(): void + { + $stopTranscription = new StopTranscription(name: 'my-transcription'); + + $this->assertSame( + '', + $stopTranscription->toBxml() + ); + } +} diff --git a/tests/Unit/Model/Bxml/StreamParamTest.php b/tests/Unit/Model/Bxml/StreamParamTest.php new file mode 100644 index 00000000..733e6d22 --- /dev/null +++ b/tests/Unit/Model/Bxml/StreamParamTest.php @@ -0,0 +1,25 @@ +assertInstanceOf(Verb::class, new StreamParam()); + } + + public function testAllAttributes(): void + { + $streamParam = new StreamParam( + name: 'key', + value: 'val' + ); + + $this->assertSame('', $streamParam->toBxml()); + } +} diff --git a/tests/Unit/Model/Bxml/TagTest.php b/tests/Unit/Model/Bxml/TagTest.php new file mode 100644 index 00000000..9e9fc337 --- /dev/null +++ b/tests/Unit/Model/Bxml/TagTest.php @@ -0,0 +1,20 @@ +assertInstanceOf(Verb::class, new Tag('my-tag')); + } + + public function testToBxml(): void + { + $this->assertSame('my-tag', (new Tag('my-tag'))->toBxml()); + } +} diff --git a/tests/Unit/Model/Bxml/TransferTest.php b/tests/Unit/Model/Bxml/TransferTest.php new file mode 100644 index 00000000..eb6cc17e --- /dev/null +++ b/tests/Unit/Model/Bxml/TransferTest.php @@ -0,0 +1,97 @@ +assertInstanceOf(NestableVerb::class, new Transfer()); + } + + public function testAllAttributes(): void + { + $transfer = new Transfer( + transferCallerId: '+15551234567', + privacy: true, + transferCallerDisplayName: 'Support', + callTimeout: 30.5, + transferCompleteUrl: '/complete', + transferCompleteMethod: HttpMethod::POST, + transferCompleteFallbackUrl: '/completeFallback', + transferCompleteFallbackMethod: HttpMethod::GET, + username: 'user', + password: 'pass', + fallbackUsername: 'fallbackUser', + fallbackPassword: 'fallbackPass', + tag: 'my-tag', + diversionTreatment: DiversionTreatment::PROPAGATE, + diversionReason: DiversionReason::NO_ANSWER + ); + + $this->assertSame( + '', + $transfer->toBxml() + ); + } + + public function testWithNestedDestinations(): void + { + $transfer = new Transfer([ + new PhoneNumber('+15555555555'), + new SipUri('sip:user@example.com'), + ]); + + $this->assertSame( + '+15555555555' + . 'sip:user@example.com', + $transfer->toBxml() + ); + } + + public function testAddVerb(): void + { + $transfer = new Transfer(); + $transfer->addVerb(new PhoneNumber('+15555555555')); + + $this->assertSame( + '+15555555555', + $transfer->toBxml() + ); + } + + public function testRejectsNonDestination(): void + { + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Transfer accepts only PhoneNumber, SipUri; got Hangup at index 0'); + + new Transfer([new Hangup()]); + } + + public function testAddVerbRejectsNonDestination(): void + { + $transfer = new Transfer(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Transfer accepts only PhoneNumber, SipUri; got Hangup at index 0'); + + $transfer->addVerb(new Hangup()); + } +} From 7071d08477ccdac3b9b94d5d1ba54d266b7500fb Mon Sep 17 00:00:00 2001 From: Cameron Koegel <53310569+ckoegel@users.noreply.github.com> Date: Thu, 10 Sep 2026 16:15:49 -0400 Subject: [PATCH 47/53] SWI-11661 Catchup to Other SDKs (#93) * update bw yaml * regen files * unit tests * composer template --- .openapi-generator/FILES | 4 + README.md | 2 + bandwidth.yml | 4463 +++++++++-------- custom_templates/composer.mustache | 52 + docs/Api/MediaApi.md | 28 +- docs/Api/MessagesApi.md | 8 +- docs/Api/MultiChannelApi.md | 4 +- docs/Model/AnswerCallback.md | 3 +- docs/Model/BridgeCompleteCallback.md | 2 +- docs/Model/BridgeTargetCompleteCallback.md | 2 +- docs/Model/ConferenceCompletedCallback.md | 2 +- docs/Model/ConferenceCreatedCallback.md | 2 +- docs/Model/ConferenceMemberExitCallback.md | 2 +- docs/Model/ConferenceMemberJoinCallback.md | 2 +- .../ConferenceRecordingAvailableCallback.md | 2 +- docs/Model/ConferenceRedirectCallback.md | 2 +- docs/Model/DisconnectCallback.md | 4 +- docs/Model/DtmfCallback.md | 2 +- docs/Model/GatherCallback.md | 2 +- docs/Model/InitiateCallback.md | 4 +- .../Model/MachineDetectionCompleteCallback.md | 2 +- docs/Model/RecordingAvailableCallback.md | 2 +- docs/Model/RecordingCompleteCallback.md | 2 +- docs/Model/RedirectCallback.md | 2 +- docs/Model/ReferCallStatusEnum.md | 8 + docs/Model/ReferCompleteCallback.md | 23 + docs/Model/TranscriptionAvailableCallback.md | 2 +- docs/Model/TransferAnswerCallback.md | 2 +- docs/Model/TransferCompleteCallback.md | 2 +- docs/Model/TransferDisconnectCallback.md | 2 +- src/Api/MediaApi.php | 70 +- src/Api/MessagesApi.php | 20 +- src/Api/MultiChannelApi.php | 10 +- src/Model/AnswerCallback.php | 48 +- src/Model/BridgeCompleteCallback.php | 2 +- src/Model/BridgeTargetCompleteCallback.php | 2 +- src/Model/ConferenceCompletedCallback.php | 2 +- src/Model/ConferenceCreatedCallback.php | 2 +- src/Model/ConferenceMemberExitCallback.php | 2 +- src/Model/ConferenceMemberJoinCallback.php | 2 +- .../ConferenceRecordingAvailableCallback.php | 2 +- src/Model/ConferenceRedirectCallback.php | 2 +- src/Model/DisconnectCallback.php | 82 +- src/Model/DtmfCallback.php | 2 +- src/Model/GatherCallback.php | 2 +- src/Model/InitiateCallback.php | 82 +- .../MachineDetectionCompleteCallback.php | 2 +- src/Model/RecordingAvailableCallback.php | 2 +- src/Model/RecordingCompleteCallback.php | 2 +- src/Model/RedirectCallback.php | 2 +- src/Model/ReferCallStatusEnum.php | 46 + src/Model/ReferCompleteCallback.php | 875 ++++ src/Model/TranscriptionAvailableCallback.php | 2 +- src/Model/TransferAnswerCallback.php | 2 +- src/Model/TransferCompleteCallback.php | 2 +- src/Model/TransferDisconnectCallback.php | 2 +- tests/Unit/Model/AnswerCallbackTest.php | 12 +- tests/Unit/Model/DisconnectCallbackTest.php | 22 +- tests/Unit/Model/InitiateCallbackTest.php | 22 +- tests/Unit/Model/ReferCallStatusEnumTest.php | 56 + .../Unit/Model/ReferCompleteCallbackTest.php | 214 + 61 files changed, 3939 insertions(+), 2295 deletions(-) create mode 100644 custom_templates/composer.mustache create mode 100644 docs/Model/ReferCallStatusEnum.md create mode 100644 docs/Model/ReferCompleteCallback.md create mode 100644 src/Model/ReferCallStatusEnum.php create mode 100644 src/Model/ReferCompleteCallback.php create mode 100644 tests/Unit/Model/ReferCallStatusEnumTest.php create mode 100644 tests/Unit/Model/ReferCompleteCallbackTest.php diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 7272a802..232d698f 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -173,6 +173,8 @@ docs/Model/RecordingTranscriptionMetadata.md docs/Model/RecordingTranscriptions.md docs/Model/RedirectCallback.md docs/Model/RedirectMethodEnum.md +docs/Model/ReferCallStatusEnum.md +docs/Model/ReferCompleteCallback.md docs/Model/SipConnectionMetadata.md docs/Model/SipCredentials.md docs/Model/SmsMessageContent.md @@ -393,6 +395,8 @@ src/Model/RecordingTranscriptionMetadata.php src/Model/RecordingTranscriptions.php src/Model/RedirectCallback.php src/Model/RedirectMethodEnum.php +src/Model/ReferCallStatusEnum.php +src/Model/ReferCompleteCallback.php src/Model/SipConnectionMetadata.php src/Model/SipCredentials.php src/Model/SmsMessageContent.php diff --git a/README.md b/README.md index dbdb0ec6..66fde478 100644 --- a/README.md +++ b/README.md @@ -297,6 +297,8 @@ Class | Method | HTTP request | Description - [RecordingTranscriptions](docs/Model/RecordingTranscriptions.md) - [RedirectCallback](docs/Model/RedirectCallback.md) - [RedirectMethodEnum](docs/Model/RedirectMethodEnum.md) +- [ReferCallStatusEnum](docs/Model/ReferCallStatusEnum.md) +- [ReferCompleteCallback](docs/Model/ReferCompleteCallback.md) - [SipConnectionMetadata](docs/Model/SipConnectionMetadata.md) - [SipCredentials](docs/Model/SipCredentials.md) - [SmsMessageContent](docs/Model/SmsMessageContent.md) diff --git a/bandwidth.yml b/bandwidth.yml index 52ceffd4..e7ad640e 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -32,27 +32,27 @@ paths: tags: - Media parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/continuationToken' + - $ref: "#/components/parameters/accountId" + - $ref: "#/components/parameters/continuationToken" responses: - '200': - $ref: '#/components/responses/listMediaResponse' - '400': - $ref: '#/components/responses/messagingBadRequestError' - '401': - $ref: '#/components/responses/messagingUnauthorizedError' - '403': - $ref: '#/components/responses/messagingForbiddenError' - '404': - $ref: '#/components/responses/messagingNotFoundError' - '406': - $ref: '#/components/responses/messagingNotAcceptableError' - '415': - $ref: '#/components/responses/messagingInvalidMediaTypeError' - '429': - $ref: '#/components/responses/messagingTooManyRequestsError' - '500': - $ref: '#/components/responses/messagingInternalServerError' + "200": + $ref: "#/components/responses/listMediaResponse" + "400": + $ref: "#/components/responses/messagingBadRequestError" + "401": + $ref: "#/components/responses/messagingUnauthorizedError" + "403": + $ref: "#/components/responses/messagingForbiddenError" + "404": + $ref: "#/components/responses/messagingNotFoundError" + "406": + $ref: "#/components/responses/messagingNotAcceptableError" + "415": + $ref: "#/components/responses/messagingInvalidMediaTypeError" + "429": + $ref: "#/components/responses/messagingTooManyRequestsError" + "500": + $ref: "#/components/responses/messagingInternalServerError" servers: &ref_0 - url: https://messaging.bandwidth.com/api/v2 description: Production @@ -64,27 +64,27 @@ paths: tags: - Media parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/mediaId' + - $ref: "#/components/parameters/accountId" + - $ref: "#/components/parameters/mediaId" responses: - '200': - $ref: '#/components/responses/getMediaResponse' - '400': - $ref: '#/components/responses/messagingBadRequestError' - '401': - $ref: '#/components/responses/messagingUnauthorizedError' - '403': - $ref: '#/components/responses/messagingForbiddenError' - '404': - $ref: '#/components/responses/messagingNotFoundError' - '406': - $ref: '#/components/responses/messagingNotAcceptableError' - '415': - $ref: '#/components/responses/messagingInvalidMediaTypeError' - '429': - $ref: '#/components/responses/messagingTooManyRequestsError' - '500': - $ref: '#/components/responses/messagingInternalServerError' + "200": + $ref: "#/components/responses/getMediaResponse" + "400": + $ref: "#/components/responses/messagingBadRequestError" + "401": + $ref: "#/components/responses/messagingUnauthorizedError" + "403": + $ref: "#/components/responses/messagingForbiddenError" + "404": + $ref: "#/components/responses/messagingNotFoundError" + "406": + $ref: "#/components/responses/messagingNotAcceptableError" + "415": + $ref: "#/components/responses/messagingInvalidMediaTypeError" + "429": + $ref: "#/components/responses/messagingTooManyRequestsError" + "500": + $ref: "#/components/responses/messagingInternalServerError" put: summary: Upload Media description: >- @@ -102,31 +102,31 @@ paths: tags: - Media parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/mediaId' - - $ref: '#/components/parameters/contentType' - - $ref: '#/components/parameters/cacheControl' + - $ref: "#/components/parameters/accountId" + - $ref: "#/components/parameters/mediaId" + - $ref: "#/components/parameters/contentType" + - $ref: "#/components/parameters/cacheControl" requestBody: - $ref: '#/components/requestBodies/uploadMediaRequest' + $ref: "#/components/requestBodies/uploadMediaRequest" responses: - '204': + "204": description: No Content - '400': - $ref: '#/components/responses/messagingBadRequestError' - '401': - $ref: '#/components/responses/messagingUnauthorizedError' - '403': - $ref: '#/components/responses/messagingForbiddenError' - '404': - $ref: '#/components/responses/messagingNotFoundError' - '406': - $ref: '#/components/responses/messagingNotAcceptableError' - '415': - $ref: '#/components/responses/messagingInvalidMediaTypeError' - '429': - $ref: '#/components/responses/messagingTooManyRequestsError' - '500': - $ref: '#/components/responses/messagingInternalServerError' + "400": + $ref: "#/components/responses/messagingBadRequestError" + "401": + $ref: "#/components/responses/messagingUnauthorizedError" + "403": + $ref: "#/components/responses/messagingForbiddenError" + "404": + $ref: "#/components/responses/messagingNotFoundError" + "406": + $ref: "#/components/responses/messagingNotAcceptableError" + "415": + $ref: "#/components/responses/messagingInvalidMediaTypeError" + "429": + $ref: "#/components/responses/messagingTooManyRequestsError" + "500": + $ref: "#/components/responses/messagingInternalServerError" delete: summary: Delete Media description: |- @@ -139,27 +139,27 @@ paths: tags: - Media parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/mediaId' + - $ref: "#/components/parameters/accountId" + - $ref: "#/components/parameters/mediaId" responses: - '204': + "204": description: No Content - '400': - $ref: '#/components/responses/messagingBadRequestError' - '401': - $ref: '#/components/responses/messagingUnauthorizedError' - '403': - $ref: '#/components/responses/messagingForbiddenError' - '404': - $ref: '#/components/responses/messagingNotFoundError' - '406': - $ref: '#/components/responses/messagingNotAcceptableError' - '415': - $ref: '#/components/responses/messagingInvalidMediaTypeError' - '429': - $ref: '#/components/responses/messagingTooManyRequestsError' - '500': - $ref: '#/components/responses/messagingInternalServerError' + "400": + $ref: "#/components/responses/messagingBadRequestError" + "401": + $ref: "#/components/responses/messagingUnauthorizedError" + "403": + $ref: "#/components/responses/messagingForbiddenError" + "404": + $ref: "#/components/responses/messagingNotFoundError" + "406": + $ref: "#/components/responses/messagingNotAcceptableError" + "415": + $ref: "#/components/responses/messagingInvalidMediaTypeError" + "429": + $ref: "#/components/responses/messagingTooManyRequestsError" + "500": + $ref: "#/components/responses/messagingInternalServerError" servers: *ref_0 /users/{accountId}/messages: get: @@ -175,53 +175,53 @@ paths: tags: - Messages parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/messageId' - - $ref: '#/components/parameters/sourceTn' - - $ref: '#/components/parameters/destinationTn' - - $ref: '#/components/parameters/messageStatus' - - $ref: '#/components/parameters/messageDirection' - - $ref: '#/components/parameters/carrierName' - - $ref: '#/components/parameters/messageType' - - $ref: '#/components/parameters/errorCode' - - $ref: '#/components/parameters/fromDateTime' - - $ref: '#/components/parameters/toDateTime' - - $ref: '#/components/parameters/campaignId' - - $ref: '#/components/parameters/fromBwLatency' - - $ref: '#/components/parameters/bwQueued' - - $ref: '#/components/parameters/product' - - $ref: '#/components/parameters/location' - - $ref: '#/components/parameters/carrierQueued' - - $ref: '#/components/parameters/fromCarrierLatency' - - $ref: '#/components/parameters/callingNumberCountryA3' - - $ref: '#/components/parameters/calledNumberCountryA3' - - $ref: '#/components/parameters/fromSegmentCount' - - $ref: '#/components/parameters/toSegmentCount' - - $ref: '#/components/parameters/fromMessageSize' - - $ref: '#/components/parameters/toMessageSize' - - $ref: '#/components/parameters/sort' - - $ref: '#/components/parameters/pageToken' - - $ref: '#/components/parameters/limit' - - $ref: '#/components/parameters/limitTotalCount' + - $ref: "#/components/parameters/accountId" + - $ref: "#/components/parameters/messageId" + - $ref: "#/components/parameters/sourceTn" + - $ref: "#/components/parameters/destinationTn" + - $ref: "#/components/parameters/messageStatus" + - $ref: "#/components/parameters/messageDirection" + - $ref: "#/components/parameters/carrierName" + - $ref: "#/components/parameters/messageType" + - $ref: "#/components/parameters/errorCode" + - $ref: "#/components/parameters/fromDateTime" + - $ref: "#/components/parameters/toDateTime" + - $ref: "#/components/parameters/campaignId" + - $ref: "#/components/parameters/fromBwLatency" + - $ref: "#/components/parameters/bwQueued" + - $ref: "#/components/parameters/product" + - $ref: "#/components/parameters/location" + - $ref: "#/components/parameters/carrierQueued" + - $ref: "#/components/parameters/fromCarrierLatency" + - $ref: "#/components/parameters/callingNumberCountryA3" + - $ref: "#/components/parameters/calledNumberCountryA3" + - $ref: "#/components/parameters/fromSegmentCount" + - $ref: "#/components/parameters/toSegmentCount" + - $ref: "#/components/parameters/fromMessageSize" + - $ref: "#/components/parameters/toMessageSize" + - $ref: "#/components/parameters/sort" + - $ref: "#/components/parameters/pageToken" + - $ref: "#/components/parameters/limit" + - $ref: "#/components/parameters/limitTotalCount" responses: - '200': - $ref: '#/components/responses/listMessagesResponse' - '400': - $ref: '#/components/responses/messagingBadRequestError' - '401': - $ref: '#/components/responses/messagingUnauthorizedError' - '403': - $ref: '#/components/responses/messagingForbiddenError' - '404': - $ref: '#/components/responses/messagingNotFoundError' - '405': - $ref: '#/components/responses/messagingMethodNotAllowedError' - '415': - $ref: '#/components/responses/messagingInvalidMediaTypeError' - '429': - $ref: '#/components/responses/listMessagesTooManyRequestsError' - '500': - $ref: '#/components/responses/messagingInternalServerError' + "200": + $ref: "#/components/responses/listMessagesResponse" + "400": + $ref: "#/components/responses/messagingBadRequestError" + "401": + $ref: "#/components/responses/messagingUnauthorizedError" + "403": + $ref: "#/components/responses/messagingForbiddenError" + "404": + $ref: "#/components/responses/messagingNotFoundError" + "405": + $ref: "#/components/responses/messagingMethodNotAllowedError" + "415": + $ref: "#/components/responses/messagingInvalidMediaTypeError" + "429": + $ref: "#/components/responses/listMessagesTooManyRequestsError" + "500": + $ref: "#/components/responses/messagingInternalServerError" post: summary: Create Message description: >- @@ -231,33 +231,33 @@ paths: tags: - Messages parameters: - - $ref: '#/components/parameters/accountId' + - $ref: "#/components/parameters/accountId" requestBody: - $ref: '#/components/requestBodies/createMessageRequest' + $ref: "#/components/requestBodies/createMessageRequest" responses: - '202': - $ref: '#/components/responses/createMessageResponse' - '400': - $ref: '#/components/responses/createMessageBadRequestError' - '401': - $ref: '#/components/responses/messagingUnauthorizedError' - '403': - $ref: '#/components/responses/messagingForbiddenError' - '404': - $ref: '#/components/responses/messagingNotFoundError' - '405': - $ref: '#/components/responses/messagingMethodNotAllowedError' - '406': - $ref: '#/components/responses/messagingNotAcceptableError' - '415': - $ref: '#/components/responses/messagingInvalidMediaTypeError' - '429': - $ref: '#/components/responses/messagingTooManyRequestsError' - '500': - $ref: '#/components/responses/messagingInternalServerError' + "202": + $ref: "#/components/responses/createMessageResponse" + "400": + $ref: "#/components/responses/createMessageBadRequestError" + "401": + $ref: "#/components/responses/messagingUnauthorizedError" + "403": + $ref: "#/components/responses/messagingForbiddenError" + "404": + $ref: "#/components/responses/messagingNotFoundError" + "405": + $ref: "#/components/responses/messagingMethodNotAllowedError" + "406": + $ref: "#/components/responses/messagingNotAcceptableError" + "415": + $ref: "#/components/responses/messagingInvalidMediaTypeError" + "429": + $ref: "#/components/responses/messagingTooManyRequestsError" + "500": + $ref: "#/components/responses/messagingInternalServerError" callbacks: statusCallback: - $ref: '#/components/callbacks/statusCallback' + $ref: "#/components/callbacks/statusCallback" servers: *ref_0 /users/{accountId}/messages/multiChannel: post: @@ -265,38 +265,38 @@ paths: description: Endpoint for sending Multi-Channel messages. operationId: createMultiChannelMessage parameters: - - $ref: '#/components/parameters/accountId' + - $ref: "#/components/parameters/accountId" tags: - Multi-Channel requestBody: - $ref: '#/components/requestBodies/createMultiChannelMessageRequest' + $ref: "#/components/requestBodies/createMultiChannelMessageRequest" responses: - '202': - $ref: '#/components/responses/createMultiChannelMessageResponse' - '400': - $ref: '#/components/responses/multiChannelBadRequestError' - '401': - $ref: '#/components/responses/multiChannelUnauthorizedError' - '403': - $ref: '#/components/responses/multiChannelForbiddenError' - '404': - $ref: '#/components/responses/multiChannelNotFoundError' - '405': - $ref: '#/components/responses/multiChannelMethodNotAllowedError' - '406': - $ref: '#/components/responses/multiChannelNotAcceptableError' - '415': - $ref: '#/components/responses/multiChannelInvalidMediaTypeError' - '429': - $ref: '#/components/responses/multiChannelTooManyRequestsError' - '500': - $ref: '#/components/responses/multiChannelInternalServerError' + "202": + $ref: "#/components/responses/createMultiChannelMessageResponse" + "400": + $ref: "#/components/responses/multiChannelBadRequestError" + "401": + $ref: "#/components/responses/multiChannelUnauthorizedError" + "403": + $ref: "#/components/responses/multiChannelForbiddenError" + "404": + $ref: "#/components/responses/multiChannelNotFoundError" + "405": + $ref: "#/components/responses/multiChannelMethodNotAllowedError" + "406": + $ref: "#/components/responses/multiChannelNotAcceptableError" + "415": + $ref: "#/components/responses/multiChannelInvalidMediaTypeError" + "429": + $ref: "#/components/responses/multiChannelTooManyRequestsError" + "500": + $ref: "#/components/responses/multiChannelInternalServerError" callbacks: statusCallback: - $ref: '#/components/callbacks/statusCallback' + $ref: "#/components/callbacks/statusCallback" x-badges: - name: Beta - color: '#076EA8' + color: "#076EA8" servers: *ref_0 /accounts/{accountId}/calls: post: @@ -317,28 +317,28 @@ paths: approximately in order, but exact ordering is not guaranteed. operationId: createCall parameters: - - $ref: '#/components/parameters/accountId' + - $ref: "#/components/parameters/accountId1" requestBody: - $ref: '#/components/requestBodies/createCallRequest' + $ref: "#/components/requestBodies/createCallRequest" responses: - '201': - $ref: '#/components/responses/createCallResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "201": + $ref: "#/components/responses/createCallResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" get: tags: - Calls @@ -358,33 +358,33 @@ paths: days, you will get an empty array [] in response. operationId: listCalls parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/to' - - $ref: '#/components/parameters/from' - - $ref: '#/components/parameters/minStartTimeCalls' - - $ref: '#/components/parameters/maxStartTimeCalls' - - $ref: '#/components/parameters/disconnectCause' - - $ref: '#/components/parameters/pageSizeCalls' - - $ref: '#/components/parameters/pageToken1' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/to" + - $ref: "#/components/parameters/from" + - $ref: "#/components/parameters/minStartTimeCalls" + - $ref: "#/components/parameters/maxStartTimeCalls" + - $ref: "#/components/parameters/disconnectCause" + - $ref: "#/components/parameters/pageSizeCalls" + - $ref: "#/components/parameters/pageToken1" responses: - '200': - $ref: '#/components/responses/listCallsResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/listCallsResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: &ref_1 - url: https://voice.bandwidth.com/api/v2 description: Production @@ -404,27 +404,27 @@ paths: 7 days, you will get an HTTP 404 response. operationId: getCallState parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" responses: - '200': - $ref: '#/components/responses/getCallStateResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/getCallStateResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" post: tags: - Calls @@ -434,31 +434,31 @@ paths: BXML document. operationId: updateCall parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" requestBody: - $ref: '#/components/requestBodies/updateCallRequest' + $ref: "#/components/requestBodies/updateCallRequest" responses: - '200': - $ref: '#/components/responses/updateCallResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '409': - $ref: '#/components/responses/voiceConflictError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/updateCallResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "409": + $ref: "#/components/responses/voiceConflictError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/calls/{callId}/bxml: put: @@ -468,31 +468,31 @@ paths: description: Interrupts and replaces an active call's BXML document. operationId: updateCallBxml parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" requestBody: - $ref: '#/components/requestBodies/updateCallBxmlRequest' + $ref: "#/components/requestBodies/updateCallBxmlRequest" responses: - '204': + "204": description: Call BXML was successfully replaced. - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '409': - $ref: '#/components/responses/voiceConflictError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "409": + $ref: "#/components/responses/voiceConflictError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/conferences: get: @@ -510,31 +510,31 @@ paths: of conference records. operationId: listConferences parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/name' - - $ref: '#/components/parameters/minCreatedTime' - - $ref: '#/components/parameters/maxCreatedTime' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/pageToken1' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/name" + - $ref: "#/components/parameters/minCreatedTime" + - $ref: "#/components/parameters/maxCreatedTime" + - $ref: "#/components/parameters/pageSize" + - $ref: "#/components/parameters/pageToken1" responses: - '200': - $ref: '#/components/responses/listConferencesResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/listConferencesResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/conferences/{conferenceId}: get: @@ -544,27 +544,27 @@ paths: description: Returns information about the specified conference. operationId: getConference parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/conferenceId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/conferenceId" responses: - '200': - $ref: '#/components/responses/getConferenceResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/getConferenceResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" post: tags: - Conferences @@ -572,29 +572,29 @@ paths: description: Update the conference state. operationId: updateConference parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/conferenceId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/conferenceId" requestBody: - $ref: '#/components/requestBodies/updateConferenceRequest' + $ref: "#/components/requestBodies/updateConferenceRequest" responses: - '204': + "204": description: Conference was successfully modified. - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/conferences/{conferenceId}/bxml: put: @@ -604,29 +604,29 @@ paths: description: Update the conference BXML document. operationId: updateConferenceBxml parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/conferenceId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/conferenceId" requestBody: - $ref: '#/components/requestBodies/updateConferenceBxmlRequest' + $ref: "#/components/requestBodies/updateConferenceBxmlRequest" responses: - '204': + "204": description: Conference successfully modified. - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/conferences/{conferenceId}/members/{memberId}: get: @@ -636,28 +636,28 @@ paths: description: Returns information about the specified conference member. operationId: getConferenceMember parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/conferenceId' - - $ref: '#/components/parameters/memberId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/conferenceId" + - $ref: "#/components/parameters/memberId" responses: - '200': - $ref: '#/components/responses/getConferenceMemberResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/getConferenceMemberResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" put: tags: - Conferences @@ -665,30 +665,30 @@ paths: description: Updates settings for a particular conference member. operationId: updateConferenceMember parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/conferenceId' - - $ref: '#/components/parameters/memberId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/conferenceId" + - $ref: "#/components/parameters/memberId" requestBody: - $ref: '#/components/requestBodies/updateConferenceMemberRequest' + $ref: "#/components/requestBodies/updateConferenceMemberRequest" responses: - '204': + "204": description: Conference member was successfully modified. - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/conferences/{conferenceId}/recordings: get: @@ -700,27 +700,27 @@ paths: took place during the specified conference. operationId: listConferenceRecordings parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/conferenceId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/conferenceId" responses: - '200': - $ref: '#/components/responses/listConferenceRecordingsResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/listConferenceRecordingsResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}: get: @@ -730,28 +730,28 @@ paths: description: Returns metadata for the specified recording. operationId: getConferenceRecording parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/conferenceId' - - $ref: '#/components/parameters/recordingId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/conferenceId" + - $ref: "#/components/parameters/recordingId" responses: - '200': - $ref: '#/components/responses/getConferenceRecordingResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/getConferenceRecordingResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media: get: @@ -761,28 +761,28 @@ paths: description: Downloads the specified recording file. operationId: downloadConferenceRecording parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/conferenceId' - - $ref: '#/components/parameters/recordingId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/conferenceId" + - $ref: "#/components/parameters/recordingId" responses: - '200': - $ref: '#/components/responses/downloadRecordingMediaResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/downloadRecordingMediaResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/recordings: get: @@ -801,30 +801,30 @@ paths: empty if no recordings match the specified criteria. operationId: listAccountCallRecordings parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/to' - - $ref: '#/components/parameters/from' - - $ref: '#/components/parameters/minStartTime' - - $ref: '#/components/parameters/maxStartTime' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/to" + - $ref: "#/components/parameters/from" + - $ref: "#/components/parameters/minStartTime" + - $ref: "#/components/parameters/maxStartTime" responses: - '200': - $ref: '#/components/responses/listCallRecordingsResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/listCallRecordingsResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/calls/{callId}/recording: put: @@ -834,29 +834,29 @@ paths: description: Pause or resume a recording on an active phone call. operationId: updateCallRecordingState parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" requestBody: - $ref: '#/components/requestBodies/updateCallRecordingRequest' + $ref: "#/components/requestBodies/updateCallRecordingRequest" responses: - '200': - $ref: '#/components/responses/updateRecordingResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/updateRecordingResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/calls/{callId}/recordings: get: @@ -868,27 +868,27 @@ paths: that took place during the specified call. operationId: listCallRecordings parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" responses: - '200': - $ref: '#/components/responses/listCallRecordingsResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/listCallRecordingsResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/calls/{callId}/recordings/{recordingId}: get: @@ -898,28 +898,28 @@ paths: description: Returns metadata for the specified recording. operationId: getCallRecording parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' - - $ref: '#/components/parameters/recordingId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" + - $ref: "#/components/parameters/recordingId" responses: - '200': - $ref: '#/components/responses/getCallRecordingResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/getCallRecordingResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" delete: tags: - Recordings @@ -935,28 +935,28 @@ paths: irreversible, can take an additional 24 to 48 hours. operationId: deleteRecording parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' - - $ref: '#/components/parameters/recordingId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" + - $ref: "#/components/parameters/recordingId" responses: - '204': + "204": description: Recording was deleted. - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media: get: @@ -966,28 +966,28 @@ paths: description: Downloads the specified recording. operationId: downloadCallRecording parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' - - $ref: '#/components/parameters/recordingId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" + - $ref: "#/components/parameters/recordingId" responses: - '200': - $ref: '#/components/responses/downloadRecordingMediaResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/downloadRecordingMediaResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" delete: tags: - Recordings @@ -995,28 +995,28 @@ paths: description: Deletes the specified recording's media. operationId: deleteRecordingMedia parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' - - $ref: '#/components/parameters/recordingId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" + - $ref: "#/components/parameters/recordingId" responses: - '204': + "204": description: The recording media was successfully deleted. - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription: get: @@ -1038,28 +1038,28 @@ paths: item. operationId: getRecordingTranscription parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' - - $ref: '#/components/parameters/recordingId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" + - $ref: "#/components/parameters/recordingId" responses: - '200': - $ref: '#/components/responses/getRecordingTranscriptionResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/getRecordingTranscriptionResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" post: tags: - Recordings @@ -1073,30 +1073,30 @@ paths: less than 4 hours. operationId: transcribeCallRecording parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' - - $ref: '#/components/parameters/recordingId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" + - $ref: "#/components/parameters/recordingId" requestBody: - $ref: '#/components/requestBodies/transcribeRecordingRequest' + $ref: "#/components/requestBodies/transcribeRecordingRequest" responses: - '204': + "204": description: Transcription was successfully requested. - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" delete: tags: - Recordings @@ -1111,28 +1111,28 @@ paths: can take an additional 24 to 48 hours. operationId: deleteRecordingTranscription parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' - - $ref: '#/components/parameters/recordingId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" + - $ref: "#/components/parameters/recordingId" responses: - '204': + "204": description: The transcription was successfully deleted. - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/statistics: get: @@ -1142,26 +1142,26 @@ paths: description: Returns details about the current state of the account. operationId: getStatistics parameters: - - $ref: '#/components/parameters/accountId' + - $ref: "#/components/parameters/accountId1" responses: - '200': - $ref: '#/components/responses/getStatisticsResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/getStatisticsResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/calls/{callId}/transcriptions: get: @@ -1173,27 +1173,27 @@ paths: [startTranscription](/docs/voice/bxml/startTranscription). operationId: listRealTimeTranscriptions parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" responses: - '200': - $ref: '#/components/responses/listTranscriptionsResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/listTranscriptionsResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId}: get: @@ -1205,28 +1205,28 @@ paths: [startTranscription](/docs/voice/bxml/startTranscription). operationId: getRealTimeTranscription parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' - - $ref: '#/components/parameters/transcriptionId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" + - $ref: "#/components/parameters/transcriptionId" responses: - '200': - $ref: '#/components/responses/getCallTranscriptionResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/getCallTranscriptionResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" delete: tags: - Transcriptions @@ -1242,28 +1242,28 @@ paths: can take an additional 24 to 48 hours. operationId: deleteRealTimeTranscription parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/callId' - - $ref: '#/components/parameters/transcriptionId' + - $ref: "#/components/parameters/accountId1" + - $ref: "#/components/parameters/callId" + - $ref: "#/components/parameters/transcriptionId" responses: - '200': - $ref: '#/components/responses/deleteCallTranscriptionResponse' - '400': - $ref: '#/components/responses/voiceBadRequestError' - '401': - $ref: '#/components/responses/voiceUnauthorizedError' - '403': - $ref: '#/components/responses/voiceForbiddenError' - '404': - $ref: '#/components/responses/voiceNotFoundError' - '405': - $ref: '#/components/responses/voiceNotAllowedError' - '415': - $ref: '#/components/responses/voiceUnsupportedMediaTypeError' - '429': - $ref: '#/components/responses/voiceTooManyRequestsError' - '500': - $ref: '#/components/responses/voiceInternalServerError' + "200": + $ref: "#/components/responses/deleteCallTranscriptionResponse" + "400": + $ref: "#/components/responses/voiceBadRequestError" + "401": + $ref: "#/components/responses/voiceUnauthorizedError" + "403": + $ref: "#/components/responses/voiceForbiddenError" + "404": + $ref: "#/components/responses/voiceNotFoundError" + "405": + $ref: "#/components/responses/voiceNotAllowedError" + "415": + $ref: "#/components/responses/voiceUnsupportedMediaTypeError" + "429": + $ref: "#/components/responses/voiceTooManyRequestsError" + "500": + $ref: "#/components/responses/voiceInternalServerError" servers: *ref_1 /accounts/{accountId}/code/voice: post: @@ -1273,20 +1273,20 @@ paths: description: Send an MFA Code via a phone call. operationId: generateVoiceCode parameters: - - $ref: '#/components/parameters/accountId' + - $ref: "#/components/parameters/accountId2" requestBody: - $ref: '#/components/requestBodies/codeRequest' + $ref: "#/components/requestBodies/codeRequest" responses: - '200': - $ref: '#/components/responses/voiceCodeResponse' - '400': - $ref: '#/components/responses/mfaBadRequestError' - '401': - $ref: '#/components/responses/mfaUnauthorizedError' - '403': - $ref: '#/components/responses/mfaForbiddenError' - '500': - $ref: '#/components/responses/mfaInternalServerError' + "200": + $ref: "#/components/responses/voiceCodeResponse" + "400": + $ref: "#/components/responses/mfaBadRequestError" + "401": + $ref: "#/components/responses/mfaUnauthorizedError" + "403": + $ref: "#/components/responses/mfaForbiddenError" + "500": + $ref: "#/components/responses/mfaInternalServerError" servers: &ref_2 - url: https://mfa.bandwidth.com/api/v1 description: Production @@ -1298,20 +1298,20 @@ paths: description: Send an MFA code via text message (SMS). operationId: generateMessagingCode parameters: - - $ref: '#/components/parameters/accountId' + - $ref: "#/components/parameters/accountId2" requestBody: - $ref: '#/components/requestBodies/codeRequest' + $ref: "#/components/requestBodies/codeRequest" responses: - '200': - $ref: '#/components/responses/messagingCodeResponse' - '400': - $ref: '#/components/responses/mfaBadRequestError' - '401': - $ref: '#/components/responses/mfaUnauthorizedError' - '403': - $ref: '#/components/responses/mfaForbiddenError' - '500': - $ref: '#/components/responses/mfaInternalServerError' + "200": + $ref: "#/components/responses/messagingCodeResponse" + "400": + $ref: "#/components/responses/mfaBadRequestError" + "401": + $ref: "#/components/responses/mfaUnauthorizedError" + "403": + $ref: "#/components/responses/mfaForbiddenError" + "500": + $ref: "#/components/responses/mfaInternalServerError" servers: *ref_2 /accounts/{accountId}/code/verify: post: @@ -1321,22 +1321,22 @@ paths: description: Verify a previously sent MFA code. operationId: verifyCode parameters: - - $ref: '#/components/parameters/accountId' + - $ref: "#/components/parameters/accountId2" requestBody: - $ref: '#/components/requestBodies/codeVerify' + $ref: "#/components/requestBodies/codeVerify" responses: - '200': - $ref: '#/components/responses/verifyCodeResponse' - '400': - $ref: '#/components/responses/mfaBadRequestError' - '401': - $ref: '#/components/responses/mfaUnauthorizedError' - '403': - $ref: '#/components/responses/mfaForbiddenError' - '429': - $ref: '#/components/responses/mfaTooManyRequestsError' - '500': - $ref: '#/components/responses/mfaInternalServerError' + "200": + $ref: "#/components/responses/verifyCodeResponse" + "400": + $ref: "#/components/responses/mfaBadRequestError" + "401": + $ref: "#/components/responses/mfaUnauthorizedError" + "403": + $ref: "#/components/responses/mfaForbiddenError" + "429": + $ref: "#/components/responses/mfaTooManyRequestsError" + "500": + $ref: "#/components/responses/mfaInternalServerError" servers: *ref_2 /accounts/{accountId}/phoneNumberLookup: post: @@ -1348,14 +1348,14 @@ paths: tags: - Phone Number Lookup parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: "#/components/parameters/accountId3" requestBody: - $ref: '#/components/requestBodies/createSyncLookupRequest' + $ref: "#/components/requestBodies/createSyncLookupRequest" responses: - '200': - $ref: '#/components/responses/createSyncLookupResponse' + "200": + $ref: "#/components/responses/createSyncLookupResponse" default: - $ref: '#/components/responses/tnLookupDefaultResponse' + $ref: "#/components/responses/tnLookupDefaultResponse" servers: &ref_3 - url: https://api.bandwidth.com/v2 description: Production @@ -1371,14 +1371,14 @@ paths: tags: - Phone Number Lookup parameters: - - $ref: '#/components/parameters/accountId1' + - $ref: "#/components/parameters/accountId3" requestBody: - $ref: '#/components/requestBodies/createAsyncBulkLookupRequest' + $ref: "#/components/requestBodies/createAsyncBulkLookupRequest" responses: - '202': - $ref: '#/components/responses/createAsyncBulkLookupResponse' + "202": + $ref: "#/components/responses/createAsyncBulkLookupResponse" default: - $ref: '#/components/responses/tnLookupDefaultResponse' + $ref: "#/components/responses/tnLookupDefaultResponse" servers: *ref_3 /accounts/{accountId}/phoneNumberLookup/bulk/{requestId}: get: @@ -1391,13 +1391,13 @@ paths: tags: - Phone Number Lookup parameters: - - $ref: '#/components/parameters/accountId1' - - $ref: '#/components/parameters/requestId' + - $ref: "#/components/parameters/accountId3" + - $ref: "#/components/parameters/requestId" responses: - '200': - $ref: '#/components/responses/getAsyncBulkLookupResponse' + "200": + $ref: "#/components/responses/getAsyncBulkLookupResponse" default: - $ref: '#/components/responses/tnLookupDefaultResponse' + $ref: "#/components/responses/tnLookupDefaultResponse" servers: *ref_3 /accounts/{accountId}/tollFreeVerification: post: @@ -1407,29 +1407,29 @@ paths: description: Submit a request for verification of a toll-free phone number. operationId: requestTollFreeVerification parameters: - - $ref: '#/components/parameters/accountId' + - $ref: "#/components/parameters/accountId4" requestBody: - $ref: '#/components/requestBodies/requestTollFreeVerificationRequest' + $ref: "#/components/requestBodies/requestTollFreeVerificationRequest" responses: - '202': + "202": description: Accepted - '400': - $ref: '#/components/responses/tfvPostBadRequestResponse' - '401': - $ref: '#/components/responses/tfvUnauthorizedResponse' - '403': - $ref: '#/components/responses/tfvForbiddenResponse' - '405': - $ref: '#/components/responses/tfvNotAllowedResponse' - '429': - $ref: '#/components/responses/tfvTooManyRequestsResponse' - '500': - $ref: '#/components/responses/tfvServerErrorResponse' - '503': - $ref: '#/components/responses/tfvServiceUnavailableResponse' + "400": + $ref: "#/components/responses/tfvPostBadRequestResponse" + "401": + $ref: "#/components/responses/tfvUnauthorizedResponse" + "403": + $ref: "#/components/responses/tfvForbiddenResponse" + "405": + $ref: "#/components/responses/tfvNotAllowedResponse" + "429": + $ref: "#/components/responses/tfvTooManyRequestsResponse" + "500": + $ref: "#/components/responses/tfvServerErrorResponse" + "503": + $ref: "#/components/responses/tfvServiceUnavailableResponse" callbacks: tfVerificationStatus: - $ref: '#/components/callbacks/tfVerificationStatus' + $ref: "#/components/callbacks/tfVerificationStatus" servers: &ref_4 - url: https://api.bandwidth.com/api/v2 description: Production @@ -1446,27 +1446,27 @@ paths: available. operationId: getTollFreeVerificationStatus parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/tfPhoneNumberPathParam' + - $ref: "#/components/parameters/accountId4" + - $ref: "#/components/parameters/tfPhoneNumberPathParam" responses: - '200': - $ref: '#/components/responses/getTollFreeVerificationStatusResponse' - '400': - $ref: '#/components/responses/tfvBadRequestResponse' - '401': - $ref: '#/components/responses/tfvUnauthorizedResponse' - '403': - $ref: '#/components/responses/tfvForbiddenResponse' - '404': - $ref: '#/components/responses/tfvNotFoundResponse' - '405': - $ref: '#/components/responses/tfvNotAllowedResponse' - '429': - $ref: '#/components/responses/tfvTooManyRequestsResponse' - '500': - $ref: '#/components/responses/tfvServerErrorResponse' - '503': - $ref: '#/components/responses/tfvServiceUnavailableResponse' + "200": + $ref: "#/components/responses/getTollFreeVerificationStatusResponse" + "400": + $ref: "#/components/responses/tfvBadRequestResponse" + "401": + $ref: "#/components/responses/tfvUnauthorizedResponse" + "403": + $ref: "#/components/responses/tfvForbiddenResponse" + "404": + $ref: "#/components/responses/tfvNotFoundResponse" + "405": + $ref: "#/components/responses/tfvNotAllowedResponse" + "429": + $ref: "#/components/responses/tfvTooManyRequestsResponse" + "500": + $ref: "#/components/responses/tfvServerErrorResponse" + "503": + $ref: "#/components/responses/tfvServiceUnavailableResponse" put: tags: - Toll-Free Verification @@ -1479,55 +1479,55 @@ paths: true). operationId: updateTollFreeVerificationRequest parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/tfPhoneNumberPathParam' + - $ref: "#/components/parameters/accountId4" + - $ref: "#/components/parameters/tfPhoneNumberPathParam" requestBody: - $ref: '#/components/requestBodies/updateTollFreeVerificationRequestRequest' + $ref: "#/components/requestBodies/updateTollFreeVerificationRequestRequest" responses: - '202': - $ref: '#/components/responses/verifyPutResponse' - '400': - $ref: '#/components/responses/tfvPostBadRequestResponse' - '401': - $ref: '#/components/responses/tfvUnauthorizedResponse' - '403': - $ref: '#/components/responses/tfvForbiddenResponse' - '405': - $ref: '#/components/responses/tfvNotAllowedResponse' - '429': - $ref: '#/components/responses/tfvTooManyRequestsResponse' - '500': - $ref: '#/components/responses/tfvServerErrorResponse' - '503': - $ref: '#/components/responses/tfvServiceUnavailableResponse' + "202": + $ref: "#/components/responses/verifyPutResponse" + "400": + $ref: "#/components/responses/tfvPostBadRequestResponse" + "401": + $ref: "#/components/responses/tfvUnauthorizedResponse" + "403": + $ref: "#/components/responses/tfvForbiddenResponse" + "405": + $ref: "#/components/responses/tfvNotAllowedResponse" + "429": + $ref: "#/components/responses/tfvTooManyRequestsResponse" + "500": + $ref: "#/components/responses/tfvServerErrorResponse" + "503": + $ref: "#/components/responses/tfvServiceUnavailableResponse" callbacks: tfVerificationStatus: - $ref: '#/components/callbacks/tfVerificationStatus' + $ref: "#/components/callbacks/tfVerificationStatus" delete: description: Delete a toll-free verification submission for a toll-free number. operationId: deleteVerificationRequest parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/tfPhoneNumberPathParam' + - $ref: "#/components/parameters/accountId4" + - $ref: "#/components/parameters/tfPhoneNumberPathParam" responses: - '204': - $ref: '#/components/responses/noContentResponse' - '400': - $ref: '#/components/responses/tfvBadRequestResponse' - '401': - $ref: '#/components/responses/tfvUnauthorizedResponse' - '403': - $ref: '#/components/responses/tfvForbiddenResponse' - '404': - $ref: '#/components/responses/tfvNotFoundResponse' - '405': - $ref: '#/components/responses/tfvNotAllowedResponse' - '429': - $ref: '#/components/responses/tfvTooManyRequestsResponse' - '500': - $ref: '#/components/responses/tfvServerErrorResponse' - '503': - $ref: '#/components/responses/tfvServiceUnavailableResponse' + "204": + $ref: "#/components/responses/noContentResponse" + "400": + $ref: "#/components/responses/tfvBadRequestResponse" + "401": + $ref: "#/components/responses/tfvUnauthorizedResponse" + "403": + $ref: "#/components/responses/tfvForbiddenResponse" + "404": + $ref: "#/components/responses/tfvNotFoundResponse" + "405": + $ref: "#/components/responses/tfvNotAllowedResponse" + "429": + $ref: "#/components/responses/tfvTooManyRequestsResponse" + "500": + $ref: "#/components/responses/tfvServerErrorResponse" + "503": + $ref: "#/components/responses/tfvServiceUnavailableResponse" summary: Delete a Toll-Free Verification Submission tags: - Toll-Free Verification @@ -1546,24 +1546,24 @@ paths: object will be null). operationId: listWebhookSubscriptions parameters: - - $ref: '#/components/parameters/accountId' + - $ref: "#/components/parameters/accountId4" responses: - '200': - $ref: '#/components/responses/listWebhookSubscriptionsResponse' - '400': - $ref: '#/components/responses/tfvPostBadRequestResponse' - '401': - $ref: '#/components/responses/tfvUnauthorizedResponse' - '403': - $ref: '#/components/responses/tfvForbiddenResponse' - '405': - $ref: '#/components/responses/tfvNotAllowedResponse' - '429': - $ref: '#/components/responses/tfvTooManyRequestsResponse' - '500': - $ref: '#/components/responses/tfvServerErrorResponse' - '503': - $ref: '#/components/responses/tfvServiceUnavailableResponse' + "200": + $ref: "#/components/responses/listWebhookSubscriptionsResponse" + "400": + $ref: "#/components/responses/tfvPostBadRequestResponse" + "401": + $ref: "#/components/responses/tfvUnauthorizedResponse" + "403": + $ref: "#/components/responses/tfvForbiddenResponse" + "405": + $ref: "#/components/responses/tfvNotAllowedResponse" + "429": + $ref: "#/components/responses/tfvTooManyRequestsResponse" + "500": + $ref: "#/components/responses/tfvServerErrorResponse" + "503": + $ref: "#/components/responses/tfvServiceUnavailableResponse" post: tags: - Toll-Free Verification @@ -1579,28 +1579,28 @@ paths: modify or delete the subscription at a later time. operationId: createWebhookSubscription parameters: - - $ref: '#/components/parameters/accountId' + - $ref: "#/components/parameters/accountId4" requestBody: - $ref: '#/components/requestBodies/webhookSubscriptionRequest' + $ref: "#/components/requestBodies/webhookSubscriptionRequest" responses: - '201': - $ref: '#/components/responses/createWebhookSubscriptionResponse' - '400': - $ref: '#/components/responses/tfvBadRequestResponse' - '401': - $ref: '#/components/responses/tfvUnauthorizedResponse' - '403': - $ref: '#/components/responses/tfvForbiddenResponse' - '404': - $ref: '#/components/responses/tfvNotFoundResponse' - '405': - $ref: '#/components/responses/tfvNotAllowedResponse' - '429': - $ref: '#/components/responses/tfvTooManyRequestsResponse' - '500': - $ref: '#/components/responses/tfvServerErrorResponse' - '503': - $ref: '#/components/responses/tfvServiceUnavailableResponse' + "201": + $ref: "#/components/responses/createWebhookSubscriptionResponse" + "400": + $ref: "#/components/responses/tfvBadRequestResponse" + "401": + $ref: "#/components/responses/tfvUnauthorizedResponse" + "403": + $ref: "#/components/responses/tfvForbiddenResponse" + "404": + $ref: "#/components/responses/tfvNotFoundResponse" + "405": + $ref: "#/components/responses/tfvNotAllowedResponse" + "429": + $ref: "#/components/responses/tfvTooManyRequestsResponse" + "500": + $ref: "#/components/responses/tfvServerErrorResponse" + "503": + $ref: "#/components/responses/tfvServiceUnavailableResponse" servers: *ref_4 /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}: delete: @@ -1610,27 +1610,27 @@ paths: description: Delete a webhook subscription by ID. operationId: deleteWebhookSubscription parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/webhookSubscriptionIdPathParam' + - $ref: "#/components/parameters/accountId4" + - $ref: "#/components/parameters/webhookSubscriptionIdPathParam" responses: - '204': - $ref: '#/components/responses/noContentResponse' - '400': - $ref: '#/components/responses/tfvBadRequestResponse' - '401': - $ref: '#/components/responses/tfvUnauthorizedResponse' - '403': - $ref: '#/components/responses/tfvForbiddenResponse' - '404': - $ref: '#/components/responses/tfvNotFoundResponse' - '405': - $ref: '#/components/responses/tfvNotAllowedResponse' - '429': - $ref: '#/components/responses/tfvTooManyRequestsResponse' - '500': - $ref: '#/components/responses/tfvServerErrorResponse' - '503': - $ref: '#/components/responses/tfvServiceUnavailableResponse' + "204": + $ref: "#/components/responses/noContentResponse" + "400": + $ref: "#/components/responses/tfvBadRequestResponse" + "401": + $ref: "#/components/responses/tfvUnauthorizedResponse" + "403": + $ref: "#/components/responses/tfvForbiddenResponse" + "404": + $ref: "#/components/responses/tfvNotFoundResponse" + "405": + $ref: "#/components/responses/tfvNotAllowedResponse" + "429": + $ref: "#/components/responses/tfvTooManyRequestsResponse" + "500": + $ref: "#/components/responses/tfvServerErrorResponse" + "503": + $ref: "#/components/responses/tfvServiceUnavailableResponse" put: tags: - Toll-Free Verification @@ -1640,29 +1640,29 @@ paths: `basicAuthentication` can be updated). operationId: updateWebhookSubscription parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/webhookSubscriptionIdPathParam' + - $ref: "#/components/parameters/accountId4" + - $ref: "#/components/parameters/webhookSubscriptionIdPathParam" requestBody: - $ref: '#/components/requestBodies/webhookSubscriptionRequest' + $ref: "#/components/requestBodies/webhookSubscriptionRequest" responses: - '200': - $ref: '#/components/responses/updateWebhookSubscriptionResponse' - '400': - $ref: '#/components/responses/tfvBadRequestResponse' - '401': - $ref: '#/components/responses/tfvUnauthorizedResponse' - '403': - $ref: '#/components/responses/tfvForbiddenResponse' - '404': - $ref: '#/components/responses/tfvNotFoundResponse' - '405': - $ref: '#/components/responses/tfvNotAllowedResponse' - '429': - $ref: '#/components/responses/tfvTooManyRequestsResponse' - '500': - $ref: '#/components/responses/tfvServerErrorResponse' - '503': - $ref: '#/components/responses/tfvServiceUnavailableResponse' + "200": + $ref: "#/components/responses/updateWebhookSubscriptionResponse" + "400": + $ref: "#/components/responses/tfvBadRequestResponse" + "401": + $ref: "#/components/responses/tfvUnauthorizedResponse" + "403": + $ref: "#/components/responses/tfvForbiddenResponse" + "404": + $ref: "#/components/responses/tfvNotFoundResponse" + "405": + $ref: "#/components/responses/tfvNotAllowedResponse" + "429": + $ref: "#/components/responses/tfvTooManyRequestsResponse" + "500": + $ref: "#/components/responses/tfvServerErrorResponse" + "503": + $ref: "#/components/responses/tfvServiceUnavailableResponse" servers: *ref_4 /tollFreeVerification/useCases: get: @@ -1672,24 +1672,24 @@ paths: description: Lists valid toll-free use cases. operationId: listTollFreeUseCases responses: - '200': - $ref: '#/components/responses/listTollFreeUseCasesResponse' - '400': - $ref: '#/components/responses/tfvBadRequestResponse' - '401': - $ref: '#/components/responses/tfvUnauthorizedResponse' - '403': - $ref: '#/components/responses/tfvForbiddenResponse' - '404': - $ref: '#/components/responses/tfvNotFoundResponse' - '405': - $ref: '#/components/responses/tfvNotAllowedResponse' - '429': - $ref: '#/components/responses/tfvTooManyRequestsResponse' - '500': - $ref: '#/components/responses/tfvServerErrorResponse' - '503': - $ref: '#/components/responses/tfvServiceUnavailableResponse' + "200": + $ref: "#/components/responses/listTollFreeUseCasesResponse" + "400": + $ref: "#/components/responses/tfvBadRequestResponse" + "401": + $ref: "#/components/responses/tfvUnauthorizedResponse" + "403": + $ref: "#/components/responses/tfvForbiddenResponse" + "404": + $ref: "#/components/responses/tfvNotFoundResponse" + "405": + $ref: "#/components/responses/tfvNotAllowedResponse" + "429": + $ref: "#/components/responses/tfvTooManyRequestsResponse" + "500": + $ref: "#/components/responses/tfvServerErrorResponse" + "503": + $ref: "#/components/responses/tfvServiceUnavailableResponse" servers: *ref_4 /accounts/{accountId}/endpoints: get: @@ -1699,30 +1699,30 @@ paths: description: Returns a list of endpoints associated with the specified account. operationId: listEndpoints parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/endpointType' - - $ref: '#/components/parameters/endpointStatus' - - $ref: '#/components/parameters/afterCursor' - - $ref: '#/components/parameters/limit1' + - $ref: "#/components/parameters/accountId5" + - $ref: "#/components/parameters/endpointType" + - $ref: "#/components/parameters/endpointStatus" + - $ref: "#/components/parameters/afterCursor" + - $ref: "#/components/parameters/limit1" responses: - '200': - $ref: '#/components/responses/listEndpointsResponse' - '400': - $ref: '#/components/responses/badRequestErrorResponse' - '401': - $ref: '#/components/responses/unauthorizedErrorResponse' - '403': - $ref: '#/components/responses/forbiddenErrorResponse' - '404': - $ref: '#/components/responses/notFoundErrorResponse' - '405': - $ref: '#/components/responses/methodNotAllowedErrorResponse' - '415': - $ref: '#/components/responses/unsupportedMediaTypeErrorResponse' - '429': - $ref: '#/components/responses/tooManyRequestsErrorResponse' - '500': - $ref: '#/components/responses/serviceUnavailableErrorResponse' + "200": + $ref: "#/components/responses/listEndpointsResponse" + "400": + $ref: "#/components/responses/badRequestErrorResponse" + "401": + $ref: "#/components/responses/unauthorizedErrorResponse" + "403": + $ref: "#/components/responses/forbiddenErrorResponse" + "404": + $ref: "#/components/responses/notFoundErrorResponse" + "405": + $ref: "#/components/responses/methodNotAllowedErrorResponse" + "415": + $ref: "#/components/responses/unsupportedMediaTypeErrorResponse" + "429": + $ref: "#/components/responses/tooManyRequestsErrorResponse" + "500": + $ref: "#/components/responses/serviceUnavailableErrorResponse" post: tags: - Endpoints @@ -1730,31 +1730,31 @@ paths: description: Creates a new Endpoint for the specified account. operationId: createEndpoint parameters: - - $ref: '#/components/parameters/accountId' + - $ref: "#/components/parameters/accountId5" requestBody: - $ref: '#/components/requestBodies/createEndpointRequest' + $ref: "#/components/requestBodies/createEndpointRequest" responses: - '201': - $ref: '#/components/responses/createEndpointResponse' - '400': - $ref: '#/components/responses/badRequestErrorResponse' - '401': - $ref: '#/components/responses/unauthorizedErrorResponse' - '403': - $ref: '#/components/responses/forbiddenErrorResponse' - '404': - $ref: '#/components/responses/notFoundErrorResponse' - '405': - $ref: '#/components/responses/methodNotAllowedErrorResponse' - '415': - $ref: '#/components/responses/unsupportedMediaTypeErrorResponse' - '429': - $ref: '#/components/responses/tooManyRequestsErrorResponse' - '500': - $ref: '#/components/responses/serviceUnavailableErrorResponse' + "201": + $ref: "#/components/responses/createEndpointResponse" + "400": + $ref: "#/components/responses/badRequestErrorResponse" + "401": + $ref: "#/components/responses/unauthorizedErrorResponse" + "403": + $ref: "#/components/responses/forbiddenErrorResponse" + "404": + $ref: "#/components/responses/notFoundErrorResponse" + "405": + $ref: "#/components/responses/methodNotAllowedErrorResponse" + "415": + $ref: "#/components/responses/unsupportedMediaTypeErrorResponse" + "429": + $ref: "#/components/responses/tooManyRequestsErrorResponse" + "500": + $ref: "#/components/responses/serviceUnavailableErrorResponse" callbacks: endpointEventCallback: - $ref: '#/components/callbacks/endpointEvent' + $ref: "#/components/callbacks/endpointEvent" servers: &ref_5 - url: https://api.bandwidth.com/v2 description: Production @@ -1766,27 +1766,27 @@ paths: description: Returns information about the specified endpoint. operationId: getEndpoint parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/endpointId' + - $ref: "#/components/parameters/accountId5" + - $ref: "#/components/parameters/endpointId" responses: - '200': - $ref: '#/components/responses/getEndpointResponse' - '400': - $ref: '#/components/responses/badRequestErrorResponse' - '401': - $ref: '#/components/responses/unauthorizedErrorResponse' - '403': - $ref: '#/components/responses/forbiddenErrorResponse' - '404': - $ref: '#/components/responses/notFoundErrorResponse' - '405': - $ref: '#/components/responses/methodNotAllowedErrorResponse' - '415': - $ref: '#/components/responses/unsupportedMediaTypeErrorResponse' - '429': - $ref: '#/components/responses/tooManyRequestsErrorResponse' - '500': - $ref: '#/components/responses/serviceUnavailableErrorResponse' + "200": + $ref: "#/components/responses/getEndpointResponse" + "400": + $ref: "#/components/responses/badRequestErrorResponse" + "401": + $ref: "#/components/responses/unauthorizedErrorResponse" + "403": + $ref: "#/components/responses/forbiddenErrorResponse" + "404": + $ref: "#/components/responses/notFoundErrorResponse" + "405": + $ref: "#/components/responses/methodNotAllowedErrorResponse" + "415": + $ref: "#/components/responses/unsupportedMediaTypeErrorResponse" + "429": + $ref: "#/components/responses/tooManyRequestsErrorResponse" + "500": + $ref: "#/components/responses/serviceUnavailableErrorResponse" delete: tags: - Endpoints @@ -1796,27 +1796,27 @@ paths: media, the media stream will be terminated. operationId: deleteEndpoint parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/endpointId' + - $ref: "#/components/parameters/accountId5" + - $ref: "#/components/parameters/endpointId" responses: - '204': + "204": description: No Content - '400': - $ref: '#/components/responses/badRequestErrorResponse' - '401': - $ref: '#/components/responses/unauthorizedErrorResponse' - '403': - $ref: '#/components/responses/forbiddenErrorResponse' - '404': - $ref: '#/components/responses/notFoundErrorResponse' - '405': - $ref: '#/components/responses/methodNotAllowedErrorResponse' - '415': - $ref: '#/components/responses/unsupportedMediaTypeErrorResponse' - '429': - $ref: '#/components/responses/tooManyRequestsErrorResponse' - '500': - $ref: '#/components/responses/serviceUnavailableErrorResponse' + "400": + $ref: "#/components/responses/badRequestErrorResponse" + "401": + $ref: "#/components/responses/unauthorizedErrorResponse" + "403": + $ref: "#/components/responses/forbiddenErrorResponse" + "404": + $ref: "#/components/responses/notFoundErrorResponse" + "405": + $ref: "#/components/responses/methodNotAllowedErrorResponse" + "415": + $ref: "#/components/responses/unsupportedMediaTypeErrorResponse" + "429": + $ref: "#/components/responses/tooManyRequestsErrorResponse" + "500": + $ref: "#/components/responses/serviceUnavailableErrorResponse" servers: *ref_5 /accounts/{accountId}/endpoints/{endpointId}/bxml: put: @@ -1826,29 +1826,29 @@ paths: description: Updates the BXML for the specified endpoint. operationId: updateEndpointBxml parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/endpointId' + - $ref: "#/components/parameters/accountId5" + - $ref: "#/components/parameters/endpointId" requestBody: - $ref: '#/components/requestBodies/updateEndpointBxmlRequest' + $ref: "#/components/requestBodies/updateEndpointBxmlRequest" responses: - '204': + "204": description: No Content - '400': - $ref: '#/components/responses/badRequestErrorResponse' - '401': - $ref: '#/components/responses/unauthorizedErrorResponse' - '403': - $ref: '#/components/responses/forbiddenErrorResponse' - '404': - $ref: '#/components/responses/notFoundErrorResponse' - '405': - $ref: '#/components/responses/methodNotAllowedErrorResponse' - '415': - $ref: '#/components/responses/unsupportedMediaTypeErrorResponse' - '429': - $ref: '#/components/responses/tooManyRequestsErrorResponse' - '500': - $ref: '#/components/responses/serviceUnavailableErrorResponse' + "400": + $ref: "#/components/responses/badRequestErrorResponse" + "401": + $ref: "#/components/responses/unauthorizedErrorResponse" + "403": + $ref: "#/components/responses/forbiddenErrorResponse" + "404": + $ref: "#/components/responses/notFoundErrorResponse" + "405": + $ref: "#/components/responses/methodNotAllowedErrorResponse" + "415": + $ref: "#/components/responses/unsupportedMediaTypeErrorResponse" + "429": + $ref: "#/components/responses/tooManyRequestsErrorResponse" + "500": + $ref: "#/components/responses/serviceUnavailableErrorResponse" servers: *ref_5 components: schemas: @@ -1943,11 +1943,11 @@ components: has limitTotalCount set to true this value is limited to 10,000. example: 100 pageInfo: - $ref: '#/components/schemas/pageInfo' + $ref: "#/components/schemas/pageInfo" messages: type: array items: - $ref: '#/components/schemas/listMessageItem' + $ref: "#/components/schemas/listMessageItem" listMessageItem: title: listMessageItem type: object @@ -1959,23 +1959,23 @@ components: accountId: type: string description: The account id associated with this message. - example: '9900000' + example: "9900000" sourceTn: type: string description: The source phone number of the message. - example: '+15554443333' + example: "+15554443333" destinationTn: type: string description: The recipient phone number of the message. - example: '+15554442222' + example: "+15554442222" messageStatus: - $ref: '#/components/schemas/messageStatusEnum' + $ref: "#/components/schemas/messageStatusEnum" messageDirection: - $ref: '#/components/schemas/listMessageDirectionEnum' + $ref: "#/components/schemas/listMessageDirectionEnum" messageType: - $ref: '#/components/schemas/messageTypeEnum' + $ref: "#/components/schemas/messageTypeEnum" segmentCount: - $ref: '#/components/schemas/segmentCount' + $ref: "#/components/schemas/segmentCount" errorCode: type: integer description: The numeric error code of the message. @@ -2100,7 +2100,7 @@ components: fieldErrors: type: array items: - $ref: '#/components/schemas/fieldError' + $ref: "#/components/schemas/fieldError" required: - type - description @@ -2141,7 +2141,7 @@ components: expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. - example: '2021-02-01T11:29:18-05:00' + example: "2021-02-01T11:29:18-05:00" carrierName: type: string description: >- @@ -2163,18 +2163,18 @@ components: owner: type: string description: The Bandwidth phone number associated with the message. - example: '+15554443333' + example: "+15554443333" applicationId: - $ref: '#/components/schemas/applicationId' + $ref: "#/components/schemas/applicationId" time: type: string format: date-time description: The datetime stamp of the message in ISO 8601 example: 2024-12-02T20:15:57.278Z segmentCount: - $ref: '#/components/schemas/segmentCount' + $ref: "#/components/schemas/segmentCount" direction: - $ref: '#/components/schemas/messageDirectionEnum' + $ref: "#/components/schemas/messageDirectionEnum" to: uniqueItems: true type: array @@ -2182,11 +2182,11 @@ components: type: string description: The phone number recipients of the message. example: - - '+15552223333' + - "+15552223333" from: type: string description: The phone number the message was sent from. - example: '+15553332222' + example: "+15553332222" media: uniqueItems: true type: array @@ -2204,11 +2204,11 @@ components: description: The contents of the message. example: Hello world tag: - $ref: '#/components/schemas/tag' + $ref: "#/components/schemas/tag" priority: - $ref: '#/components/schemas/priorityEnum' + $ref: "#/components/schemas/priorityEnum" expiration: - $ref: '#/components/schemas/expiration' + $ref: "#/components/schemas/expiration" messageRequest: title: MessageRequest type: object @@ -2218,14 +2218,14 @@ components: - from properties: applicationId: - $ref: '#/components/schemas/applicationId' + $ref: "#/components/schemas/applicationId" to: uniqueItems: true type: array description: The phone number(s) the message should be sent to in E164 format. example: - - '+15554443333' - - '+15552223333' + - "+15554443333" + - "+15552223333" items: type: string from: @@ -2239,17 +2239,17 @@ components: letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. - example: '+15551113333' + example: "+15551113333" text: - $ref: '#/components/schemas/messageText' + $ref: "#/components/schemas/messageText" media: - $ref: '#/components/schemas/messageMedia' + $ref: "#/components/schemas/messageMedia" tag: - $ref: '#/components/schemas/tag' + $ref: "#/components/schemas/tag" priority: - $ref: '#/components/schemas/priorityEnum' + $ref: "#/components/schemas/priorityEnum" expiration: - $ref: '#/components/schemas/expiration' + $ref: "#/components/schemas/expiration" messageText: type: string description: The contents of the text message. Must be 2048 characters or less. @@ -2273,14 +2273,14 @@ components: links: type: array items: - $ref: '#/components/schemas/link' + $ref: "#/components/schemas/link" example: [] data: - $ref: '#/components/schemas/multiChannelMessageResponseData' + $ref: "#/components/schemas/multiChannelMessageResponseData" errors: type: array items: - $ref: '#/components/schemas/errorObject' + $ref: "#/components/schemas/errorObject" example: [] multiChannelError: type: object @@ -2288,7 +2288,7 @@ components: links: type: array items: - $ref: '#/components/schemas/link' + $ref: "#/components/schemas/link" example: [] data: type: object @@ -2297,7 +2297,7 @@ components: errors: type: array items: - $ref: '#/components/schemas/errorObject' + $ref: "#/components/schemas/errorObject" link: type: object properties: @@ -2315,7 +2315,7 @@ components: description: A detailed explanation of the error. type: string source: - $ref: '#/components/schemas/errorSource' + $ref: "#/components/schemas/errorSource" required: - type - description @@ -2352,13 +2352,13 @@ components: multiChannelDestination: type: string description: The phone number the message should be sent to in E164 format. - example: '+15552223333' + example: "+15552223333" multiChannelDestinations: uniqueItems: true type: array description: The destination phone number(s) of the message, in E164 format. example: - - '+15554443333' + - "+15554443333" items: type: string rbmMessageContentText: @@ -2373,7 +2373,7 @@ components: maxLength: 3270 example: Hello world suggestions: - $ref: '#/components/schemas/multiChannelFullActions' + $ref: "#/components/schemas/multiChannelFullActions" required: - text rbmMediaHeightEnum: @@ -2429,9 +2429,9 @@ components: media: type: array items: - $ref: '#/components/schemas/rbmMessageContentFile' + $ref: "#/components/schemas/rbmMessageContentFile" suggestions: - $ref: '#/components/schemas/multiChannelFullActions' + $ref: "#/components/schemas/multiChannelFullActions" required: - media rbmCardContent: @@ -2450,11 +2450,11 @@ components: example: Bandwidth is a communications platform as a service (CPaaS) company. media: allOf: - - $ref: '#/components/schemas/rbmMessageContentFile' + - $ref: "#/components/schemas/rbmMessageContentFile" - type: object properties: height: - $ref: '#/components/schemas/rbmMediaHeightEnum' + $ref: "#/components/schemas/rbmMediaHeightEnum" required: - height suggestions: @@ -2463,20 +2463,20 @@ components: displayed on the rich card. type: array items: - $ref: '#/components/schemas/multiChannelAction' + $ref: "#/components/schemas/multiChannelAction" maxItems: 4 rbmStandaloneCard: title: Standalone Card type: object properties: orientation: - $ref: '#/components/schemas/standaloneCardOrientationEnum' + $ref: "#/components/schemas/standaloneCardOrientationEnum" thumbnailImageAlignment: - $ref: '#/components/schemas/thumbnailAlignmentEnum' + $ref: "#/components/schemas/thumbnailAlignmentEnum" cardContent: - $ref: '#/components/schemas/rbmCardContent' + $ref: "#/components/schemas/rbmCardContent" suggestions: - $ref: '#/components/schemas/multiChannelFullActions' + $ref: "#/components/schemas/multiChannelFullActions" required: - orientation - cardContent @@ -2500,15 +2500,15 @@ components: type: object properties: cardWidth: - $ref: '#/components/schemas/cardWidthEnum' + $ref: "#/components/schemas/cardWidthEnum" cardContents: type: array items: - $ref: '#/components/schemas/rbmCardContent' + $ref: "#/components/schemas/rbmCardContent" minItems: 2 maxItems: 10 suggestions: - $ref: '#/components/schemas/multiChannelFullActions' + $ref: "#/components/schemas/multiChannelFullActions" required: - cardContents - cardWidth @@ -2523,7 +2523,7 @@ components: type: object properties: text: - $ref: '#/components/schemas/messageText' + $ref: "#/components/schemas/messageText" required: - text mmsMessageContent: @@ -2531,16 +2531,16 @@ components: type: object properties: text: - $ref: '#/components/schemas/messageText' + $ref: "#/components/schemas/messageText" media: type: array items: - $ref: '#/components/schemas/mmsMessageContentFile' + $ref: "#/components/schemas/mmsMessageContentFile" rbmMessageContentRichCard: title: RBM Rich Card oneOf: - - $ref: '#/components/schemas/rbmStandaloneCard' - - $ref: '#/components/schemas/rbmMessageCarouselCard' + - $ref: "#/components/schemas/rbmStandaloneCard" + - $ref: "#/components/schemas/rbmMessageCarouselCard" rbmActionTypeEnum: type: string enum: @@ -2601,30 +2601,30 @@ components: type: object properties: type: - $ref: '#/components/schemas/rbmActionTypeEnum' + $ref: "#/components/schemas/rbmActionTypeEnum" text: - $ref: '#/components/schemas/rbmActionText' + $ref: "#/components/schemas/rbmActionText" postbackData: - $ref: '#/components/schemas/rbmActionPostbackData' + $ref: "#/components/schemas/rbmActionPostbackData" required: - text - postbackData - type rbmActionDial: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - title: Dial Phone type: object properties: phoneNumber: type: string description: The phone number to dial. Must be E164 format. - example: '+15552223333' + example: "+15552223333" required: - phoneNumber rbmActionViewLocation: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - title: Show Location type: object properties: @@ -2634,14 +2634,14 @@ components: description: >- The latitude of the location. Must be in range [-90.000000, 90.000000]. - example: '37.7749' + example: "37.7749" longitude: type: string format: double description: >- The longitude of the location. Must be in range [-180.000000, 180.000000]. - example: '-122.4194' + example: "-122.4194" label: type: string description: The label of the location. @@ -2652,7 +2652,7 @@ components: - longitude multiChannelActionCalendarEvent: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - title: Calendar Event type: object properties: @@ -2686,7 +2686,7 @@ components: - endTime rbmActionOpenUrl: allOf: - - $ref: '#/components/schemas/rbmActionBase' + - $ref: "#/components/schemas/rbmActionBase" - title: Open URL type: object properties: @@ -2697,100 +2697,100 @@ components: example: https://dev.bandwidth.com maxLength: 2048 application: - $ref: '#/components/schemas/rbmOpenUrlEnum' + $ref: "#/components/schemas/rbmOpenUrlEnum" webviewViewMode: - $ref: '#/components/schemas/rbmWebViewEnum' + $ref: "#/components/schemas/rbmWebViewEnum" required: - url multiChannelFullActions: type: array description: An array of suggested actions for the recipient. items: - $ref: '#/components/schemas/multiChannelAction' + $ref: "#/components/schemas/multiChannelAction" maxItems: 11 multiChannelAction: anyOf: - - $ref: '#/components/schemas/rbmActionBase' - - $ref: '#/components/schemas/rbmActionDial' - - $ref: '#/components/schemas/rbmActionViewLocation' - - $ref: '#/components/schemas/multiChannelActionCalendarEvent' - - $ref: '#/components/schemas/rbmActionOpenUrl' + - $ref: "#/components/schemas/rbmActionBase" + - $ref: "#/components/schemas/rbmActionDial" + - $ref: "#/components/schemas/rbmActionViewLocation" + - $ref: "#/components/schemas/multiChannelActionCalendarEvent" + - $ref: "#/components/schemas/rbmActionOpenUrl" discriminator: propertyName: type mapping: - REPLY: '#/components/schemas/rbmActionBase' - DIAL_PHONE: '#/components/schemas/rbmActionDial' - SHOW_LOCATION: '#/components/schemas/rbmActionViewLocation' - CREATE_CALENDAR_EVENT: '#/components/schemas/multiChannelActionCalendarEvent' - OPEN_URL: '#/components/schemas/rbmActionOpenUrl' - REQUEST_LOCATION: '#/components/schemas/rbmActionBase' + REPLY: "#/components/schemas/rbmActionBase" + DIAL_PHONE: "#/components/schemas/rbmActionDial" + SHOW_LOCATION: "#/components/schemas/rbmActionViewLocation" + CREATE_CALENDAR_EVENT: "#/components/schemas/multiChannelActionCalendarEvent" + OPEN_URL: "#/components/schemas/rbmActionOpenUrl" + REQUEST_LOCATION: "#/components/schemas/rbmActionBase" multiChannelChannelListObjectBase: type: object properties: from: - $ref: '#/components/schemas/multiChannelSenderId' + $ref: "#/components/schemas/multiChannelSenderId" applicationId: - $ref: '#/components/schemas/applicationId' + $ref: "#/components/schemas/applicationId" channel: - $ref: '#/components/schemas/multiChannelMessageChannelEnum' + $ref: "#/components/schemas/multiChannelMessageChannelEnum" required: - from - applicationId - channel multiChannelChannelListRBMObject: allOf: - - $ref: '#/components/schemas/multiChannelChannelListObjectBase' + - $ref: "#/components/schemas/multiChannelChannelListObjectBase" - type: object properties: content: description: The content of the message. oneOf: - - $ref: '#/components/schemas/rbmMessageContentText' - - $ref: '#/components/schemas/rbmMessageMedia' - - $ref: '#/components/schemas/rbmMessageContentRichCard' + - $ref: "#/components/schemas/rbmMessageContentText" + - $ref: "#/components/schemas/rbmMessageMedia" + - $ref: "#/components/schemas/rbmMessageContentRichCard" required: - content multiChannelChannelListSMSObject: allOf: - - $ref: '#/components/schemas/multiChannelChannelListObjectBase' + - $ref: "#/components/schemas/multiChannelChannelListObjectBase" - type: object properties: content: - $ref: '#/components/schemas/smsMessageContent' + $ref: "#/components/schemas/smsMessageContent" required: - content multiChannelChannelListMMSObject: allOf: - - $ref: '#/components/schemas/multiChannelChannelListObjectBase' + - $ref: "#/components/schemas/multiChannelChannelListObjectBase" - type: object properties: content: - $ref: '#/components/schemas/mmsMessageContent' + $ref: "#/components/schemas/mmsMessageContent" required: - content multiChannelChannelListRBMResponseObject: allOf: - - $ref: '#/components/schemas/multiChannelChannelListRBMObject' - - $ref: '#/components/schemas/multiChannelChannelListOwnerObject' + - $ref: "#/components/schemas/multiChannelChannelListRBMObject" + - $ref: "#/components/schemas/multiChannelChannelListOwnerObject" multiChannelChannelListSMSResponseObject: allOf: - - $ref: '#/components/schemas/multiChannelChannelListSMSObject' - - $ref: '#/components/schemas/multiChannelChannelListOwnerObject' + - $ref: "#/components/schemas/multiChannelChannelListSMSObject" + - $ref: "#/components/schemas/multiChannelChannelListOwnerObject" multiChannelChannelListMMSResponseObject: allOf: - - $ref: '#/components/schemas/multiChannelChannelListMMSObject' - - $ref: '#/components/schemas/multiChannelChannelListOwnerObject' + - $ref: "#/components/schemas/multiChannelChannelListMMSObject" + - $ref: "#/components/schemas/multiChannelChannelListOwnerObject" multiChannelChannelListRequestObject: anyOf: - - $ref: '#/components/schemas/multiChannelChannelListRBMObject' - - $ref: '#/components/schemas/multiChannelChannelListSMSObject' - - $ref: '#/components/schemas/multiChannelChannelListMMSObject' + - $ref: "#/components/schemas/multiChannelChannelListRBMObject" + - $ref: "#/components/schemas/multiChannelChannelListSMSObject" + - $ref: "#/components/schemas/multiChannelChannelListMMSObject" discriminator: propertyName: channel mapping: - RBM: '#/components/schemas/multiChannelChannelListRBMObject' - SMS: '#/components/schemas/multiChannelChannelListSMSObject' - MMS: '#/components/schemas/multiChannelChannelListMMSObject' + RBM: "#/components/schemas/multiChannelChannelListRBMObject" + SMS: "#/components/schemas/multiChannelChannelListSMSObject" + MMS: "#/components/schemas/multiChannelChannelListMMSObject" multiChannelChannelListOwnerObject: type: object properties: @@ -2803,21 +2803,21 @@ components: - owner multiChannelChannelListResponseObject: anyOf: - - $ref: '#/components/schemas/multiChannelChannelListRBMResponseObject' - - $ref: '#/components/schemas/multiChannelChannelListSMSResponseObject' - - $ref: '#/components/schemas/multiChannelChannelListMMSResponseObject' + - $ref: "#/components/schemas/multiChannelChannelListRBMResponseObject" + - $ref: "#/components/schemas/multiChannelChannelListSMSResponseObject" + - $ref: "#/components/schemas/multiChannelChannelListMMSResponseObject" discriminator: propertyName: channel mapping: - RBM: '#/components/schemas/multiChannelChannelListRBMResponseObject' - SMS: '#/components/schemas/multiChannelChannelListSMSResponseObject' - MMS: '#/components/schemas/multiChannelChannelListMMSResponseObject' + RBM: "#/components/schemas/multiChannelChannelListRBMResponseObject" + SMS: "#/components/schemas/multiChannelChannelListSMSResponseObject" + MMS: "#/components/schemas/multiChannelChannelListMMSResponseObject" multiChannelMessageRequest: description: Multi-Channel Message Request type: object properties: to: - $ref: '#/components/schemas/multiChannelDestination' + $ref: "#/components/schemas/multiChannelDestination" channelList: type: array description: >- @@ -2825,14 +2825,14 @@ components: order they are listed. Once a message sends successfully, the others will be ignored. items: - $ref: '#/components/schemas/multiChannelChannelListRequestObject' + $ref: "#/components/schemas/multiChannelChannelListRequestObject" maxItems: 4 tag: - $ref: '#/components/schemas/tag' + $ref: "#/components/schemas/tag" priority: - $ref: '#/components/schemas/priorityEnum' + $ref: "#/components/schemas/priorityEnum" expiration: - $ref: '#/components/schemas/expiration' + $ref: "#/components/schemas/expiration" required: - to - channelList @@ -2841,16 +2841,16 @@ components: type: object properties: id: - $ref: '#/components/schemas/id' + $ref: "#/components/schemas/id" time: description: The time the message was received by the Bandwidth API. type: string format: date-time example: 2025-01-01T18:20:16.000Z direction: - $ref: '#/components/schemas/messageDirectionEnum' + $ref: "#/components/schemas/messageDirectionEnum" to: - $ref: '#/components/schemas/multiChannelDestinations' + $ref: "#/components/schemas/multiChannelDestinations" channelList: type: array description: >- @@ -2858,14 +2858,14 @@ components: order they are listed. Once a message sends successfully, the others will be ignored. items: - $ref: '#/components/schemas/multiChannelChannelListResponseObject' + $ref: "#/components/schemas/multiChannelChannelListResponseObject" maxItems: 4 tag: - $ref: '#/components/schemas/tag' + $ref: "#/components/schemas/tag" priority: - $ref: '#/components/schemas/priorityEnum' + $ref: "#/components/schemas/priorityEnum" expiration: - $ref: '#/components/schemas/expiration' + $ref: "#/components/schemas/expiration" required: - id - time @@ -2879,7 +2879,7 @@ components: text: type: string media: - $ref: '#/components/schemas/rbmMessageContentFile' + $ref: "#/components/schemas/rbmMessageContentFile" rbmSuggestionResponse: type: object properties: @@ -2888,7 +2888,7 @@ components: description: The text associated with the suggestion response. example: Yes, I would like to proceed postbackData: - $ref: '#/components/schemas/rbmActionPostbackData' + $ref: "#/components/schemas/rbmActionPostbackData" pairedMessageId: type: string nullable: true @@ -2901,12 +2901,12 @@ components: type: string format: double description: The latitude of the client's location. - example: '37.7749' + example: "37.7749" longitude: type: string format: double description: The longitude of the client's location. - example: '-122.4194' + example: "-122.4194" callback: description: >- Callbacks are divided into two types based on direction of the related @@ -2919,19 +2919,19 @@ components: message client's response to a suggestion or location request. type: object oneOf: - - $ref: '#/components/schemas/statusCallback' - - $ref: '#/components/schemas/inboundCallback' + - $ref: "#/components/schemas/statusCallback" + - $ref: "#/components/schemas/inboundCallback" discriminator: propertyName: type mapping: - message-sending: '#/components/schemas/statusCallback' - message-sent: '#/components/schemas/statusCallback' - message-delivered: '#/components/schemas/statusCallback' - message-failed: '#/components/schemas/statusCallback' - message-read: '#/components/schemas/statusCallback' - message-received: '#/components/schemas/inboundCallback' - requested-location-response: '#/components/schemas/inboundCallback' - suggestion-response: '#/components/schemas/inboundCallback' + message-sending: "#/components/schemas/statusCallback" + message-sent: "#/components/schemas/statusCallback" + message-delivered: "#/components/schemas/statusCallback" + message-failed: "#/components/schemas/statusCallback" + message-read: "#/components/schemas/statusCallback" + message-received: "#/components/schemas/inboundCallback" + requested-location-response: "#/components/schemas/inboundCallback" + suggestion-response: "#/components/schemas/inboundCallback" statusCallback: type: object description: >- @@ -2950,7 +2950,7 @@ components: format: date-time example: 2024-12-02T20:15:58.278Z type: - $ref: '#/components/schemas/statusCallbackTypeEnum' + $ref: "#/components/schemas/statusCallbackTypeEnum" to: type: string description: >- @@ -2958,19 +2958,19 @@ components: For status callbacks, this the the Bandwidth user's client phone number. - example: '+15552223333' + example: "+15552223333" description: type: string description: A detailed description of the event described by the callback. example: Message delivered to handset. message: - $ref: '#/components/schemas/statusCallbackMessage' + $ref: "#/components/schemas/statusCallbackMessage" errorCode: type: integer description: Optional error code, applicable only when type is `message-failed`. example: 4405 carrierName: - $ref: '#/components/schemas/carrierName' + $ref: "#/components/schemas/carrierName" required: - time - type @@ -2986,7 +2986,7 @@ components: format: date-time example: 2024-12-02T20:15:57.278Z type: - $ref: '#/components/schemas/inboundCallbackTypeEnum' + $ref: "#/components/schemas/inboundCallbackTypeEnum" to: type: string description: > @@ -2994,15 +2994,15 @@ components: For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. - example: '+15552223333' + example: "+15552223333" description: type: string description: A detailed description of the event described by the callback. example: Incoming message received message: - $ref: '#/components/schemas/inboundCallbackMessage' + $ref: "#/components/schemas/inboundCallbackMessage" carrierName: - $ref: '#/components/schemas/carrierName' + $ref: "#/components/schemas/carrierName" required: - time - type @@ -3069,17 +3069,17 @@ components: description: >- The Bandwidth phone number or alphanumeric identifier associated with the message. - example: '+15553332222' + example: "+15553332222" applicationId: - $ref: '#/components/schemas/applicationId' + $ref: "#/components/schemas/applicationId" time: type: string format: date-time example: 2024-12-02T20:15:57.666Z segmentCount: - $ref: '#/components/schemas/segmentCount' + $ref: "#/components/schemas/segmentCount" direction: - $ref: '#/components/schemas/messageDirectionEnum' + $ref: "#/components/schemas/messageDirectionEnum" to: description: The phone number recipients of the message. uniqueItems: true @@ -3087,18 +3087,18 @@ components: items: type: string example: - - '+15552223333' + - "+15552223333" from: type: string description: >- The Bandwidth phone number or alphanumeric identifier the message was sent from. - example: '+15553332222' + example: "+15553332222" text: type: string example: Hello world tag: - $ref: '#/components/schemas/tag' + $ref: "#/components/schemas/tag" media: type: array description: Optional media, not applicable for sms @@ -3109,9 +3109,9 @@ components: - https://dev.bandwidth.com/images/bandwidth-logo.png - https://dev.bandwidth.com/images/github_logo.png priority: - $ref: '#/components/schemas/priorityEnum' + $ref: "#/components/schemas/priorityEnum" channel: - $ref: '#/components/schemas/multiChannelMessageChannelEnum' + $ref: "#/components/schemas/multiChannelMessageChannelEnum" required: - id - owner @@ -3123,15 +3123,15 @@ components: - from inboundCallbackMessage: allOf: - - $ref: '#/components/schemas/statusCallbackMessage' + - $ref: "#/components/schemas/statusCallbackMessage" - type: object properties: content: - $ref: '#/components/schemas/multiChannelMessageContent' + $ref: "#/components/schemas/multiChannelMessageContent" suggestionResponse: - $ref: '#/components/schemas/rbmSuggestionResponse' + $ref: "#/components/schemas/rbmSuggestionResponse" locationResponse: - $ref: '#/components/schemas/rbmLocationResponse' + $ref: "#/components/schemas/rbmLocationResponse" required: - id - owner @@ -3184,6 +3184,13 @@ components: - outbound description: The direction of the call. example: inbound + referCallStatusEnum: + type: string + enum: + - success + - failure + description: The outcome of the REFER operation. + example: success fileFormatEnum: type: string enum: @@ -3266,7 +3273,7 @@ components: (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.example`)). - example: '+19195551234' + example: "+19195551234" from: type: string description: >- @@ -3274,7 +3281,7 @@ components: from (must be in E.164 format, like `+15555551212`) even if `privacy` is set to true. - example: '+15555551212' + example: "+15555551212" privacy: nullable: true type: boolean @@ -3337,7 +3344,7 @@ components: maxLength: 2048 example: https://www.myCallbackServer.example/webhooks/answer answerMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" username: type: string nullable: true @@ -3365,7 +3372,7 @@ components: maxLength: 2048 example: https://www.myFallbackServer.example/webhooks/answer answerFallbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" fallbackUsername: type: string nullable: true @@ -3389,7 +3396,7 @@ components: maxLength: 2048 example: https://www.myCallbackServer.example/webhooks/disconnect disconnectMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" callTimeout: nullable: true type: number @@ -3424,7 +3431,7 @@ components: default: 15 example: 15 machineDetection: - $ref: '#/components/schemas/machineDetectionConfiguration' + $ref: "#/components/schemas/machineDetectionConfiguration" priority: nullable: true type: integer @@ -3486,7 +3493,7 @@ components: description: The id of the application associated with the `from` number. accountId: type: string - example: '9900000' + example: "9900000" description: The bandwidth account ID associated with the call. callId: type: string @@ -3494,18 +3501,18 @@ components: description: Programmable Voice API Call ID. to: type: string - example: '+19195551234' + example: "+19195551234" description: Recipient of the outgoing call. from: type: string - example: '+19195554321' + example: "+19195554321" description: Phone number that created the outbound call. enqueuedTime: nullable: true type: string format: date-time description: The time at which the call was accepted into the queue. - example: '2022-06-16T13:15:07.160Z' + example: "2022-06-16T13:15:07.160Z" callUrl: type: string format: uri @@ -3532,14 +3539,14 @@ components: example: My custom tag value description: Custom tag value. answerMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" answerUrl: type: string format: uri example: https://myServer.example/bandwidth/webhooks/answer description: URL to deliver the `answer` event webhook. answerFallbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" answerFallbackUrl: nullable: true type: string @@ -3547,7 +3554,7 @@ components: example: https://myFallbackServer.example/bandwidth/webhooks/answer description: Fallback URL to deliver the `answer` event webhook. disconnectMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" disconnectUrl: nullable: true type: string @@ -3593,7 +3600,7 @@ components: accountId: type: string description: The account id associated with the call. - example: '9900000' + example: "9900000" callId: type: string description: The programmable voice API call ID. @@ -3610,15 +3617,15 @@ components: description: >- The phone number that received the call, in E.164 format (e.g. +15555555555), or if the call was to a SIP URI, the SIP URI. - example: '+19195551234' + example: "+19195551234" from: type: string description: >- The phone number that made the call, in E.164 format (e.g. +15555555555). - example: '+19195554321' + example: "+19195554321" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" state: description: >- The current state of the call. Current possible values are @@ -3688,7 +3695,7 @@ components: type: string format: date-time description: The time this call was placed in queue. - example: '2022-06-16T13:15:07.160Z' + example: "2022-06-16T13:15:07.160Z" startTime: nullable: true type: string @@ -3696,7 +3703,7 @@ components: description: >- The time the call was initiated, in ISO 8601 format. `null` if the call is still in your queue. - example: '2022-06-16T13:15:07.160Z' + example: "2022-06-16T13:15:07.160Z" answerTime: nullable: true type: string @@ -3704,13 +3711,13 @@ components: description: >- Populated once the call has been answered, with the time in ISO 8601 format. - example: '2022-06-16T13:15:18.126Z' + example: "2022-06-16T13:15:18.126Z" endTime: nullable: true type: string format: date-time description: Populated once the call has ended, with the time in ISO 8601 format. - example: '2022-06-16T13:15:18.314Z' + example: "2022-06-16T13:15:18.314Z" disconnectCause: nullable: true type: string @@ -3773,12 +3780,12 @@ components: type: string format: date-time description: The last time the call had a state update, in ISO 8601 format. - example: '2022-06-16T13:15:18.314Z' + example: "2022-06-16T13:15:18.314Z" updateCall: type: object properties: state: - $ref: '#/components/schemas/callStateEnum' + $ref: "#/components/schemas/callStateEnum" redirectUrl: description: |- The URL to send the [Redirect](/docs/voice/bxml/redirect) event @@ -3792,7 +3799,7 @@ components: format: uri example: https://myServer.example/bandwidth/webhooks/redirect redirectMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" username: type: string nullable: true @@ -3814,7 +3821,7 @@ components: redirect callback delivery in case `redirectUrl` fails to respond. example: https://myFallbackServer.example/bandwidth/webhooks/redirect redirectFallbackMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" fallbackUsername: type: string nullable: true @@ -3854,7 +3861,7 @@ components: - state properties: state: - $ref: '#/components/schemas/recordingStateEnum' + $ref: "#/components/schemas/recordingStateEnum" accountStatistics: type: object properties: @@ -3872,43 +3879,43 @@ components: type: object properties: applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" parentCallId: - $ref: '#/components/schemas/parentCallId' + $ref: "#/components/schemas/parentCallId" recordingId: - $ref: '#/components/schemas/recordingId' + $ref: "#/components/schemas/recordingId" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" transferCallerId: - $ref: '#/components/schemas/transferCallerId' + $ref: "#/components/schemas/transferCallerId" transferTo: - $ref: '#/components/schemas/transferTo' + $ref: "#/components/schemas/transferTo" duration: - $ref: '#/components/schemas/duration' + $ref: "#/components/schemas/duration" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" channels: - $ref: '#/components/schemas/channels' + $ref: "#/components/schemas/channels" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" endTime: - $ref: '#/components/schemas/endTime' + $ref: "#/components/schemas/endTime" fileFormat: - $ref: '#/components/schemas/fileFormatEnum' + $ref: "#/components/schemas/fileFormatEnum" status: - $ref: '#/components/schemas/status' + $ref: "#/components/schemas/status" mediaUrl: - $ref: '#/components/schemas/mediaUrl' + $ref: "#/components/schemas/mediaUrl" transcription: - $ref: '#/components/schemas/recordingTranscriptionMetadata' + $ref: "#/components/schemas/recordingTranscriptionMetadata" recordingName: - $ref: '#/components/schemas/recordingName' + $ref: "#/components/schemas/recordingName" conference: type: object properties: @@ -3924,13 +3931,13 @@ components: type: string format: date-time description: The time the conference was initiated, in ISO 8601 format. - example: '2022-06-17T22:19:40.375Z' + example: "2022-06-17T22:19:40.375Z" completedTime: nullable: true type: string format: date-time description: The time the conference was terminated, in ISO 8601 format. - example: '2022-06-17T22:20:00.000Z' + example: "2022-06-17T22:20:00.000Z" conferenceEventUrl: nullable: true type: string @@ -3938,7 +3945,7 @@ components: description: The URL to send the conference-related events. example: https://myServer.example/bandwidth/webhooks/conferenceEvent conferenceEventMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" tag: nullable: true type: string @@ -3950,7 +3957,7 @@ components: type: array nullable: true items: - $ref: '#/components/schemas/conferenceMember' + $ref: "#/components/schemas/conferenceMember" description: >- A list of active members of the conference. Omitted if this @@ -3960,7 +3967,7 @@ components: type: object properties: status: - $ref: '#/components/schemas/conferenceStateEnum' + $ref: "#/components/schemas/conferenceStateEnum" redirectUrl: nullable: true type: string @@ -3975,7 +3982,7 @@ components: but required if `state` is `active`. example: https://myServer.example/bandwidth/webhooks/conferenceRedirect redirectMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" username: type: string nullable: true @@ -4002,7 +4009,7 @@ components: example: >- https://myFallbackServer.example/bandwidth/webhooks/conferenceRedirect redirectFallbackMethod: - $ref: '#/components/schemas/redirectMethodEnum' + $ref: "#/components/schemas/redirectMethodEnum" fallbackUsername: type: string nullable: true @@ -4019,9 +4026,9 @@ components: type: object properties: callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" conferenceId: - $ref: '#/components/schemas/conferenceId' + $ref: "#/components/schemas/conferenceId" memberUrl: type: string format: uri @@ -4129,29 +4136,29 @@ components: type: object properties: accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" conferenceId: - $ref: '#/components/schemas/conferenceId' + $ref: "#/components/schemas/conferenceId" name: - $ref: '#/components/schemas/name' + $ref: "#/components/schemas/name" recordingId: - $ref: '#/components/schemas/recordingId' + $ref: "#/components/schemas/recordingId" duration: - $ref: '#/components/schemas/duration' + $ref: "#/components/schemas/duration" channels: - $ref: '#/components/schemas/channels' + $ref: "#/components/schemas/channels" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" endTime: - $ref: '#/components/schemas/endTime' + $ref: "#/components/schemas/endTime" fileFormat: - $ref: '#/components/schemas/fileFormatEnum' + $ref: "#/components/schemas/fileFormatEnum" status: - $ref: '#/components/schemas/status' + $ref: "#/components/schemas/status" mediaUrl: - $ref: '#/components/schemas/mediaUrl' + $ref: "#/components/schemas/mediaUrl" recordingName: - $ref: '#/components/schemas/recordingName' + $ref: "#/components/schemas/recordingName" machineDetectionConfiguration: type: object description: >- @@ -4163,7 +4170,7 @@ components: information. properties: mode: - $ref: '#/components/schemas/machineDetectionModeEnum' + $ref: "#/components/schemas/machineDetectionModeEnum" detectionTimeout: nullable: true type: number @@ -4252,7 +4259,7 @@ components: maxLength: 2048 example: https://myServer.example/bandwidth/webhooks/machineDetectionComplete callbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" username: type: string nullable: true @@ -4280,7 +4287,7 @@ components: example: >- https://myFallbackServer.example/bandwidth/webhooks/machineDetectionComplete fallbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" fallbackUsername: type: string nullable: true @@ -4312,7 +4319,7 @@ components: password fields for authorization. example: https://myServer.example/bandwidth/webhooks/transcriptionAvailable callbackMethod: - $ref: '#/components/schemas/callbackMethodEnum' + $ref: "#/components/schemas/callbackMethodEnum" username: type: string nullable: true @@ -4326,7 +4333,7 @@ components: maxLength: 1024 example: mySecretPassword1! tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" callbackTimeout: nullable: true type: number @@ -4358,14 +4365,14 @@ components: transcripts: type: array items: - $ref: '#/components/schemas/transcription' + $ref: "#/components/schemas/transcription" clips: type: array description: >- A list of individual speech clips with speaker, timing, and confidence information. items: - $ref: '#/components/schemas/recordingTranscriptionClip' + $ref: "#/components/schemas/recordingTranscriptionClip" example: transcripts: - speaker: 0 @@ -4428,7 +4435,7 @@ components: callTranscriptionMetadataList: type: array items: - $ref: '#/components/schemas/callTranscriptionMetadata' + $ref: "#/components/schemas/callTranscriptionMetadata" example: - transcriptionId: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b transcriptionName: live_transcription @@ -4464,7 +4471,7 @@ components: accountId: type: string description: The user account associated with the call. - example: '9900000' + example: "9900000" callId: type: string description: The call id associated with the event. @@ -4476,7 +4483,7 @@ components: tracks: type: array items: - $ref: '#/components/schemas/callTranscription' + $ref: "#/components/schemas/callTranscription" example: - detectedLanguage: en-US track: inbound @@ -4486,9 +4493,9 @@ components: type: object properties: detectedLanguage: - $ref: '#/components/schemas/callTranscriptionDetectedLanguageEnum' + $ref: "#/components/schemas/callTranscriptionDetectedLanguageEnum" track: - $ref: '#/components/schemas/callTranscriptionTrackEnum' + $ref: "#/components/schemas/callTranscriptionTrackEnum" transcript: type: string description: The transcription itself. @@ -4512,12 +4519,12 @@ components: description: The unique transcription ID example: t-387bd648-18f3-4823-9d16-746bca0003c9 status: - $ref: '#/components/schemas/status' + $ref: "#/components/schemas/status" completedTime: type: string format: date-time description: The time that the transcription was completed - example: '2022-06-13T18:46:29.715Z' + example: "2022-06-13T18:46:29.715Z" url: type: string format: uri @@ -4541,33 +4548,35 @@ components: request when an outbound call is answered. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" answerTime: - $ref: '#/components/schemas/answerTime' + $ref: "#/components/schemas/answerTime" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" machineDetectionResult: - $ref: '#/components/schemas/machineDetectionResult' + $ref: "#/components/schemas/machineDetectionResult" + sipCallId: + $ref: "#/components/schemas/sipCallId" bridgeCompleteCallback: type: object description: >- @@ -4578,37 +4587,37 @@ components: calls to be bridged. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" answerTime: - $ref: '#/components/schemas/answerTime' + $ref: "#/components/schemas/answerTime" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" cause: - $ref: '#/components/schemas/cause' + $ref: "#/components/schemas/cause" errorMessage: - $ref: '#/components/schemas/errorMessage' + $ref: "#/components/schemas/errorMessage" errorId: - $ref: '#/components/schemas/errorId' + $ref: "#/components/schemas/errorId" bridgeTargetCompleteCallback: type: object description: >- @@ -4618,31 +4627,31 @@ components: is NOT sent. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" answerTime: - $ref: '#/components/schemas/answerTime' + $ref: "#/components/schemas/answerTime" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" conferenceCreatedCallback: type: object description: >- @@ -4656,15 +4665,15 @@ components: conference. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" conferenceId: - $ref: '#/components/schemas/conferenceId' + $ref: "#/components/schemas/conferenceId" name: - $ref: '#/components/schemas/name' + $ref: "#/components/schemas/name" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" conferenceRedirectCallback: type: object description: >- @@ -4678,15 +4687,15 @@ components: audio verbs that are played into the conference. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" conferenceId: - $ref: '#/components/schemas/conferenceId' + $ref: "#/components/schemas/conferenceId" name: - $ref: '#/components/schemas/name' + $ref: "#/components/schemas/name" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" conferenceMemberJoinCallback: type: object description: >- @@ -4700,21 +4709,21 @@ components: into the conference. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" conferenceId: - $ref: '#/components/schemas/conferenceId' + $ref: "#/components/schemas/conferenceId" name: - $ref: '#/components/schemas/name' + $ref: "#/components/schemas/name" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" conferenceMemberExitCallback: type: object description: >- @@ -4728,21 +4737,21 @@ components: into the conference. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" conferenceId: - $ref: '#/components/schemas/conferenceId' + $ref: "#/components/schemas/conferenceId" name: - $ref: '#/components/schemas/name' + $ref: "#/components/schemas/name" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" conferenceCompletedCallback: type: object description: >- @@ -4750,15 +4759,15 @@ components: conference. The response to this event may not contain BXML. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" conferenceId: - $ref: '#/components/schemas/conferenceId' + $ref: "#/components/schemas/conferenceId" name: - $ref: '#/components/schemas/name' + $ref: "#/components/schemas/name" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" conferenceRecordingAvailableCallback: type: object description: >- @@ -4767,71 +4776,75 @@ components: available for download. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" conferenceId: - $ref: '#/components/schemas/conferenceId' + $ref: "#/components/schemas/conferenceId" name: - $ref: '#/components/schemas/name' + $ref: "#/components/schemas/name" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" recordingId: - $ref: '#/components/schemas/recordingId' + $ref: "#/components/schemas/recordingId" channels: - $ref: '#/components/schemas/channels' + $ref: "#/components/schemas/channels" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" endTime: - $ref: '#/components/schemas/endTime' + $ref: "#/components/schemas/endTime" duration: - $ref: '#/components/schemas/duration' + $ref: "#/components/schemas/duration" fileFormat: - $ref: '#/components/schemas/fileFormatEnum' + $ref: "#/components/schemas/fileFormatEnum" mediaUrl: - $ref: '#/components/schemas/mediaUrl' + $ref: "#/components/schemas/mediaUrl" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" status: - $ref: '#/components/schemas/status' + $ref: "#/components/schemas/status" disconnectCallback: type: object description: The Disconnect event is fired when a call ends, for any reason. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" answerTime: - $ref: '#/components/schemas/answerTime' + $ref: "#/components/schemas/answerTime" endTime: - $ref: '#/components/schemas/endTime' + $ref: "#/components/schemas/endTime" cause: - $ref: '#/components/schemas/cause' + $ref: "#/components/schemas/cause" errorMessage: - $ref: '#/components/schemas/errorMessage' + $ref: "#/components/schemas/errorMessage" errorId: - $ref: '#/components/schemas/errorId' + $ref: "#/components/schemas/errorId" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" + sipCallId: + $ref: "#/components/schemas/sipCallId" + sipResponseCode: + $ref: "#/components/schemas/sipResponseCode" dtmfCallback: type: object description: >- @@ -4839,39 +4852,39 @@ components: verb is executed. You may not respond to this event with BXML. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" digit: - $ref: '#/components/schemas/digit' + $ref: "#/components/schemas/digit" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" answerTime: - $ref: '#/components/schemas/answerTime' + $ref: "#/components/schemas/answerTime" parentCallId: - $ref: '#/components/schemas/parentCallId' + $ref: "#/components/schemas/parentCallId" transferCallerId: - $ref: '#/components/schemas/transferCallerId' + $ref: "#/components/schemas/transferCallerId" transferTo: - $ref: '#/components/schemas/transferTo' + $ref: "#/components/schemas/transferTo" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" gatherCallback: type: object description: >- @@ -4879,41 +4892,41 @@ components: is to report the gathered digits to the calling application. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" digits: - $ref: '#/components/schemas/digits' + $ref: "#/components/schemas/digits" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" answerTime: - $ref: '#/components/schemas/answerTime' + $ref: "#/components/schemas/answerTime" parentCallId: - $ref: '#/components/schemas/parentCallId' + $ref: "#/components/schemas/parentCallId" terminatingDigit: - $ref: '#/components/schemas/terminatingDigit' + $ref: "#/components/schemas/terminatingDigit" transferCallerId: - $ref: '#/components/schemas/transferCallerId' + $ref: "#/components/schemas/transferCallerId" transferTo: - $ref: '#/components/schemas/transferTo' + $ref: "#/components/schemas/transferTo" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" initiateCallback: type: object description: >- @@ -4923,31 +4936,35 @@ components: telephone number belongs to. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" diversion: - $ref: '#/components/schemas/diversion' + $ref: "#/components/schemas/diversion" stirShaken: - $ref: '#/components/schemas/stirShaken' + $ref: "#/components/schemas/stirShaken" uui: - $ref: '#/components/schemas/uui' + $ref: "#/components/schemas/uui" + sipCallId: + $ref: "#/components/schemas/sipCallId" + sipHeaders: + $ref: "#/components/schemas/sipHeaders" machineDetectionCompleteCallback: type: object description: >- @@ -4957,33 +4974,33 @@ components: event is not sent when sync answering machine detection mode is chosen. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" answerTime: - $ref: '#/components/schemas/answerTime' + $ref: "#/components/schemas/answerTime" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" machineDetectionResult: - $ref: '#/components/schemas/machineDetectionResult' + $ref: "#/components/schemas/machineDetectionResult" recordingCompleteCallback: type: object description: >- @@ -4993,49 +5010,49 @@ components: Available event will be sent. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" parentCallId: - $ref: '#/components/schemas/parentCallId' + $ref: "#/components/schemas/parentCallId" recordingId: - $ref: '#/components/schemas/recordingId' + $ref: "#/components/schemas/recordingId" mediaUrl: - $ref: '#/components/schemas/mediaUrl' + $ref: "#/components/schemas/mediaUrl" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" answerTime: - $ref: '#/components/schemas/answerTime' + $ref: "#/components/schemas/answerTime" endTime: - $ref: '#/components/schemas/endTime' + $ref: "#/components/schemas/endTime" duration: - $ref: '#/components/schemas/duration' + $ref: "#/components/schemas/duration" fileFormat: - $ref: '#/components/schemas/fileFormatEnum' + $ref: "#/components/schemas/fileFormatEnum" channels: - $ref: '#/components/schemas/channels' + $ref: "#/components/schemas/channels" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" transferCallerId: - $ref: '#/components/schemas/transferCallerId' + $ref: "#/components/schemas/transferCallerId" transferTo: - $ref: '#/components/schemas/transferTo' + $ref: "#/components/schemas/transferTo" recordingAvailableCallback: type: object description: >- @@ -5043,49 +5060,49 @@ components: processed. It indicates that the recording is available for download. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" parentCallId: - $ref: '#/components/schemas/parentCallId' + $ref: "#/components/schemas/parentCallId" recordingId: - $ref: '#/components/schemas/recordingId' + $ref: "#/components/schemas/recordingId" mediaUrl: - $ref: '#/components/schemas/mediaUrl' + $ref: "#/components/schemas/mediaUrl" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" endTime: - $ref: '#/components/schemas/endTime' + $ref: "#/components/schemas/endTime" duration: - $ref: '#/components/schemas/duration' + $ref: "#/components/schemas/duration" fileFormat: - $ref: '#/components/schemas/fileFormatEnum' + $ref: "#/components/schemas/fileFormatEnum" channels: - $ref: '#/components/schemas/channels' + $ref: "#/components/schemas/channels" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" status: - $ref: '#/components/schemas/status' + $ref: "#/components/schemas/status" transferCallerId: - $ref: '#/components/schemas/transferCallerId' + $ref: "#/components/schemas/transferCallerId" transferTo: - $ref: '#/components/schemas/transferTo' + $ref: "#/components/schemas/transferTo" redirectCallback: type: object description: >- @@ -5093,37 +5110,76 @@ components: purpose is to get the next set of verbs from the calling application. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" parentCallId: - $ref: '#/components/schemas/parentCallId' + $ref: "#/components/schemas/parentCallId" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" answerTime: - $ref: '#/components/schemas/answerTime' + $ref: "#/components/schemas/answerTime" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" transferCallerId: - $ref: '#/components/schemas/transferCallerId' + $ref: "#/components/schemas/transferCallerId" transferTo: - $ref: '#/components/schemas/transferTo' + $ref: "#/components/schemas/transferTo" + referCompleteCallback: + type: object + description: >- + This event is sent to the referCompleteUrl of a call's verb when + the SIP REFER flow completes. On success, the call has been torn down + and the BXML returned from this callback is ignored. On failure, the + call remains active and the BXML returned from this callback is executed + on the call. + properties: + eventType: + $ref: "#/components/schemas/eventType" + eventTime: + $ref: "#/components/schemas/eventTime" + accountId: + $ref: "#/components/schemas/accountId" + applicationId: + $ref: "#/components/schemas/applicationId1" + from: + $ref: "#/components/schemas/from" + to: + $ref: "#/components/schemas/to" + direction: + $ref: "#/components/schemas/callDirectionEnum" + callId: + $ref: "#/components/schemas/callId" + callUrl: + $ref: "#/components/schemas/callUrl" + startTime: + $ref: "#/components/schemas/startTime" + answerTime: + $ref: "#/components/schemas/answerTime" + tag: + $ref: "#/components/schemas/tag1" + referCallStatus: + $ref: "#/components/schemas/referCallStatusEnum" + referSipResponseCode: + $ref: "#/components/schemas/referSipResponseCode" + notifySipResponseCode: + $ref: "#/components/schemas/notifySipResponseCode" transcriptionAvailableCallback: type: object description: >- @@ -5131,47 +5187,47 @@ components: transcription is available to be downloaded. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" mediaUrl: - $ref: '#/components/schemas/mediaUrl' + $ref: "#/components/schemas/mediaUrl" parentCallId: - $ref: '#/components/schemas/parentCallId' + $ref: "#/components/schemas/parentCallId" recordingId: - $ref: '#/components/schemas/recordingId' + $ref: "#/components/schemas/recordingId" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" endTime: - $ref: '#/components/schemas/endTime' + $ref: "#/components/schemas/endTime" duration: - $ref: '#/components/schemas/duration' + $ref: "#/components/schemas/duration" fileFormat: - $ref: '#/components/schemas/fileFormatEnum' + $ref: "#/components/schemas/fileFormatEnum" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" transcription: - $ref: '#/components/schemas/transcription' + $ref: "#/components/schemas/transcription" transferCallerId: - $ref: '#/components/schemas/transferCallerId' + $ref: "#/components/schemas/transferCallerId" transferTo: - $ref: '#/components/schemas/transferTo' + $ref: "#/components/schemas/transferTo" transferAnswerCallback: type: object description: >- @@ -5184,35 +5240,35 @@ components: transferAnswer event, but some are not allowed. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" answerTime: - $ref: '#/components/schemas/answerTime' + $ref: "#/components/schemas/answerTime" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" transferCallerId: - $ref: '#/components/schemas/transferCallerId' + $ref: "#/components/schemas/transferCallerId" transferTo: - $ref: '#/components/schemas/transferTo' + $ref: "#/components/schemas/transferTo" transferCompleteCallback: type: object description: >- @@ -5223,41 +5279,41 @@ components: transferComplete event corresponds to one of the legs. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" answerTime: - $ref: '#/components/schemas/answerTime' + $ref: "#/components/schemas/answerTime" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" transferCallerId: - $ref: '#/components/schemas/transferCallerId' + $ref: "#/components/schemas/transferCallerId" transferTo: - $ref: '#/components/schemas/transferTo' + $ref: "#/components/schemas/transferTo" cause: - $ref: '#/components/schemas/cause' + $ref: "#/components/schemas/cause" errorMessage: - $ref: '#/components/schemas/errorMessage' + $ref: "#/components/schemas/errorMessage" errorId: - $ref: '#/components/schemas/errorId' + $ref: "#/components/schemas/errorId" transferDisconnectCallback: type: object description: >- @@ -5269,45 +5325,45 @@ components: the transferred leg. properties: eventType: - $ref: '#/components/schemas/eventType' + $ref: "#/components/schemas/eventType" eventTime: - $ref: '#/components/schemas/eventTime' + $ref: "#/components/schemas/eventTime" accountId: - $ref: '#/components/schemas/accountId' + $ref: "#/components/schemas/accountId" applicationId: - $ref: '#/components/schemas/applicationId1' + $ref: "#/components/schemas/applicationId1" from: - $ref: '#/components/schemas/from' + $ref: "#/components/schemas/from" to: - $ref: '#/components/schemas/to' + $ref: "#/components/schemas/to" direction: - $ref: '#/components/schemas/callDirectionEnum' + $ref: "#/components/schemas/callDirectionEnum" callId: - $ref: '#/components/schemas/callId' + $ref: "#/components/schemas/callId" callUrl: - $ref: '#/components/schemas/callUrl' + $ref: "#/components/schemas/callUrl" parentCallId: - $ref: '#/components/schemas/parentCallId' + $ref: "#/components/schemas/parentCallId" enqueuedTime: - $ref: '#/components/schemas/enqueuedTime' + $ref: "#/components/schemas/enqueuedTime" startTime: - $ref: '#/components/schemas/startTime' + $ref: "#/components/schemas/startTime" answerTime: - $ref: '#/components/schemas/answerTime' + $ref: "#/components/schemas/answerTime" endTime: - $ref: '#/components/schemas/endTime' + $ref: "#/components/schemas/endTime" tag: - $ref: '#/components/schemas/tag1' + $ref: "#/components/schemas/tag1" transferCallerId: - $ref: '#/components/schemas/transferCallerId' + $ref: "#/components/schemas/transferCallerId" transferTo: - $ref: '#/components/schemas/transferTo' + $ref: "#/components/schemas/transferTo" cause: - $ref: '#/components/schemas/cause' + $ref: "#/components/schemas/cause" errorMessage: - $ref: '#/components/schemas/errorMessage' + $ref: "#/components/schemas/errorMessage" errorId: - $ref: '#/components/schemas/errorId' + $ref: "#/components/schemas/errorId" eventType: type: string description: >- @@ -5316,8 +5372,8 @@ components: conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, - recordingAvailable, redirect, transcriptionAvailable, transferAnswer, - transferComplete, transferDisconnect. + recordingAvailable, redirect, referComplete, transcriptionAvailable, + transferAnswer, transferComplete, transferDisconnect. example: bridgeComplete eventTime: type: string @@ -5326,11 +5382,11 @@ components: The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. - example: '2022-06-17T22:19:40.375Z' + example: "2022-06-17T22:19:40.375Z" accountId: type: string description: The user account associated with the call. - example: '9900000' + example: "9900000" applicationId1: type: string description: The id of the application associated with the call. @@ -5340,13 +5396,13 @@ components: description: >- The phone number that received the call, in E.164 format (e.g. +15555555555). - example: '+15555555555' + example: "+15555555555" from: type: string description: >- The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). - example: '+15555555555' + example: "+15555555555" conferenceId: type: string description: The unique, Bandwidth-generated ID of the conference that was recorded @@ -5373,43 +5429,43 @@ components: digit: type: string description: The digit collected in the call. - example: '2' + example: "2" digits: type: string description: >- (optional) The digits, letters, and/or symbols entered by the user. The string is empty if a timeout occurred before any buttons were pressed. - example: '123' + example: "123" terminatingDigit: type: string description: >- (optional) The digit the user pressed to end the gather. Empty string value if no terminating digit was pressed. - example: '#' + example: "#" startTime: type: string format: date-time description: Time the call was started, in ISO 8601 format. - example: '2022-06-17T22:19:40.375Z' + example: "2022-06-17T22:19:40.375Z" enqueuedTime: type: string format: date-time description: >- (optional) If call queueing is enabled and this is an outbound call, time the call was queued, in ISO 8601 format. - example: '2022-06-17T22:20:00.000Z' + example: "2022-06-17T22:20:00.000Z" nullable: true answerTime: type: string format: date-time description: Time the call was answered, in ISO 8601 format. - example: '2022-06-17T22:20:00.000Z' + example: "2022-06-17T22:20:00.000Z" nullable: true endTime: type: string format: date-time description: The time that the recording ended in ISO-8601 format - example: '2022-06-17T22:20:00.000Z' + example: "2022-06-17T22:20:00.000Z" status: type: string description: >- @@ -5425,13 +5481,13 @@ components: description: >- The phone number used as the from field of the B-leg call, in E.164 format (e.g. +15555555555). - example: '+15555555555' + example: "+15555555555" transferTo: type: string description: >- The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). - example: '+15555555555' + example: "+15555555555" mediaUrl: nullable: true type: string @@ -5469,6 +5525,21 @@ components: or it was previously cleared, this field will not be present. example: exampleTag nullable: true + referSipResponseCode: + type: integer + description: >- + (optional) The SIP response code returned for the REFER request itself + (e.g. 202, 405, 603). Present when a SIP response was received for the + REFER. + example: 202 + notifySipResponseCode: + type: integer + description: >- + (optional) The final SIP response code reported via NOTIFY + (message/sipfrag body). Present only when the caller's endpoint sent a + final NOTIFY (e.g. 200, 404, 486, 503). Not present on NOTIFY timeout or + when the REFER was rejected before a subscription was established. + example: 200 cause: type: string description: >- @@ -5521,21 +5592,21 @@ components: privacy: type: string description: off or full - example: 'off' + example: "off" screen: type: string description: >- No if the number was provided by the user, yes if the number was provided by the network - example: 'no' + example: "no" counter: type: string description: The number of diversions that have occurred - example: '2' + example: "2" limit: type: string description: The maximum number of diversions allowed for this session - example: '3' + example: "3" unknown: type: string description: >- @@ -5547,7 +5618,7 @@ components: description: >- Always present. Indicates the last telephone number that the call was diverted from. - example: '+15558884444' + example: "+15558884444" transcription: type: object properties: @@ -5595,6 +5666,36 @@ components: value, including the encoding specifier, may not exceed 256 characters. example: bXktdXVp maxLength: 256 + sipCallId: + type: string + description: >- + (optional) The SIP Call-ID of the call's current SIP dialog with + Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on + any call, inbound or outbound, once that dialog has been established; + may be absent very early in a call before the dialog exists. + example: c95ac8d6e1a31c52eb38f419893c151633ec68f8d@sbc.bandwidth.com + sipHeaders: + type: object + additionalProperties: + type: string + description: >- + (optional) Map of customer-supplied X-* headers from the original + INVITE. Keys are lowercase (SIP headers are case-insensitive). Present + only for inbound SIP URI calls with custom headers. Note - keys preserve + the original SIP header name in lowercase rather than Bandwidth's usual + camelCase JSON convention, since these are passthrough values from the + caller's SIP INVITE, not Bandwidth-defined fields. If the same header + name is sent more than once in the INVITE, only the last value is kept. + example: + x-custom-header: customer-value + x-session-id: sess-12345 + sipResponseCode: + type: integer + description: >- + (optional) The SIP status code returned by Bandwidth's SBC when it + rejected an outbound call's INVITE (e.g. 486 for busy, 603 for decline). + Present only when an outbound call was rejected by the SBC. + example: 486 codeRequest: type: object properties: @@ -5602,13 +5703,13 @@ components: type: string description: The phone number to send the mfa code to. pattern: ^\+[1-9]\d{1,14}$ - example: '+19195551234' + example: "+19195551234" from: type: string description: The application phone number, the sender of the mfa code. pattern: ^\+[1-9]\d{1,14}$ maxLength: 32 - example: '+19195554321' + example: "+19195554321" applicationId: type: string description: The application unique ID, obtained from Bandwidth. @@ -5668,7 +5769,7 @@ components: type: string description: The phone number to send the mfa code to. pattern: ^\+[1-9]\d{1,14}$ - example: '+19195551234' + example: "+19195551234" scope: type: string description: >- @@ -5690,7 +5791,7 @@ components: description: The generated mfa code to check if valid. minLength: 4 maxLength: 8 - example: '123456' + example: "123456" required: - to - expirationTimeInMinutes @@ -5832,8 +5933,8 @@ components: type: string description: Phone number experiencing the error. example: - - '+13992077164' - - '+19196104424' + - "+13992077164" + - "+19196104424" message: type: string description: Message describing the error @@ -5887,27 +5988,27 @@ components: links: type: array items: - $ref: '#/components/schemas/linkSchema' + $ref: "#/components/schemas/linkSchema" example: [] data: type: object description: The phone number lookup response data properties: requestId: - $ref: '#/components/schemas/requestId' + $ref: "#/components/schemas/requestId" status: - $ref: '#/components/schemas/completedLookupStatusEnum' + $ref: "#/components/schemas/completedLookupStatusEnum" results: type: array description: >- The carrier information results for the specified telephone numbers. items: - $ref: '#/components/schemas/lookupResult' + $ref: "#/components/schemas/lookupResult" errors: type: array items: - $ref: '#/components/schemas/lookupErrorSchema' + $ref: "#/components/schemas/lookupErrorSchema" createAsyncBulkLookupResponse: type: object properties: @@ -5915,53 +6016,53 @@ components: type: array description: Links for pagination (if applicable) items: - $ref: '#/components/schemas/linkSchema' + $ref: "#/components/schemas/linkSchema" data: type: object description: The phone number lookup response data properties: requestId: - $ref: '#/components/schemas/requestId' + $ref: "#/components/schemas/requestId" status: - $ref: '#/components/schemas/inProgressLookupStatusEnum' + $ref: "#/components/schemas/inProgressLookupStatusEnum" errors: type: array items: - $ref: '#/components/schemas/lookupErrorSchema' + $ref: "#/components/schemas/lookupErrorSchema" getAsyncBulkLookupResponse: type: object properties: links: type: array items: - $ref: '#/components/schemas/linkSchema' + $ref: "#/components/schemas/linkSchema" example: [] data: type: object description: The phone number lookup response data properties: requestId: - $ref: '#/components/schemas/requestId' + $ref: "#/components/schemas/requestId" status: - $ref: '#/components/schemas/inProgressLookupStatusEnum' + $ref: "#/components/schemas/inProgressLookupStatusEnum" results: type: array description: >- The carrier information results for the specified telephone number. items: - $ref: '#/components/schemas/lookupResult' + $ref: "#/components/schemas/lookupResult" errors: type: array items: - $ref: '#/components/schemas/lookupErrorSchema' + $ref: "#/components/schemas/lookupErrorSchema" lookupErrorResponse: type: object properties: links: type: array items: - $ref: '#/components/schemas/linkSchema' + $ref: "#/components/schemas/linkSchema" example: [] data: type: object @@ -5969,7 +6070,7 @@ components: errors: type: array items: - $ref: '#/components/schemas/lookupErrorSchema' + $ref: "#/components/schemas/lookupErrorSchema" rcsErrorEnum: type: string description: >- @@ -6010,9 +6111,9 @@ components: phoneNumber: type: string description: The telephone number in E.164 format. - example: '+10072904498' + example: "+10072904498" lineType: - $ref: '#/components/schemas/lineTypeEnum' + $ref: "#/components/schemas/lineTypeEnum" messagingProvider: type: string description: The messaging service provider of the telephone number. @@ -6042,9 +6143,9 @@ components: deactivation event. example: 2025-06-20 18:35 deactivationEvent: - $ref: '#/components/schemas/deactivationEventEnum' + $ref: "#/components/schemas/deactivationEventEnum" latestMessageDeliveryStatus: - $ref: '#/components/schemas/latestMessageDeliveryStatusEnum' + $ref: "#/components/schemas/latestMessageDeliveryStatusEnum" initialMessageDeliveryStatusDate: type: string format: date @@ -6055,7 +6156,7 @@ components: Think of this as the "start time" for that status. Value resets every time the `latestMessageDeliveryStatus` changes. - example: '2025-06-20' + example: "2025-06-20" latestMessageDeliveryStatusDate: type: string format: date @@ -6067,7 +6168,7 @@ components: `latestMessageDeliveryStatus` is. Value resets every time the `latestMessageDeliveryStatus` changes. - example: '2025-06-21' + example: "2025-06-21" rcsEnabled: type: boolean description: > @@ -6079,7 +6180,7 @@ components: accountId1: type: string description: User's account ID. - example: '1234567' + example: "1234567" tfPhoneNumber: type: string description: Toll-free telephone number in E.164 format. @@ -6087,13 +6188,13 @@ components: maxLength: 12 nullable: false pattern: ^\+1(800|833|844|855|866|877|888)[2-9]\d{6}$ - example: '+18005555555' + example: "+18005555555" tfvWebhookErrors: type: array description: Details of the errors that were encountered when processing the request. items: type: string - example: 'optInWorkflowImageURLs: Entries must be a valid array of objects.' + example: "optInWorkflowImageURLs: Entries must be a valid array of objects." tfvCallbackStatusEnum: type: string enum: @@ -6130,11 +6231,11 @@ components: type: object properties: statusCode: - $ref: '#/components/schemas/denialStatusCode' + $ref: "#/components/schemas/denialStatusCode" reason: - $ref: '#/components/schemas/declineReasonDescription' + $ref: "#/components/schemas/declineReasonDescription" resubmitAllowed: - $ref: '#/components/schemas/resubmitAllowed' + $ref: "#/components/schemas/resubmitAllowed" required: - statusCode - reason @@ -6312,7 +6413,7 @@ components: minLength: 1 maxLength: 500 nullable: false - example: '+19192654500' + example: "+19192654500" verificationRequest: type: object required: @@ -6327,9 +6428,9 @@ components: - businessEntityType properties: businessAddress: - $ref: '#/components/schemas/address' + $ref: "#/components/schemas/address" businessContact: - $ref: '#/components/schemas/contact' + $ref: "#/components/schemas/contact" messageVolume: type: integer description: Estimated monthly volume of messages from the toll-free number. @@ -6341,15 +6442,15 @@ components: minItems: 1 maxItems: 10 items: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" useCase: - $ref: '#/components/schemas/useCase' + $ref: "#/components/schemas/useCase" useCaseSummary: - $ref: '#/components/schemas/useCaseSummary' + $ref: "#/components/schemas/useCaseSummary" productionMessageContent: - $ref: '#/components/schemas/productionMessageContent' + $ref: "#/components/schemas/productionMessageContent" optInWorkflow: - $ref: '#/components/schemas/optInWorkflow' + $ref: "#/components/schemas/optInWorkflow" additionalInformation: type: string description: Any additional information. @@ -6358,27 +6459,27 @@ components: nullable: true example: Any additional information isvReseller: - $ref: '#/components/schemas/isvReseller' + $ref: "#/components/schemas/isvReseller" privacyPolicyUrl: - $ref: '#/components/schemas/privacyPolicyUrl' + $ref: "#/components/schemas/privacyPolicyUrl" termsAndConditionsUrl: - $ref: '#/components/schemas/termsAndConditionsUrl' + $ref: "#/components/schemas/termsAndConditionsUrl" businessDba: - $ref: '#/components/schemas/businessDba' + $ref: "#/components/schemas/businessDba" businessRegistrationNumber: - $ref: '#/components/schemas/businessRegistrationNumber' + $ref: "#/components/schemas/businessRegistrationNumber" businessRegistrationType: - $ref: '#/components/schemas/businessRegistrationTypeEnum' + $ref: "#/components/schemas/businessRegistrationTypeEnum" businessRegistrationIssuingCountry: - $ref: '#/components/schemas/businessRegistrationIssuingCountry' + $ref: "#/components/schemas/businessRegistrationIssuingCountry" businessEntityType: - $ref: '#/components/schemas/businessEntityTypeEnum' + $ref: "#/components/schemas/businessEntityTypeEnum" helpMessageResponse: - $ref: '#/components/schemas/helpMessageResponse' + $ref: "#/components/schemas/helpMessageResponse" ageGatedContent: - $ref: '#/components/schemas/ageGatedContent' + $ref: "#/components/schemas/ageGatedContent" cvToken: - $ref: '#/components/schemas/cvTokenNullable' + $ref: "#/components/schemas/cvTokenNullable" verificationUpdateRequest: type: object required: @@ -6391,9 +6492,9 @@ components: - optInWorkflow properties: businessAddress: - $ref: '#/components/schemas/address' + $ref: "#/components/schemas/address" businessContact: - $ref: '#/components/schemas/contact' + $ref: "#/components/schemas/contact" messageVolume: type: integer description: Estimated monthly volume of messages from the toll-free number. @@ -6401,37 +6502,37 @@ components: maximum: 10000000 example: 10000 useCase: - $ref: '#/components/schemas/useCase' + $ref: "#/components/schemas/useCase" useCaseSummary: - $ref: '#/components/schemas/useCaseSummary' + $ref: "#/components/schemas/useCaseSummary" productionMessageContent: - $ref: '#/components/schemas/productionMessageContent' + $ref: "#/components/schemas/productionMessageContent" optInWorkflow: - $ref: '#/components/schemas/optInWorkflow' + $ref: "#/components/schemas/optInWorkflow" additionalInformation: - $ref: '#/components/schemas/additionalInformation' + $ref: "#/components/schemas/additionalInformation" isvReseller: - $ref: '#/components/schemas/isvReseller' + $ref: "#/components/schemas/isvReseller" privacyPolicyUrl: - $ref: '#/components/schemas/privacyPolicyUrl' + $ref: "#/components/schemas/privacyPolicyUrl" termsAndConditionsUrl: - $ref: '#/components/schemas/termsAndConditionsUrl' + $ref: "#/components/schemas/termsAndConditionsUrl" businessDba: - $ref: '#/components/schemas/businessDba' + $ref: "#/components/schemas/businessDba" businessRegistrationNumber: - $ref: '#/components/schemas/businessRegistrationNumber' + $ref: "#/components/schemas/businessRegistrationNumber" businessRegistrationType: - $ref: '#/components/schemas/businessRegistrationTypeEnum' + $ref: "#/components/schemas/businessRegistrationTypeEnum" businessEntityType: - $ref: '#/components/schemas/businessEntityTypeEnum' + $ref: "#/components/schemas/businessEntityTypeEnum" businessRegistrationIssuingCountry: - $ref: '#/components/schemas/businessRegistrationIssuingCountry' + $ref: "#/components/schemas/businessRegistrationIssuingCountry" helpMessageResponse: - $ref: '#/components/schemas/helpMessageResponse' + $ref: "#/components/schemas/helpMessageResponse" ageGatedContent: - $ref: '#/components/schemas/ageGatedContent' + $ref: "#/components/schemas/ageGatedContent" cvToken: - $ref: '#/components/schemas/cvTokenNullable' + $ref: "#/components/schemas/cvTokenNullable" tfvBasicAuthentication: type: object properties: @@ -6450,47 +6551,47 @@ components: type: object properties: basicAuthentication: - $ref: '#/components/schemas/tfvBasicAuthentication' + $ref: "#/components/schemas/tfvBasicAuthentication" callbackUrl: - $ref: '#/components/schemas/webhookUrl' + $ref: "#/components/schemas/webhookUrl" sharedSecretKey: - $ref: '#/components/schemas/sharedSecretKey' + $ref: "#/components/schemas/sharedSecretKey" required: - callbackUrl failureWebhook: type: object properties: accountId: - $ref: '#/components/schemas/accountId1' + $ref: "#/components/schemas/accountId1" phoneNumber: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" errorCode: type: string description: >- An error code indicating what error was encountered. This code can be interpreted as an HTTP status code in regards to the error that was encountered. - example: '400' + example: "400" errorMessage: type: string description: A description of the error that was encountered. example: cannot process request. errors: - $ref: '#/components/schemas/tfvWebhookErrors' + $ref: "#/components/schemas/tfvWebhookErrors" internalTicketNumber: - $ref: '#/components/schemas/internalTicketNumberForWebhook' + $ref: "#/components/schemas/internalTicketNumberForWebhook" verificationDenialWebhook: type: object properties: accountId: - $ref: '#/components/schemas/accountId1' + $ref: "#/components/schemas/accountId1" additionalDenialReasons: description: >- An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. type: array items: - $ref: '#/components/schemas/additionalDenialReason' + $ref: "#/components/schemas/additionalDenialReason" example: - statusCode: 512 reason: Reason A @@ -6499,52 +6600,52 @@ components: reason: Reason B resubmitAllowed: true declineReasonDescription: - $ref: '#/components/schemas/declineReasonDescription' + $ref: "#/components/schemas/declineReasonDescription" denialStatusCode: - $ref: '#/components/schemas/denialStatusCode' + $ref: "#/components/schemas/denialStatusCode" internalTicketNumber: - $ref: '#/components/schemas/internalTicketNumberForWebhook' + $ref: "#/components/schemas/internalTicketNumberForWebhook" phoneNumber: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" resubmitAllowed: - $ref: '#/components/schemas/resubmitAllowed' + $ref: "#/components/schemas/resubmitAllowed" status: - $ref: '#/components/schemas/tfvUnverifiedStatus' + $ref: "#/components/schemas/tfvUnverifiedStatus" blocked: - $ref: '#/components/schemas/blocked' + $ref: "#/components/schemas/blocked" blockedReason: - $ref: '#/components/schemas/blockedReason' + $ref: "#/components/schemas/blockedReason" verificationWebhook: type: object properties: accountId: - $ref: '#/components/schemas/accountId1' + $ref: "#/components/schemas/accountId1" phoneNumber: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" status: - $ref: '#/components/schemas/tfvCallbackStatusEnum' + $ref: "#/components/schemas/tfvCallbackStatusEnum" internalTicketNumber: - $ref: '#/components/schemas/internalTicketNumberForWebhook' + $ref: "#/components/schemas/internalTicketNumberForWebhook" blockedWebhook: type: object properties: accountId: - $ref: '#/components/schemas/accountId1' + $ref: "#/components/schemas/accountId1" phoneNumber: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" status: - $ref: '#/components/schemas/tfvCallbackStatusEnum' + $ref: "#/components/schemas/tfvCallbackStatusEnum" internalTicketNumber: - $ref: '#/components/schemas/internalTicketNumberForWebhook' + $ref: "#/components/schemas/internalTicketNumberForWebhook" blocked: - $ref: '#/components/schemas/blocked' + $ref: "#/components/schemas/blocked" blockedReason: - $ref: '#/components/schemas/blockedReason' + $ref: "#/components/schemas/blockedReason" tfvSubmissionWrapper: type: object properties: submission: - $ref: '#/components/schemas/verificationUpdateRequest' + $ref: "#/components/schemas/verificationUpdateRequest" address: type: object nullable: false @@ -6595,8 +6696,8 @@ components: type: string description: The zip of the business using the toll-free number. nullable: false - example: '27606' - pattern: '[- A-Za-z0-9]{0,500}' + example: "27606" + pattern: "[- A-Za-z0-9]{0,500}" url: type: string format: url @@ -6672,9 +6773,9 @@ components: nullable: false example: Doe email: - $ref: '#/components/schemas/email' + $ref: "#/components/schemas/email" phoneNumber: - $ref: '#/components/schemas/businessContactPhoneNumber' + $ref: "#/components/schemas/businessContactPhoneNumber" email: type: string format: email @@ -6728,14 +6829,14 @@ components: - data properties: links: - $ref: '#/components/schemas/linksObject' + $ref: "#/components/schemas/linksObject" errors: type: array items: - $ref: '#/components/schemas/webhookSubscriptionError' + $ref: "#/components/schemas/webhookSubscriptionError" data: items: - $ref: '#/components/schemas/webhookSubscription' + $ref: "#/components/schemas/webhookSubscription" type: array linksObject: type: object @@ -6768,7 +6869,7 @@ components: telephoneNumbers: type: array items: - $ref: '#/components/schemas/telephoneNumber' + $ref: "#/components/schemas/telephoneNumber" telephoneNumber: type: object properties: @@ -6794,11 +6895,11 @@ components: example: 7hICGStfAfeGxEq3N0lQwO accountId: type: string - example: '1234567' + example: "1234567" callbackUrl: - $ref: '#/components/schemas/webhookUrl' + $ref: "#/components/schemas/webhookUrl" type: - $ref: '#/components/schemas/webhookSubscriptionTypeEnum' + $ref: "#/components/schemas/webhookSubscriptionTypeEnum" basicAuthentication: description: >- Basic authentication credentials are not required, but if present, @@ -6817,11 +6918,11 @@ components: createdDate: type: string format: date-time - example: '2023-05-15T13:56:39.965Z' + example: "2023-05-15T13:56:39.965Z" modifiedDate: type: string format: date-time - example: '2023-05-15T13:56:39.965Z' + example: "2023-05-15T13:56:39.965Z" webhookUrl: description: >- Callback URL to receive status updates from Bandwidth. When a webhook @@ -6858,15 +6959,15 @@ components: type: object properties: phoneNumber: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" status: - $ref: '#/components/schemas/tfvStatusEnum' + $ref: "#/components/schemas/tfvStatusEnum" internalTicketNumber: - $ref: '#/components/schemas/internalTicketNumber' + $ref: "#/components/schemas/internalTicketNumber" declineReasonDescription: - $ref: '#/components/schemas/declineReasonDescription' + $ref: "#/components/schemas/declineReasonDescription" denialStatusCode: - $ref: '#/components/schemas/denialStatusCodeNullable' + $ref: "#/components/schemas/denialStatusCodeNullable" additionalDenialReasons: description: >- An optional list of denial reasons in addition to @@ -6874,7 +6975,7 @@ components: nullable: true type: array items: - $ref: '#/components/schemas/additionalDenialReason' + $ref: "#/components/schemas/additionalDenialReason" example: - statusCode: 512 reason: Reason A @@ -6883,32 +6984,32 @@ components: reason: Reason B resubmitAllowed: true resubmitAllowed: - $ref: '#/components/schemas/resubmitAllowed' + $ref: "#/components/schemas/resubmitAllowed" createdDateTime: type: string description: Date and time the verification request was created. format: date-time - example: '2021-06-08T06:45:13.0Z' + example: "2021-06-08T06:45:13.0Z" modifiedDateTime: type: string description: Date and time the verification request was last modified. format: date-time - example: '2021-06-08T06:45:13.0Z' + example: "2021-06-08T06:45:13.0Z" submission: - $ref: '#/components/schemas/tfvSubmissionInfo' + $ref: "#/components/schemas/tfvSubmissionInfo" blocked: - $ref: '#/components/schemas/blocked' + $ref: "#/components/schemas/blocked" blockedReason: - $ref: '#/components/schemas/blockedReason' + $ref: "#/components/schemas/blockedReason" cvToken: - $ref: '#/components/schemas/cvTokenNullable' + $ref: "#/components/schemas/cvTokenNullable" tfvSubmissionInfo: type: object properties: businessAddress: - $ref: '#/components/schemas/address' + $ref: "#/components/schemas/address" businessContact: - $ref: '#/components/schemas/contact' + $ref: "#/components/schemas/contact" messageVolume: type: integer description: Estimated monthly volume of messages from the toll-free number. @@ -6916,36 +7017,36 @@ components: maximum: 10000000 example: 10000 useCase: - $ref: '#/components/schemas/useCase' + $ref: "#/components/schemas/useCase" useCaseSummary: - $ref: '#/components/schemas/useCaseSummary' + $ref: "#/components/schemas/useCaseSummary" productionMessageContent: - $ref: '#/components/schemas/productionMessageContent' + $ref: "#/components/schemas/productionMessageContent" optInWorkflow: - $ref: '#/components/schemas/optInWorkflow' + $ref: "#/components/schemas/optInWorkflow" additionalInformation: - $ref: '#/components/schemas/additionalInformation' + $ref: "#/components/schemas/additionalInformation" isvReseller: - $ref: '#/components/schemas/isvReseller' + $ref: "#/components/schemas/isvReseller" privacyPolicyUrl: - $ref: '#/components/schemas/privacyPolicyUrl' + $ref: "#/components/schemas/privacyPolicyUrl" termsAndConditionsUrl: - $ref: '#/components/schemas/termsAndConditionsUrl' + $ref: "#/components/schemas/termsAndConditionsUrl" businessDba: - $ref: '#/components/schemas/businessDba' + $ref: "#/components/schemas/businessDba" businessRegistrationNumber: - $ref: '#/components/schemas/businessRegistrationNumber' + $ref: "#/components/schemas/businessRegistrationNumber" description: Government-issued business identifying number. businessRegistrationType: - $ref: '#/components/schemas/businessRegistrationTypeEnum' + $ref: "#/components/schemas/businessRegistrationTypeEnum" description: The type of business registration number. businessRegistrationIssuingCountry: - $ref: '#/components/schemas/businessRegistrationIssuingCountry' + $ref: "#/components/schemas/businessRegistrationIssuingCountry" description: >- The country issuing the business registration in ISO-3166-1 alpha-3 format. businessEntityType: - $ref: '#/components/schemas/businessEntityTypeEnum' + $ref: "#/components/schemas/businessEntityTypeEnum" description: The type of registered business. tfvStatusEnum: type: string @@ -7025,7 +7126,7 @@ components: description: The port of the SIP connection. example: 5060 credentials: - $ref: '#/components/schemas/sipCredentials' + $ref: "#/components/schemas/sipCredentials" uuiHeader: type: string description: The User-to-User Information header for the SIP connection. @@ -7057,12 +7158,12 @@ components: maximum: 1024 example: David's iPhone status: - $ref: '#/components/schemas/deviceStatusEnum' + $ref: "#/components/schemas/deviceStatusEnum" creationTimestamp: type: string format: date-time description: The time the device was created. In ISO-8601 format. - example: '2021-01-01T00:00:00Z' + example: "2021-01-01T00:00:00Z" required: - deviceId - status @@ -7071,25 +7172,25 @@ components: type: object properties: endpointId: - $ref: '#/components/schemas/endpointId' + $ref: "#/components/schemas/endpointId" type: - $ref: '#/components/schemas/endpointTypeEnum' + $ref: "#/components/schemas/endpointTypeEnum" status: - $ref: '#/components/schemas/endpointStatusEnum' + $ref: "#/components/schemas/endpointStatusEnum" creationTimestamp: type: string format: date-time description: The time the endpoint was created. In ISO-8601 format. - example: '2021-01-01T00:00:00Z' + example: "2021-01-01T00:00:00Z" expirationTimestamp: type: string format: date-time description: >- The time the endpoint token will expire. In ISO-8601 format. Tokens last 24 hours. - example: '2021-01-02T00:00:00Z' + example: "2021-01-02T00:00:00Z" tag: - $ref: '#/components/schemas/endpointTag' + $ref: "#/components/schemas/endpointTag" required: - endpointId - type @@ -7099,27 +7200,27 @@ components: endpoint: type: object allOf: - - $ref: '#/components/schemas/endpoints' + - $ref: "#/components/schemas/endpoints" - type: object properties: devices: type: array items: - $ref: '#/components/schemas/device' + $ref: "#/components/schemas/device" createWebRtcConnectionRequest: allOf: - - $ref: '#/components/schemas/createEndpointRequestBase' + - $ref: "#/components/schemas/createEndpointRequestBase" - type: object properties: connectionMetadata: - $ref: '#/components/schemas/webRtcConnectionMetadata' + $ref: "#/components/schemas/webRtcConnectionMetadata" createEndpointRequestBase: type: object properties: type: - $ref: '#/components/schemas/endpointTypeEnum' + $ref: "#/components/schemas/endpointTypeEnum" direction: - $ref: '#/components/schemas/endpointDirectionEnum' + $ref: "#/components/schemas/endpointDirectionEnum" eventCallbackUrl: type: string format: uri @@ -7131,24 +7232,24 @@ components: description: The URL to send event fallbacks to. example: https://fallback.myapp.com/callback tag: - $ref: '#/components/schemas/endpointTag' + $ref: "#/components/schemas/endpointTag" required: - type - direction createEndpointRequest: oneOf: - - $ref: '#/components/schemas/createWebRtcConnectionRequest' + - $ref: "#/components/schemas/createWebRtcConnectionRequest" discriminator: propertyName: type mapping: - WEBRTC: '#/components/schemas/createWebRtcConnectionRequest' + WEBRTC: "#/components/schemas/createWebRtcConnectionRequest" createEndpointResponseData: allOf: - - $ref: '#/components/schemas/endpoint' + - $ref: "#/components/schemas/endpoint" - type: object properties: token: - $ref: '#/components/schemas/endpointToken' + $ref: "#/components/schemas/endpointToken" required: - token endpointEventTypeEnum: @@ -7159,18 +7260,18 @@ components: endpointEvent: description: An event that occurred on an endpoint. allOf: - - $ref: '#/components/schemas/endpoints' + - $ref: "#/components/schemas/endpoints" - type: object properties: eventTime: type: string format: date-time description: The time the event occurred. In ISO-8601 format. - example: '2021-01-01T00:00:00Z' + example: "2021-01-01T00:00:00Z" eventType: - $ref: '#/components/schemas/endpointEventTypeEnum' + $ref: "#/components/schemas/endpointEventTypeEnum" device: - $ref: '#/components/schemas/device' + $ref: "#/components/schemas/device" required: - eventType - eventTime @@ -7234,9 +7335,9 @@ components: code: type: string description: A code that uniquely identifies the error. - example: '404' + example: "404" source: - $ref: '#/components/schemas/brtcErrorSource' + $ref: "#/components/schemas/brtcErrorSource" required: - type - description @@ -7267,17 +7368,17 @@ components: links: type: array items: - $ref: '#/components/schemas/brtcLink' + $ref: "#/components/schemas/brtcLink" page: - $ref: '#/components/schemas/page' + $ref: "#/components/schemas/page" data: type: array items: - $ref: '#/components/schemas/endpoints' + $ref: "#/components/schemas/endpoints" errors: type: array items: - $ref: '#/components/schemas/brtcError' + $ref: "#/components/schemas/brtcError" required: - links - data @@ -7288,13 +7389,13 @@ components: links: type: array items: - $ref: '#/components/schemas/brtcLink' + $ref: "#/components/schemas/brtcLink" data: - $ref: '#/components/schemas/endpoint' + $ref: "#/components/schemas/endpoint" errors: type: array items: - $ref: '#/components/schemas/brtcError' + $ref: "#/components/schemas/brtcError" required: - links - data @@ -7305,13 +7406,13 @@ components: links: type: array items: - $ref: '#/components/schemas/brtcLink' + $ref: "#/components/schemas/brtcLink" data: - $ref: '#/components/schemas/createEndpointResponseData' + $ref: "#/components/schemas/createEndpointResponseData" errors: type: array items: - $ref: '#/components/schemas/brtcError' + $ref: "#/components/schemas/brtcError" required: - links - data @@ -7322,7 +7423,7 @@ components: links: type: array items: - $ref: '#/components/schemas/brtcLink' + $ref: "#/components/schemas/brtcLink" data: type: object nullable: true @@ -7330,7 +7431,7 @@ components: errors: type: array items: - $ref: '#/components/schemas/brtcError' + $ref: "#/components/schemas/brtcError" required: - links - data @@ -7341,19 +7442,19 @@ components: content: application/json: schema: - $ref: '#/components/schemas/message' + $ref: "#/components/schemas/message" createMultiChannelMessageResponse: description: Accepted content: application/json: schema: - $ref: '#/components/schemas/createMultiChannelMessageResponse' + $ref: "#/components/schemas/createMultiChannelMessageResponse" listMessagesResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/messagesList' + $ref: "#/components/schemas/messagesList" getMediaResponse: description: OK content: @@ -7374,73 +7475,73 @@ components: schema: type: array items: - $ref: '#/components/schemas/media' + $ref: "#/components/schemas/media" messagingBadRequestError: description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" messagingNotAcceptableError: description: Not Acceptable content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" createMessageBadRequestError: description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/createMessageRequestError' + $ref: "#/components/schemas/createMessageRequestError" messagingUnauthorizedError: description: Unauthorized content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" messagingForbiddenError: description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" messagingNotFoundError: description: Not Found content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" messagingMethodNotAllowedError: description: Method Not Allowed content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" messagingInvalidMediaTypeError: description: Unsupported Media Type content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" messagingTooManyRequestsError: description: Too Many Requests content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" messagingInternalServerError: description: Internal Server Error content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" multiChannelBadRequestError: description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" example: links: [] data: null @@ -7458,7 +7559,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" example: links: [] data: null @@ -7471,7 +7572,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" example: links: [] data: null @@ -7484,7 +7585,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" example: links: [] data: null @@ -7497,7 +7598,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" example: links: [] data: null @@ -7510,7 +7611,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" example: links: [] data: null @@ -7526,7 +7627,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" example: links: [] data: null @@ -7541,7 +7642,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/multiChannelError' + $ref: "#/components/schemas/multiChannelError" example: links: [] data: null @@ -7560,7 +7661,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: "#/components/schemas/messagingRequestError" example: type: rate_limit_exceeded description: >- @@ -7576,16 +7677,16 @@ components: content: application/json: schema: - $ref: '#/components/schemas/createCallResponse' + $ref: "#/components/schemas/createCallResponse" examples: createCall Response: - $ref: '#/components/examples/createCallResponseExample' + $ref: "#/components/examples/createCallResponseExample" getCallStateResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/callState' + $ref: "#/components/schemas/callState" updateCallResponse: description: OK listCallsResponse: @@ -7595,13 +7696,13 @@ components: schema: type: array items: - $ref: '#/components/schemas/callState' + $ref: "#/components/schemas/callState" getStatisticsResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/accountStatistics' + $ref: "#/components/schemas/accountStatistics" updateRecordingResponse: description: OK listCallRecordingsResponse: @@ -7611,13 +7712,13 @@ components: schema: type: array items: - $ref: '#/components/schemas/callRecordingMetadata' + $ref: "#/components/schemas/callRecordingMetadata" getCallRecordingResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/callRecordingMetadata' + $ref: "#/components/schemas/callRecordingMetadata" downloadRecordingMediaResponse: description: OK content: @@ -7634,19 +7735,19 @@ components: content: application/json: schema: - $ref: '#/components/schemas/recordingTranscriptions' + $ref: "#/components/schemas/recordingTranscriptions" listTranscriptionsResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/callTranscriptionMetadataList' + $ref: "#/components/schemas/callTranscriptionMetadataList" getCallTranscriptionResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/callTranscriptionResponse' + $ref: "#/components/schemas/callTranscriptionResponse" deleteCallTranscriptionResponse: description: No Content listConferencesResponse: @@ -7656,22 +7757,22 @@ components: schema: type: array items: - $ref: '#/components/schemas/conference' + $ref: "#/components/schemas/conference" examples: listConferences Response: - $ref: '#/components/examples/listConferencesResponseExample' + $ref: "#/components/examples/listConferencesResponseExample" getConferenceResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/conference' + $ref: "#/components/schemas/conference" getConferenceMemberResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/conferenceMember' + $ref: "#/components/schemas/conferenceMember" listConferenceRecordingsResponse: description: OK content: @@ -7679,76 +7780,76 @@ components: schema: type: array items: - $ref: '#/components/schemas/conferenceRecordingMetadata' + $ref: "#/components/schemas/conferenceRecordingMetadata" getConferenceRecordingResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/conferenceRecordingMetadata' + $ref: "#/components/schemas/conferenceRecordingMetadata" voiceBadRequestError: description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" examples: badRequestErrorExample: - $ref: '#/components/examples/voiceBadRequestErrorExample' + $ref: "#/components/examples/voiceBadRequestErrorExample" voiceUnauthorizedError: description: Unauthorized content: application/json: schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" examples: unauthorizedErrorExample: - $ref: '#/components/examples/voiceUnauthorizedErrorExample' + $ref: "#/components/examples/voiceUnauthorizedErrorExample" voiceForbiddenError: description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" examples: forbiddenErrorExample: - $ref: '#/components/examples/voiceForbiddenErrorExample' + $ref: "#/components/examples/voiceForbiddenErrorExample" voiceNotFoundError: description: Not Found content: application/json: schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" examples: notFoundErrorExample: - $ref: '#/components/examples/voiceNotFoundErrorExample' + $ref: "#/components/examples/voiceNotFoundErrorExample" voiceNotAllowedError: description: Method Not Allowed content: application/json: schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" examples: notAllowedErrorExample: - $ref: '#/components/examples/voiceNotAllowedErrorExample' + $ref: "#/components/examples/voiceNotAllowedErrorExample" voiceConflictError: description: Conflict content: application/json: schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" examples: conflictErrorExample: - $ref: '#/components/examples/voiceConflictErrorExample' + $ref: "#/components/examples/voiceConflictErrorExample" voiceUnsupportedMediaTypeError: description: Unsupported Media Type content: application/json: schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceUnsupportedMediaTypeErrorExample' + $ref: "#/components/examples/voiceUnsupportedMediaTypeErrorExample" voiceTooManyRequestsError: description: Too Many Requests headers: @@ -7759,174 +7860,174 @@ components: content: application/json: schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/voiceTooManyRequestsErrorExample' + $ref: "#/components/examples/voiceTooManyRequestsErrorExample" voiceInternalServerError: description: Internal Server Error content: application/json: schema: - $ref: '#/components/schemas/voiceApiError' + $ref: "#/components/schemas/voiceApiError" examples: internalServerErrorExample: - $ref: '#/components/examples/voiceInternalServerErrorExample' + $ref: "#/components/examples/voiceInternalServerErrorExample" voiceCodeResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/voiceCodeResponse' + $ref: "#/components/schemas/voiceCodeResponse" messagingCodeResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/messagingCodeResponse' + $ref: "#/components/schemas/messagingCodeResponse" verifyCodeResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/verifyCodeResponse' + $ref: "#/components/schemas/verifyCodeResponse" mfaBadRequestError: description: Bad Request headers: {} content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" mfaUnauthorizedError: description: Unauthorized headers: {} content: application/json: schema: - $ref: '#/components/schemas/mfaUnauthorizedRequestError' + $ref: "#/components/schemas/mfaUnauthorizedRequestError" mfaForbiddenError: description: Forbidden headers: {} content: application/json: schema: - $ref: '#/components/schemas/mfaForbiddenRequestError' + $ref: "#/components/schemas/mfaForbiddenRequestError" mfaTooManyRequestsError: description: Too Many Requests headers: {} content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" mfaInternalServerError: description: Internal Server Error headers: {} content: application/json: schema: - $ref: '#/components/schemas/mfaRequestError' + $ref: "#/components/schemas/mfaRequestError" createSyncLookupResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/createSyncLookupResponse' + $ref: "#/components/schemas/createSyncLookupResponse" examples: lookupCompleteWithDniExample: - $ref: '#/components/examples/lookupCompleteWithDniExample' + $ref: "#/components/examples/lookupCompleteWithDniExample" lookupCompleteExample: - $ref: '#/components/examples/lookupCompleteExample' + $ref: "#/components/examples/lookupCompleteExample" lookupCompleteWithRcsExample: - $ref: '#/components/examples/lookupCompleteWithRcsExample' + $ref: "#/components/examples/lookupCompleteWithRcsExample" lookupCompleteWithRcsErrorExample: - $ref: '#/components/examples/lookupCompleteWithRcsErrorExample' + $ref: "#/components/examples/lookupCompleteWithRcsErrorExample" lookupPartialExample: - $ref: '#/components/examples/lookupPartialExample' + $ref: "#/components/examples/lookupPartialExample" lookupFailedExample: - $ref: '#/components/examples/lookupFailedExample' + $ref: "#/components/examples/lookupFailedExample" createAsyncBulkLookupResponse: description: Accepted content: application/json: schema: - $ref: '#/components/schemas/createAsyncBulkLookupResponse' + $ref: "#/components/schemas/createAsyncBulkLookupResponse" examples: lookupAcceptedExample: - $ref: '#/components/examples/lookupAcceptedExample' + $ref: "#/components/examples/lookupAcceptedExample" getAsyncBulkLookupResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/getAsyncBulkLookupResponse' + $ref: "#/components/schemas/getAsyncBulkLookupResponse" examples: lookupCompleteWithDniExample: - $ref: '#/components/examples/lookupCompleteWithDniExample' + $ref: "#/components/examples/lookupCompleteWithDniExample" lookupCompleteExample: - $ref: '#/components/examples/lookupCompleteExample' + $ref: "#/components/examples/lookupCompleteExample" lookupInProgressExample: - $ref: '#/components/examples/lookupInProgressExample' + $ref: "#/components/examples/lookupInProgressExample" lookupPartialExample: - $ref: '#/components/examples/lookupPartialExample' + $ref: "#/components/examples/lookupPartialExample" lookupFailedExample: - $ref: '#/components/examples/lookupFailedExample' + $ref: "#/components/examples/lookupFailedExample" tnLookupDefaultResponse: description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/lookupErrorResponse' + $ref: "#/components/schemas/lookupErrorResponse" examples: badRequest: - $ref: '#/components/examples/badRequestExample' + $ref: "#/components/examples/badRequestExample" unauthorized: - $ref: '#/components/examples/unauthorizedExample' + $ref: "#/components/examples/unauthorizedExample" forbidden: - $ref: '#/components/examples/forbiddenExample' + $ref: "#/components/examples/forbiddenExample" mediaType: - $ref: '#/components/examples/unsupportedMediaTypeExample' + $ref: "#/components/examples/unsupportedMediaTypeExample" notFound: - $ref: '#/components/examples/notFoundExample' + $ref: "#/components/examples/notFoundExample" tooManyRequests: - $ref: '#/components/examples/tooManyRequestsExample' + $ref: "#/components/examples/tooManyRequestsExample" internalServer: - $ref: '#/components/examples/internalServerErrorExample' + $ref: "#/components/examples/internalServerErrorExample" getTollFreeVerificationStatusResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/tfvStatus' + $ref: "#/components/schemas/tfvStatus" listWebhookSubscriptionsResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/webhookSubscriptionsListBody' + $ref: "#/components/schemas/webhookSubscriptionsListBody" createWebhookSubscriptionResponse: description: Created content: application/json: schema: - $ref: '#/components/schemas/webhookSubscription' + $ref: "#/components/schemas/webhookSubscription" updateWebhookSubscriptionResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/webhookSubscription' + $ref: "#/components/schemas/webhookSubscription" listTollFreeUseCasesResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/useCases' + $ref: "#/components/schemas/useCases" tfvBadRequestResponse: description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" example: description: Cannot process request. type: bad request @@ -7937,7 +8038,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" example: description: cannot process request. errors: @@ -7949,7 +8050,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" example: description: Client is providing incorrect or invalid credentials. type: unauthorized @@ -7958,7 +8059,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" example: description: Client is not authorized for the action. type: forbidden @@ -7967,7 +8068,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" example: description: Cannot find the requested resource. type: Not Found @@ -7976,7 +8077,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" example: description: Method is not allowed. type: Method Not Allowed @@ -7985,7 +8086,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" example: description: Throttling error. Too many requests. type: Too Many Requests @@ -7994,7 +8095,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" example: description: Internal Server Error. type: Internal Server Error @@ -8003,7 +8104,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/tfvError' + $ref: "#/components/schemas/tfvError" example: description: Service Unavailable Error. type: Service Unavailable @@ -8014,82 +8115,82 @@ components: content: application/json: schema: - $ref: '#/components/schemas/listEndpointsResponse' + $ref: "#/components/schemas/listEndpointsResponse" examples: listEndpointsResponseExample: - $ref: '#/components/examples/listEndpointsResponseExample' + $ref: "#/components/examples/listEndpointsResponseExample" createEndpointResponse: description: Created content: application/json: schema: - $ref: '#/components/schemas/createEndpointResponse' + $ref: "#/components/schemas/createEndpointResponse" examples: createEndpointResponseExample: - $ref: '#/components/examples/createEndpointResponseExample' + $ref: "#/components/examples/createEndpointResponseExample" getEndpointResponse: description: OK content: application/json: schema: - $ref: '#/components/schemas/endpointResponse' + $ref: "#/components/schemas/endpointResponse" examples: getEndpointResponseExample: - $ref: '#/components/examples/getEndpointResponseExample' + $ref: "#/components/examples/getEndpointResponseExample" badRequestErrorResponse: description: Bad Request content: application/json: schema: - $ref: '#/components/schemas/brtcErrorResponse' + $ref: "#/components/schemas/brtcErrorResponse" examples: badRequestErrorExample: - $ref: '#/components/examples/badRequestErrorExample' + $ref: "#/components/examples/badRequestErrorExample" unauthorizedErrorResponse: description: Unauthorized content: application/json: schema: - $ref: '#/components/schemas/brtcErrorResponse' + $ref: "#/components/schemas/brtcErrorResponse" examples: unauthorizedErrorExample: - $ref: '#/components/examples/unauthorizedErrorExample' + $ref: "#/components/examples/unauthorizedErrorExample" forbiddenErrorResponse: description: Forbidden content: application/json: schema: - $ref: '#/components/schemas/brtcErrorResponse' + $ref: "#/components/schemas/brtcErrorResponse" examples: forbiddenErrorExample: - $ref: '#/components/examples/forbiddenErrorExample' + $ref: "#/components/examples/forbiddenErrorExample" notFoundErrorResponse: description: Not Found content: application/json: schema: - $ref: '#/components/schemas/brtcErrorResponse' + $ref: "#/components/schemas/brtcErrorResponse" examples: notFoundErrorExample: - $ref: '#/components/examples/notFoundErrorExample' + $ref: "#/components/examples/notFoundErrorExample" methodNotAllowedErrorResponse: description: Method Not Allowed content: application/json: schema: - $ref: '#/components/schemas/brtcErrorResponse' + $ref: "#/components/schemas/brtcErrorResponse" examples: methodNotAllowedErrorExample: - $ref: '#/components/examples/methodNotAllowedErrorExample' + $ref: "#/components/examples/methodNotAllowedErrorExample" unsupportedMediaTypeErrorResponse: description: Unsupported Media Type content: application/json: schema: - $ref: '#/components/schemas/brtcErrorResponse' + $ref: "#/components/schemas/brtcErrorResponse" examples: unsuppotedMediaTypeErrorExample: - $ref: '#/components/examples/unsupportedMediaTypeErrorExample' + $ref: "#/components/examples/unsupportedMediaTypeErrorExample" tooManyRequestsErrorResponse: description: Too Many Requests headers: @@ -8104,19 +8205,19 @@ components: content: application/json: schema: - $ref: '#/components/schemas/brtcErrorResponse' + $ref: "#/components/schemas/brtcErrorResponse" examples: tooManyRequestsErrorExample: - $ref: '#/components/examples/tooManyRequestsErrorExample' + $ref: "#/components/examples/tooManyRequestsErrorExample" serviceUnavailableErrorResponse: description: Service Unavailable content: application/json: schema: - $ref: '#/components/schemas/brtcErrorResponse' + $ref: "#/components/schemas/brtcErrorResponse" examples: serviceUnavailableErrorExample: - $ref: '#/components/examples/serviceUnavailableErrorExample' + $ref: "#/components/examples/serviceUnavailableErrorExample" parameters: accountId: in: path @@ -8124,14 +8225,20 @@ components: required: true schema: type: string - description: Your Bandwidth Account ID. - example: '9900000' + description: > + This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth + App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. + + + **When migrating to OAuth authentication, you must use the 7-digit + Account ID.** + example: "9900000" mediaId: in: path name: mediaId required: true - description: Media ID to retrieve. - example: 14762070468292kw2fuqty55yp2b2/0/bw.png + description: The ID of the media file. + example: bw.png schema: type: string contentType: @@ -8184,7 +8291,7 @@ components: full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). - example: '%2B15554443333' + example: "%2B15554443333" schema: type: string destinationTn: @@ -8196,7 +8303,7 @@ components: single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). - example: '%2B15554443333' + example: "%2B15554443333" schema: type: string messageStatus: @@ -8207,14 +8314,14 @@ components: The status of the message. One of RECEIVED QUEUED SENDING SENT FAILED DELIVERED ACCEPTED UNDELIVERED. schema: - $ref: '#/components/schemas/messageStatusEnum' + $ref: "#/components/schemas/messageStatusEnum" messageDirection: in: query name: messageDirection required: false description: The direction of the message. One of INBOUND OUTBOUND. schema: - $ref: '#/components/schemas/listMessageDirectionEnum' + $ref: "#/components/schemas/listMessageDirectionEnum" carrierName: in: query name: carrierName @@ -8232,7 +8339,7 @@ components: required: false description: The type of message. Either sms or mms. schema: - $ref: '#/components/schemas/messageTypeEnum' + $ref: "#/components/schemas/messageTypeEnum" errorCode: in: query name: errorCode @@ -8296,7 +8403,7 @@ components: description: Messaging product associated with the message. example: P2P schema: - $ref: '#/components/schemas/productTypeEnum' + $ref: "#/components/schemas/productTypeEnum" location: in: query name: location @@ -8416,6 +8523,14 @@ components: example: true schema: type: boolean + accountId1: + name: accountId + in: path + required: true + schema: + type: string + description: Your Bandwidth Account ID. + example: "9900000" callId: name: callId in: path @@ -8463,7 +8578,7 @@ components: schema: type: string description: Filter results by the `to` field. - example: '%2b19195551234' + example: "%2b19195551234" from: name: from in: query @@ -8471,7 +8586,7 @@ components: schema: type: string description: Filter results by the `from` field. - example: '%2b19195554321' + example: "%2b19195554321" name: name: name in: query @@ -8489,7 +8604,7 @@ components: description: >- Filter results to conferences which have a `createdTime` after or at `minCreatedTime` (in ISO8601 format). - example: '2022-06-21T19:13:21Z' + example: "2022-06-21T19:13:21Z" maxCreatedTime: name: maxCreatedTime in: query @@ -8499,7 +8614,7 @@ components: description: >- Filter results to conferences which have a `createdTime` before or at `maxCreatedTime` (in ISO8601 format). - example: '2022-06-21T19:13:21Z' + example: "2022-06-21T19:13:21Z" minStartTime: name: minStartTime in: query @@ -8509,7 +8624,7 @@ components: description: >- Filter results to recordings which have a `startTime` after or including `minStartTime` (in ISO8601 format). - example: '2022-06-21T19:13:21Z' + example: "2022-06-21T19:13:21Z" maxStartTime: name: maxStartTime in: query @@ -8519,7 +8634,7 @@ components: description: >- Filter results to recordings which have a `startTime` before `maxStartTime` (in ISO8601 format). - example: '2022-06-21T19:13:21Z' + example: "2022-06-21T19:13:21Z" pageSize: name: pageSize in: query @@ -8541,7 +8656,7 @@ components: description: >- Filter results to calls which have a `startTime` after or including `minStartTime` (in ISO8601 format). - example: '2022-06-21T19:13:21Z' + example: "2022-06-21T19:13:21Z" maxStartTimeCalls: name: maxStartTime in: query @@ -8551,7 +8666,7 @@ components: description: >- Filter results to calls which have a `startTime` before or including `maxStartTime` (in ISO8601 format). - example: '2022-06-21T19:13:21Z' + example: "2022-06-21T19:13:21Z" pageSizeCalls: name: pageSize in: query @@ -8583,14 +8698,22 @@ components: type: string description: Filter results to calls with specified call Disconnect Cause. example: hangup - accountId1: + accountId2: + in: path + name: accountId + required: true + schema: + type: string + description: Your Bandwidth Account ID. + example: "9900000" + accountId3: in: path name: accountId required: true schema: type: string description: Your Bandwidth Account ID. - example: '9900000' + example: "9900000" requestId: in: path name: requestId @@ -8600,14 +8723,22 @@ components: format: uuid description: The phone number lookup request ID from Bandwidth. example: 004223a0-8b17-41b1-bf81-20732adf5590 + accountId4: + in: path + name: accountId + required: true + schema: + type: string + description: Your Bandwidth Account ID. + example: "9900000" tfPhoneNumberPathParam: in: path name: phoneNumber required: true schema: - $ref: '#/components/schemas/tfPhoneNumber' + $ref: "#/components/schemas/tfPhoneNumber" description: Valid Toll-Free telephone number in E.164 format. - example: '+18885555555' + example: "+18885555555" webhookSubscriptionIdPathParam: in: path name: id @@ -8616,6 +8747,14 @@ components: type: string description: Webhook subscription ID example: 7bt57JcsVYJrN9K1OcV1Nu + accountId5: + in: path + name: accountId + required: true + schema: + type: string + description: Your Bandwidth Account ID. + example: "9900000" endpointId: name: endpointId in: path @@ -8628,13 +8767,13 @@ components: name: type in: query schema: - $ref: '#/components/schemas/endpointTypeEnum' + $ref: "#/components/schemas/endpointTypeEnum" description: The type of endpoint. endpointStatus: name: status in: query schema: - $ref: '#/components/schemas/endpointStatusEnum' + $ref: "#/components/schemas/endpointStatusEnum" description: The status of the endpoint. afterCursor: name: afterCursor @@ -8659,39 +8798,39 @@ components: smsMessageReceivedCallbackExample: summary: An example of a sms message-received callback body. value: - time: '2025-01-06T15:43:35.502180Z' + time: "2025-01-06T15:43:35.502180Z" type: message-received - to: '+12345678902' + to: "+12345678902" description: Incoming message received message: id: 14762070468292kw2fuqty55yp2b2 - owner: '+12345678902' + owner: "+12345678902" applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 - time: '2025-01-06T15:43:34.000000Z' + time: "2025-01-06T15:43:34.000000Z" segmentCount: 1 direction: in to: - - '+12345678902' - from: '+12345678901' + - "+12345678902" + from: "+12345678901" text: Hey, check out this SMS! mmsMessageReceivedCallbackExample: summary: An example of a mms message-received callback body. value: - time: '2024-09-14T18:20:45.160744Z' + time: "2024-09-14T18:20:45.160744Z" type: message-received - to: '+12345678902' + to: "+12345678902" description: Incoming message received message: id: 14762070468292kw2fuqty55yp2b2 - owner: '+12345678902' + owner: "+12345678902" applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 - time: '2024-09-14T18:20:45.160744Z' + time: "2024-09-14T18:20:45.160744Z" segmentCount: 1 direction: in to: - - '+12345678902' - - '+12345678903' - from: '+12345678901' + - "+12345678902" + - "+12345678903" + from: "+12345678901" text: Hey, check out the MMS! media: - >- @@ -8699,42 +8838,42 @@ components: messageSendingCallbackExample: summary: An example of a message-sending callback body. value: - time: '2024-06-25T18:42:36.979456Z' + time: "2024-06-25T18:42:36.979456Z" type: message-sending - to: '+15554443333' + to: "+15554443333" description: Message is sending to carrier. message: id: 1593110555875xo7watq5px6rbe5d - owner: '+15552221111' + owner: "+15552221111" applicationId: cfd4fb83-7531-4acc-b471-42d0bb76a65c - time: '2024-06-25T18:42:35.876906Z' + time: "2024-06-25T18:42:35.876906Z" segmentCount: 1 direction: out to: - - '+15554443333' - from: '+15552221111' - text: '' + - "+15554443333" + from: "+15552221111" + text: "" media: - https://dev.bandwidth.com/images/bandwidth-logo.png tag: your tag here messageSentCallbackExample: summary: An example of a message-sent callback body. value: - time: '2024-06-25T18:42:36.979456Z' + time: "2024-06-25T18:42:36.979456Z" type: message-sent - to: '+15554443333' + to: "+15554443333" description: Message sent to carrier message: id: 1593110555875xo7watq5px6rbe5d - owner: '+15552221111' + owner: "+15552221111" applicationId: cfd4fb83-7531-4acc-b471-42d0bb76a65c - time: '2024-06-25T18:42:35.876906Z' + time: "2024-06-25T18:42:35.876906Z" segmentCount: 1 direction: out to: - - '+15554443333' - from: '+15552221111' - text: '' + - "+15554443333" + from: "+15552221111" + text: "" media: - https://dev.bandwidth.com/images/bandwidth-logo.png tag: v2 lab @@ -8742,36 +8881,36 @@ components: summary: An example of a sms message-delivered callback body. value: type: message-delivered - time: '2024-09-14T18:20:11.160744Z' + time: "2024-09-14T18:20:11.160744Z" description: Message delivered to handset. - to: '+12345678902' + to: "+12345678902" message: id: 14762070468292kw2fuqty55yp2b2 - time: '2024-09-14T18:20:11.160744Z' + time: "2024-09-14T18:20:11.160744Z" to: - - '+12345678902' - from: '+12345678901' - text: '' + - "+12345678902" + from: "+12345678901" + text: "" applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 - owner: '+12345678902' + owner: "+12345678902" direction: out segmentCount: 1 mmsMessageDeliveredCallbackExample: summary: An example of a mms message-delivered callback body. value: type: message-delivered - time: '2024-09-14T18:20:24.160544Z' + time: "2024-09-14T18:20:24.160544Z" description: Message delivered to handset. - to: '+12345678902' + to: "+12345678902" message: id: 14762070468292kw2fuqty55yp2b2 - time: '2024-09-14T18:20:24.160544Z' + time: "2024-09-14T18:20:24.160544Z" to: - - '+12345678902' - from: '+12345678901' - text: '' + - "+12345678902" + from: "+12345678901" + text: "" applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 - owner: '+12345678902' + owner: "+12345678902" direction: out segmentCount: 1 media: @@ -8780,52 +8919,52 @@ components: summary: An example of a group mms message-delivered callback body. value: type: message-delivered - time: '2024-09-14T18:20:17.160544Z' + time: "2024-09-14T18:20:17.160544Z" description: Message delivered to handset. - to: '+12345678902' + to: "+12345678902" message: id: 14762070468292kw2fuqty55yp2b2 - time: '2024-09-14T18:20:17.160544Z' + time: "2024-09-14T18:20:17.160544Z" to: - - '+12345678902' - - '+12345678903' - from: '+12345678901' - text: '' + - "+12345678902" + - "+12345678903" + from: "+12345678901" + text: "" applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 - owner: '+12345678902' + owner: "+12345678902" direction: out segmentCount: 1 messageFailedCallbackExample: summary: An example of a message-failed callback body. value: type: message-failed - time: '2024-12-18T16:51:27.704450Z' + time: "2024-12-18T16:51:27.704450Z" description: forbidden to country - to: '+52345678903' + to: "+52345678903" errorCode: 4432 message: id: 14762070468292kw2fuqty55yp2b2 - time: '2024-12-18T16:51:27.704450Z' + time: "2024-12-18T16:51:27.704450Z" to: - - '+12345678902' - - '+52345678903' - from: '+12345678901' - text: '' + - "+12345678902" + - "+52345678903" + from: "+12345678901" + text: "" applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 media: - https://dev.bandwidth.com/images/bandwidth-logo.png - owner: '+12345678901' + owner: "+12345678901" direction: out segmentCount: 1 createCallResponseExample: summary: Example of a createCall Response value: applicationId: 04e88489-df02-4e34-a0ee-27a91849555f - accountId: '9900000' + accountId: "9900000" callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 - to: '+19195551234' - from: '+19195554312' - enqueuedTime: '2022-06-16T13:15:07.160Z' + to: "+19195551234" + from: "+19195554312" + enqueuedTime: "2022-06-16T13:15:07.160Z" callUrl: >- https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 callTimeout: 30 @@ -8838,17 +8977,17 @@ components: disconnectMethod: POST disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect username: mySecretUsername - password: '*****' + password: "*****" fallbackUsername: mySecretUsername - fallbackPassword: '*****' + fallbackPassword: "*****" priority: 5 listConferencesResponseExample: summary: Example of a listConferences Response value: - id: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9 name: my-conference-name - createdTime: '2022-06-17T22:19:40.375Z' - completedTime: '2022-06-17T22:20:00.000Z' + createdTime: "2022-06-17T22:19:40.375Z" + completedTime: "2022-06-17T22:20:00.000Z" conferenceEventUrl: https://myServer.example/bandwidth/webhooks/conferenceEvent conferenceEventMethod: POST tag: my custom tag @@ -8856,64 +8995,64 @@ components: summary: Example of a Bad Request (400) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed.' + description: "Invalid answerUrl: only http and https are allowed." voiceUnauthorizedErrorExample: summary: Example of an Unauthorized (401) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed.' + description: "Invalid answerUrl: only http and https are allowed." voiceForbiddenErrorExample: summary: Example of a Forbidden (403) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed.' + description: "Invalid answerUrl: only http and https are allowed." voiceNotFoundErrorExample: summary: Example of a Not Found (404) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed.' + description: "Invalid answerUrl: only http and https are allowed." voiceNotAllowedErrorExample: summary: Example of a Not Allowed (405) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed.' + description: "Invalid answerUrl: only http and https are allowed." voiceConflictErrorExample: summary: Example of a Conflict (409) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed.' + description: "Invalid answerUrl: only http and https are allowed." voiceUnsupportedMediaTypeErrorExample: summary: Example of an Unsupported Media Type (415) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed.' + description: "Invalid answerUrl: only http and https are allowed." voiceTooManyRequestsErrorExample: summary: Example of a Too Many Requests (429) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed.' + description: "Invalid answerUrl: only http and https are allowed." voiceInternalServerErrorExample: summary: Example of an Internal Server (500) Error value: type: validation - description: 'Invalid answerUrl: only http and https are allowed.' + description: "Invalid answerUrl: only http and https are allowed." singleNumberRequestExample: summary: Number Lookup Request value: phoneNumbers: - - '+19196104423' + - "+19196104423" multipleNumberRequestExample: summary: Number Lookup Request for Multiple Numbers value: phoneNumbers: - - '+19196104423' - - '+19196104424' + - "+19196104423" + - "+19196104424" rcsAgentRequestExample: summary: Number Lookup Request with Custom RCS Agent value: phoneNumbers: - - '+19196104423' - - '+19196104424' + - "+19196104423" + - "+19196104424" rcsAgent: MyCustomRcsAgent lookupAcceptedExample: summary: Numbers Lookup Accepted @@ -8950,7 +9089,7 @@ components: description: The following TNs could not be found in the Number Industry data meta: phoneNumbers: - - '+13992077164' + - "+13992077164" message: Invalid TNs code: 1001 type: NumberInventory @@ -8962,12 +9101,12 @@ components: requestId: 004223a0-8b17-41b1-bf81-20732adf5590 status: PARTIAL_COMPLETE results: - - phoneNumber: '+19196104423' + - phoneNumber: "+19196104423" lineType: MOBILE messagingProvider: Verizon Wireless voiceProvider: Verizon Wireless countryCodeA3: USA - - phoneNumber: '+19196104424' + - phoneNumber: "+19196104424" lineType: MOBILE messagingProvider: T-Mobile USA voiceProvider: T-Mobile USA @@ -8977,7 +9116,7 @@ components: description: The following TNs could not be found in the Number Industry data meta: phoneNumbers: - - '+13992077164' + - "+13992077164" message: Invalid TNs code: 1001 type: NumberInventory @@ -8989,12 +9128,12 @@ components: requestId: 004223a0-8b17-41b1-bf81-20732adf5590 status: COMPLETE results: - - phoneNumber: '+10072904497' + - phoneNumber: "+10072904497" lineType: MOBILE messagingProvider: Verizon Wireless voiceProvider: Verizon Wireless countryCodeA3: USA - - phoneNumber: '+10072904498' + - phoneNumber: "+10072904498" lineType: MOBILE messagingProvider: T-Mobile USA voiceProvider: T-Mobile USA @@ -9008,36 +9147,36 @@ components: requestId: 20732adf-bf81-8b17-41b1-004223a05590 status: COMPLETE results: - - phoneNumber: '+10072904497' + - phoneNumber: "+10072904497" countryCodeA3: USA lineType: MOBILE messagingProvider: T-MOBILE USA INC voiceProvider: T-MOBILE USA INC latestMessageDeliveryStatus: ACTIVE - initialMessageDeliveryStatusDate: '2025-05-14' - latestMessageDeliveryStatusDate: '2025-05-18' - - phoneNumber: '+10072904498' + initialMessageDeliveryStatusDate: "2025-05-14" + latestMessageDeliveryStatusDate: "2025-05-18" + - phoneNumber: "+10072904498" countryCodeA3: USA lineType: MOBILE voiceProvider: VERIZON latestMessageDeliveryStatus: DEACTIVATED - initialMessageDeliveryStatusDate: '2025-09-05' - latestMessageDeliveryStatusDate: '2025-09-05' - - phoneNumber: '+10072904499' + initialMessageDeliveryStatusDate: "2025-09-05" + latestMessageDeliveryStatusDate: "2025-09-05" + - phoneNumber: "+10072904499" lineType: MOBILE countryCodeA3: USA messagingProvider: VERIZON voiceProvider: VERIZON deactivationReporter: Verizon Wireless - deactivationDate: '2025-09-29 01:23:00' + deactivationDate: "2025-09-29 01:23:00" deactivationEvent: DEACTIVATED latestMessageDeliveryStatus: UNKNOWN - - phoneNumber: '+10072904500' + - phoneNumber: "+10072904500" lineType: FIXED countryCodeA3: USA voiceProvider: VERIZON deactivationReporter: Verizon Wireless - deactivationDate: '2025-09-29 01:23:00' + deactivationDate: "2025-09-29 01:23:00" deactivationEvent: DEACTIVATED latestMessageDeliveryStatus: NOT_ENABLED errors: [] @@ -9049,13 +9188,13 @@ components: requestId: 004223a0-8b17-41b1-bf81-20732adf5590 status: COMPLETE results: - - phoneNumber: '+10072904497' + - phoneNumber: "+10072904497" lineType: MOBILE messagingProvider: Verizon Wireless voiceProvider: Verizon Wireless countryCodeA3: USA rcsEnabled: true - - phoneNumber: '+10072904498' + - phoneNumber: "+10072904498" lineType: MOBILE messagingProvider: T-Mobile USA voiceProvider: T-Mobile USA @@ -9070,12 +9209,12 @@ components: requestId: 004223a0-8b17-41b1-bf81-20732adf5590 status: COMPLETE results: - - phoneNumber: '+10072904497' + - phoneNumber: "+10072904497" lineType: MOBILE messagingProvider: Verizon Wireless voiceProvider: Verizon Wireless countryCodeA3: USA - - phoneNumber: '+10072904498' + - phoneNumber: "+10072904498" lineType: MOBILE messagingProvider: T-Mobile USA voiceProvider: T-Mobile USA @@ -9086,13 +9225,13 @@ components: description: An exception was thrown during the async RCS service call. meta: phoneNumbers: - - '+10072904497' + - "+10072904497" - code: MISSING_FROM_RESPONSE type: rcs-error description: The phone number was absent from the RCS service response. meta: phoneNumbers: - - '+10072904498' + - "+10072904498" badRequestExample: summary: Example Bad Request Error value: @@ -9111,7 +9250,7 @@ components: errors: - type: Unauthorized description: You are not authorized to access this resource. - code: '1' + code: "1" page: null forbiddenExample: summary: Forbidden Error @@ -9121,7 +9260,7 @@ components: errors: - type: Forbidden description: You do not have permission to access this resource. - code: '2' + code: "2" page: null unsupportedMediaTypeExample: summary: Unsupported Media Type Error @@ -9159,7 +9298,7 @@ components: links: [] data: {} errors: - - code: '500' + - code: "500" type: unexpected-error description: >- Unexpected error. Please contact Bandwidth Support if your @@ -9186,14 +9325,14 @@ components: - endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 type: WEBRTC status: CONNECTED - creationTimestamp: '2021-01-01T00:00:00Z' - expirationTimestamp: '2021-01-02T00:00:00Z' + creationTimestamp: "2021-01-01T00:00:00Z" + expirationTimestamp: "2021-01-02T00:00:00Z" tag: my-tag - endpointId: e-2cb0-4a07-b215-b22865662d85-15ac29a2-1331029c type: WEBRTC status: CONNECTED - creationTimestamp: '2021-01-01T00:00:00Z' - expirationTimestamp: '2021-01-02T00:00:00Z' + creationTimestamp: "2021-01-01T00:00:00Z" + expirationTimestamp: "2021-01-02T00:00:00Z" tag: my-tag errors: [] createEndpointResponseExample: @@ -9209,8 +9348,8 @@ components: token: xxxxx.yyyyy.zzzzz type: WEBRTC status: CONNECTED - creationTimestamp: '2021-01-01T00:00:00Z' - expirationTimestamp: '2021-01-02T00:00:00Z' + creationTimestamp: "2021-01-01T00:00:00Z" + expirationTimestamp: "2021-01-02T00:00:00Z" devices: [] tag: my-tag errors: [] @@ -9226,8 +9365,8 @@ components: endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 type: WEBRTC status: CONNECTED - creationTimestamp: '2021-01-01T00:00:00Z' - expirationTimestamp: '2021-01-02T00:00:00Z' + creationTimestamp: "2021-01-01T00:00:00Z" + expirationTimestamp: "2021-01-02T00:00:00Z" devices: [] tag: my-tag errors: [] @@ -9240,7 +9379,7 @@ components: port: 3000 credentials: username: username - password: '********' + password: "********" uuiHeader: 123456;encoding=jwt direction: INBOUND eventCallbackUrl: https://myEventCallbackUrl.com/callbacks/bandwidth @@ -9263,9 +9402,9 @@ components: endpointId: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 type: WEBRTC status: DISCONNECTED - creationTimestamp: '2021-01-01T00:00:00Z' - expirationTimestamp: '2021-01-02T00:00:00Z' - eventTime: '2021-01-01T00:00:00Z' + creationTimestamp: "2021-01-01T00:00:00Z" + expirationTimestamp: "2021-01-02T00:00:00Z" + eventTime: "2021-01-01T00:00:00Z" eventType: DEVICE_DISCONNECTED tag: my-tag badRequestErrorExample: @@ -9277,7 +9416,7 @@ components: - id: 59512d87-7a92-4040-8e4a-78fb772019b9 type: invalid_parameter description: accountId must not contain any characters other than numbers. - code: '400' + code: "400" source: parameter: accountId unauthorizedErrorExample: @@ -9291,7 +9430,7 @@ components: description: >- The provided credentials are not authorized to access this resource. - code: '401' + code: "401" source: header: Authorization forbiddenErrorExample: @@ -9305,7 +9444,7 @@ components: description: >- The provided credentials are not authorized to access this resource. - code: '403' + code: "403" source: header: Authorization notFoundErrorExample: @@ -9317,7 +9456,7 @@ components: - id: 59512d87-7a92-4040-8e4a-78fb772019b9 type: resource_not_found description: The requested resource was not found. - code: '404' + code: "404" source: reference: e-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85 methodNotAllowedErrorExample: @@ -9329,7 +9468,7 @@ components: - id: 59512d87-7a92-4040-8e4a-78fb772019b9 type: method_not_allowed description: The requested method is not allowed on this resource. - code: '405' + code: "405" source: parameter: accountId unsupportedMediaTypeErrorExample: @@ -9341,7 +9480,7 @@ components: - id: 59512d87-7a92-4040-8e4a-78fb772019b9 type: unsupported_media_type description: The provided media type is not supported. - code: '415' + code: "415" source: header: Content-Type tooManyRequestsErrorExample: @@ -9363,19 +9502,19 @@ components: - id: 59512d87-7a92-4040-8e4a-78fb772019b9 type: service_unavailable description: The service is currently unavailable. - code: '500' + code: "500" requestBodies: createMessageRequest: content: application/json: schema: - $ref: '#/components/schemas/messageRequest' + $ref: "#/components/schemas/messageRequest" required: true createMultiChannelMessageRequest: content: application/json: schema: - $ref: '#/components/schemas/multiChannelMessageRequest' + $ref: "#/components/schemas/multiChannelMessageRequest" required: true uploadMediaRequest: content: @@ -9578,7 +9717,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/createCall' + $ref: "#/components/schemas/createCall" updateCallRequest: description: >- JSON object containing information to redirect an existing call to a new @@ -9587,7 +9726,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/updateCall' + $ref: "#/components/schemas/updateCall" updateCallBxmlRequest: required: true content: @@ -9615,19 +9754,19 @@ components: content: application/json: schema: - $ref: '#/components/schemas/updateCallRecording' + $ref: "#/components/schemas/updateCallRecording" transcribeRecordingRequest: required: true content: application/json: schema: - $ref: '#/components/schemas/transcribeRecording' + $ref: "#/components/schemas/transcribeRecording" updateConferenceRequest: required: true content: application/json: schema: - $ref: '#/components/schemas/updateConference' + $ref: "#/components/schemas/updateConference" updateConferenceBxmlRequest: required: true content: @@ -9648,59 +9787,59 @@ components: content: application/json: schema: - $ref: '#/components/schemas/updateConferenceMember' + $ref: "#/components/schemas/updateConferenceMember" codeRequest: description: MFA code request body. required: true content: application/json: schema: - $ref: '#/components/schemas/codeRequest' + $ref: "#/components/schemas/codeRequest" codeVerify: description: MFA code verify request body. required: true content: application/json: schema: - $ref: '#/components/schemas/verifyCodeRequest' + $ref: "#/components/schemas/verifyCodeRequest" createSyncLookupRequest: description: Synchronous phone number lookup request. required: true content: application/json: schema: - $ref: '#/components/schemas/syncLookupRequest' + $ref: "#/components/schemas/syncLookupRequest" examples: singleNumberRequestExample: - $ref: '#/components/examples/singleNumberRequestExample' + $ref: "#/components/examples/singleNumberRequestExample" multipleNumberRequestExample: - $ref: '#/components/examples/multipleNumberRequestExample' + $ref: "#/components/examples/multipleNumberRequestExample" rcsAgentRequestExample: - $ref: '#/components/examples/rcsAgentRequestExample' + $ref: "#/components/examples/rcsAgentRequestExample" createAsyncBulkLookupRequest: description: Asynchronous bulk phone number lookup request. required: true content: application/json: schema: - $ref: '#/components/schemas/asyncLookupRequest' + $ref: "#/components/schemas/asyncLookupRequest" examples: multipleNumberRequestExample: - $ref: '#/components/examples/multipleNumberRequestExample' + $ref: "#/components/examples/multipleNumberRequestExample" requestTollFreeVerificationRequest: description: Request for verification of a toll-free phone number. required: true content: application/json: schema: - $ref: '#/components/schemas/verificationRequest' + $ref: "#/components/schemas/verificationRequest" updateTollFreeVerificationRequestRequest: description: Update a request for verification of a toll-free phone number. required: true content: application/json: schema: - $ref: '#/components/schemas/tfvSubmissionWrapper' + $ref: "#/components/schemas/tfvSubmissionWrapper" verificationWebhookRequest: description: Verification callback status of a toll-free phone number. required: true @@ -9708,10 +9847,10 @@ components: application/json: schema: oneOf: - - $ref: '#/components/schemas/verificationWebhook' - - $ref: '#/components/schemas/verificationDenialWebhook' - - $ref: '#/components/schemas/failureWebhook' - - $ref: '#/components/schemas/blockedWebhook' + - $ref: "#/components/schemas/verificationWebhook" + - $ref: "#/components/schemas/verificationDenialWebhook" + - $ref: "#/components/schemas/failureWebhook" + - $ref: "#/components/schemas/blockedWebhook" webhookSubscriptionRequest: description: >- Information about a webhook that Bandwidth should send upon the @@ -9720,16 +9859,16 @@ components: content: application/json: schema: - $ref: '#/components/schemas/webhookSubscriptionRequestSchema' + $ref: "#/components/schemas/webhookSubscriptionRequestSchema" createEndpointRequest: required: true content: application/json: schema: - $ref: '#/components/schemas/createEndpointRequest' + $ref: "#/components/schemas/createEndpointRequest" examples: createWebRtcEndpointRequestExample: - $ref: '#/components/examples/createWeRtcEndpointExample' + $ref: "#/components/examples/createWeRtcEndpointExample" updateEndpointBxmlRequest: required: true content: @@ -9744,7 +9883,7 @@ components: documentation](/docs/voice/bxml/). examples: updateEndpointBxmlRequestExample: - $ref: '#/components/examples/updateEndpointBxmlRequestExample' + $ref: "#/components/examples/updateEndpointBxmlRequestExample" securitySchemes: Basic: type: http @@ -9765,7 +9904,7 @@ components: scopes: {} callbacks: inboundCallback: - '{inboundCallbackUrl}': + "{inboundCallbackUrl}": post: requestBody: required: true @@ -9792,19 +9931,19 @@ components: content: application/json: schema: - $ref: '#/components/schemas/inboundCallback' + $ref: "#/components/schemas/inboundCallback" examples: smsMessageReceivedCallback: - $ref: '#/components/examples/smsMessageReceivedCallbackExample' + $ref: "#/components/examples/smsMessageReceivedCallbackExample" mmsMessageReceivedCallback: - $ref: '#/components/examples/mmsMessageReceivedCallbackExample' + $ref: "#/components/examples/mmsMessageReceivedCallbackExample" responses: - '200': + "200": description: OK - '202': + "202": description: Accepted statusCallback: - '{statusCallbackUrl}': + "{statusCallbackUrl}": post: requestBody: required: true @@ -9820,25 +9959,25 @@ components: content: application/json: schema: - $ref: '#/components/schemas/statusCallback' + $ref: "#/components/schemas/statusCallback" examples: messageSendingCallback: - $ref: '#/components/examples/messageSendingCallbackExample' + $ref: "#/components/examples/messageSendingCallbackExample" messageSentCallback: - $ref: '#/components/examples/messageSentCallbackExample' + $ref: "#/components/examples/messageSentCallbackExample" smsMessageDeliveredCallback: - $ref: '#/components/examples/smsMessageDeliveredCallbackExample' + $ref: "#/components/examples/smsMessageDeliveredCallbackExample" mmsMessageDeliveredCallback: - $ref: '#/components/examples/mmsMessageDeliveredCallbackExample' + $ref: "#/components/examples/mmsMessageDeliveredCallbackExample" groupMmsMessageDeliveredCallback: $ref: >- #/components/examples/groupMmsMessageDeliveredCallbackExample messageFailedCallback: - $ref: '#/components/examples/messageFailedCallbackExample' + $ref: "#/components/examples/messageFailedCallbackExample" responses: - '200': + "200": description: OK - '202': + "202": description: Accepted tfVerificationStatus: your_url.com/webhookService: @@ -9860,37 +9999,37 @@ components: schema: type: string requestBody: - $ref: '#/components/requestBodies/verificationWebhookRequest' + $ref: "#/components/requestBodies/verificationWebhookRequest" responses: - '204': - $ref: '#/components/responses/noContentResponse' - '400': - $ref: '#/components/responses/tfvBadRequestResponse' - '401': - $ref: '#/components/responses/tfvUnauthorizedResponse' - '403': - $ref: '#/components/responses/tfvForbiddenResponse' - '404': - $ref: '#/components/responses/tfvNotFoundResponse' - '405': - $ref: '#/components/responses/tfvNotAllowedResponse' - '429': - $ref: '#/components/responses/tfvTooManyRequestsResponse' - '500': - $ref: '#/components/responses/tfvServerErrorResponse' - '503': - $ref: '#/components/responses/tfvServiceUnavailableResponse' + "204": + $ref: "#/components/responses/noContentResponse" + "400": + $ref: "#/components/responses/tfvBadRequestResponse" + "401": + $ref: "#/components/responses/tfvUnauthorizedResponse" + "403": + $ref: "#/components/responses/tfvForbiddenResponse" + "404": + $ref: "#/components/responses/tfvNotFoundResponse" + "405": + $ref: "#/components/responses/tfvNotAllowedResponse" + "429": + $ref: "#/components/responses/tfvTooManyRequestsResponse" + "500": + $ref: "#/components/responses/tfvServerErrorResponse" + "503": + $ref: "#/components/responses/tfvServiceUnavailableResponse" endpointEvent: - '{request.body#/eventCallbackUrl}': + "{request.body#/eventCallbackUrl}": post: requestBody: content: application/json: schema: - $ref: '#/components/schemas/endpointEvent' + $ref: "#/components/schemas/endpointEvent" examples: endpointDisconnectedEventExample: - $ref: '#/components/examples/endpointDisconnectedEventExample' + $ref: "#/components/examples/endpointDisconnectedEventExample" responses: - '204': + "204": description: Event was successfully received. diff --git a/custom_templates/composer.mustache b/custom_templates/composer.mustache new file mode 100644 index 00000000..d2aad527 --- /dev/null +++ b/custom_templates/composer.mustache @@ -0,0 +1,52 @@ +{ + {{#composerPackageName}} + "name": "{{.}}", + {{/composerPackageName}} + {{#artifactVersion}} + "version": "{{.}}", + {{/artifactVersion}} + "description": "{{{appDescription}}}", + "keywords": [ + "openapitools", + "openapi-generator", + "openapi", + "php", + "sdk", + "rest", + "api" + ], + "homepage": "https://openapi-generator.tech", + "license": "unlicense", + "authors": [ + { + "name": "OpenAPI-Generator contributors", + "homepage": "https://openapi-generator.tech" + } + ], + "require": { + "php": "^8.1", + "ext-curl": "*", + "ext-dom": "*", + "ext-json": "*", + "ext-mbstring": "*", + "guzzlehttp/guzzle": "^7.4.5", + "guzzlehttp/psr7": "^2.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.5", + "overtrue/phplint": "^9.0", + "phpunit/phpunit": "^9.0" + }, + "autoload": { + "psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/" } + }, + "autoload-dev": { + "psr-4": { "{{escapedInvokerPackage}}\\Test\\" : "{{testBasePath}}/" } + }, + "scripts": { + "test": [ + "@phplint" + ], + "phplint": "phplint" + } +} diff --git a/docs/Api/MediaApi.md b/docs/Api/MediaApi.md index 55d92a6b..81a2ffe5 100644 --- a/docs/Api/MediaApi.md +++ b/docs/Api/MediaApi.md @@ -43,8 +43,8 @@ $apiInstance = new Bandwidth\Api\MediaApi( new GuzzleHttp\Client(), $config ); -$account_id = 9900000; // string | Your Bandwidth Account ID. -$media_id = 14762070468292kw2fuqty55yp2b2/0/bw.png; // string | Media ID to retrieve. +$account_id = 9900000; // string | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** +$media_id = bw.png; // string | The ID of the media file. $hostIndex = 0; $variables = [ @@ -61,8 +61,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **account_id** | **string**| Your Bandwidth Account ID. | | -| **media_id** | **string**| Media ID to retrieve. | | +| **account_id** | **string**| This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | | +| **media_id** | **string**| The ID of the media file. | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | @@ -116,8 +116,8 @@ $apiInstance = new Bandwidth\Api\MediaApi( new GuzzleHttp\Client(), $config ); -$account_id = 9900000; // string | Your Bandwidth Account ID. -$media_id = 14762070468292kw2fuqty55yp2b2/0/bw.png; // string | Media ID to retrieve. +$account_id = 9900000; // string | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** +$media_id = bw.png; // string | The ID of the media file. $hostIndex = 0; $variables = [ @@ -135,8 +135,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **account_id** | **string**| Your Bandwidth Account ID. | | -| **media_id** | **string**| Media ID to retrieve. | | +| **account_id** | **string**| This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | | +| **media_id** | **string**| The ID of the media file. | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | @@ -190,7 +190,7 @@ $apiInstance = new Bandwidth\Api\MediaApi( new GuzzleHttp\Client(), $config ); -$account_id = 9900000; // string | Your Bandwidth Account ID. +$account_id = 9900000; // string | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** $continuation_token = 1XEi2tsFtLo1JbtLwETnM1ZJ+PqAa8w6ENvC5QKvwyrCDYII663Gy5M4s40owR1tjkuWUif6qbWvFtQJR5/ipqbUnfAqL254LKNlPy6tATCzioKSuHuOqgzloDkSwRtX0LtcL2otHS69hK343m+SjdL+vlj71tT39; // string | Continuation token used to retrieve subsequent media. $hostIndex = 0; @@ -209,7 +209,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **account_id** | **string**| Your Bandwidth Account ID. | | +| **account_id** | **string**| This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | | | **continuation_token** | **string**| Continuation token used to retrieve subsequent media. | [optional] | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | @@ -264,8 +264,8 @@ $apiInstance = new Bandwidth\Api\MediaApi( new GuzzleHttp\Client(), $config ); -$account_id = 9900000; // string | Your Bandwidth Account ID. -$media_id = 14762070468292kw2fuqty55yp2b2/0/bw.png; // string | Media ID to retrieve. +$account_id = 9900000; // string | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** +$media_id = bw.png; // string | The ID of the media file. $body = '/path/to/file.txt'; // \SplFileObject $content_type = audio/wav; // string | The media type of the entity-body. $cache_control = no-cache; // string | General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. @@ -285,8 +285,8 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **account_id** | **string**| Your Bandwidth Account ID. | | -| **media_id** | **string**| Media ID to retrieve. | | +| **account_id** | **string**| This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | | +| **media_id** | **string**| The ID of the media file. | | | **body** | **\SplFileObject****\SplFileObject**| | | | **content_type** | **string**| The media type of the entity-body. | [optional] | | **cache_control** | **string**| General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. | [optional] | diff --git a/docs/Api/MessagesApi.md b/docs/Api/MessagesApi.md index 6638e374..b0b0e427 100644 --- a/docs/Api/MessagesApi.md +++ b/docs/Api/MessagesApi.md @@ -41,7 +41,7 @@ $apiInstance = new Bandwidth\Api\MessagesApi( new GuzzleHttp\Client(), $config ); -$account_id = 9900000; // string | Your Bandwidth Account ID. +$account_id = 9900000; // string | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** $message_request = new \Bandwidth\Model\MessageRequest(); // \Bandwidth\Model\MessageRequest $hostIndex = 0; @@ -60,7 +60,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **account_id** | **string**| Your Bandwidth Account ID. | | +| **account_id** | **string**| This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | | | **message_request** | [**\Bandwidth\Model\MessageRequest**](../Model/MessageRequest.md)| | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | @@ -115,7 +115,7 @@ $apiInstance = new Bandwidth\Api\MessagesApi( new GuzzleHttp\Client(), $config ); -$account_id = 9900000; // string | Your Bandwidth Account ID. +$account_id = 9900000; // string | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** $message_id = 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6; // string | The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. $source_tn = %2B15554443333; // string | The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). $destination_tn = %2B15554443333; // string | The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). @@ -160,7 +160,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **account_id** | **string**| Your Bandwidth Account ID. | | +| **account_id** | **string**| This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | | | **message_id** | **string**| The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. | [optional] | | **source_tn** | **string**| The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). | [optional] | | **destination_tn** | **string**| The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). | [optional] | diff --git a/docs/Api/MultiChannelApi.md b/docs/Api/MultiChannelApi.md index bfeebb54..180109b8 100644 --- a/docs/Api/MultiChannelApi.md +++ b/docs/Api/MultiChannelApi.md @@ -40,7 +40,7 @@ $apiInstance = new Bandwidth\Api\MultiChannelApi( new GuzzleHttp\Client(), $config ); -$account_id = 9900000; // string | Your Bandwidth Account ID. +$account_id = 9900000; // string | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** $multi_channel_message_request = new \Bandwidth\Model\MultiChannelMessageRequest(); // \Bandwidth\Model\MultiChannelMessageRequest $hostIndex = 0; @@ -59,7 +59,7 @@ try { | Name | Type | Description | Notes | | ------------- | ------------- | ------------- | ------------- | -| **account_id** | **string**| Your Bandwidth Account ID. | | +| **account_id** | **string**| This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | | | **multi_channel_message_request** | [**\Bandwidth\Model\MultiChannelMessageRequest**](../Model/MultiChannelMessageRequest.md)| | | | hostIndex | null|int | Host index. Defaults to null. If null, then the library will use $this->hostIndex instead | [optional] | | variables | array | Associative array of variables to pass to the host. Defaults to empty array. | [optional] | diff --git a/docs/Model/AnswerCallback.md b/docs/Model/AnswerCallback.md index 3c3bd606..6cacbb4e 100644 --- a/docs/Model/AnswerCallback.md +++ b/docs/Model/AnswerCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] @@ -18,5 +18,6 @@ Name | Type | Description | Notes **answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] **tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] **machine_detection_result** | [**\Bandwidth\Model\MachineDetectionResult**](MachineDetectionResult.md) | | [optional] +**sip_call_id** | **string** | (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BridgeCompleteCallback.md b/docs/Model/BridgeCompleteCallback.md index 107200de..de578e0e 100644 --- a/docs/Model/BridgeCompleteCallback.md +++ b/docs/Model/BridgeCompleteCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] diff --git a/docs/Model/BridgeTargetCompleteCallback.md b/docs/Model/BridgeTargetCompleteCallback.md index 53f2e21c..a13b156d 100644 --- a/docs/Model/BridgeTargetCompleteCallback.md +++ b/docs/Model/BridgeTargetCompleteCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] diff --git a/docs/Model/ConferenceCompletedCallback.md b/docs/Model/ConferenceCompletedCallback.md index 60a60e80..18604d5b 100644 --- a/docs/Model/ConferenceCompletedCallback.md +++ b/docs/Model/ConferenceCompletedCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] **name** | **string** | The user-specified name of the conference that was recorded | [optional] diff --git a/docs/Model/ConferenceCreatedCallback.md b/docs/Model/ConferenceCreatedCallback.md index f54696f8..f8f62ad5 100644 --- a/docs/Model/ConferenceCreatedCallback.md +++ b/docs/Model/ConferenceCreatedCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] **name** | **string** | The user-specified name of the conference that was recorded | [optional] diff --git a/docs/Model/ConferenceMemberExitCallback.md b/docs/Model/ConferenceMemberExitCallback.md index 837a8e06..6edb6d48 100644 --- a/docs/Model/ConferenceMemberExitCallback.md +++ b/docs/Model/ConferenceMemberExitCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] **name** | **string** | The user-specified name of the conference that was recorded | [optional] diff --git a/docs/Model/ConferenceMemberJoinCallback.md b/docs/Model/ConferenceMemberJoinCallback.md index f47aea1e..7056338b 100644 --- a/docs/Model/ConferenceMemberJoinCallback.md +++ b/docs/Model/ConferenceMemberJoinCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] **name** | **string** | The user-specified name of the conference that was recorded | [optional] diff --git a/docs/Model/ConferenceRecordingAvailableCallback.md b/docs/Model/ConferenceRecordingAvailableCallback.md index 23a82809..3cc8a67e 100644 --- a/docs/Model/ConferenceRecordingAvailableCallback.md +++ b/docs/Model/ConferenceRecordingAvailableCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] **name** | **string** | The user-specified name of the conference that was recorded | [optional] diff --git a/docs/Model/ConferenceRedirectCallback.md b/docs/Model/ConferenceRedirectCallback.md index d1bd898c..02c36253 100644 --- a/docs/Model/ConferenceRedirectCallback.md +++ b/docs/Model/ConferenceRedirectCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **conference_id** | **string** | The unique, Bandwidth-generated ID of the conference that was recorded | [optional] **name** | **string** | The user-specified name of the conference that was recorded | [optional] diff --git a/docs/Model/DisconnectCallback.md b/docs/Model/DisconnectCallback.md index 8cf3fc83..fcc05e53 100644 --- a/docs/Model/DisconnectCallback.md +++ b/docs/Model/DisconnectCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] @@ -21,5 +21,7 @@ Name | Type | Description | Notes **error_message** | **string** | Text explaining the reason that caused the call to fail in case of errors. | [optional] **error_id** | **string** | Bandwidth's internal id that references the error event. | [optional] **tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**sip_call_id** | **string** | (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. | [optional] +**sip_response_code** | **int** | (optional) The SIP status code returned by Bandwidth's SBC when it rejected an outbound call's INVITE (e.g. 486 for busy, 603 for decline). Present only when an outbound call was rejected by the SBC. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/DtmfCallback.md b/docs/Model/DtmfCallback.md index a01d9d04..2d7eab7c 100644 --- a/docs/Model/DtmfCallback.md +++ b/docs/Model/DtmfCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] diff --git a/docs/Model/GatherCallback.md b/docs/Model/GatherCallback.md index 681db30a..a6ffdcd5 100644 --- a/docs/Model/GatherCallback.md +++ b/docs/Model/GatherCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] diff --git a/docs/Model/InitiateCallback.md b/docs/Model/InitiateCallback.md index 4096e04d..94e831ec 100644 --- a/docs/Model/InitiateCallback.md +++ b/docs/Model/InitiateCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] @@ -17,5 +17,7 @@ Name | Type | Description | Notes **diversion** | [**\Bandwidth\Model\Diversion**](Diversion.md) | | [optional] **stir_shaken** | [**\Bandwidth\Model\StirShaken**](StirShaken.md) | | [optional] **uui** | **string** | The value of the `User-To-User` header to send within the initial `INVITE`. Must include the encoding parameter as specified in RFC 7433. Only `base64`, `jwt` and `hex` encoding are currently allowed. This value, including the encoding specifier, may not exceed 256 characters. | [optional] +**sip_call_id** | **string** | (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. | [optional] +**sip_headers** | **array** | (optional) Map of customer-supplied X-* headers from the original INVITE. Keys are lowercase (SIP headers are case-insensitive). Present only for inbound SIP URI calls with custom headers. Note - keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. | [optional] [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/MachineDetectionCompleteCallback.md b/docs/Model/MachineDetectionCompleteCallback.md index 8f5ae3ac..1a260e16 100644 --- a/docs/Model/MachineDetectionCompleteCallback.md +++ b/docs/Model/MachineDetectionCompleteCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] diff --git a/docs/Model/RecordingAvailableCallback.md b/docs/Model/RecordingAvailableCallback.md index cdf0c491..0e08cb54 100644 --- a/docs/Model/RecordingAvailableCallback.md +++ b/docs/Model/RecordingAvailableCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] diff --git a/docs/Model/RecordingCompleteCallback.md b/docs/Model/RecordingCompleteCallback.md index 1d427fd5..7dc177a4 100644 --- a/docs/Model/RecordingCompleteCallback.md +++ b/docs/Model/RecordingCompleteCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] diff --git a/docs/Model/RedirectCallback.md b/docs/Model/RedirectCallback.md index e3325931..43223b3f 100644 --- a/docs/Model/RedirectCallback.md +++ b/docs/Model/RedirectCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] diff --git a/docs/Model/ReferCallStatusEnum.md b/docs/Model/ReferCallStatusEnum.md new file mode 100644 index 00000000..9f0f5dce --- /dev/null +++ b/docs/Model/ReferCallStatusEnum.md @@ -0,0 +1,8 @@ +# ReferCallStatusEnum + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ReferCompleteCallback.md b/docs/Model/ReferCompleteCallback.md new file mode 100644 index 00000000..c3496423 --- /dev/null +++ b/docs/Model/ReferCompleteCallback.md @@ -0,0 +1,23 @@ +# ReferCompleteCallback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] +**account_id** | **string** | The user account associated with the call. | [optional] +**application_id** | **string** | The id of the application associated with the call. | [optional] +**from** | **string** | The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). | [optional] +**to** | **string** | The phone number that received the call, in E.164 format (e.g. +15555555555). | [optional] +**direction** | [**\Bandwidth\Model\CallDirectionEnum**](CallDirectionEnum.md) | | [optional] +**call_id** | **string** | The call id associated with the event. | [optional] +**call_url** | **string** | The URL of the call associated with the event. | [optional] +**start_time** | **\DateTime** | Time the call was started, in ISO 8601 format. | [optional] +**answer_time** | **\DateTime** | Time the call was answered, in ISO 8601 format. | [optional] +**tag** | **string** | (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. | [optional] +**refer_call_status** | [**\Bandwidth\Model\ReferCallStatusEnum**](ReferCallStatusEnum.md) | | [optional] +**refer_sip_response_code** | **int** | (optional) The SIP response code returned for the REFER request itself (e.g. 202, 405, 603). Present when a SIP response was received for the REFER. | [optional] +**notify_sip_response_code** | **int** | (optional) The final SIP response code reported via NOTIFY (message/sipfrag body). Present only when the caller's endpoint sent a final NOTIFY (e.g. 200, 404, 486, 503). Not present on NOTIFY timeout or when the REFER was rejected before a subscription was established. | [optional] + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/TranscriptionAvailableCallback.md b/docs/Model/TranscriptionAvailableCallback.md index 970b971d..6a1cdc92 100644 --- a/docs/Model/TranscriptionAvailableCallback.md +++ b/docs/Model/TranscriptionAvailableCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] diff --git a/docs/Model/TransferAnswerCallback.md b/docs/Model/TransferAnswerCallback.md index c90ebdd2..ab9e956d 100644 --- a/docs/Model/TransferAnswerCallback.md +++ b/docs/Model/TransferAnswerCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] diff --git a/docs/Model/TransferCompleteCallback.md b/docs/Model/TransferCompleteCallback.md index 826e130a..4aee768d 100644 --- a/docs/Model/TransferCompleteCallback.md +++ b/docs/Model/TransferCompleteCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] diff --git a/docs/Model/TransferDisconnectCallback.md b/docs/Model/TransferDisconnectCallback.md index 92067a27..0f36d0ca 100644 --- a/docs/Model/TransferDisconnectCallback.md +++ b/docs/Model/TransferDisconnectCallback.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] +**event_type** | **string** | The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. | [optional] **event_time** | **\DateTime** | The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. | [optional] **account_id** | **string** | The user account associated with the call. | [optional] **application_id** | **string** | The id of the application associated with the call. | [optional] diff --git a/src/Api/MediaApi.php b/src/Api/MediaApi.php index b0a33ef1..c7948d11 100644 --- a/src/Api/MediaApi.php +++ b/src/Api/MediaApi.php @@ -189,8 +189,8 @@ public function getConfig(): Configuration * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMedia'] to see the possible values for this operation @@ -220,8 +220,8 @@ public function deleteMedia( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMedia'] to see the possible values for this operation @@ -345,8 +345,8 @@ public function deleteMediaWithHttpInfo( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMedia'] to see the possible values for this operation @@ -379,8 +379,8 @@ function ($response) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMedia'] to see the possible values for this operation @@ -429,8 +429,8 @@ function ($exception) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['deleteMedia'] to see the possible values for this operation @@ -561,8 +561,8 @@ protected function getHostSettingsFordeleteMedia(): array * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMedia'] to see the possible values for this operation @@ -592,8 +592,8 @@ public function getMedia( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMedia'] to see the possible values for this operation @@ -798,8 +798,8 @@ public function getMediaWithHttpInfo( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMedia'] to see the possible values for this operation @@ -832,8 +832,8 @@ function ($response) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMedia'] to see the possible values for this operation @@ -895,8 +895,8 @@ function ($exception) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getMedia'] to see the possible values for this operation @@ -1027,7 +1027,7 @@ protected function getHostSettingsForgetMedia(): array * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param string|null $continuation_token Continuation token used to retrieve subsequent media. (optional) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -1058,7 +1058,7 @@ public function listMedia( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param string|null $continuation_token Continuation token used to retrieve subsequent media. (optional) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -1264,7 +1264,7 @@ public function listMediaWithHttpInfo( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param string|null $continuation_token Continuation token used to retrieve subsequent media. (optional) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -1298,7 +1298,7 @@ function ($response) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param string|null $continuation_token Continuation token used to retrieve subsequent media. (optional) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -1361,7 +1361,7 @@ function ($exception) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param string|null $continuation_token Continuation token used to retrieve subsequent media. (optional) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -1483,8 +1483,8 @@ protected function getHostSettingsForlistMedia(): array * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param \SplFileObject $body body (required) * @param string|null $content_type The media type of the entity-body. (optional) * @param string|null $cache_control General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. (optional) @@ -1520,8 +1520,8 @@ public function uploadMedia( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param \SplFileObject $body (required) * @param string|null $content_type The media type of the entity-body. (optional) * @param string|null $cache_control General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. (optional) @@ -1651,8 +1651,8 @@ public function uploadMediaWithHttpInfo( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param \SplFileObject $body (required) * @param string|null $content_type The media type of the entity-body. (optional) * @param string|null $cache_control General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. (optional) @@ -1691,8 +1691,8 @@ function ($response) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param \SplFileObject $body (required) * @param string|null $content_type The media type of the entity-body. (optional) * @param string|null $cache_control General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. (optional) @@ -1747,8 +1747,8 @@ function ($exception) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) - * @param string $media_id Media ID to retrieve. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) + * @param string $media_id The ID of the media file. (required) * @param \SplFileObject $body (required) * @param string|null $content_type The media type of the entity-body. (optional) * @param string|null $cache_control General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. (optional) diff --git a/src/Api/MessagesApi.php b/src/Api/MessagesApi.php index ff9227ab..1c0e4bd4 100644 --- a/src/Api/MessagesApi.php +++ b/src/Api/MessagesApi.php @@ -136,7 +136,7 @@ public function getConfig(): Configuration * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param \Bandwidth\Model\MessageRequest $message_request message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -167,7 +167,7 @@ public function createMessage( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param \Bandwidth\Model\MessageRequest $message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -387,7 +387,7 @@ public function createMessageWithHttpInfo( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param \Bandwidth\Model\MessageRequest $message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -421,7 +421,7 @@ function ($response) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param \Bandwidth\Model\MessageRequest $message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -484,7 +484,7 @@ function ($exception) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param \Bandwidth\Model\MessageRequest $message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -648,7 +648,7 @@ protected function getHostSettingsForcreateMessage(): array * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) @@ -731,7 +731,7 @@ public function listMessages( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) @@ -989,7 +989,7 @@ public function listMessagesWithHttpInfo( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) @@ -1075,7 +1075,7 @@ function ($response) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) @@ -1190,7 +1190,7 @@ function ($exception) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param string|null $message_id The ID of the message to search for. Special characters need to be encoded using URL encoding. Message IDs could come in different formats, e.g., 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 and 1589228074636lm4k2je7j7jklbn2 are valid message ID formats. Note that you must include at least one query parameter. (optional) * @param string|null $source_tn The phone number that sent the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) * @param string|null $destination_tn The phone number that received the message. Accepted values are: a single full phone number a comma separated list of full phone numbers (maximum of 10) or a single partial phone number (minimum of 5 characters e.g. '%2B1919'). (optional) diff --git a/src/Api/MultiChannelApi.php b/src/Api/MultiChannelApi.php index aea7aef0..b0e2b103 100644 --- a/src/Api/MultiChannelApi.php +++ b/src/Api/MultiChannelApi.php @@ -133,7 +133,7 @@ public function getConfig(): Configuration * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request multi_channel_message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -164,7 +164,7 @@ public function createMultiChannelMessage( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -370,7 +370,7 @@ public function createMultiChannelMessageWithHttpInfo( * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -404,7 +404,7 @@ function ($response) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. @@ -467,7 +467,7 @@ function ($exception) { * if needed, use the 'variables' parameter to pass variables to the host. * URL: https://messaging.bandwidth.com/api/v2 * - * @param string $account_id Your Bandwidth Account ID. (required) + * @param string $account_id This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** (required) * @param \Bandwidth\Model\MultiChannelMessageRequest $multi_channel_message_request (required) * @param null|int $hostIndex Host index. Defaults to null. If null, then the library will use $this->hostIndex instead * @param array $variables Associative array of variables to pass to the host. Defaults to empty array. diff --git a/src/Model/AnswerCallback.php b/src/Model/AnswerCallback.php index 4584b78f..b4b61adf 100644 --- a/src/Model/AnswerCallback.php +++ b/src/Model/AnswerCallback.php @@ -73,7 +73,8 @@ class AnswerCallback implements ModelInterface, ArrayAccess, JsonSerializable 'start_time' => '\DateTime', 'answer_time' => '\DateTime', 'tag' => 'string', - 'machine_detection_result' => '\Bandwidth\Model\MachineDetectionResult' + 'machine_detection_result' => '\Bandwidth\Model\MachineDetectionResult', + 'sip_call_id' => 'string' ]; /** @@ -95,7 +96,8 @@ class AnswerCallback implements ModelInterface, ArrayAccess, JsonSerializable 'start_time' => 'date-time', 'answer_time' => 'date-time', 'tag' => null, - 'machine_detection_result' => null + 'machine_detection_result' => null, + 'sip_call_id' => null ]; /** @@ -117,7 +119,8 @@ class AnswerCallback implements ModelInterface, ArrayAccess, JsonSerializable 'start_time' => false, 'answer_time' => true, 'tag' => true, - 'machine_detection_result' => true + 'machine_detection_result' => true, + 'sip_call_id' => false ]; /** @@ -209,7 +212,8 @@ public function isNullableSetToNull(string $property): bool 'start_time' => 'startTime', 'answer_time' => 'answerTime', 'tag' => 'tag', - 'machine_detection_result' => 'machineDetectionResult' + 'machine_detection_result' => 'machineDetectionResult', + 'sip_call_id' => 'sipCallId' ]; /** @@ -231,7 +235,8 @@ public function isNullableSetToNull(string $property): bool 'start_time' => 'setStartTime', 'answer_time' => 'setAnswerTime', 'tag' => 'setTag', - 'machine_detection_result' => 'setMachineDetectionResult' + 'machine_detection_result' => 'setMachineDetectionResult', + 'sip_call_id' => 'setSipCallId' ]; /** @@ -253,7 +258,8 @@ public function isNullableSetToNull(string $property): bool 'start_time' => 'getStartTime', 'answer_time' => 'getAnswerTime', 'tag' => 'getTag', - 'machine_detection_result' => 'getMachineDetectionResult' + 'machine_detection_result' => 'getMachineDetectionResult', + 'sip_call_id' => 'getSipCallId' ]; /** @@ -317,6 +323,7 @@ public function __construct(?array $data = null) $this->setIfExists('answer_time', $data ?? [], null); $this->setIfExists('tag', $data ?? [], null); $this->setIfExists('machine_detection_result', $data ?? [], null); + $this->setIfExists('sip_call_id', $data ?? [], null); } /** @@ -369,7 +376,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ @@ -761,6 +768,33 @@ public function setMachineDetectionResult(?\Bandwidth\Model\MachineDetectionResu return $this; } + + /** + * Gets sip_call_id + * + * @return string|null + */ + public function getSipCallId(): ?string + { + return $this->container['sip_call_id']; + } + + /** + * Sets sip_call_id + * + * @param string|null $sip_call_id (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. + * + * @return $this + */ + public function setSipCallId(?string $sip_call_id): static + { + if (is_null($sip_call_id)) { + throw new InvalidArgumentException('non-nullable sip_call_id cannot be null'); + } + $this->container['sip_call_id'] = $sip_call_id; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/BridgeCompleteCallback.php b/src/Model/BridgeCompleteCallback.php index 45d8a753..60e8c05f 100644 --- a/src/Model/BridgeCompleteCallback.php +++ b/src/Model/BridgeCompleteCallback.php @@ -383,7 +383,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/BridgeTargetCompleteCallback.php b/src/Model/BridgeTargetCompleteCallback.php index c63cc6ed..9ed8b67f 100644 --- a/src/Model/BridgeTargetCompleteCallback.php +++ b/src/Model/BridgeTargetCompleteCallback.php @@ -362,7 +362,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/ConferenceCompletedCallback.php b/src/Model/ConferenceCompletedCallback.php index ed8747a2..5fcd4042 100644 --- a/src/Model/ConferenceCompletedCallback.php +++ b/src/Model/ConferenceCompletedCallback.php @@ -306,7 +306,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/ConferenceCreatedCallback.php b/src/Model/ConferenceCreatedCallback.php index e6d43abb..16ad6006 100644 --- a/src/Model/ConferenceCreatedCallback.php +++ b/src/Model/ConferenceCreatedCallback.php @@ -306,7 +306,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/ConferenceMemberExitCallback.php b/src/Model/ConferenceMemberExitCallback.php index e6aa9c8c..adc4fe5a 100644 --- a/src/Model/ConferenceMemberExitCallback.php +++ b/src/Model/ConferenceMemberExitCallback.php @@ -327,7 +327,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/ConferenceMemberJoinCallback.php b/src/Model/ConferenceMemberJoinCallback.php index a7af8376..0ab6da36 100644 --- a/src/Model/ConferenceMemberJoinCallback.php +++ b/src/Model/ConferenceMemberJoinCallback.php @@ -327,7 +327,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/ConferenceRecordingAvailableCallback.php b/src/Model/ConferenceRecordingAvailableCallback.php index c23f5500..41354068 100644 --- a/src/Model/ConferenceRecordingAvailableCallback.php +++ b/src/Model/ConferenceRecordingAvailableCallback.php @@ -369,7 +369,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/ConferenceRedirectCallback.php b/src/Model/ConferenceRedirectCallback.php index c3bae887..eaaa4e9f 100644 --- a/src/Model/ConferenceRedirectCallback.php +++ b/src/Model/ConferenceRedirectCallback.php @@ -306,7 +306,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/DisconnectCallback.php b/src/Model/DisconnectCallback.php index 7c489ef7..b330715a 100644 --- a/src/Model/DisconnectCallback.php +++ b/src/Model/DisconnectCallback.php @@ -76,7 +76,9 @@ class DisconnectCallback implements ModelInterface, ArrayAccess, JsonSerializabl 'cause' => 'string', 'error_message' => 'string', 'error_id' => 'string', - 'tag' => 'string' + 'tag' => 'string', + 'sip_call_id' => 'string', + 'sip_response_code' => 'int' ]; /** @@ -101,7 +103,9 @@ class DisconnectCallback implements ModelInterface, ArrayAccess, JsonSerializabl 'cause' => null, 'error_message' => null, 'error_id' => null, - 'tag' => null + 'tag' => null, + 'sip_call_id' => null, + 'sip_response_code' => null ]; /** @@ -126,7 +130,9 @@ class DisconnectCallback implements ModelInterface, ArrayAccess, JsonSerializabl 'cause' => false, 'error_message' => true, 'error_id' => true, - 'tag' => true + 'tag' => true, + 'sip_call_id' => false, + 'sip_response_code' => false ]; /** @@ -221,7 +227,9 @@ public function isNullableSetToNull(string $property): bool 'cause' => 'cause', 'error_message' => 'errorMessage', 'error_id' => 'errorId', - 'tag' => 'tag' + 'tag' => 'tag', + 'sip_call_id' => 'sipCallId', + 'sip_response_code' => 'sipResponseCode' ]; /** @@ -246,7 +254,9 @@ public function isNullableSetToNull(string $property): bool 'cause' => 'setCause', 'error_message' => 'setErrorMessage', 'error_id' => 'setErrorId', - 'tag' => 'setTag' + 'tag' => 'setTag', + 'sip_call_id' => 'setSipCallId', + 'sip_response_code' => 'setSipResponseCode' ]; /** @@ -271,7 +281,9 @@ public function isNullableSetToNull(string $property): bool 'cause' => 'getCause', 'error_message' => 'getErrorMessage', 'error_id' => 'getErrorId', - 'tag' => 'getTag' + 'tag' => 'getTag', + 'sip_call_id' => 'getSipCallId', + 'sip_response_code' => 'getSipResponseCode' ]; /** @@ -338,6 +350,8 @@ public function __construct(?array $data = null) $this->setIfExists('error_message', $data ?? [], null); $this->setIfExists('error_id', $data ?? [], null); $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('sip_call_id', $data ?? [], null); + $this->setIfExists('sip_response_code', $data ?? [], null); } /** @@ -390,7 +404,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ @@ -870,6 +884,60 @@ public function setTag(?string $tag): static return $this; } + + /** + * Gets sip_call_id + * + * @return string|null + */ + public function getSipCallId(): ?string + { + return $this->container['sip_call_id']; + } + + /** + * Sets sip_call_id + * + * @param string|null $sip_call_id (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. + * + * @return $this + */ + public function setSipCallId(?string $sip_call_id): static + { + if (is_null($sip_call_id)) { + throw new InvalidArgumentException('non-nullable sip_call_id cannot be null'); + } + $this->container['sip_call_id'] = $sip_call_id; + + return $this; + } + + /** + * Gets sip_response_code + * + * @return int|null + */ + public function getSipResponseCode(): ?int + { + return $this->container['sip_response_code']; + } + + /** + * Sets sip_response_code + * + * @param int|null $sip_response_code (optional) The SIP status code returned by Bandwidth's SBC when it rejected an outbound call's INVITE (e.g. 486 for busy, 603 for decline). Present only when an outbound call was rejected by the SBC. + * + * @return $this + */ + public function setSipResponseCode(?int $sip_response_code): static + { + if (is_null($sip_response_code)) { + throw new InvalidArgumentException('non-nullable sip_response_code cannot be null'); + } + $this->container['sip_response_code'] = $sip_response_code; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/DtmfCallback.php b/src/Model/DtmfCallback.php index 7d262c66..e869f632 100644 --- a/src/Model/DtmfCallback.php +++ b/src/Model/DtmfCallback.php @@ -390,7 +390,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/GatherCallback.php b/src/Model/GatherCallback.php index c7fab9bf..12db7555 100644 --- a/src/Model/GatherCallback.php +++ b/src/Model/GatherCallback.php @@ -397,7 +397,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/InitiateCallback.php b/src/Model/InitiateCallback.php index d7c427d3..2f6b5316 100644 --- a/src/Model/InitiateCallback.php +++ b/src/Model/InitiateCallback.php @@ -72,7 +72,9 @@ class InitiateCallback implements ModelInterface, ArrayAccess, JsonSerializable 'start_time' => '\DateTime', 'diversion' => '\Bandwidth\Model\Diversion', 'stir_shaken' => '\Bandwidth\Model\StirShaken', - 'uui' => 'string' + 'uui' => 'string', + 'sip_call_id' => 'string', + 'sip_headers' => 'array' ]; /** @@ -93,7 +95,9 @@ class InitiateCallback implements ModelInterface, ArrayAccess, JsonSerializable 'start_time' => 'date-time', 'diversion' => null, 'stir_shaken' => null, - 'uui' => null + 'uui' => null, + 'sip_call_id' => null, + 'sip_headers' => null ]; /** @@ -114,7 +118,9 @@ class InitiateCallback implements ModelInterface, ArrayAccess, JsonSerializable 'start_time' => false, 'diversion' => false, 'stir_shaken' => false, - 'uui' => false + 'uui' => false, + 'sip_call_id' => false, + 'sip_headers' => false ]; /** @@ -205,7 +211,9 @@ public function isNullableSetToNull(string $property): bool 'start_time' => 'startTime', 'diversion' => 'diversion', 'stir_shaken' => 'stirShaken', - 'uui' => 'uui' + 'uui' => 'uui', + 'sip_call_id' => 'sipCallId', + 'sip_headers' => 'sipHeaders' ]; /** @@ -226,7 +234,9 @@ public function isNullableSetToNull(string $property): bool 'start_time' => 'setStartTime', 'diversion' => 'setDiversion', 'stir_shaken' => 'setStirShaken', - 'uui' => 'setUui' + 'uui' => 'setUui', + 'sip_call_id' => 'setSipCallId', + 'sip_headers' => 'setSipHeaders' ]; /** @@ -247,7 +257,9 @@ public function isNullableSetToNull(string $property): bool 'start_time' => 'getStartTime', 'diversion' => 'getDiversion', 'stir_shaken' => 'getStirShaken', - 'uui' => 'getUui' + 'uui' => 'getUui', + 'sip_call_id' => 'getSipCallId', + 'sip_headers' => 'getSipHeaders' ]; /** @@ -310,6 +322,8 @@ public function __construct(?array $data = null) $this->setIfExists('diversion', $data ?? [], null); $this->setIfExists('stir_shaken', $data ?? [], null); $this->setIfExists('uui', $data ?? [], null); + $this->setIfExists('sip_call_id', $data ?? [], null); + $this->setIfExists('sip_headers', $data ?? [], null); } /** @@ -366,7 +380,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ @@ -707,6 +721,60 @@ public function setUui(?string $uui): static return $this; } + + /** + * Gets sip_call_id + * + * @return string|null + */ + public function getSipCallId(): ?string + { + return $this->container['sip_call_id']; + } + + /** + * Sets sip_call_id + * + * @param string|null $sip_call_id (optional) The SIP Call-ID of the call's current SIP dialog with Bandwidth's SBC. Used to correlate dialogs and trace calls. Present on any call, inbound or outbound, once that dialog has been established; may be absent very early in a call before the dialog exists. + * + * @return $this + */ + public function setSipCallId(?string $sip_call_id): static + { + if (is_null($sip_call_id)) { + throw new InvalidArgumentException('non-nullable sip_call_id cannot be null'); + } + $this->container['sip_call_id'] = $sip_call_id; + + return $this; + } + + /** + * Gets sip_headers + * + * @return array|null + */ + public function getSipHeaders(): ?array + { + return $this->container['sip_headers']; + } + + /** + * Sets sip_headers + * + * @param array|null $sip_headers (optional) Map of customer-supplied X-* headers from the original INVITE. Keys are lowercase (SIP headers are case-insensitive). Present only for inbound SIP URI calls with custom headers. Note - keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. + * + * @return $this + */ + public function setSipHeaders(?array $sip_headers): static + { + if (is_null($sip_headers)) { + throw new InvalidArgumentException('non-nullable sip_headers cannot be null'); + } + $this->container['sip_headers'] = $sip_headers; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/src/Model/MachineDetectionCompleteCallback.php b/src/Model/MachineDetectionCompleteCallback.php index d92a740d..8ac67eec 100644 --- a/src/Model/MachineDetectionCompleteCallback.php +++ b/src/Model/MachineDetectionCompleteCallback.php @@ -369,7 +369,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/RecordingAvailableCallback.php b/src/Model/RecordingAvailableCallback.php index bcc108a0..1b0dfdd7 100644 --- a/src/Model/RecordingAvailableCallback.php +++ b/src/Model/RecordingAvailableCallback.php @@ -425,7 +425,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/RecordingCompleteCallback.php b/src/Model/RecordingCompleteCallback.php index f7953f20..27cd9670 100644 --- a/src/Model/RecordingCompleteCallback.php +++ b/src/Model/RecordingCompleteCallback.php @@ -425,7 +425,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/RedirectCallback.php b/src/Model/RedirectCallback.php index ab5f2d8c..c00af22b 100644 --- a/src/Model/RedirectCallback.php +++ b/src/Model/RedirectCallback.php @@ -383,7 +383,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/ReferCallStatusEnum.php b/src/Model/ReferCallStatusEnum.php new file mode 100644 index 00000000..ef865fc8 --- /dev/null +++ b/src/Model/ReferCallStatusEnum.php @@ -0,0 +1,46 @@ + + */ +class ReferCompleteCallback implements ModelInterface, ArrayAccess, JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static string $openAPIModelName = 'referCompleteCallback'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPITypes = [ + 'event_type' => 'string', + 'event_time' => '\DateTime', + 'account_id' => 'string', + 'application_id' => 'string', + 'from' => 'string', + 'to' => 'string', + 'direction' => '\Bandwidth\Model\CallDirectionEnum', + 'call_id' => 'string', + 'call_url' => 'string', + 'start_time' => '\DateTime', + 'answer_time' => '\DateTime', + 'tag' => 'string', + 'refer_call_status' => '\Bandwidth\Model\ReferCallStatusEnum', + 'refer_sip_response_code' => 'int', + 'notify_sip_response_code' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var array + */ + protected static array $openAPIFormats = [ + 'event_type' => null, + 'event_time' => 'date-time', + 'account_id' => null, + 'application_id' => null, + 'from' => null, + 'to' => null, + 'direction' => null, + 'call_id' => null, + 'call_url' => 'uri', + 'start_time' => 'date-time', + 'answer_time' => 'date-time', + 'tag' => null, + 'refer_call_status' => null, + 'refer_sip_response_code' => null, + 'notify_sip_response_code' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var array + */ + protected static array $openAPINullables = [ + 'event_type' => false, + 'event_time' => false, + 'account_id' => false, + 'application_id' => false, + 'from' => false, + 'to' => false, + 'direction' => false, + 'call_id' => false, + 'call_url' => false, + 'start_time' => false, + 'answer_time' => true, + 'tag' => true, + 'refer_call_status' => false, + 'refer_sip_response_code' => false, + 'notify_sip_response_code' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var array + */ + protected array $openAPINullablesSetToNull = []; + + /** + * {@inheritdoc} + */ + public static function openAPITypes(): array + { + return self::$openAPITypes; + } + + /** + * {@inheritdoc} + */ + public static function openAPIFormats(): array + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return array + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param array $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * {@inheritdoc} + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * {@inheritdoc} + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var array + */ + protected static array $attributeMap = [ + 'event_type' => 'eventType', + 'event_time' => 'eventTime', + 'account_id' => 'accountId', + 'application_id' => 'applicationId', + 'from' => 'from', + 'to' => 'to', + 'direction' => 'direction', + 'call_id' => 'callId', + 'call_url' => 'callUrl', + 'start_time' => 'startTime', + 'answer_time' => 'answerTime', + 'tag' => 'tag', + 'refer_call_status' => 'referCallStatus', + 'refer_sip_response_code' => 'referSipResponseCode', + 'notify_sip_response_code' => 'notifySipResponseCode' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var array + */ + protected static array $setters = [ + 'event_type' => 'setEventType', + 'event_time' => 'setEventTime', + 'account_id' => 'setAccountId', + 'application_id' => 'setApplicationId', + 'from' => 'setFrom', + 'to' => 'setTo', + 'direction' => 'setDirection', + 'call_id' => 'setCallId', + 'call_url' => 'setCallUrl', + 'start_time' => 'setStartTime', + 'answer_time' => 'setAnswerTime', + 'tag' => 'setTag', + 'refer_call_status' => 'setReferCallStatus', + 'refer_sip_response_code' => 'setReferSipResponseCode', + 'notify_sip_response_code' => 'setNotifySipResponseCode' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var array + */ + protected static array $getters = [ + 'event_type' => 'getEventType', + 'event_time' => 'getEventTime', + 'account_id' => 'getAccountId', + 'application_id' => 'getApplicationId', + 'from' => 'getFrom', + 'to' => 'getTo', + 'direction' => 'getDirection', + 'call_id' => 'getCallId', + 'call_url' => 'getCallUrl', + 'start_time' => 'getStartTime', + 'answer_time' => 'getAnswerTime', + 'tag' => 'getTag', + 'refer_call_status' => 'getReferCallStatus', + 'refer_sip_response_code' => 'getReferSipResponseCode', + 'notify_sip_response_code' => 'getNotifySipResponseCode' + ]; + + /** + * {@inheritdoc} + */ + public static function attributeMap(): array + { + return self::$attributeMap; + } + + /** + * {@inheritdoc} + */ + public static function setters(): array + { + return self::$setters; + } + + /** + * {@inheritdoc} + */ + public static function getters(): array + { + return self::$getters; + } + + /** + * {@inheritdoc} + */ + public function getModelName(): string + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var array + */ + protected array $container = []; + + /** + * Constructor + * + * @param array $data Associated array of property values initializing the model + */ + public function __construct(?array $data = null) + { + $this->setIfExists('event_type', $data ?? [], null); + $this->setIfExists('event_time', $data ?? [], null); + $this->setIfExists('account_id', $data ?? [], null); + $this->setIfExists('application_id', $data ?? [], null); + $this->setIfExists('from', $data ?? [], null); + $this->setIfExists('to', $data ?? [], null); + $this->setIfExists('direction', $data ?? [], null); + $this->setIfExists('call_id', $data ?? [], null); + $this->setIfExists('call_url', $data ?? [], null); + $this->setIfExists('start_time', $data ?? [], null); + $this->setIfExists('answer_time', $data ?? [], null); + $this->setIfExists('tag', $data ?? [], null); + $this->setIfExists('refer_call_status', $data ?? [], null); + $this->setIfExists('refer_sip_response_code', $data ?? [], null); + $this->setIfExists('notify_sip_response_code', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, mixed $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * {@inheritdoc} + */ + public function listInvalidProperties(): array + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * {@inheritdoc} + */ + public function valid(): bool + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets event_type + * + * @return string|null + */ + public function getEventType(): ?string + { + return $this->container['event_type']; + } + + /** + * Sets event_type + * + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * + * @return $this + */ + public function setEventType(?string $event_type): static + { + if (is_null($event_type)) { + throw new InvalidArgumentException('non-nullable event_type cannot be null'); + } + $this->container['event_type'] = $event_type; + + return $this; + } + + /** + * Gets event_time + * + * @return \DateTime|null + */ + public function getEventTime(): ?\DateTime + { + return $this->container['event_time']; + } + + /** + * Sets event_time + * + * @param \DateTime|null $event_time The approximate UTC date and time when the event was generated by the Bandwidth server, in ISO 8601 format. This may not be exactly the time of event execution. + * + * @return $this + */ + public function setEventTime(?\DateTime $event_time): static + { + if (is_null($event_time)) { + throw new InvalidArgumentException('non-nullable event_time cannot be null'); + } + $this->container['event_time'] = $event_time; + + return $this; + } + + /** + * Gets account_id + * + * @return string|null + */ + public function getAccountId(): ?string + { + return $this->container['account_id']; + } + + /** + * Sets account_id + * + * @param string|null $account_id The user account associated with the call. + * + * @return $this + */ + public function setAccountId(?string $account_id): static + { + if (is_null($account_id)) { + throw new InvalidArgumentException('non-nullable account_id cannot be null'); + } + $this->container['account_id'] = $account_id; + + return $this; + } + + /** + * Gets application_id + * + * @return string|null + */ + public function getApplicationId(): ?string + { + return $this->container['application_id']; + } + + /** + * Sets application_id + * + * @param string|null $application_id The id of the application associated with the call. + * + * @return $this + */ + public function setApplicationId(?string $application_id): static + { + if (is_null($application_id)) { + throw new InvalidArgumentException('non-nullable application_id cannot be null'); + } + $this->container['application_id'] = $application_id; + + return $this; + } + + /** + * Gets from + * + * @return string|null + */ + public function getFrom(): ?string + { + return $this->container['from']; + } + + /** + * Sets from + * + * @param string|null $from The provided identifier of the caller. Must be a phone number in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setFrom(?string $from): static + { + if (is_null($from)) { + throw new InvalidArgumentException('non-nullable from cannot be null'); + } + $this->container['from'] = $from; + + return $this; + } + + /** + * Gets to + * + * @return string|null + */ + public function getTo(): ?string + { + return $this->container['to']; + } + + /** + * Sets to + * + * @param string|null $to The phone number that received the call, in E.164 format (e.g. +15555555555). + * + * @return $this + */ + public function setTo(?string $to): static + { + if (is_null($to)) { + throw new InvalidArgumentException('non-nullable to cannot be null'); + } + $this->container['to'] = $to; + + return $this; + } + + /** + * Gets direction + * + * @return \Bandwidth\Model\CallDirectionEnum|null + */ + public function getDirection(): ?\Bandwidth\Model\CallDirectionEnum + { + return $this->container['direction']; + } + + /** + * Sets direction + * + * @param \Bandwidth\Model\CallDirectionEnum|null $direction direction + * + * @return $this + */ + public function setDirection(?\Bandwidth\Model\CallDirectionEnum $direction): static + { + if (is_null($direction)) { + throw new InvalidArgumentException('non-nullable direction cannot be null'); + } + $this->container['direction'] = $direction; + + return $this; + } + + /** + * Gets call_id + * + * @return string|null + */ + public function getCallId(): ?string + { + return $this->container['call_id']; + } + + /** + * Sets call_id + * + * @param string|null $call_id The call id associated with the event. + * + * @return $this + */ + public function setCallId(?string $call_id): static + { + if (is_null($call_id)) { + throw new InvalidArgumentException('non-nullable call_id cannot be null'); + } + $this->container['call_id'] = $call_id; + + return $this; + } + + /** + * Gets call_url + * + * @return string|null + */ + public function getCallUrl(): ?string + { + return $this->container['call_url']; + } + + /** + * Sets call_url + * + * @param string|null $call_url The URL of the call associated with the event. + * + * @return $this + */ + public function setCallUrl(?string $call_url): static + { + if (is_null($call_url)) { + throw new InvalidArgumentException('non-nullable call_url cannot be null'); + } + $this->container['call_url'] = $call_url; + + return $this; + } + + /** + * Gets start_time + * + * @return \DateTime|null + */ + public function getStartTime(): ?\DateTime + { + return $this->container['start_time']; + } + + /** + * Sets start_time + * + * @param \DateTime|null $start_time Time the call was started, in ISO 8601 format. + * + * @return $this + */ + public function setStartTime(?\DateTime $start_time): static + { + if (is_null($start_time)) { + throw new InvalidArgumentException('non-nullable start_time cannot be null'); + } + $this->container['start_time'] = $start_time; + + return $this; + } + + /** + * Gets answer_time + * + * @return \DateTime|null + */ + public function getAnswerTime(): ?\DateTime + { + return $this->container['answer_time']; + } + + /** + * Sets answer_time + * + * @param \DateTime|null $answer_time Time the call was answered, in ISO 8601 format. + * + * @return $this + */ + public function setAnswerTime(?\DateTime $answer_time): static + { + if (is_null($answer_time)) { + array_push($this->openAPINullablesSetToNull, 'answer_time'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('answer_time', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['answer_time'] = $answer_time; + + return $this; + } + + /** + * Gets tag + * + * @return string|null + */ + public function getTag(): ?string + { + return $this->container['tag']; + } + + /** + * Sets tag + * + * @param string|null $tag (optional) The tag specified on call creation. If no tag was specified or it was previously cleared, this field will not be present. + * + * @return $this + */ + public function setTag(?string $tag): static + { + if (is_null($tag)) { + array_push($this->openAPINullablesSetToNull, 'tag'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('tag', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['tag'] = $tag; + + return $this; + } + + /** + * Gets refer_call_status + * + * @return \Bandwidth\Model\ReferCallStatusEnum|null + */ + public function getReferCallStatus(): ?\Bandwidth\Model\ReferCallStatusEnum + { + return $this->container['refer_call_status']; + } + + /** + * Sets refer_call_status + * + * @param \Bandwidth\Model\ReferCallStatusEnum|null $refer_call_status refer_call_status + * + * @return $this + */ + public function setReferCallStatus(?\Bandwidth\Model\ReferCallStatusEnum $refer_call_status): static + { + if (is_null($refer_call_status)) { + throw new InvalidArgumentException('non-nullable refer_call_status cannot be null'); + } + $this->container['refer_call_status'] = $refer_call_status; + + return $this; + } + + /** + * Gets refer_sip_response_code + * + * @return int|null + */ + public function getReferSipResponseCode(): ?int + { + return $this->container['refer_sip_response_code']; + } + + /** + * Sets refer_sip_response_code + * + * @param int|null $refer_sip_response_code (optional) The SIP response code returned for the REFER request itself (e.g. 202, 405, 603). Present when a SIP response was received for the REFER. + * + * @return $this + */ + public function setReferSipResponseCode(?int $refer_sip_response_code): static + { + if (is_null($refer_sip_response_code)) { + throw new InvalidArgumentException('non-nullable refer_sip_response_code cannot be null'); + } + $this->container['refer_sip_response_code'] = $refer_sip_response_code; + + return $this; + } + + /** + * Gets notify_sip_response_code + * + * @return int|null + */ + public function getNotifySipResponseCode(): ?int + { + return $this->container['notify_sip_response_code']; + } + + /** + * Sets notify_sip_response_code + * + * @param int|null $notify_sip_response_code (optional) The final SIP response code reported via NOTIFY (message/sipfrag body). Present only when the caller's endpoint sent a final NOTIFY (e.g. 200, 404, 486, 503). Not present on NOTIFY timeout or when the REFER was rejected before a subscription was established. + * + * @return $this + */ + public function setNotifySipResponseCode(?int $notify_sip_response_code): static + { + if (is_null($notify_sip_response_code)) { + throw new InvalidArgumentException('non-nullable notify_sip_response_code cannot be null'); + } + $this->container['notify_sip_response_code'] = $notify_sip_response_code; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param int|string $offset Offset + * + * @return boolean + */ + public function offsetExists(mixed $offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param int|string $offset Offset + * + * @return mixed|null + */ + #[ReturnTypeWillChange] + public function offsetGet(mixed $offset): mixed + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|string|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet(mixed $offset, mixed $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param int|string $offset Offset + * + * @return void + */ + public function offsetUnset(mixed $offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[ReturnTypeWillChange] + public function jsonSerialize(): mixed + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString(): string + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue(): string + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/src/Model/TranscriptionAvailableCallback.php b/src/Model/TranscriptionAvailableCallback.php index 32a13c07..1f7e21f4 100644 --- a/src/Model/TranscriptionAvailableCallback.php +++ b/src/Model/TranscriptionAvailableCallback.php @@ -418,7 +418,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/TransferAnswerCallback.php b/src/Model/TransferAnswerCallback.php index 2a06b2fd..a54c2661 100644 --- a/src/Model/TransferAnswerCallback.php +++ b/src/Model/TransferAnswerCallback.php @@ -376,7 +376,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/TransferCompleteCallback.php b/src/Model/TransferCompleteCallback.php index fb4ae2a0..b59615b6 100644 --- a/src/Model/TransferCompleteCallback.php +++ b/src/Model/TransferCompleteCallback.php @@ -397,7 +397,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/src/Model/TransferDisconnectCallback.php b/src/Model/TransferDisconnectCallback.php index 3d472b28..da315c1d 100644 --- a/src/Model/TransferDisconnectCallback.php +++ b/src/Model/TransferDisconnectCallback.php @@ -411,7 +411,7 @@ public function getEventType(): ?string /** * Sets event_type * - * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. + * @param string|null $event_type The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, referComplete, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect. * * @return $this */ diff --git a/tests/Unit/Model/AnswerCallbackTest.php b/tests/Unit/Model/AnswerCallbackTest.php index cd6bb6f9..7b49d169 100644 --- a/tests/Unit/Model/AnswerCallbackTest.php +++ b/tests/Unit/Model/AnswerCallbackTest.php @@ -65,7 +65,8 @@ public static function setUpBeforeClass(): void 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), 'tag' => 'test_string', - 'machine_detection_result' => new MachineDetectionResult([]) + 'machine_detection_result' => new MachineDetectionResult([]), + 'sip_call_id' => 'test_string' ]); } @@ -200,4 +201,13 @@ public function testPropertyTag() public function testPropertyMachineDetectionResult() { $this->assertInstanceOf(MachineDetectionResult::class, self::$instance->getMachineDetectionResult()); + } + + /** + * Test attribute "sip_call_id" + */ + public function testPropertySipCallId() + { + $this->assertIsString(self::$instance->getSipCallId()); + $this->assertEquals('test_string', self::$instance->getSipCallId()); }} diff --git a/tests/Unit/Model/DisconnectCallbackTest.php b/tests/Unit/Model/DisconnectCallbackTest.php index e45025c8..fe709984 100644 --- a/tests/Unit/Model/DisconnectCallbackTest.php +++ b/tests/Unit/Model/DisconnectCallbackTest.php @@ -67,7 +67,9 @@ public static function setUpBeforeClass(): void 'cause' => 'test_string', 'error_message' => 'test_string', 'error_id' => 'test_string', - 'tag' => 'test_string' + 'tag' => 'test_string', + 'sip_call_id' => 'test_string', + 'sip_response_code' => 1 ]); } @@ -230,4 +232,22 @@ public function testPropertyTag() { $this->assertIsString(self::$instance->getTag()); $this->assertEquals('test_string', self::$instance->getTag()); + } + + /** + * Test attribute "sip_call_id" + */ + public function testPropertySipCallId() + { + $this->assertIsString(self::$instance->getSipCallId()); + $this->assertEquals('test_string', self::$instance->getSipCallId()); + } + + /** + * Test attribute "sip_response_code" + */ + public function testPropertySipResponseCode() + { + $this->assertIsInt(self::$instance->getSipResponseCode()); + $this->assertEquals(1, self::$instance->getSipResponseCode()); }} diff --git a/tests/Unit/Model/InitiateCallbackTest.php b/tests/Unit/Model/InitiateCallbackTest.php index c2a12e11..e349ab7d 100644 --- a/tests/Unit/Model/InitiateCallbackTest.php +++ b/tests/Unit/Model/InitiateCallbackTest.php @@ -65,7 +65,9 @@ public static function setUpBeforeClass(): void 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), 'diversion' => new Diversion([]), 'stir_shaken' => new StirShaken([]), - 'uui' => 'test_string' + 'uui' => 'test_string', + 'sip_call_id' => 'test_string', + 'sip_headers' => ['x-test-header' => 'test_string'] ]); } @@ -190,4 +192,22 @@ public function testPropertyUui() { $this->assertIsString(self::$instance->getUui()); $this->assertEquals('test_string', self::$instance->getUui()); + } + + /** + * Test attribute "sip_call_id" + */ + public function testPropertySipCallId() + { + $this->assertIsString(self::$instance->getSipCallId()); + $this->assertEquals('test_string', self::$instance->getSipCallId()); + } + + /** + * Test attribute "sip_headers" + */ + public function testPropertySipHeaders() + { + $this->assertIsArray(self::$instance->getSipHeaders()); + $this->assertEquals(['x-test-header' => 'test_string'], self::$instance->getSipHeaders()); }} diff --git a/tests/Unit/Model/ReferCallStatusEnumTest.php b/tests/Unit/Model/ReferCallStatusEnumTest.php new file mode 100644 index 00000000..3d9f9a2f --- /dev/null +++ b/tests/Unit/Model/ReferCallStatusEnumTest.php @@ -0,0 +1,56 @@ +assertSame( + ['success', 'failure'], + array_column(ReferCallStatusEnum::cases(), 'value') + ); + } +} diff --git a/tests/Unit/Model/ReferCompleteCallbackTest.php b/tests/Unit/Model/ReferCompleteCallbackTest.php new file mode 100644 index 00000000..89e86231 --- /dev/null +++ b/tests/Unit/Model/ReferCompleteCallbackTest.php @@ -0,0 +1,214 @@ + 'test_string', + 'event_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'account_id' => 'test_string', + 'application_id' => 'test_string', + 'from' => 'test_string', + 'to' => 'test_string', + 'direction' => CallDirectionEnum::INBOUND, + 'call_id' => 'test_string', + 'call_url' => 'test_string', + 'start_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'answer_time' => new \DateTime('2024-01-01T00:00:00+00:00'), + 'tag' => 'test_string', + 'refer_call_status' => ReferCallStatusEnum::SUCCESS, + 'refer_sip_response_code' => 1, + 'notify_sip_response_code' => 1 + ]); + } + + /** + * Test "ReferCompleteCallback" + */ + public function testReferCompleteCallback() + { + $this->assertInstanceOf(ReferCompleteCallback::class, self::$instance); + } + + /** + * Test attribute "event_type" + */ + public function testPropertyEventType() + { + $this->assertIsString(self::$instance->getEventType()); + $this->assertEquals('test_string', self::$instance->getEventType()); + } + + /** + * Test attribute "event_time" + */ + public function testPropertyEventTime() + { + $this->assertInstanceOf(\DateTime::class, self::$instance->getEventTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getEventTime()); + } + + /** + * Test attribute "account_id" + */ + public function testPropertyAccountId() + { + $this->assertIsString(self::$instance->getAccountId()); + $this->assertEquals('test_string', self::$instance->getAccountId()); + } + + /** + * Test attribute "application_id" + */ + public function testPropertyApplicationId() + { + $this->assertIsString(self::$instance->getApplicationId()); + $this->assertEquals('test_string', self::$instance->getApplicationId()); + } + + /** + * Test attribute "from" + */ + public function testPropertyFrom() + { + $this->assertIsString(self::$instance->getFrom()); + $this->assertEquals('test_string', self::$instance->getFrom()); + } + + /** + * Test attribute "to" + */ + public function testPropertyTo() + { + $this->assertIsString(self::$instance->getTo()); + $this->assertEquals('test_string', self::$instance->getTo()); + } + + /** + * Test attribute "direction" + */ + public function testPropertyDirection() + { + $this->assertInstanceOf(CallDirectionEnum::class, self::$instance->getDirection()); + $this->assertSame(CallDirectionEnum::INBOUND, self::$instance->getDirection()); + } + + /** + * Test attribute "call_id" + */ + public function testPropertyCallId() + { + $this->assertIsString(self::$instance->getCallId()); + $this->assertEquals('test_string', self::$instance->getCallId()); + } + + /** + * Test attribute "call_url" + */ + public function testPropertyCallUrl() + { + $this->assertIsString(self::$instance->getCallUrl()); + $this->assertEquals('test_string', self::$instance->getCallUrl()); + } + + /** + * Test attribute "start_time" + */ + public function testPropertyStartTime() + { + $this->assertInstanceOf(\DateTime::class, self::$instance->getStartTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getStartTime()); + } + + /** + * Test attribute "answer_time" + */ + public function testPropertyAnswerTime() + { + $this->assertInstanceOf(\DateTime::class, self::$instance->getAnswerTime()); + $this->assertEquals(new \DateTime('2024-01-01T00:00:00+00:00'), self::$instance->getAnswerTime()); + } + + /** + * Test attribute "tag" + */ + public function testPropertyTag() + { + $this->assertIsString(self::$instance->getTag()); + $this->assertEquals('test_string', self::$instance->getTag()); + } + + /** + * Test attribute "refer_call_status" + */ + public function testPropertyReferCallStatus() + { + $this->assertInstanceOf(ReferCallStatusEnum::class, self::$instance->getReferCallStatus()); + $this->assertSame(ReferCallStatusEnum::SUCCESS, self::$instance->getReferCallStatus()); + } + + /** + * Test attribute "refer_sip_response_code" + */ + public function testPropertyReferSipResponseCode() + { + $this->assertIsInt(self::$instance->getReferSipResponseCode()); + $this->assertEquals(1, self::$instance->getReferSipResponseCode()); + } + + /** + * Test attribute "notify_sip_response_code" + */ + public function testPropertyNotifySipResponseCode() + { + $this->assertIsInt(self::$instance->getNotifySipResponseCode()); + $this->assertEquals(1, self::$instance->getNotifySipResponseCode()); + }} From 4844649d1eae3bd6f332be354f0811bf9937304a Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 10 Sep 2026 16:29:16 -0400 Subject: [PATCH 48/53] no fail fast for pr tests --- .github/workflows/test-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 327a6bf0..22f010cc 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -33,6 +33,7 @@ jobs: matrix: os: [windows-2022, windows-2025, ubuntu-22.04, ubuntu-24.04] php-version: [8.2, 8.3, 8.4, 8.5] + fail-fast: false steps: - name: Checkout uses: actions/checkout@v7 From db3c1c0917f8474ff693745ce328e07172cce9f9 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 10 Sep 2026 16:49:48 -0400 Subject: [PATCH 49/53] client unit tests --- tests/Unit/Client/ConfigurationTest.php | 98 +++++++++++++++ tests/Unit/Client/ObjectSerializerTest.php | 140 +++++++++++++++++++++ 2 files changed, 238 insertions(+) create mode 100644 tests/Unit/Client/ConfigurationTest.php create mode 100644 tests/Unit/Client/ObjectSerializerTest.php diff --git a/tests/Unit/Client/ConfigurationTest.php b/tests/Unit/Client/ConfigurationTest.php new file mode 100644 index 00000000..f1f244bb --- /dev/null +++ b/tests/Unit/Client/ConfigurationTest.php @@ -0,0 +1,98 @@ +originalDefault = Configuration::getDefaultConfiguration(); + } + + protected function tearDown(): void + { + Configuration::setDefaultConfiguration($this->originalDefault); + } + + /** + * A preset access token is returned as-is when no client credentials are set, + * so the default getter never reaches its HTTP call. + */ + public function testGetAccessTokenReturnsPresetTokenWithoutClientCredentials() + { + $config = (new Configuration())->setAccessToken('preset-token'); + + $this->assertEquals('preset-token', $config->getAccessToken()); + } + + /** + * With nothing configured the default getter falls through to the empty + * static token rather than attempting a token fetch. + */ + public function testGetAccessTokenReturnsEmptyStringWhenUnconfigured() + { + $this->assertEquals('', (new Configuration())->getAccessToken()); + } + + /** + * Test that a caller-supplied getter replaces the default OAuth getter. + */ + public function testSetAccessTokenGetterOverridesDefaultGetter() + { + $config = (new Configuration())->setAccessTokenGetter(fn () => 'injected-token'); + + $this->assertEquals('injected-token', $config->getAccessToken()); + } + + /** + * Test that clearing the getter falls back to the static access token. + */ + public function testNullAccessTokenGetterFallsBackToStaticToken() + { + $config = (new Configuration()) + ->setAccessTokenGetter(null) + ->setAccessToken('static-token'); + + $this->assertEquals('static-token', $config->getAccessToken()); + } + + /** + * Test the default configuration singleton is stable and replaceable. + */ + public function testDefaultConfigurationSingleton() + { + $this->assertSame( + Configuration::getDefaultConfiguration(), + Configuration::getDefaultConfiguration() + ); + + $replacement = new Configuration(); + Configuration::setDefaultConfiguration($replacement); + + $this->assertSame($replacement, Configuration::getDefaultConfiguration()); + } +} diff --git a/tests/Unit/Client/ObjectSerializerTest.php b/tests/Unit/Client/ObjectSerializerTest.php new file mode 100644 index 00000000..7f35c6c2 --- /dev/null +++ b/tests/Unit/Client/ObjectSerializerTest.php @@ -0,0 +1,140 @@ +originalDefault = Configuration::getDefaultConfiguration(); + } + + protected function tearDown(): void + { + Configuration::setDefaultConfiguration($this->originalDefault); + } + + /** + * Test "sanitizeFilename" + * + * @dataProvider sanitizeFilenameProvider + */ + public function testSanitizeFilename(string $filename, string $expected) + { + $this->assertEquals($expected, ObjectSerializer::sanitizeFilename($filename)); + } + + public static function sanitizeFilenameProvider(): array + { + return [ + 'unix traversal' => ['../../sun.gif', 'sun.gif'], + 'windows path' => ['C:\\tmp\\bw.png', 'bw.png'], + 'bare filename' => ['bw.png', 'bw.png'], + ]; + } + + /** + * Test "sanitizeTimestamp" truncates sub-microsecond precision. + */ + public function testSanitizeTimestampTruncatesToSixDigits() + { + $this->assertEquals( + '2024-01-01T00:00:00.123456Z', + ObjectSerializer::sanitizeTimestamp('2024-01-01T00:00:00.1234567890Z') + ); + } + + /** + * Test "convertBoolToQueryStringFormat" reads the default configuration. + * + * @dataProvider convertBoolProvider + */ + public function testConvertBoolToQueryStringFormat(string $format, int|string $expected) + { + Configuration::setDefaultConfiguration( + (new Configuration())->setBooleanFormatForQueryString($format) + ); + + $this->assertSame($expected, ObjectSerializer::convertBoolToQueryStringFormat(true)); + } + + public static function convertBoolProvider(): array + { + return [ + 'int format' => [Configuration::BOOLEAN_FORMAT_INT, 1], + 'string format' => [Configuration::BOOLEAN_FORMAT_STRING, 'true'], + ]; + } + + /** + * Test "deserialize" for an associative array, whose inner type is parsed + * out of the type string. + */ + public function testDeserializeAssociativeArray() + { + $this->assertEquals( + ['x-test-header' => 'value'], + ObjectSerializer::deserialize(['x-test-header' => 'value'], 'array') + ); + } + + /** + * An empty date-time string means a missing value, not the current time. + */ + public function testDeserializeEmptyDateTimeReturnsNull() + { + $this->assertNull(ObjectSerializer::deserialize('', '\DateTime')); + } + + /** + * Test that an unknown enum value is rejected. + */ + public function testDeserializeRejectsUnknownEnumValue() + { + $this->expectException(\InvalidArgumentException::class); + + ObjectSerializer::deserialize('nonsense', ReferCallStatusEnum::class); + } + + /** + * Test that a date-only format drops the time component. + */ + public function testSanitizeForSerializationHonorsDateFormat() + { + $this->assertEquals( + '2024-01-01', + ObjectSerializer::sanitizeForSerialization( + new DateTime('2024-01-01T12:34:56+00:00'), + '\DateTime', + 'date' + ) + ); + } +} From e130240d7ef24eecf513bc45e6f038d7540f26eb Mon Sep 17 00:00:00 2001 From: ckoegel Date: Thu, 10 Sep 2026 17:11:28 -0400 Subject: [PATCH 50/53] model tests script --- generate-model-tests.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 generate-model-tests.sh diff --git a/generate-model-tests.sh b/generate-model-tests.sh new file mode 100644 index 00000000..6681e93a --- /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/^tests\//# tests\//' .openapi-generator-ignore && rm .openapi-generator-ignore.bak +# remove current test files for models +rm -f ./tests/Unit/Model/*.php +# generate new test files for models +openapi-generator-cli generate -i bandwidth.yml -o ./ -c openapi-config.yml -g php-nextgen > /dev/null +# move generated model test files to the correct location +mv ./tests/Model/* ./tests/Unit/Model/ +# fix namespaces in moved test files +perl -pi -e 's/^namespace Bandwidth\\Test\\Model;/namespace Bandwidth\\Test\\Unit\\Model;/' ./tests/Unit/Model/*.php +# remove remaining generated test files +rm -rf ./tests/Api ./tests/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 -- From 8a62fbd658cecdbb2d1acedef91d957c98a38b7f Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 14 Sep 2026 13:11:41 -0400 Subject: [PATCH 51/53] use composer for tests --- .github/workflows/test-pr.yml | 2 +- .github/workflows/test-smoke.yml | 4 ++-- composer.json | 5 ++--- custom_templates/composer.mustache | 5 ++--- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 22f010cc..b85db600 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -53,5 +53,5 @@ jobs: [ "$i" -eq 10 ] && { echo "::error::prism failed to start"; cat prism.log; exit 1; } sleep 1 done - ./vendor/bin/phpunit tests/Unit + composer test:unit shell: bash diff --git a/.github/workflows/test-smoke.yml b/.github/workflows/test-smoke.yml index 10ae1854..c39377bb 100644 --- a/.github/workflows/test-smoke.yml +++ b/.github/workflows/test-smoke.yml @@ -45,7 +45,7 @@ jobs: - name: Install Packages and Test run: | composer install - ./vendor/bin/phpunit tests/Smoke + composer test:smoke test_up: name: Smoke Test UP Account @@ -70,7 +70,7 @@ jobs: - name: Install Packages and Test run: | composer install - ./vendor/bin/phpunit tests/Smoke + composer test:smoke notify_for_failures: name: Notify for Failures diff --git a/composer.json b/composer.json index 1bf77215..5dabfcac 100644 --- a/composer.json +++ b/composer.json @@ -39,9 +39,8 @@ "psr-4": { "Bandwidth\\Test\\" : "tests/" } }, "scripts": { - "test": [ - "@phplint" - ], + "test:unit": "phpunit tests/Unit", + "test:smoke": "phpunit tests/Smoke", "phplint": "phplint" } } diff --git a/custom_templates/composer.mustache b/custom_templates/composer.mustache index d2aad527..d396fff7 100644 --- a/custom_templates/composer.mustache +++ b/custom_templates/composer.mustache @@ -44,9 +44,8 @@ "psr-4": { "{{escapedInvokerPackage}}\\Test\\" : "{{testBasePath}}/" } }, "scripts": { - "test": [ - "@phplint" - ], + "test:unit": "phpunit tests/Unit", + "test:smoke": "phpunit tests/Smoke", "phplint": "phplint" } } From c7e749e9dc91000a47db0c23c0e528a7f1bd9a1f Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 14 Sep 2026 13:21:16 -0400 Subject: [PATCH 52/53] fix composer json --- composer.json | 10 +++++----- custom_templates/composer.mustache | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/composer.json b/composer.json index 5dabfcac..27d58978 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "bandwidth/php-sdk", + "name": "bandwidth/sdk", "description": "Bandwidth's Communication APIs", "keywords": [ "openapitools", @@ -10,12 +10,12 @@ "rest", "api" ], - "homepage": "https://openapi-generator.tech", - "license": "unlicense", + "homepage": "https://github.com/Bandwidth/php-sdk", + "license": "MIT", "authors": [ { - "name": "OpenAPI-Generator contributors", - "homepage": "https://openapi-generator.tech" + "name": "Bandwidth", + "homepage": "https://www.bandwidth.com" } ], "require": { diff --git a/custom_templates/composer.mustache b/custom_templates/composer.mustache index d396fff7..41b93fa1 100644 --- a/custom_templates/composer.mustache +++ b/custom_templates/composer.mustache @@ -1,6 +1,6 @@ { {{#composerPackageName}} - "name": "{{.}}", + "name": "bandwidth/sdk", {{/composerPackageName}} {{#artifactVersion}} "version": "{{.}}", @@ -15,12 +15,12 @@ "rest", "api" ], - "homepage": "https://openapi-generator.tech", - "license": "unlicense", + "homepage": "https://github.com/Bandwidth/php-sdk", + "license": "MIT", "authors": [ { - "name": "OpenAPI-Generator contributors", - "homepage": "https://openapi-generator.tech" + "name": "Bandwidth", + "homepage": "https://www.bandwidth.com" } ], "require": { From 2e7bd0a8aa75c63af23740b4fb71c0878435cc88 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 14 Sep 2026 13:33:34 -0400 Subject: [PATCH 53/53] readme and license fixes --- LICENSE | 24 +++++ custom_templates/README.mustache | 137 +++++++++++++++++++++++++++++ custom_templates/composer.mustache | 2 - 3 files changed, 161 insertions(+), 2 deletions(-) create mode 100644 LICENSE create mode 100644 custom_templates/README.mustache diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..1d74e244 --- /dev/null +++ b/LICENSE @@ -0,0 +1,24 @@ +License: +======== +The MIT License (MIT) +http://opensource.org/licenses/MIT + +Copyright (c) 2026 Bandwidth + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/custom_templates/README.mustache b/custom_templates/README.mustache new file mode 100644 index 00000000..c90c8498 --- /dev/null +++ b/custom_templates/README.mustache @@ -0,0 +1,137 @@ +# {{packageName}} + +{{#appDescriptionWithNewLines}} +{{{.}}} +{{/appDescriptionWithNewLines}} + +{{#infoUrl}} +For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}). +{{/infoUrl}} + +## Installation & Usage + +### Requirements + +PHP 8.1 and later. + +### Composer + +To install the bindings via [Composer](https://getcomposer.org/), run: + +```shell +composer require bandwidth/sdk +``` + +### Manual Installation + +Download the files and include `autoload.php`: + +```php + php_doc_auth_partial}} + +$apiInstance = new {{invokerPackage}}\Api\{{classname}}( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(){{#hasAuthMethods}}, + $config{{/hasAuthMethods}} +); +{{#allParams}}${{paramName}} = {{{example}}}; // {{{dataType}}}{{#description}} | {{{.}}}{{/description}} +{{/allParams}} + +try { + {{#returnType}}$result = {{/returnType}}$apiInstance->{{{operationId}}}({{#allParams}}${{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} + print_r($result);{{/returnType}} +} catch (Exception $e) { + echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL; +} +{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} +``` + +## API Endpoints + +All URIs are relative to *{{basePath}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}/{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} +## Models + +{{#models}}{{#model}}- [{{{classname}}}]({{modelDocPath}}/{{{classname}}}.md){{/model}} +{{/models}} + +## Authorization +{{^authMethods}} +All endpoints do not require authorization. +{{/authMethods}} +{{#authMethods}} +{{#last}} Authentication schemes defined for the API:{{/last}} +### {{{name}}} +{{#isApiKey}} + +- **Type**: API key +- **API key parameter name**: {{{keyParamName}}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} + +{{/isApiKey}} +{{#isBasic}} +{{#isBasicBasic}} + +- **Type**: HTTP basic authentication +{{/isBasicBasic}} +{{#isBasicBearer}} + +- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} +{{/isBasicBearer}} +{{/isBasic}} +{{#isOAuth}} + +- **Type**: `OAuth` +- **Flow**: `{{{flow}}}` +- **Authorization URL**: `{{{authorizationUrl}}}` +- **Scopes**: {{^scopes}}N/A{{/scopes}} +{{#scopes}} + - **{{{scope}}}**: {{{description}}} +{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} +## Tests + +To run the tests, use: + +```bash +composer install +vendor/bin/phpunit +``` + +## Author + +{{#apiInfo}}{{#apis}}{{#-last}}{{infoEmail}} +{{/-last}}{{/apis}}{{/apiInfo}} +## About this package + +This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: `{{appVersion}}` +{{#artifactVersion}} + - Package version: `{{.}}` +{{/artifactVersion}} +{{^hideGenerationTimestamp}} + - Build date: `{{generatedDate}}` +{{/hideGenerationTimestamp}} + - Generator version: `{{generatorVersion}}` +- Build package: `{{generatorClass}}` diff --git a/custom_templates/composer.mustache b/custom_templates/composer.mustache index 41b93fa1..4251d341 100644 --- a/custom_templates/composer.mustache +++ b/custom_templates/composer.mustache @@ -1,7 +1,5 @@ { - {{#composerPackageName}} "name": "bandwidth/sdk", - {{/composerPackageName}} {{#artifactVersion}} "version": "{{.}}", {{/artifactVersion}}