RequestSentEvent
extends ShipEngineEvent
in package
implements
JsonSerializable
Class RequestSentEvent
Interfaces, Classes and Traits
- JsonSerializable
Table of Contents
- REQUEST_SENT = 'request_sent'
- The event name for the RequestSentEvent.
- $body : array<string|int, mixed>
- An associative array representation of the response body.
- $headers : array<string|int, mixed>
- An array of request headers that was sent on the request that triggered this event.
- $message : string
- The event message to provide context to the underlying event.
- $requestId : string
- The requestId that corresponds to the request that was sent when this event is emitted.
- $retry : int
- The current retry - this is used in the retry logic that the ShipEngineClient executes.
- $timeout : DateInterval
- The timeout for requests in seconds.
- $timestamp : DateTime
- The timestamp of when the event was emitted.
- $type : string
- The type of event being emitted.
- $url : string
- This is the URL that the request was sent to.
- __construct() : mixed
- RequestSentEvent constructor - this event is emitted when a request is sent from the ShipEngineClient to the target server.
- jsonSerialize() : mixed
- Specify data which should be serialized to JSON
Constants
REQUEST_SENT
The event name for the RequestSentEvent.
public
mixed
REQUEST_SENT
= 'request_sent'
Tags
Properties
$body
An associative array representation of the response body.
public
array<string|int, mixed>
$body
$headers
An array of request headers that was sent on the request that triggered this event.
public
array<string|int, mixed>
$headers
$message
The event message to provide context to the underlying event.
public
string
$message
$requestId
The requestId that corresponds to the request that was sent when this event is emitted.
public
string
$requestId
$retry
The current retry - this is used in the retry logic that the ShipEngineClient executes.
public
int
$retry
$timeout
The timeout for requests in seconds.
public
DateInterval
$timeout
Tags
$timestamp
The timestamp of when the event was emitted.
public
DateTime
$timestamp
$type
The type of event being emitted.
public
string
$type
$url
This is the URL that the request was sent to.
public
string
$url
Methods
__construct()
RequestSentEvent constructor - this event is emitted when a request is sent from the ShipEngineClient to the target server.
public
__construct(string $message, string $requestId, string $url, array<string|int, mixed> $headers, array<string|int, mixed> $body, int $retry, DateInterval $timeout) : mixed
Parameters
- $message : string
- $requestId : string
- $url : string
- $headers : array<string|int, mixed>
- $body : array<string|int, mixed>
- $retry : int
- $timeout : DateInterval
Return values
mixed —jsonSerialize()
Specify data which should be serialized to JSON
public
jsonSerialize() : mixed