for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace TarfinLabs\Netgsm\Iys\Requests;
class Search
{
protected string $url = 'iys/search';
protected string $type;
protected string $recipient;
protected string $recipientType;
protected string $refId;
/**
* @param string $type
* @return $this
*/
public function setType(string $type): self
$this->type = $type;
return $this;
}
* @param string $recipient
public function setRecipient(string $recipient): self
$this->recipient = $recipient;
* @param string $recipientType
public function setRecipientType(string $recipientType): self
$this->recipientType = $recipientType;
* @param string $refId
public function setRefId(string $refId): self
$this->refId = $refId;
* @param array $defaults
public function setDefaults(array $defaults): self
foreach ($defaults as $key => $value) {
if (method_exists($this, 'set'.ucfirst($key))) {
call_user_func([$this, 'set'.ucfirst($key)], $value);
* Get request body.
*
* @return array
public function body(): array
return [
'type' => $this->type ?? null,
'recipient' => $this->recipient ?? null,
'recipientType' => $this->recipientType ?? null,
'refid' => $this->refId ?? null,
];
* Get request url.
* @return string
public function getUrl(): string
return $this->url;