RetailCRM API Client

FailureRequestEvent extends AbstractRequestEvent
in package

Class FailureRequestEvent

Tags
category

FailureRequestEvent

Table of Contents

Methods

__construct()  : mixed
FailureRequestEvent constructor.
getApiDomain()  : string
Returns RetailCRM domain for request.
getApiKey()  : string
Returns API key for request in the event.
getApiUrl()  : string
Returns RetailCRM URL for request in the event without trailing slash.
getException()  : ApiException|ClientException
Returns an exception instance which will be thrown after event propagation (if not suppressed).
getRequest()  : RequestInterface
Returns a request for which an event was thrown.
getResponse()  : ResponseInterface|null
Returns a response for which an event was thrown.
getResponseArray()  : array<int|string, mixed>
Returns a response array. It will be present only if custom request was used.
shouldSuppressThrow()  : bool
Returns true if exception should not be thrown.
suppressThrow()  : FailureRequestEvent
Suppresses exception for the client caller.

Methods

__construct()

FailureRequestEvent constructor.

public __construct(string $baseUrl, RequestInterface $request, ResponseInterface|null $response, ApiException|ClientException $exception[, array<int|string, mixed> $responseArray = [] ]) : mixed
Parameters
$baseUrl : string
$request : RequestInterface
$response : ResponseInterface|null
$exception : ApiException|ClientException
$responseArray : array<int|string, mixed> = []

getApiDomain()

Returns RetailCRM domain for request.

public getApiDomain() : string
Return values
string

getApiKey()

Returns API key for request in the event.

public getApiKey() : string
Return values
string

getApiUrl()

Returns RetailCRM URL for request in the event without trailing slash.

public getApiUrl() : string
Return values
string

getRequest()

Returns a request for which an event was thrown.

public getRequest() : RequestInterface
Return values
RequestInterface

getResponse()

Returns a response for which an event was thrown.

public getResponse() : ResponseInterface|null
Return values
ResponseInterface|null

getResponseArray()

Returns a response array. It will be present only if custom request was used.

public getResponseArray() : array<int|string, mixed>
Return values
array<int|string, mixed>

shouldSuppressThrow()

Returns true if exception should not be thrown.

public shouldSuppressThrow() : bool
Return values
bool

        
On this page

Search results