74 lines
1.4 KiB
PHP
74 lines
1.4 KiB
PHP
<?php
|
|
namespace Stemcell\Sms\Model\Data;
|
|
|
|
use Stemcell\Sms\Api\Data\GatewayResponseInterface;
|
|
use Magento\Framework\DataObject;
|
|
|
|
class GatewayResponse extends DataObject implements GatewayResponseInterface
|
|
{
|
|
/**
|
|
* @param bool $isSuccess
|
|
* @return $this
|
|
*/
|
|
public function setIsSuccess(bool $isSuccess): self
|
|
{
|
|
$this->setData(self::IS_SUCCESS, $isSuccess);
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return bool
|
|
*/
|
|
public function getIsSuccess(): bool
|
|
{
|
|
return $this->getData(self::IS_SUCCESS);
|
|
}
|
|
|
|
/**
|
|
* @param string $message
|
|
* @return $this
|
|
*/
|
|
public function setMessage(string $message): self
|
|
{
|
|
$this->setData(self::MESSAGE, $message);
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getMessage(): string | null
|
|
{
|
|
return $this->getData(self::MESSAGE);
|
|
}
|
|
|
|
/**
|
|
* @param array $response
|
|
* @return $this
|
|
*/
|
|
public function setResponse(array $response): self
|
|
{
|
|
$this->setData(self::RESPONSE, $response);
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return string[]
|
|
*/
|
|
public function getResponse(): array
|
|
{
|
|
return $this->getData(self::RESPONSE);
|
|
}
|
|
|
|
public function setType(string $type): self
|
|
{
|
|
$this->setData(self::TYPE, $type);
|
|
return $this;
|
|
}
|
|
|
|
public function getType(): string
|
|
{
|
|
return $this->getData(self::TYPE);
|
|
}
|
|
}
|