host = $host; return $this; } /** * @inheritDoc * * @return string * @since 31.0.0 */ public function getHost(): string { return $this->host; } /** * @inheritDoc * * @param string $key * @param string|int|float|bool|array $value * * @return IOutgoingSignedRequest * @since 31.0.0 */ public function addHeader(string $key, string|int|float|bool|array $value): IOutgoingSignedRequest { $this->headers[$key] = $value; return $this; } /** * @inheritDoc * * @return array * @since 31.0.0 */ public function getHeaders(): array { return $this->headers; } /** * @inheritDoc * * @param string $estimated * * @return IOutgoingSignedRequest * @since 31.0.0 */ public function setClearSignature(string $estimated): IOutgoingSignedRequest { $this->clearSignature = $estimated; return $this; } /** * @inheritDoc * * @return string * @since 31.0.0 */ public function getClearSignature(): string { return $this->clearSignature; } /** * @inheritDoc * * @param string $algorithm * * @return IOutgoingSignedRequest * @since 31.0.0 */ public function setAlgorithm(string $algorithm): IOutgoingSignedRequest { $this->algorithm = $algorithm; return $this; } /** * @inheritDoc * * @return string * @since 31.0.0 */ public function getAlgorithm(): string { return $this->algorithm; } public function jsonSerialize(): array { return array_merge( parent::jsonSerialize(), [ 'headers' => $this->headers, 'host' => $this->getHost(), 'clearSignature' => $this->getClearSignature(), ] ); } }