APIResponse

Implements \NextEvent\PHPSDK\Util\Log\LogContextInterface

Class APIResponse

A wrapper class for responses returned by GuzzleHttp. Adds utility functions used by the SDK

package

NextEvent\PHPSDK\Model

Methods

APIResponse constructor.

__construct(\NextEvent\PHPSDK\Model\ResponseInterface $response) 

Wrapping a ResponseInterface for use in SDK

Throws
\NextEvent\PHPSDK\Exception\InvalidArgumentException

Arguments

$response

\NextEvent\PHPSDK\Model\ResponseInterface

Get JSON content from Request

getContent() : array

Response

array

Get the unique identifier of the API request

getRequestID() : string

Use this in support inquiries to let us track the request in our logs

Response

string

Get the underlying HTTP response message

getResponse() : \NextEvent\PHPSDK\Model\ResponseInterface

Response

\NextEvent\PHPSDK\Model\ResponseInterface

Return object representation for log context

toLogContext() : array

Response

array