Add the request information to the session payload.

@param  array  $payload
@return $this
481521
protected function addRequestInformation(&$payload)
    {
        if ($this->container->bound('request')) {
            $payload = array_merge($payload, [
                'ip_address' => $this->ipAddress(),
                'user_agent' => $this->userAgent(),
            ]);
        }

        return $this;
    }
195861
public function add(Payload $payload)
    {
        // if there is no exp claim then add the jwt to
        // the blacklist indefinitely
        if (! $payload->hasKey('exp')) {
            return $this->addForever($payload);
        }

        // if we have already added this token to the blacklist
        if (! empty($this->storage->get($this->getKey($payload)))) {
            return true;
        }

        $this->storage->add(
            $this->getKey($payload),
            ['valid_until' => $this->getGraceTimestamp()],
            $this->getMinutesUntilExpired($payload)
        );

        return true;
    }
1324659
public static function create(array $payload): self
    {
        $senderId = $payload['sender']['id'];
        $recipientId = $payload['recipient']['id'];
        $timestamp = $payload['timestamp'];
        $message = Message::create($payload['message']);

        return new static($senderId, $recipientId, $timestamp, $message);
    }
479236
public function sendSMS($payload = [])
    {
        if (empty($payload)) {
            throw IsEmpty::create("Message Payload can not be empty. Please fill the appropriate details");
        }

        $this->performPostRequest('/smsapi/send_sms', $payload);

        return $this;
    }
416137
public function add(Payload $payload)
    {
        $exp = Utils::timestamp($payload['exp']);
        $refreshExp = Utils::timestamp($payload['iat'])->addMinutes($this->refreshTTL);

        // there is no need to add the token to the blacklist
        // if the token has already expired AND the refresh_ttl
        // has gone by
        if ($exp->isPast() && $refreshExp->isPast()) {
            return false;
        }

        // Set the cache entry's lifetime to be equal to the amount
        // of refreshable time it has remaining (which is the larger
        // of `exp` and `iat+refresh_ttl`), rounded up a minute
        $cacheLifetime = $exp->max($refreshExp)->addMinute()->diffInMinutes();

        $this->storage->add($payload['jti'], [], $cacheLifetime);

        return true;
    }
415111
public static function create(array $payload): self
    {
        $senderId = $payload['sender']['id'];
        $recipientId = $payload['recipient']['id'];
        $timestamp = $payload['timestamp'];
        $takeThreadControl = TakeThreadControl::create($payload['take_thread_control']);

        return new static($senderId, $recipientId, $timestamp, $takeThreadControl);
    }
986290
protected function withCreatePayloadHooks($queue, array $payload)
    {
        if (! empty(static::$createPayloadCallbacks)) {
            foreach (static::$createPayloadCallbacks as $callback) {
                $payload = array_merge($payload, call_user_func(
                    $callback, $this->getConnectionName(), $queue, $payload
                ));
            }
        }

        return $payload;
    }
266180
public static function createPostbackEvent(array $payload)
    {
        $postback = Postback::create($payload['postback']);
        $senderId = $payload['sender']['id'];
        $recipientId = $payload['recipient']['id'];
        $timestamp = $payload['timestamp'];

        return new PostbackEvent($senderId, $recipientId, $timestamp, $postback);
    }
639908
public static function create(array $payload)
    {
        $senderId = $payload['sender']['id'];
        $recipientId = $payload['recipient']['id'];
        $timestamp = $payload['timestamp'];
        $gamePlay = GamePlay::create($payload['game_play']);

        return new static($senderId, $recipientId, $timestamp, $gamePlay);
    }
596681
public function update(array $payload): bool
    {
        $resourceType = static::resourceType();
        $response = null;

        try {
            $response = $this->getHttpClient()->request('PUT', $this->apiUrl(), [
                'json' => $payload,
            ]);
        } catch (RequestException $e) {
            $this->throwResourceException($e->getResponse(), 'update', UpdateResourceException::class);
        }

        $json = json_decode((string) $response->getBody(), true);

        if (empty($json[$resourceType])) {
            return false;
        }

        $this->data = $json[$resourceType];

        return true;
    }
994908
public static function create(array $payload): self
    {
        $senderId = $payload['sender']['id'];
        $recipientId = $payload['recipient']['id'];
        $timestamp = $payload['timestamp'];
        $payment = Payment::create($payload['payment']);

        return new static($senderId, $recipientId, $timestamp, $payment);
    }
1052599
public static function createFromPayload(array $payload)
    {
        $job = $payload['job'];
        $data = $payload['data'];

        unset($payload['job'], $payload['data']);

        return new static($job, $data, [], $payload);
    }
308010
protected function processPayload(Array $payload)
	{
		// verify the payload
		if (isset($payload['security']) and isset($payload['data']) and isset($payload['flash']))
		{
			if (( ! $this->config['match_ip'] or $payload['security']['ip'] === $_SERVER['REMOTE_ADDR']) and
				( ! $this->config['match_ua'] or $payload['security']['ua'] === $_SERVER['HTTP_USER_AGENT']) and
				($payload['security']['ex'] == 0 or $payload['security']['ex'] >= time()) and
				$payload['security']['id'] == $this->sessionId)
			{
				// restore the session id
				$this->setSessionId($payload['security']['id']);

				// restore the last session id rotation timer
				$this->manager->setRotationTimer($payload['security']['rt']);

				// and store the data
				$this->data->setContents($payload['data']);
				$this->flash->setContents($payload['flash']);

				return true;
			}
		}

		return false;
	}
419309
public static function create(array $payload): AbstractEvent
    {
        foreach (array_keys($payload) as $key) {
            if (\array_key_exists($key, self::EVENTS)) {
                $className = self::EVENTS[$key];
                if (isset($payload['message']['is_echo'])) {
                    $className = MessageEchoEvent::class;
                }

                return $className::create($payload);
            }
        }

        return RawEvent::create($payload);
    }
475368
public static function create(array $payload): self
    {
        $senderId = $payload['sender']['id'];
        $recipientId = $payload['recipient']['id'];
        $timestamp = $payload['timestamp'];
        $read = Read::create($payload['read']);

        return new static($senderId, $recipientId, $timestamp, $read);
    }
1296930
function buildPayload(&$payload)
    {
        if (is_array($payload)) {
            $payload = $this->array_map_deep($payload, array($this, 'buildPayloadItemInfo'));
        } else {
            $payload = $this->makePayloadBuilder($payload);
            $this->buildPayload($payload);
        }

        return $payload;
    }
665473
public static function create(array $payload): self
    {
        $senderId = isset($payload['sender']) ? $payload['sender']['id'] : '';
        $recipientId = $payload['recipient']['id'];
        $timestamp = $payload['timestamp'];
        $appRoles = AppRoles::create($payload['app_roles']);

        return new static($senderId, $recipientId, $timestamp, $appRoles);
    }