From b732ef5c36fdfa2b527bc78c4ebb0b499a005d1f Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 7 Jul 2026 16:23:15 -0400 Subject: [PATCH 01/33] 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 8cb8bd3..cc2a4bd 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 3d865cb..0000000 --- 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 0000000..7484ee5 --- /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 0000000..f866c6f --- /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 0000000..14d6b5d --- /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 0000000..af9cf39 --- /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 0000000..ef4be48 --- /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 0000000..707be2a --- /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 749af7f..0000000 --- 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 c3dbb35..23e0246 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 0000000..52ceffd --- /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 d0b683a..d302939 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 0000000..148c134 --- /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 0000000..5394fe7 --- /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 0000000..e32306a --- /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 0000000..aa08eea --- /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 0000000..9506c4d --- /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 0000000..6e69cad --- /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 0000000..631e46c --- /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 0000000..d33675c --- /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 0000000..08270ce --- /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 0000000..c70133f --- /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 0000000..868b385 --- /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 0000000..c705976 --- /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 0000000..e3681ab --- /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 0000000..f415166 --- /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 0000000..622be5b --- /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 0000000..198aa6a --- /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 0000000..c3afbb4 --- /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 0000000..ec50517 --- /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 0000000..e77f2a3 --- /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 0000000..8304212 --- /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 0000000..df33268 --- /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 0000000..dd25ae4 --- /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 0000000..62b8ae5 --- /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 0000000..50f4249 --- /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 0000000..f279aee --- /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 0000000..ee8ba41 --- /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 0000000..754d6d7 --- /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 0000000..a288039 --- /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 0000000..4d81c63 --- /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 0000000..8d26071 --- /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 0000000..43c8738 --- /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 0000000..10a2cb7 --- /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 0000000..04ae984 --- /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 0000000..d3112be --- /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 0000000..a2e7f72 --- /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 0000000..dba3107 --- /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 0000000..89658f4 --- /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 0000000..9d737ec --- /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 0000000..40a0a6d --- /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 0000000..ea04ebf --- /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 0000000..06b1aff --- /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 0000000..60a60e8 --- /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 0000000..f54696f --- /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 0000000..ad6d74f --- /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 0000000..837a8e0 --- /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 0000000..f47aea1 --- /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 0000000..3976ad2 --- /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 0000000..14b84d4 --- /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 0000000..d1bd898 --- /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 0000000..e61483b --- /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 0000000..e18b6e6 --- /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 0000000..2460c41 --- /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 0000000..6de366b --- /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 0000000..60f853e --- /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 0000000..b5724fe --- /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 0000000..699242a --- /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 0000000..0fde440 --- /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 0000000..ed7b8be --- /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 0000000..b834941 --- /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 0000000..5d8e7fb --- /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 0000000..1515b19 --- /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 0000000..f9e5579 --- /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 0000000..7003b3f --- /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 0000000..c8bdf82 --- /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 0000000..ee92cf7 --- /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 0000000..7bc751c --- /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 0000000..34fbd3d --- /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 0000000..7bb2d6c --- /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 0000000..4824835 --- /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 0000000..2b11f07 --- /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 0000000..41e4d0f --- /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 0000000..4096d40 --- /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 0000000..da95b81 --- /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 0000000..7fd26e7 --- /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 0000000..c854291 --- /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 0000000..f6014f6 --- /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 0000000..2385ab5 --- /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 0000000..5a63ae6 --- /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 0000000..6450d7e --- /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 0000000..57ff20f --- /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 0000000..9bb021f --- /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 0000000..3bfc575 --- /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 0000000..a812003 --- /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 0000000..1f36189 --- /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 0000000..20e7fbb --- /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 0000000..cfbdbde --- /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 0000000..59e0d6f --- /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 0000000..a74bbfa --- /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 0000000..39ed500 --- /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 0000000..7c8c82e --- /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 0000000..1a815b4 --- /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 0000000..da9aa1d --- /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 0000000..3c32c36 --- /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 0000000..f471ad1 --- /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 0000000..cc059c5 --- /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 0000000..233b007 --- /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 0000000..6cffce5 --- /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 0000000..3e80734 --- /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 0000000..a91edda --- /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 0000000..2061781 --- /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 0000000..5519510 --- /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 0000000..59e196e --- /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 0000000..031b391 --- /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 0000000..6330525 --- /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 0000000..8d6bdd3 --- /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 0000000..d4c241d --- /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 0000000..f0e615f --- /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 0000000..b9afaef --- /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 0000000..66ca35e --- /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 0000000..4679cb8 --- /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 0000000..66049bb --- /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 0000000..520484e --- /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 0000000..9491cbd --- /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 0000000..e53d356 --- /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 0000000..7a96a10 --- /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 0000000..cf5356e --- /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 0000000..518e315 --- /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 0000000..efd1664 --- /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 0000000..ad079a4 --- /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 0000000..7a5c67c --- /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 0000000..c819bd2 --- /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 0000000..9b12ad4 --- /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 0000000..6bf60f1 --- /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 0000000..d2fea75 --- /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 0000000..746133a --- /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 0000000..e44a22d --- /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 0000000..4df5ff8 --- /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 0000000..9420592 --- /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 0000000..e84ee8f --- /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 0000000..3918cd2 --- /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 0000000..8292358 --- /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 0000000..4e5bb37 --- /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 0000000..d2fbcc3 --- /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 0000000..47957f5 --- /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 0000000..7a93619 --- /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 0000000..483edd2 --- /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 0000000..9bf972a --- /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 0000000..f1b5c42 --- /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 0000000..c9857d3 --- /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 0000000..7f9263e --- /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 0000000..ed31308 --- /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 0000000..c1fe165 --- /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 0000000..f02ecf1 --- /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 0000000..0a2ae92 --- /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 0000000..aadb258 --- /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 0000000..2a47dee --- /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 0000000..57bb63e --- /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 0000000..50999c5 --- /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 0000000..acfe166 --- /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 0000000..ab3d098 --- /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 0000000..2538c92 --- /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 0000000..d3634cf --- /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 0000000..f035b0f --- /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 0000000..0c245d7 --- /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 0000000..193f391 --- /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 0000000..0e2439f --- /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 0000000..9f161ba --- /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 0000000..ff4e99d --- /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 0000000..776dfe4 --- /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 0000000..f446379 --- /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 0000000..72c6554 --- /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 0000000..edfb94e --- /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 0000000..d6ed8f9 --- /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 0000000..38d6f5c --- /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 0000000..98cba8e --- /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 0000000..aa9a956 --- /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 0000000..6ede626 --- /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 0000000..29dcdd5 --- /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 0000000..bab5206 --- /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 0000000..bb744e6 --- /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 0000000..2c1841f --- /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 0000000..6982f08 --- /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 0000000..965564f --- /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 0000000..3d0b696 --- /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 0000000..98a2762 --- /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 0000000..a16be06 --- /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 0000000..1023b2a --- /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 0000000..bb75e91 --- /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 0000000..bb99ce0 --- /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 0000000..67a462e --- /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 0000000..7db3951 --- /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 0000000..c8b173d --- /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 0000000..527dfe8 --- /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 0000000..a7c720d --- /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 0000000..d99efd4 --- /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 0000000..0979c83 --- /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 0000000..e56d820 --- /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 0000000..13ff7d3 --- /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 0000000..c341d5d --- /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 0000000..73c2227 --- /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 0000000..d8b6079 --- /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 0000000..8be1819 --- /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 0000000..9e673c5 --- /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 0000000..83ab0c4 --- /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 0000000..33a14df --- /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 0000000..03093f4 --- /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 0000000..a21b003 --- /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 0000000..ad0fe2b --- /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 0000000..0d34777 --- /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 0000000..9aed1ca --- /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 0000000..d98948d --- /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 0000000..5c70f91 --- /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 0000000..9bd4f40 --- /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 0000000..68457be --- /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 0000000..7810c41 --- /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 0000000..78aefa8 --- /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 0000000..da07487 --- /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 0000000..999901b --- /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 0000000..5256770 --- /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 0000000..5faaf40 --- /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 0000000..a8858bf --- /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 0000000..f53a75d --- /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 0000000..8b5e6f6 --- /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 0000000..f3237ad --- /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 5bdcd15..0000000 --- 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 0000000..1135449 --- /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 55ae203..4f05317 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 debe766..0000000 --- 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 0000000..43a4f42 --- /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 0000000..5bbc41c --- /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 0000000..26ae2a5 --- /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 0000000..ed2f8c2 --- /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 0000000..c7641c3 --- /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 0000000..062b500 --- /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 0000000..596c01b --- /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 0000000..e95dc41 --- /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 0000000..9259667 --- /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 0000000..a1daad6 --- /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 0000000..ab646b8 --- /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 0000000..6e8e3ac --- /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 8e80179..0000000 --- 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 2f25f72..6eac769 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 7a41cc3..0000000 --- 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 418ec49..0000000 --- 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 0000000..14ccd5c --- /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 0da47ee..0000000 --- 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 eb0cc1e..0000000 --- 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 48ae7e0..0000000 --- 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 6293d93..0000000 --- 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 361bd50..0000000 --- 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 d087337..0000000 --- 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 238368f..0000000 --- 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 ca22d91..0000000 --- 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 2e0bc0c..0000000 --- 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 2165544..0000000 --- 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 8b4dc44..0000000 --- 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 70c71d7..0000000 --- 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 942cd45..0000000 --- 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 08ddbc9..0000000 --- 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 2250bf7..0000000 --- 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 7215ad9..0000000 --- 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 0000000..78a0801 --- /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 0000000..6beeb56 --- /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 0000000..60bdae6 --- /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 0000000..f2724e0 --- /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 0000000..576d182 --- /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 0000000..91f5b71 --- /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 0000000..3c65a62 --- /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 0000000..f024834 --- /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 0000000..a0fa5b5 --- /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 0000000..4b26c43 --- /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 0000000..db505dc --- /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 0000000..347f4d3 --- /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 0000000..93e9865 --- /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 0000000..e58c7f2 --- /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 0000000..7103ec8 --- /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 0000000..7ac107c --- /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 0000000..13ccb61 --- /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 0000000..0c008e1 --- /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 0000000..7b57f5e --- /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 0000000..24ea98b --- /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 0000000..79f5f59 --- /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 0000000..9b211ec --- /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 0000000..d1f0dfc --- /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 0000000..5184e64 --- /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 0000000..112ae43 --- /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 0000000..718b23f --- /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 0000000..1753345 --- /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 0000000..38a9aae --- /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 0000000..5ca3292 --- /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 0000000..4cd0eaf --- /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 0000000..036d226 --- /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 0000000..b0ee285 --- /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 0000000..8443916 --- /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 0000000..395b5fa --- /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 0000000..7e3577c --- /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 0000000..2c75457 --- /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 0000000..cfed8fd --- /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 0000000..7f7718d --- /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 0000000..0a65a4e --- /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 0000000..4235ce9 --- /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 0000000..b7fe4c5 --- /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 0000000..53bc9b4 --- /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 0000000..a629025 --- /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 0000000..836ed95 --- /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 0000000..6f7e9ba --- /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 0000000..fdff232 --- /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 0000000..5f5471f --- /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 0000000..040fa18 --- /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 0000000..e6249a3 --- /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 0000000..8d65de7 --- /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 0000000..4788bef --- /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 0000000..f599341 --- /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 0000000..224e476 --- /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 0000000..2ba57c2 --- /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 0000000..4ab1e53 --- /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 0000000..8af32a2 --- /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 0000000..984c5f7 --- /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 0000000..0119a4d --- /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 0000000..7ff174d --- /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 0000000..788b30f --- /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 0000000..de7298c --- /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 0000000..20bc428 --- /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 0000000..4a6a35a --- /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 0000000..674da8d --- /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 0000000..10987ae --- /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 0000000..9561fae --- /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 0000000..c8df17c --- /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 0000000..4b12517 --- /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 0000000..d4c9aab --- /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 0000000..68e4549 --- /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 0000000..40b806e --- /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 0000000..43626ef --- /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 0000000..811f95b --- /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 0000000..7f5b702 --- /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 0000000..aa1756f --- /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 0000000..581e27b --- /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 0000000..b96cb64 --- /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 0000000..0dedab5 --- /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 0000000..e02cc46 --- /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 0000000..39dea85 --- /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 0000000..f255b29 --- /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 0000000..4948e3c --- /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 0000000..2ec30f6 --- /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 0000000..1bf63d2 --- /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 0000000..991d9f4 --- /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 0000000..902b685 --- /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 0000000..fb40612 --- /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 0000000..acc08da --- /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 0000000..ea86e0d --- /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 0000000..9a3e97c --- /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 0000000..e7b18bb --- /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 0000000..48298d4 --- /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 0000000..681e2ac --- /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 0000000..038544b --- /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 0000000..535094e --- /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 0000000..ba2c4fc --- /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 0000000..28abd25 --- /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 0000000..3ca9700 --- /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 0000000..946646b --- /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 0000000..a922b82 --- /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 0000000..c2bea95 --- /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 0000000..b6bf222 --- /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 0000000..a189b58 --- /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 0000000..69a4272 --- /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 0000000..5ee6eff --- /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 0000000..b536cf5 --- /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 0000000..377f3c2 --- /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 0000000..8a228a7 --- /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 0000000..038404f --- /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 0000000..e625c54 --- /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 0000000..3138006 --- /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 0000000..47eb1c2 --- /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 0000000..4f43bd2 --- /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 0000000..73a0f88 --- /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 0000000..481f0a9 --- /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 0000000..31cec29 --- /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 0000000..15e1d46 --- /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 0000000..8a716c4 --- /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 0000000..8532d4b --- /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 0000000..b1f96f0 --- /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 0000000..f496203 --- /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 0000000..5baa8a5 --- /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 0000000..f3d77aa --- /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 0000000..c026e43 --- /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 0000000..05494c5 --- /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 0000000..b0d0fb5 --- /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 0000000..a6ed040 --- /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 0000000..57000e3 --- /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 0000000..ccc7579 --- /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 0000000..ac9cec9 --- /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 0000000..4739ed8 --- /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 0000000..7fe8b8c --- /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 0000000..0bbf9cc --- /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 0000000..ae16764 --- /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 0000000..d307f98 --- /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 0000000..842e608 --- /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 0000000..edbf42d --- /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 0000000..d66b03c --- /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 0000000..be3db54 --- /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 0000000..88554b8 --- /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 0000000..1808970 --- /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 0000000..22292e3 --- /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 0000000..a2ebc44 --- /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 0000000..48309c5 --- /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 0000000..83da938 --- /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 0000000..a0a8c8c --- /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 0000000..c3f43b8 --- /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 0000000..9c1972b --- /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 0000000..a8db65c --- /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 0000000..7c44ca4 --- /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 0000000..850c2f9 --- /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 0000000..78bb6a0 --- /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 0000000..ff9d65b --- /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 0000000..bc1d78b --- /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 0000000..7cd4055 --- /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 0000000..4dcb62b --- /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 0000000..03cffbf --- /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 0000000..124b7fd --- /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 0000000..bd4496b --- /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 ea0eb44..0000000 --- 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 302f371..0000000 --- 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 3ffe87b..0000000 --- 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 d689f81..0000000 --- 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 ebaa94d..0000000 --- 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 c8f4b69..0000000 --- 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 1c63a75..0000000 --- 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 0000000..33a8bea --- /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 aa68036..0000000 --- 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 1d07d92..0000000 --- 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 1a6ae17..0000000 --- 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 8c9ec72..0000000 --- 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 ae3d76f..0000000 --- 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 e0c6e33..0000000 --- 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 8172c00..0000000 --- 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 e91d445..0000000 --- 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 54e945b..0000000 --- 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 8a86ec3..0000000 --- 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 5c08aaa..0000000 --- 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 4c22bea..0000000 --- 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 67e0e43..0000000 --- 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 a6d4393..0000000 --- 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 c666666..0000000 --- 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 ee2fb6a..0000000 --- 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 18e12a1..0000000 --- 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 4353c5a..0000000 --- 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 a8ca057..0000000 --- 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 94b1266..0000000 --- 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 eb2839e..0000000 --- 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 e5adcc1..0000000 --- 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 4c4defd..0000000 --- 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 bff91c6..0000000 --- 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 c2215ea..0000000 --- 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 ffc80f1..0000000 --- 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 d414cf8..0000000 --- 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 a5cacfa..0000000 --- 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 f07fddb..0000000 --- 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 743f512..0000000 --- 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 e6f3d68..0000000 --- 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 3c684d3..0000000 --- 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 627689d..0000000 --- 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 0d7b1b4..0000000 --- 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 6820ce2..0000000 --- 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 bada923..0000000 --- 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 511190f..0000000 --- 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 3e195f5..0000000 --- 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 5392c8b..0000000 --- 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 41d6814..0000000 --- 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 88ddfa3..0000000 --- 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 45cdaad..0000000 --- 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 2d058b2..0000000 --- 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 a7b0b82..0000000 --- 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 cd65992..0000000 --- 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 6a6540e..0000000 --- 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 add9061..0000000 --- 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 9ebfa9e..0000000 --- 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 7277ab5..0000000 --- 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 8ef6499..0000000 --- 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 2474794..0000000 --- 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 428e6ad..0000000 --- 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 8cc04a2..0000000 --- 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 7da2280..0000000 --- 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 e5790fd..0000000 --- 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 9807096..0000000 --- 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 7d9496b..0000000 --- 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 6be172f..0000000 --- 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 cea62f6..0000000 --- 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 84057a9..0000000 --- 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 2026499..0000000 --- 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 4c9334a..0000000 --- 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 089b842..0000000 --- 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 7deab15..0000000 --- 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 35a961f..0000000 --- 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 725e537..0000000 --- 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 8d484f8..0000000 --- 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 f8f1473..0000000 --- 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 499aba4..0000000 --- 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 80537b9..0000000 --- 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 fd40808..0000000 --- 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 0000000..06476c2 --- /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 44bdb2f..0000000 --- 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 0000000..88eeb7b --- /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/33] 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 f866c6f..e72f388 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 23e0246..48dd5de 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 d302939..4e0a6c9 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 148c134..b96b9fe 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 5394fe7..1d182bd 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 e32306a..fe416f9 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 aa08eea..1f4196c 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 9506c4d..55d92a6 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 6e69cad..6638e37 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 631e46c..bfeebb5 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 d33675c..5eb609c 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 08270ce..7a6a4b4 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 c70133f..91dab58 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 868b385..c4ca7f6 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 c705976..0f10238 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 198aa6a..3c3bd60 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 ec50517..8e2a9a0 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 e77f2a3..107200d 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 8304212..53f2e21 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 df33268..8d504be 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 dd25ae4..3e8a9cd 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 a288039..96da31f 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 4d81c63..9dc6923 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 43c8738..b9ad214 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 d3112be..cf2d9f5 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 dba3107..88dc7cf 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 06b1aff..6a35def 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 3976ad2..23a8280 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 14b84d4..257aa51 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 2460c41..1f8241e 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 6de366b..257952a 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 60f853e..08fc238 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 b5724fe..9d8b465 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 699242a..30f9780 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 0fde440..59464de 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 ed7b8be..37f3745 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 b834941..f67b8a2 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 5d8e7fb..cfcee27 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 1515b19..96ec124 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 f9e5579..c7be58f 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 7003b3f..0394e4f 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 ee92cf7..48373dd 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 34fbd3d..8cf3fc8 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 4824835..a01d9d0 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 2b11f07..708d4ff 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 4096d40..efe57fd 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 7fd26e7..f0bc49d 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 2385ab5..4140446 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 5a63ae6..6a2f6ad 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 a812003..681db30 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 1f36189..d9e45a6 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 20e7fbb..f0a4530 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 59e0d6f..f354409 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 a74bbfa..b96d8bf 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 7c8c82e..4096e04 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 233b007..f01b1ba 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 3e80734..bf7b090 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 a91edda..c15beef 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 2061781..b503053 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 59e196e..0a7c71e 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 031b391..8f5ae3a 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 6330525..bf1bf0d 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 b9afaef..4dd7686 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 4679cb8..391bf4f 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 9491cbd..5422a85 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 ad079a4..c03e1eb 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 c819bd2..e255ffe 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 9b12ad4..7a41991 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 6bf60f1..e1b6dd7 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 d2fea75..cda71d2 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 746133a..9539922 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 4df5ff8..ef0ec8d 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 9420592..91860be 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 e84ee8f..767cab7 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 3918cd2..e167c7a 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 8292358..219bc83 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 4e5bb37..922b58b 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 d2fbcc3..b48fcc1 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 47957f5..baed1f1 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 483edd2..9e95b70 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 9bf972a..0a61eaa 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 f1b5c42..c120148 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 0a2ae92..9e641fe 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 aadb258..0744ebd 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 2a47dee..e3c1631 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 50999c5..2fb12d5 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 acfe166..8405875 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 ab3d098..c861823 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 f035b0f..bb27bc3 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 193f391..b8f4d14 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 0e2439f..c0f3a40 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 9f161ba..4d201b0 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 776dfe4..0060133 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 edfb94e..cdf0c49 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 d6ed8f9..1d427fd 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 6ede626..f0bb6cb 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 29dcdd5..e332593 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 bb744e6..4b62196 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 3d0b696..19e6f3c 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 98a2762..286542f 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 527dfe8..1f1f9b6 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 d99efd4..baa36f2 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 0979c83..e295940 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 13ff7d3..1018548 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 73c2227..970b971 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 d8b6079..c90ebdd 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 8be1819..826e130 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 9e673c5..92067a2 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 83ab0c4..f3bdf8d 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 33a14df..e96fa5e 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 03093f4..3754850 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 ad0fe2b..a2dadad 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 0d34777..cd5dcf6 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 9aed1ca..1d891fc 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 d98948d..1707174 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 78aefa8..73d9a1f 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 999901b..7879abc 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 5256770..075d329 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 a8858bf..d7c4f52 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 8b5e6f6..1cce16a 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 4f05317..029bbfd 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 43a4f42..01488ac 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 5bbc41c..df29fbd 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 26ae2a5..ad58349 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 ed2f8c2..3c5ef3e 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 c7641c3..c35847a 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 062b500..2b24ca2 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 596c01b..894e183 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 e95dc41..700a2d6 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 9259667..b5b4fc6 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 a1daad6..a9037c9 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 ab646b8..44b62c0 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 6e8e3ac..680e266 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 6eac769..81418c1 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 8cb4531..11339da 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 14ccd5c..ec7f74c 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 78a0801..3ccb961 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 6beeb56..e61d06a 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 60bdae6..fba90a8 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 f2724e0..68fad61 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 576d182..62065a5 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 91f5b71..9c5b7f2 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 3c65a62..8d55f6b 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 f024834..2fda790 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 a0fa5b5..c7cda10 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 4b26c43..4190f04 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 db505dc..674b275 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 347f4d3..786e57b 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 93e9865..c3aa86a 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 5aa42f2..d7ef2bc 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 c05e3bb..17fcbc4 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 6981080..cd1ca0c 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 e58c7f2..644b215 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 7103ec8..a54228b 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 8fba8d4..8dfa018 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 7ac107c..56dfcc4 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 6d20f28..729e626 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 13ccb61..796d33e 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 0c008e1..3531596 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 831eefb..d6e2f0a 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 7b57f5e..002aabb 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 51d57e0..cfcd489 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 334e14e..7397a8e 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 24ea98b..ce103be 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 e77ab5f..8626996 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 79f5f59..2ddcf41 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 9b211ec..4a989ac 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 d1f0dfc..d319074 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 5184e64..2875200 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 112ae43..4ee6963 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 718b23f..604aa82 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 1753345..d2036ea 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 38a9aae..8fe3332 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 5ca3292..8329ea3 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 42cebfb..93b8510 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 4cd0eaf..abf00bd 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 036d226..d822a52 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 b0ee285..55987f2 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 8443916..f7b5a31 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 395b5fa..515bbc5 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 7e3577c..7c8b1ab 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 2c75457..5c71df8 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 cfed8fd..4dd47a7 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 7f7718d..f743d03 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 0a65a4e..bf74e7f 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 4235ce9..bca6421 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 b7fe4c5..913f0c9 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 53bc9b4..a571b84 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 da3bdb7..17985aa 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 a629025..a1e719d 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 08184f9..c795608 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 836ed95..40be62a 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 6f7e9ba..d93d33b 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 fdff232..9679c6c 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 5f5471f..cf36d52 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 08731e4..d7ef394 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 040fa18..16dddd5 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 01d52dc..66f57ad 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 e6249a3..c60c20f 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 df59315..191db9c 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 d27409a..75a5333 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 8d65de7..5a13b62 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 4788bef..49327fc 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 f599341..e03ece1 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 224e476..d18b2eb 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 2ba57c2..efd2907 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 9a37cb9..85bb601 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 4ab1e53..b9f29d7 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 8af32a2..754422a 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 984c5f7..14199e8 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 7bfea93..0325fdd 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 0119a4d..f85b44b 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 7ff174d..cafd9ce 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 7725abd..851be3d 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 788b30f..9c759f2 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 8bd3406..a89ab78 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 beaf8ec..f2960f3 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 de7298c..55e456f 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 20bc428..f99c5c2 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 4a6a35a..e7cce0b 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 674da8d..bb9f45f 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 d404eba..770aac4 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 10987ae..7f17144 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 9561fae..adb7cd9 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 c8df17c..6b5ffd3 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 4b12517..bca6392 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 d4c9aab..df54049 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 68e4549..f590e5e 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 40b806e..ad65f80 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 a3a3d3f..a7ed156 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 43626ef..28a58d1 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 811f95b..dd4e4c7 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 7f5b702..18013b8 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 9039ea6..9afe946 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 aa1756f..3cb2f23 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 4a1b1df..9a51804 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 f2bc0cd..6fd7c2c 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 581e27b..2f51d03 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 b96cb64..3caae14 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 0dedab5..83fecbd 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 e02cc46..96525b7 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 39dea85..23df072 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 f255b29..d4fee67 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 4948e3c..fb0a277 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 2ec30f6..6a75f36 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 1bf63d2..a9221ef 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 991d9f4..502981c 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 902b685..294b600 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 fb40612..031a89f 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 acc08da..2caba3e 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 ea86e0d..7c39615 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 9a3e97c..9bd9312 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 e7b18bb..64a3493 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 48298d4..f3c5ecf 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 681e2ac..0f24829 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 038544b..dbead3f 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 535094e..408faec 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 ba2c4fc..bae669d 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 28abd25..576c4e1 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 3ca9700..7e2169d 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 1fc7dfa..b3ff7ab 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 946646b..22379b9 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 a922b82..bece48c 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 c2bea95..0b46ddc 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 b6bf222..31592b5 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 a189b58..5d8e6a8 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 69a4272..8d67af4 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 7e92d72..fe32e99 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 faa4fe1..6971387 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 5ee6eff..4139d7e 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 b536cf5..a1e2952 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 377f3c2..e804b57 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 ada6cbd..665739f 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 8a228a7..15e577f 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 038404f..9a017c9 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 e625c54..e668dbd 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 3138006..2bb905d 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 710446b..454a33a 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 47eb1c2..744f3ec 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 4f43bd2..1f6c41b 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 73a0f88..ecd33d3 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 481f0a9..8cb7c3f 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 31cec29..0a850fc 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 66ca15a..fb4f624 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 15e1d46..6603ef8 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 8a716c4..0e4574b 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 350a862..655613c 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 8532d4b..8df77da 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 b1f96f0..4454420 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 faf8a02..4923721 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 f496203..f0bdd88 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 5baa8a5..365c731 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 f3d77aa..40dc0e5 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 c026e43..7642ba0 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 f1930aa..73bc461 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 05494c5..5299ebf 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 b0d0fb5..a8bf40d 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 a6ed040..d5c0e44 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 319eba7..47dfb13 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 57000e3..d8cc15e 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 ccc7579..28bbcd7 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 e1193a5..de9ba5f 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 ac9cec9..a938508 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 4739ed8..5599cdf 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 7fe8b8c..c774065 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 0bbf9cc..fa96c67 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 483e38d..8f3597a 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 ae16764..5a90c34 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 d307f98..a6900f6 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 51a2ddb..96e2ff0 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 842e608..12c3483 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 edbf42d..89619cf 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 3a7a352..1066023 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 d66b03c..074b4e9 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 be3db54..de3fd8c 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 88554b8..9248b89 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 1808970..15598c5 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 22292e3..4d56405 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 a2ebc44..6022bc9 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 48309c5..d8aee3b 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 83da938..240de46 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 a0a8c8c..a635211 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 c3f43b8..869313f 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 9c1972b..e6fb757 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 a8db65c..6af507d 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 7c44ca4..0e5a548 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 850c2f9..28d9939 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 78bb6a0..bc31494 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 ff9d65b..e111b05 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 bc1d78b..c46b1b6 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 7cd4055..621763a 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 4dcb62b..497bc29 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 03cffbf..9ffc39a 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 124b7fd..61f5096 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 bd4496b..e803980 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 3821cfd..39d50b2 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 33a8bea..a24d387 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/33] 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 48dd5de..12c92d9 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/33] 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 e72f388..45eefd5 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 12c92d9..9d11fbf 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 06476c2..ec4ea1a 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 b150ea0..70d500e 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 5451142..777c372 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 afd90c0..b1903db 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 4f0c24d..e1fc978 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 42b8257..9597d70 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 be79b72..d533499 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 f804299..edc6370 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 bd80fc3..c06f47f 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 b45312f..78d3d58 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 7a9b0e1..5ec8822 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 88eeb7b..b04cdbf 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 e1cf047..aed0c6b 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 9cddffc..6d052bd 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 77fc42d..838058d 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 be79338..ef8d5db 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 73c0db1..7fe8ba7 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 2d5d4aa..6b67142 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 40e5559..56ac2bc 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 215e538..54c27e8 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 ffb83db..62b8967 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 8a2d9f5..2d6b527 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 5c21865..3ee4cdc 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 01c9380..c0334d0 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 04faf5d..2179618 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 dc8b014..94b0a79 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 9caf2cf..8584509 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 77c9cbc..228e574 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 98153a8..88c2eae 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 73fae4a..dfaa7b8 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 0d2d65a..5523bf9 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 1aff77f..9f961ec 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 075cb68..4819ca5 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 88f63ec..e477a5e 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 b841627..7ec7a07 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 4021d8e..917b849 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 d7e6f4a..38a9cb5 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 1f13697..a49f374 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 c413dce..e27c6df 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 9739471..3602df2 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 4097013..f7ad90f 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 724a4f4..0c1a544 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 58204df..93f77ea 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 ab9bd06..2727b0d 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 4979301..fed7283 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 15f8633..4a1884a 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 cd6c6e8..b4f076a 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 83e6ff3..a23c120 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 9821f0f..451fe61 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 8355f3d..f37ab47 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 a8d041e..e252d94 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 09d8c50..cbf5171 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 3f70b19..dae3329 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 d136330..6b39b2f 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 793c003..b17b122 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 09c4e18..9f1d4e2 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 ffd4bd2..a2e9d52 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 a8070cc..62cc525 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 ad8ec94..e1b0275 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 126a1bd..213d210 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 7fbf16b..cbcc2fb 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 f2a9381..4b34da8 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 53c6d41..1897aa6 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 87a27e4..64b2234 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 09f40b7..b2255bc 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 1a2f11b..3571316 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 7324913..87de665 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 1f1f8cf..c187e45 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 70c15d2..0457f2a 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 f2733b1..3cc7e0c 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 9738250..f04f741 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 ad3ad2a..00ba579 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 fd2746a..c0be392 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 a7107bf..3e72c25 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 dee802c..e79cc74 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 93c7be7..e61fbee 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 2b135b6..1e3b5f3 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 07dfde4..cc64336 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 74a2ff6..23fed9e 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 c66d356..affeede 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 a7aea73..6b100e0 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 575abb0..51f8762 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 759f31e..9345fff 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 ddc1ee8..bbd6da6 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 83dddb0..0a148d4 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 1a7b7fa..429052d 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 69e489a..947f2dd 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 f4dc3f9..bff2e98 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 accc02f..848e757 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 bb8add0..945eb74 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 a0ee8c5..a79b58f 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 dfbff2c..c2a85d9 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 cf18ecd..f1ea866 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 9865d63..cd5f2db 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 5d911d0..29e99d3 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 7cbaac8..86a6980 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 c41cdb9..f8e15da 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 5988232..0af606c 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 32f77db..880d569 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 7c6b601..41ec638 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 29debaa..b1bc31b 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 86a5ca5..aaa2a2c 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 f691384..8789ba7 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 0c5d783..5135c7d 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 6fc6b37..ddbd446 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 8d2981b..3f9d0ba 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 29428f5..cf8281c 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 4506a39..79916dd 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 dbf199a..e788ac5 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 eace8be..33fdb9c 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 781e7bf..c3fc7ce 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 b8e3331..1425d61 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 14ac856..1d4e2e1 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 f605d52..1f335bb 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 de2ef1c..6c05c9a 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 18261f6..1cc2f19 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 37d89a9..2adb9e0 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 0a6ccf5..68cd9b6 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 5042b42..7a26e44 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 4779301..fda5137 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 afb46c2..205de2d 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 da0926c..b339cb8 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 f0a792d..2f240ae 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 1de9e5b..57904e8 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 0e7b21b..ad5f363 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 8f429fc..3b558d5 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 0fa11c0..bc5b824 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 96ba562..bcd7d94 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 385d633..f845c08 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 05115dc..80b6bf4 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 c17ae7a..8138fc6 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 486aa25..1261812 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 4688167..f96c56e 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 2466ecd..cbc9ddb 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 f3b9144..07d954b 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 5bd3196..e9b5a4e 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 124f444..ecb2636 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 8a878e3..55188bb 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 6335f98..b696c01 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 55d5ccb..4448c00 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 f70bb12..a467d10 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 06723e6..eb71819 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 e5c94e9..e1ed064 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 62b5536..5689c48 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 f93ce8b..0ff05b0 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 0786ecd..90b0ce0 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 db1fec3..7327087 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 f323978..a63ed16 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 f47f87b..b0cac05 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 82419d2..c4ffef2 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 59ea5e1..9bf5845 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 d6174ff..f851f62 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 ada7cbd..a442302 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 7ca58fc..954130f 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 9be20e8..d8e6770 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 55cad17..edf932f 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 59e7e81..87a257e 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 821530d..834f5c4 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 b38873d..ead3e6c 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 44fb15b..01a2512 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 439e465..4048b36 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 c9f9394..f11855a 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 b230c54..c6a0aee 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 f79dac2..5cb3132 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 2fc00ae..ca10e03 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 17119fe..1d17616 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 1c828c2..2b73fc3 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 4fc6509..1c953f8 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 b241b81..b453e3f 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 367981c..76e7fa8 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 37da6a8..9870181 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 066a5c7..541a78b 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 96b2adc..60c9e64 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 cc7bf3e..b3aee9e 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 b0fb5af..0249bc4 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 0903612..b8f45c4 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 1e3a420..6400e04 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 dfc790b..fcc8beb 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 0310980..eb0537a 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 1c1c5cc..040b762 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 07ec2ea..9496333 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 c58d5ea..9048d56 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 29046c9..1e8c856 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 1c92d02..15e4860 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 0486f5c..51c7976 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 c54189d..62b2cc6 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 33780ed..797fd0d 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 4d3f471..012ede4 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 c235bf1..d3e89ee 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 4fb22b4..feafdb5 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 ad78158..447c3fb 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 8bd82f5..2ff7291 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 87d4ddb..7da1f1b 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 daabe31..bca0854 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 3c14074..24de27f 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 0259068..fa7a01e 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 b083f81..a949e9d 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 082c6d8..a7288c2 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 c0f4e78..7356ced 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 482f040..7187dcb 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 e0ce806..7bafb9f 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 92891ad..7ccc957 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 0101a29..06c2cd9 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 62ea1f9..518ad31 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 660497a..e0fb2fa 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 d414146..d67c618 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 02061f7..fb9463c 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 e97a960..2416d34 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 3a95eca..d17c00b 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 0b8ce06..1b44684 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/33] 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 fd3de59..511a462 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/33] 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 4e0a6c9..8291a2d 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 f53a75d..b15db01 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 503b735..2950f86 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/33] 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 511a462..4aecc08 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/33] 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 e1fc978..8198214 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/33] 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 45eefd5..0c887d9 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 14d6b5d..186c33c 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 9d11fbf..5cc040d 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 88dc7cf..27e4783 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 e255ffe..41741b2 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 91860be..17cc777 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 e167c7a..bbd1af3 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 219bc83..aa651d5 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 b8f4d14..56fb0d3 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 029bbfd..ca4becb 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 01488ac..6a0c5aa 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 df29fbd..a4dff35 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 ad58349..504640f 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 3c5ef3e..6fad0b5 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 c35847a..88f25f6 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 2b24ca2..5f9e18d 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 894e183..11d2df9 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 700a2d6..da2578e 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 b5b4fc6..e7266f1 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 a9037c9..6b74bdc 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 44b62c0..fae8042 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 680e266..f5ce77c 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 81418c1..eb7ed08 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 11339da..01446fc 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 ec7f74c..90c4050 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 3ccb961..a58cf67 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 e61d06a..b341389 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 fba90a8..bf126ed 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 68fad61..cdb46fe 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 62065a5..ded939b 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 9c5b7f2..ff6f81e 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 8d55f6b..1c4ba91 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 2fda790..739c534 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 c7cda10..84a07ee 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 4190f04..59ea115 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 674b275..85b576b 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 786e57b..beac9a7 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 c3aa86a..ee0c4f6 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 d7ef2bc..f0db3f0 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 17fcbc4..739530f 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 cd1ca0c..de4b519 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 644b215..9381229 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 a54228b..5f4a2c5 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 8dfa018..c5d6159 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 56dfcc4..3527c4f 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 729e626..7078898 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 796d33e..3c53fe2 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 3531596..92433c9 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 d6e2f0a..fab94fa 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 002aabb..893c3d7 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 cfcd489..51ec802 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 7397a8e..7e6bae0 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 ce103be..a2c3e69 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 0000000..8e09a9a --- /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 8626996..4374069 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 2ddcf41..fa665d4 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 4a989ac..281540d 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 d319074..ac4d47b 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 2875200..3b81426 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 4ee6963..24b54cc 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 604aa82..5744e31 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 d2036ea..b0e8294 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 8fe3332..d52753a 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 8329ea3..62df2ed 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 93b8510..12a42dc 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 abf00bd..7117ef8 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 d822a52..8f2f036 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 55987f2..586fb22 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 f7b5a31..f9a98b7 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 515bbc5..9fb8402 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 7c8b1ab..86608e3 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 5c71df8..7e05b04 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 4dd47a7..aef9555 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 f743d03..e9d1ad0 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 bf74e7f..740d9dd 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 bca6421..aa509e3 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 913f0c9..a8d0d8d 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 a571b84..870aca2 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 17985aa..0723074 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 a1e719d..04a0b21 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 c795608..6ff9de6 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 40be62a..0802247 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 d93d33b..81f6235 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 9679c6c..d2fffa6 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 cf36d52..c29d0f6 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 d7ef394..eb297b9 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 16dddd5..18b4d44 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 66f57ad..228ddca 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 c60c20f..ee13793 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 191db9c..355f269 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 75a5333..4d866dc 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 5a13b62..a1f97c0 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 49327fc..5e85c98 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 e03ece1..a3f6bcb 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 d18b2eb..29237bf 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 efd2907..5d937e7 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 85bb601..b039dfc 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 b9f29d7..2be8da2 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 754422a..4c0915b 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 14199e8..b8d29a5 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 0325fdd..95a8f33 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 f85b44b..6acbb1a 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 cafd9ce..065a4f4 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 851be3d..80a584d 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 9c759f2..6cc5f6b 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 a89ab78..d005849 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 f2960f3..9016c47 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 55e456f..62e9153 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 f99c5c2..ed46073 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 e7cce0b..d672d2d 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 bb9f45f..9c0a8c0 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 770aac4..42b8f35 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 7f17144..5ce79fa 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 adb7cd9..24b3d36 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 6b5ffd3..b202fd3 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 bca6392..21b523d 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 df54049..35b8d6e 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 f590e5e..8e5ed34 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 ad65f80..88e2021 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 a7ed156..6ecac6a 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 28a58d1..acf9094 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 dd4e4c7..e24e3d1 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 18013b8..1c1e997 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 9afe946..c20145f 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 3cb2f23..8d4de72 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 9a51804..ed0068f 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 6fd7c2c..158e361 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 2f51d03..1762f3e 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 3caae14..1f1caf2 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 83fecbd..ec36c8f 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 96525b7..a558164 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 23df072..45bf413 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 d4fee67..6a9f4bb 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 fb0a277..8707c3e 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 6a75f36..9ba89d1 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 a9221ef..95277d6 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 502981c..48b5d55 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 294b600..ffa161c 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 031a89f..7561c1e 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 2caba3e..4d23079 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 7c39615..f970d05 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 9bd9312..f340009 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 64a3493..6db5a02 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 f3c5ecf..a3a7f38 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 0f24829..c2558de 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 dbead3f..5920a67 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 408faec..7dbbe6d 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 bae669d..0fc2ba2 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 576c4e1..52ec09d 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 7e2169d..0e397d8 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 b3ff7ab..9e6267d 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 22379b9..252621e 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 bece48c..5daa29d 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 0b46ddc..6d1f80f 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 31592b5..c85b368 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 5d8e6a8..adbc1c5 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 8d67af4..13607a0 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 fe32e99..79c4d47 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 6971387..eb9a4aa 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 4139d7e..0894efc 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 a1e2952..028095d 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 e804b57..8a61be6 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 665739f..e958b2b 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 15e577f..7892e15 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 9a017c9..3231dfb 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 e668dbd..e6b622d 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 2bb905d..3dbc470 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 454a33a..d95202a 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 744f3ec..797df28 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 1f6c41b..16fb621 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 ecd33d3..642438f 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 8cb7c3f..79b3f3a 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 0a850fc..725c4b7 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 fb4f624..a17eb3f 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 6603ef8..b64c6f5 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 0e4574b..1a11753 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 655613c..2a91439 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 8df77da..1073783 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 4454420..3fabc00 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 4923721..47e46ca 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 f0bdd88..7200311 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 365c731..8659742 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 40dc0e5..dc8eb77 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 7642ba0..189c901 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 73bc461..428f1f9 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 5299ebf..f008473 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 a8bf40d..a5cd72d 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 d5c0e44..aa0862e 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 47dfb13..5485920 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 d8cc15e..2fb4173 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 28bbcd7..c592b74 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 de9ba5f..888bac2 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 a938508..b36c394 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 5599cdf..23e673a 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 c774065..965628c 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 fa96c67..17d8461 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 8f3597a..ac6e298 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 5a90c34..80664db 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 a6900f6..f9323cc 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 96e2ff0..a37f4b9 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 12c3483..2f07b21 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 89619cf..d2bb47b 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 1066023..c9c04d7 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 074b4e9..d400c99 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 de3fd8c..4421ea6 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 9248b89..ad79d0b 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 15598c5..c0815c3 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 4d56405..17b9373 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 6022bc9..0f6418e 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 d8aee3b..db023cc 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 240de46..38d3317 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 a635211..9691bd0 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 869313f..3132306 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 e6fb757..2768535 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 6af507d..780a365 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 0e5a548..6cd945f 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 28d9939..d2cee1a 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 bc31494..08c80c4 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 e111b05..3c0209a 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 c46b1b6..622086e 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 621763a..b446b2a 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 497bc29..ec3d00d 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 9ffc39a..99701f7 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 61f5096..31531e9 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 e803980..944c887 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 39d50b2..3c6bdb7 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 a24d387..dd708e0 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/33] 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 b04cdbf..0d8083f 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 aed0c6b..4919093 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 6d052bd..2183d3b 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 838058d..accf41b 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 ef8d5db..60f6af7 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 7fe8ba7..f346c45 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 6b67142..4e0747d 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 56ac2bc..31dca6d 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 54c27e8..1aa1b34 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 62b8967..1f53020 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 2d6b527..0f95246 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 3ee4cdc..fc57e83 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 c0334d0..04dfad7 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 2179618..6e5ee13 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 94b0a79..24baa51 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 8584509..e2cc61e 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 228e574..48b75f8 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 88c2eae..315e557 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 dfaa7b8..02b9050 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 5523bf9..0ad2c57 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 9f961ec..9105440 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 4819ca5..9bde715 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 e477a5e..0d1e17e 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 7ec7a07..e1f9bdb 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 917b849..ec51480 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 38a9cb5..04ec5ac 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 a49f374..decf204 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 e27c6df..e994059 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 3602df2..1aba3e6 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 f7ad90f..ae9903a 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 0c1a544..8725f4b 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 93f77ea..609d4eb 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 2727b0d..9aa66c4 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 fed7283..e025376 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 4a1884a..a1c1028 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 b4f076a..e5c49cf 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 a23c120..68dbca3 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 451fe61..fd76e82 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 f37ab47..7706dca 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 e252d94..2866b70 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 cbf5171..befa7dd 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 dae3329..f3a2ff9 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 6b39b2f..7408353 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 b17b122..3ceb0f5 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 9f1d4e2..e07ed9d 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 a2e9d52..728273a 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 62cc525..b9948ce 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 e1b0275..3b8d788 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 213d210..e4cd661 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 cbcc2fb..d7e1a35 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 4b34da8..c8387bc 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 1897aa6..2790b4b 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 64b2234..a1eef86 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 b2255bc..0ed36e1 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 3571316..5a81cfa 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 87de665..d8ca063 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 c187e45..b27ad1a 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 0457f2a..6899a66 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 3cc7e0c..8d07918 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 f04f741..84824ea 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 00ba579..337db3a 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 c0be392..b85fb4b 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 3e72c25..bd5f5b8 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 e79cc74..880eb72 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 e61fbee..1d2afb5 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 1e3b5f3..4a89a8b 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 cc64336..198ede5 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 23fed9e..786b4f5 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 affeede..55b4572 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 6b100e0..c8d2b25 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 51f8762..21e8595 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 9345fff..bee5fb6 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 bbd6da6..9284cba 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 0a148d4..7a82bff 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 429052d..f9ed608 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 947f2dd..e4e757e 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 bff2e98..98fa5e8 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 848e757..30e05dc 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 945eb74..d9eafc4 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 a79b58f..eea3a96 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 c2a85d9..33c0c54 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 f1ea866..b1bc9d0 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 cd5f2db..1ba27bf 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 29e99d3..197bc15 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 86a6980..0c16847 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 f8e15da..c2c7286 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 0af606c..97b92b1 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 880d569..ab9ff69 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 41ec638..c5c49b0 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 b1bc31b..d78364f 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 aaa2a2c..f368c4d 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 8789ba7..22dd922 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 5135c7d..c0fbc2a 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 ddbd446..a588ab9 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 3f9d0ba..68a11dc 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 cf8281c..c5445b5 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 79916dd..6bbe817 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 e788ac5..2aa606d 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 33fdb9c..2ca7486 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 c3fc7ce..b4985f4 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 1425d61..428326b 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 1d4e2e1..bec9a73 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 1f335bb..a399309 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 6c05c9a..6d35766 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 1cc2f19..b95f293 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 2adb9e0..6ba7539 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 68cd9b6..eb17179 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 7a26e44..a8b514d 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 fda5137..8f31d8a 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 205de2d..f48bf91 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 b339cb8..39c8a40 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 2f240ae..562e149 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 57904e8..2dbdb47 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 ad5f363..0848aab 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 3b558d5..3d6365f 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 bc5b824..7556d96 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 bcd7d94..654781c 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 f845c08..6770ee5 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 80b6bf4..2b7ee6d 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 8138fc6..b7f24ba 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 1261812..1ab7eff 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 f96c56e..7a04fc0 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 cbc9ddb..188ee63 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 07d954b..168fcd3 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 e9b5a4e..5e35990 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 ecb2636..1ab0bb9 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 55188bb..7b9c897 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 b696c01..adf682f 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 4448c00..186cb7c 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 a467d10..b81b84a 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 eb71819..5f833f3 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 e1ed064..99a9c95 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 5689c48..1c24642 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 0ff05b0..991ae62 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 90b0ce0..81a0103 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 7327087..367ff2e 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 a63ed16..35fde68 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 b0cac05..6a082d5 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 c4ffef2..af42670 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 9bf5845..a5f1646 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 f851f62..8a966b3 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 a442302..35d75ec 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 954130f..98a9e2a 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 d8e6770..99127c2 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 edf932f..b802c19 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 87a257e..8a30312 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 834f5c4..2f59cbb 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 ead3e6c..f1b63d5 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 01a2512..c07899e 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 4048b36..0d9f45d 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 f11855a..139009a 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 c6a0aee..c41d7f6 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 5cb3132..2c361dd 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 ca10e03..85e8ac1 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 1d17616..e5c8908 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 2b73fc3..badd345 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 1c953f8..ded4df0 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 b453e3f..c8c6567 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 76e7fa8..3df44cf 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 9870181..e4584c5 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 541a78b..60dc077 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 60c9e64..a3fb228 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 b3aee9e..45e3cb8 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 0249bc4..cf8a7e1 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 b8f45c4..4191e30 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 6400e04..de3ad61 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 fcc8beb..fe8c9c1 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 eb0537a..07c150b 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 040b762..97aa42f 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 9496333..4700241 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 9048d56..aed6a4d 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 1e8c856..96f966a 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 15e4860..5c70bac 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 51c7976..a99103d 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 62b2cc6..6c6584d 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 797fd0d..7d90e84 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 012ede4..9460e77 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 d3e89ee..0583871 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 feafdb5..b746337 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 447c3fb..7efd005 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 2ff7291..445d7ec 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 7da1f1b..bcebd4c 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 bca0854..be0e9b2 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 24de27f..18452de 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 fa7a01e..57393dc 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 a949e9d..37fdead 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 a7288c2..1596f25 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 7356ced..7a0508b 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 7187dcb..606ab85 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 7bafb9f..ce21d20 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 7ccc957..f907089 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 06c2cd9..6e6b58a 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 518ad31..e6f377e 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 e0fb2fa..d4cce9e 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 d67c618..84ca0ed 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 fb9463c..7c26c89 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 2416d34..bfeace7 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 d17c00b..aad615e 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 1b44684..8fa5377 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/33] 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 9597d70..7a06709 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/33] 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 6a0c5aa..5b60567 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 a4dff35..8a1d737 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 504640f..eef967d 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 6fad0b5..3c3829c 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 88f25f6..377c7ae 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 5f9e18d..d22e6a5 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 11d2df9..9b37e8f 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 da2578e..8f69038 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 e7266f1..72f88fc 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 6b74bdc..fee9719 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 fae8042..ff59306 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 f5ce77c..259c91a 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 eb7ed08..8296ddf 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/33] 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 0c887d9..7272a80 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 186c33c..8fc8df6 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 5cc040d..866a9a5 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 ca4becb..9de7508 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 01446fc..b409cf9 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 90c4050..4884754 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 a58cf67..a4a65fa 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 b341389..9da7a3b 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 bf126ed..db6710a 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 cdb46fe..838124e 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 0000000..9c01010 --- /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 ded939b..03705e0 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 ff6f81e..b0a0c64 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 1c4ba91..73601fe 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 739c534..3abf34e 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 84a07ee..9d787bb 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 59ea115..34ac11b 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 85b576b..4398ef9 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 beac9a7..edb329c 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 ee0c4f6..4ef0d95 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 f0db3f0..3f7f31e 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 739530f..fd0ed19 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 de4b519..640021f 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 9381229..e7881a9 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 5f4a2c5..8213f29 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 c5d6159..ed8c14c 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 3527c4f..d903c3a 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 7078898..56babc4 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 3c53fe2..324e514 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 92433c9..a6c40fb 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 fab94fa..9cd50bb 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 893c3d7..db853ac 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 51ec802..853891f 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 7e6bae0..a2bd6d2 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 a2c3e69..4dd73ac 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 4374069..1ac69dd 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 fa665d4..9a6c224 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 281540d..1775bf4 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 ac4d47b..a27a432 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 3b81426..2083caf 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 24b54cc..52245c1 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 5744e31..3167bb2 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 b0e8294..0131bea 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 d52753a..e4f451b 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 62df2ed..2e7b893 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 12a42dc..f77d796 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 7117ef8..24cd226 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 8f2f036..11b0028 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 586fb22..750e081 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 f9a98b7..01008a1 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 9fb8402..7555d3e 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 86608e3..cf0f91a 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 7e05b04..a1e2992 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 aef9555..7d1ea43 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 e9d1ad0..12ebcb3 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 740d9dd..6430c4a 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 aa509e3..f0594e0 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 a8d0d8d..79a1fc1 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 870aca2..c891163 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 0723074..e75d593 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 04a0b21..c89e812 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 6ff9de6..93562ca 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 0802247..4dd3c58 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 81f6235..edfa926 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 d2fffa6..52a3a3d 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 c29d0f6..aa3b79c 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 eb297b9..3eaa8f0 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 18b4d44..0ea0a93 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 228ddca..71c77a5 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 ee13793..84eb986 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 355f269..73fe7da 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 4d866dc..e72b5f4 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 a1f97c0..fd2d2bf 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 5e85c98..39f5742 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 a3f6bcb..152f246 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 29237bf..ef837d4 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 5d937e7..0eb6d1b 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 b039dfc..553b810 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 2be8da2..5f29a02 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 4c0915b..3bc9d5c 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 b8d29a5..b54a8ff 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 95a8f33..a995fa7 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 6acbb1a..a984eb3 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 065a4f4..b0c9463 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 80a584d..ea3e58a 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 6cc5f6b..aa02724 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 d005849..9f10386 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 9016c47..d06f11b 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 62e9153..3bb93a7 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 ed46073..941a1c1 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 d672d2d..d34df68 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 9c0a8c0..0872877 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 42b8f35..a2574f3 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 5ce79fa..56544af 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 24b3d36..d11ec7d 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 b202fd3..acf43a9 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 21b523d..de8a322 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 35b8d6e..3143a5b 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 8e5ed34..7f10821 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 88e2021..e02b887 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 6ecac6a..3250d00 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 acf9094..2dc01f5 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 e24e3d1..342c4a4 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 1c1e997..d94ab97 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 c20145f..3280c58 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 8d4de72..127429b 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 ed0068f..55d9b5d 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 158e361..6a32eef 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 1762f3e..c13a209 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 1f1caf2..604027f 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 ec36c8f..464e0a8 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 a558164..df92c8e 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 45bf413..efff3de 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 6a9f4bb..52be96e 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 8707c3e..d8fbec0 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 9ba89d1..7e84d05 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 95277d6..13fe978 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 48b5d55..f549ea1 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 ffa161c..9029f7c 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 7561c1e..5ee73f5 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 4d23079..7b8f574 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 f970d05..40f6d0a 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 f340009..98b31be 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 6db5a02..130515a 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 a3a7f38..59de2d1 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 c2558de..3d4fe32 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 5920a67..64ef5a1 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 7dbbe6d..787223a 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 0fc2ba2..8f76878 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 52ec09d..128e9a1 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 0e397d8..75b8865 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 9e6267d..34c8fed 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 252621e..71d6624 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 5daa29d..a2d8230 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 8e09a9a..b01b20b 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 6d1f80f..5576b03 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 c85b368..1ebb9e0 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 adbc1c5..53cee02 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 13607a0..9791454 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 79c4d47..5a32ba7 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 eb9a4aa..3afd1b0 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 0894efc..d9aa464 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 028095d..f4a3eda 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 8a61be6..926da02 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 e958b2b..b1137b5 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 7892e15..17e3ddd 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 3231dfb..a2c0b47 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 e6b622d..9417565 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 3dbc470..d09e05a 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 d95202a..27a83e1 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 797df28..3ed416d 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 16fb621..5dcc070 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 642438f..c2ad1fa 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 79b3f3a..2583688 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 725c4b7..4b2c943 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 a17eb3f..d63a0d4 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 b64c6f5..97058c5 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 1a11753..ffdbf34 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 2a91439..6693846 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 1073783..774f8e6 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 3fabc00..2215ba6 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 47e46ca..e27a37d 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 7200311..9eafcda 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 8659742..7e9fa6b 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 dc8eb77..602c5e3 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 189c901..724269b 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 428f1f9..803312f 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 f008473..4818b04 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 a5cd72d..26bd4f5 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 aa0862e..5494299 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 5485920..be17072 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 2fb4173..1c4ac05 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 c592b74..20ead8e 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 888bac2..c8dcaa9 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 b36c394..e1e136d 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 23e673a..35562bb 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 965628c..346bf13 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 17d8461..741c029 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 ac6e298..141962c 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 80664db..9b1dde4 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 f9323cc..4cf5fd4 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 a37f4b9..1c26a1c 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 2f07b21..ceda5ba 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 d2bb47b..20a76b5 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 c9c04d7..4510b45 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 d400c99..5365b64 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 4421ea6..23f1219 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 ad79d0b..8a81490 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 c0815c3..f36d92f 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 17b9373..c961103 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 0f6418e..1f0f1a8 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 db023cc..b7e64fc 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 38d3317..aacaf8a 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 9691bd0..d2e400d 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 3132306..64e176b 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 2768535..a7e9e50 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 780a365..5b23330 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 6cd945f..96cd392 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 d2cee1a..ef2a701 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 08c80c4..8836474 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 3c0209a..304c767 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 622086e..5313288 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 b446b2a..395c5c8 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 ec3d00d..fa0887d 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 99701f7..ba0a9a7 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 31531e9..91d3944 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 944c887..f89beae 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 3c6bdb7..e9df357 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 dd708e0..6fa9c55 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/33] 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 6fa9c55..0bfa45e 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/33] 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 b1903db..37e4c2e 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 c06f47f..81a145a 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 78d3d58..1db5cdb 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/33] \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 4aecc08..3989aa8 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/33] 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 17cc777..d8e82e4 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/33] 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 0000000..9626903 --- /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 2950f86..b566853 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 8296ddf..7b638c8 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/33] 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 777c372..22a8e43 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 d533499..71403ff 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/33] 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 81a145a..8c7c512 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 1db5cdb..b03ab52 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/33] 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 5b60567..c1ffdfd 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 8a1d737..b90c9fe 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 eef967d..30ee44c 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 3c3829c..52947ec 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 377c7ae..2bfc4dd 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 d22e6a5..bab49b3 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 9b37e8f..46f9214 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 8f69038..845ee9c 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 72f88fc..e7ebef6 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 fee9719..08d9a22 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 ff59306..7acaa4e 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 259c91a..424402d 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/33] 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 ec4ea1a..67fc872 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 70d500e..14c12a8 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 edc6370..3b58171 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 5ec8822..9cd3e8e 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 0000000..4275b4c --- /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 0000000..a8bfae3 --- /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/33] 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 67fc872..44056c2 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 14c12a8..3d8d7a2 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 22a8e43..8177800 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 37e4c2e..d5db315 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 8198214..a0eb817 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 3989aa8..48fef68 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 7a06709..cd6798b 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 71403ff..a2a3270 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 3b58171..76b246c 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 8c7c512..1bae514 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 b03ab52..a798bd7 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 9cd3e8e..eda18db 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 0000000..2be97e7 --- /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 0000000..5ac711a --- /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 0000000..f3cabec --- /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 0000000..3623fec --- /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 0000000..d066c1b --- /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 0000000..df8fe9d --- /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 0000000..cdc52d9 --- /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 0000000..ab524d5 --- /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 0000000..50d6185 --- /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 0000000..8b9935b --- /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 0000000..bdc97e4 --- /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 0000000..84ad078 --- /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/33] 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 0000000..38c8acf --- /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 669c386..0000000 --- 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/33] 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 0000000..44550a5 --- /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/33] 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/33] 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 0d8083f..210cf88 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 4919093..2c22c4b 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 2183d3b..ffedb82 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 accf41b..79f3e09 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 60f6af7..66ebf71 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 f346c45..abb3d01 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 4e0747d..dc15b8c 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 31dca6d..68b8617 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 1aa1b34..30d68d4 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 1f53020..0e4c17d 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 0f95246..ec36570 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 fc57e83..01d827a 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 04dfad7..f7ab11d 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 6e5ee13..09cb2aa 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 24baa51..b8ddc0e 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 e2cc61e..8ed2dd7 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 48b75f8..bf3f574 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 315e557..36d5c1f 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 02b9050..9fab0e8 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 0ad2c57..b524a16 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 9105440..71630af 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 9bde715..ead1e65 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 0d1e17e..e3947df 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 e1f9bdb..f4769f4 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 ec51480..3880bdf 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 04ec5ac..4777538 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 decf204..ab9f968 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 e994059..7884bb2 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 1aba3e6..b48338b 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 ae9903a..0364ca7 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 8725f4b..cd06fce 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 609d4eb..7a6016e 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 9aa66c4..262bc9c 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 e025376..3540489 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 a1c1028..42a019f 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 e5c49cf..0966a60 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 68dbca3..7874668 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 fd76e82..0d13610 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 7706dca..abcf781 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 2866b70..0e6f6ac 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 befa7dd..3ff9ae4 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 f3a2ff9..13659d2 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 7408353..bab4938 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 3ceb0f5..b10942e 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 e07ed9d..dc1cba7 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 728273a..502b440 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 b9948ce..f8307a0 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 3b8d788..0decfdd 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 e4cd661..acbb55e 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 d7e1a35..6edb323 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 c8387bc..7a4443f 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 2790b4b..70fc36e 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 a1eef86..41102a7 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 0ed36e1..9554947 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 5a81cfa..ca6f196 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 d8ca063..8712a87 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 b27ad1a..cf940a9 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 6899a66..49c68d3 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 8d07918..5958cd6 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 84824ea..db3417a 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 337db3a..ba975de 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 b85fb4b..3bd7f14 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 bd5f5b8..a0a9286 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 880eb72..6ac5183 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 1d2afb5..704725f 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 4a89a8b..d884dfe 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 198ede5..310f4fc 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 786b4f5..3e8a346 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 55b4572..0b5c809 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 c8d2b25..3cd8571 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 21e8595..26c613c 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 bee5fb6..6251e87 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 9284cba..e536672 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 7a82bff..557da23 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 f9ed608..02d2578 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 e4e757e..76c9f38 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 98fa5e8..8c6584e 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 30e05dc..495271b 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 d9eafc4..75bf33f 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 eea3a96..f9d7e14 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 33c0c54..45af023 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 b1bc9d0..fa5ec2d 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 1ba27bf..62d8139 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 197bc15..0178c85 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 0c16847..76ae7ac 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 c2c7286..07b3b2b 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 97b92b1..98ccc91 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 ab9ff69..c878e1e 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 c5c49b0..dad0335 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 d78364f..3065fee 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 f368c4d..8ab9778 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 22dd922..fb5e965 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 c0fbc2a..a5d9b52 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 a588ab9..767307a 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 68a11dc..3ab0c18 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 c5445b5..b008a2b 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 6bbe817..ffb49dc 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 2aa606d..e881e0f 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 2ca7486..0178ea8 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 b4985f4..7ef3d2d 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 428326b..d6832f5 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 bec9a73..946dac3 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 a399309..4e682e5 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 6d35766..259e473 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 b95f293..889f3dc 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 6ba7539..257ca9c 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 eb17179..9aa156c 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 a8b514d..a133d73 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 8f31d8a..7cae5a2 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 f48bf91..a2e1cec 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 39c8a40..b85d160 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 562e149..d829d21 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 2dbdb47..c6e1fc1 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 0848aab..d262980 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 3d6365f..b61b965 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 7556d96..9db4ef3 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 654781c..5f878a1 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 6770ee5..eb47d16 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 2b7ee6d..795fedb 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 b7f24ba..c490bd5 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 1ab7eff..40f5ffe 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 7a04fc0..bd8cae1 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 188ee63..26baae1 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 168fcd3..6cd1c2a 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 5e35990..767784b 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 1ab0bb9..caf3414 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 7b9c897..e2caf1a 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 adf682f..95892d9 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 186cb7c..fbe6bf3 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 b81b84a..523fbf9 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 5f833f3..06d94c0 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 99a9c95..ac593ec 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 1c24642..c13aec0 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 991ae62..e549a14 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 81a0103..11a22af 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 367ff2e..2110066 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 35fde68..22f17ad 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 6a082d5..d0a3ba0 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 af42670..74e6f85 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 a5f1646..c286ca7 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 8a966b3..094d2ff 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 35d75ec..360e064 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 98a9e2a..efb0de9 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 99127c2..24670a3 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 b802c19..5befa05 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 8a30312..3e5635c 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 2f59cbb..f24252f 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 f1b63d5..f48a71e 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 c07899e..a7f75fb 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 0d9f45d..b54b0f3 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 139009a..74b4fe8 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 c41d7f6..6ff19e0 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 2c361dd..da9aab4 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 85e8ac1..56c8b2c 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 e5c8908..e932f8d 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 badd345..b7105f8 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 ded4df0..e87339f 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 c8c6567..7405b08 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 3df44cf..9cf3721 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 e4584c5..5056df5 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 60dc077..c8e6e84 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 a3fb228..3c385f1 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 45e3cb8..5b0ba68 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 cf8a7e1..c2751b7 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 4191e30..f26b1df 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 de3ad61..2a8e90d 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 fe8c9c1..88d8527 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 07c150b..260af42 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 97aa42f..8a1552a 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 4700241..02d1fb4 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 aed6a4d..74e1e6a 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 96f966a..2c51b0c 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 5c70bac..382f919 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 a99103d..9c3dd00 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 6c6584d..d67c63d 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 7d90e84..73c2436 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 9460e77..dd4893e 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 0583871..33b6b38 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 b746337..1c93a43 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 7efd005..7e534ae 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 445d7ec..5303fc3 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 bcebd4c..f895a9c 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 be0e9b2..dd45a91 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 18452de..a48a7fe 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 57393dc..201108b 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 37fdead..1f1dfd6 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 1596f25..593fe23 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 7a0508b..98d1501 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 606ab85..be55be8 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 ce21d20..48171a1 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 f907089..7faad12 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 6e6b58a..4e72f12 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 e6f377e..ad5346f 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 d4cce9e..d585ccb 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 84ca0ed..d7379ca 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 7c26c89..5f0a201 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 bfeace7..bb96d93 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 aad615e..8a3612c 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 8fa5377..72cc52c 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/33] 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 2be97e7..fc233d0 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 5ac711a..09450ab 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 f3cabec..abb5fcd 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 3623fec..60c41ca 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 d066c1b..0e9c1f9 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 df8fe9d..693bee7 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 cdc52d9..d475512 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 ab524d5..329b38d 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 50d6185..f032191 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 8b9935b..a606274 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 bdc97e4..4cd6e05 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 84ad078..c184309 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/33] 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 f7ab11d..dce6803 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 09cb2aa..7118eba 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 b8ddc0e..530cb65 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 bf3f574..0abfbfe 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 9fab0e8..a0a3085 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 e3947df..e46645e 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 f4769f4..ce275c0 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 4777538..7b9cabc 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 7884bb2..cb5d3db 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 7874668..3076e92 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 70fc36e..5969177 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 41102a7..83f309e 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 49c68d3..b87456d 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 db3417a..a87c28a 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 3bd7f14..b6d3998 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 6ac5183..52621b7 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 3cd8571..a81b7c9 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 557da23..e7c6801 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 8c6584e..82d3415 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 75bf33f..b5d21c0 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 f9d7e14..e65dbf1 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 76ae7ac..a117bf7 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 a5d9b52..09ae13d 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 b008a2b..43bf58a 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 e881e0f..f81f43f 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 7ef3d2d..219ea60 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 26baae1..3ed7102 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 523fbf9..e9efd13 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 06d94c0..885abca 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 11a22af..2b07ef1 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 c286ca7..9ac1a8c 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 3e5635c..e266353 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 a7f75fb..101f04f 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 6ff19e0..52e27e6 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 e87339f..ce0feb8 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 c8e6e84..41cf48f 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 c2751b7..d83ac2d 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 8a1552a..69d4559 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 74e1e6a..7dc7d77 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 d67c63d..f6adc1b 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 8a3612c..c51d4d4 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/33] 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 210cf88..e4505bf 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 2c22c4b..f77259e 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 ffedb82..63ccd3d 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 79f3e09..cd6bb6f 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 66ebf71..622d61b 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 abb3d01..2cf939a 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 dc15b8c..37e1ac5 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 68b8617..046b77d 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 30d68d4..8719a70 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 0e4c17d..d1c6811 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 ec36570..a22c71e 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 01d827a..87e8157 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 8ed2dd7..be681a9 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 36d5c1f..a54e144 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 b524a16..26192a2 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 71630af..993b618 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 ead1e65..001198d 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 ab9f968..247e89c 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 b48338b..530d8fc 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 0364ca7..ef4e476 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 cd06fce..48ae5f6 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 7a6016e..c261c50 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 262bc9c..c409d1d 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 3540489..ace5b7e 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 42a019f..5f14c09 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 0966a60..7f7888a 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 0d13610..31b030c 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 abcf781..1f0a99e 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 0e6f6ac..0bc7d8e 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 3ff9ae4..aca3699 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 13659d2..c59d360 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 bab4938..d814df3 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 b10942e..56dea6f 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 dc1cba7..2aee373 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 502b440..a4fdf20 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 f8307a0..c93250b 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 0decfdd..56e9b26 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 acbb55e..d1aab5b 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 6edb323..4100dd4 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 7a4443f..ec57f28 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 9554947..e73c385 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 ca6f196..e45025c 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 8712a87..10a57c0 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 cf940a9..82f3241 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 5958cd6..6228f4d 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 ba975de..c6dc58d 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 a0a9286..9b8ae8a 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 704725f..2cdd490 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 d884dfe..473b859 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 310f4fc..951c526 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 3e8a346..f24cb14 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 0b5c809..9001e49 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 26c613c..2202d30 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 6251e87..01025cb 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 e536672..ce831d1 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 02d2578..d8714c5 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 76c9f38..66df754 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 495271b..c2a12e1 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 45af023..da89a17 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 fa5ec2d..6a46a91 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 62d8139..594aab0 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 0178c85..e43c31c 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 07b3b2b..c0bff34 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 98ccc91..368203a 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 c878e1e..3e5b424 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 dad0335..4d6f4ae 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 3065fee..69ab4e7 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 8ab9778..124f8f4 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 fb5e965..a578744 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 767307a..2f0af84 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 3ab0c18..659ebec 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 ffb49dc..babf914 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 0178ea8..0beafff 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 d6832f5..48d09ed 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 946dac3..dfdd5b5 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 4e682e5..054b390 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 259e473..bc86707 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 889f3dc..bc2cd6d 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 257ca9c..294e04f 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 9aa156c..1651ec3 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 a133d73..5e11f12 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 7cae5a2..92e1b32 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 b85d160..cc28f8f 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 d829d21..28776c9 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 c6e1fc1..2a1b3f5 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 d262980..7fefe73 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 9db4ef3..45ab0b1 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 5f878a1..2ac362e 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 c490bd5..f8231f9 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 40f5ffe..720d191 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 bd8cae1..ee2fb35 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 6cd1c2a..334d310 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 767784b..bd14604 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 caf3414..a7bbc7b 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 e2caf1a..0a7ed0c 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 95892d9..d4824ab 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 fbe6bf3..c902b29 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 ac593ec..ca45907 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 c13aec0..1e4cc2f 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 e549a14..fc65b9b 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 2110066..f9b18fd 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 22f17ad..78243ac 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 d0a3ba0..cdd7c87 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 74e6f85..a694521 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 094d2ff..2d73dfd 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 360e064..ddfdd32 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 24670a3..b10aa39 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 5befa05..77b260b 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 f24252f..f1b0a5b 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 f48a71e..daa544e 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 b54b0f3..677a070 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 74b4fe8..8d1c898 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 da9aab4..5a63910 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 56c8b2c..377a83d 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 e932f8d..df486ac 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 b7105f8..8b710cd 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 7405b08..0adf3f3 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 9cf3721..c1598e5 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 5056df5..2b9fb71 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 3c385f1..5d9405d 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 5b0ba68..b606ede 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 f26b1df..517bf38 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 2a8e90d..e48ce61 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 88d8527..12fc804 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 260af42..daa979d 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 02d1fb4..032e5ad 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 2c51b0c..b60d3f0 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 382f919..d333443 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 9c3dd00..5c74b3d 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 73c2436..5590968 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 dd4893e..13b9b40 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 33b6b38..80fb444 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 1c93a43..c2b6839 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 7e534ae..d809011 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 5303fc3..71a6c8d 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 f895a9c..83c4150 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 dd45a91..7a3745d 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 a48a7fe..85e9c59 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 201108b..e8c5701 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 1f1dfd6..6645872 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 593fe23..63ce096 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 98d1501..a2224f0 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 be55be8..51a6415 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 48171a1..72b3b7f 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 7faad12..2c8d4a0 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 4e72f12..04c8f85 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 ad5346f..5ad055b 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 d585ccb..37a290b 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 d7379ca..965f70f 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 5f0a201..8176d3d 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 bb96d93..2c71cd3 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 72cc52c..fcad228 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/33] 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 38c8acf..295e60b 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/33] 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 3880bdf..7a6d0bc 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 a2e1cec..5f7c9f6 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 eb47d16..da213fe 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 795fedb..3270d2e 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/33] 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 295e60b..d0789fa 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