Vonage / vonage-php-sdk-core

Vonage REST API client for PHP. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
https://developer.vonage.com/
Apache License 2.0
916 stars 180 forks source link

Pull out whole response from SMSCollection #425

Closed SecondeJK closed 1 year ago

SecondeJK commented 1 year ago

As requested in #412 , this PR allows the user to pull out the raw response from sending an SMS.

Description

The SDKs are written in such as way as to help the developer integrate Vonage APIs in a more verbose, PHP way. However, there a possibly times when a developer wants to get access to something protected. Some inner workings of the SDK will remain private and the whole point is that the developer doesn't need to worry about those things.

In this case though, there is no harm in extracting the raw response from an SMS Collection object. You can now get this response out with $response->getAllMessagesRaw() method.

How Has This Been Tested?

Additional test added for this usage.

Example Output or Screenshots (if appropriate):

Types of changes

Checklist: