/home/techb158/ileadtechnology.com/SSM/vendor/nexmo/client-core/src/Message/Response
Edit: /home/techb158/ileadtechnology.com/SSM/vendor/nexmo/client-core/src/Message/Response/Message.php (2362B)
expected = array(
'status',
'message-id',
'to',
'message-price',
'network'
);
//default value
$data = array_merge(array('client-ref' => null, 'remaining-balance' => null), $data);
$return = parent::__construct($data);
//validate receipt
if (!$receipt) {
return $return;
}
if ($receipt->getId() != $this->getId()) {
throw new \UnexpectedValueException('receipt id must match message id');
}
$this->receipt = $receipt;
return $receipt;
}
/**
* @return int
*/
public function getStatus()
{
return (int) $this->data['status'];
}
/**
* @return string
*/
public function getId()
{
return (string) $this->data['message-id'];
}
/**
* @return string
*/
public function getTo()
{
return (string) $this->data['to'];
}
/**
* @return string
*/
public function getBalance()
{
return (string) $this->data['remaining-balance'];
}
/**
* @return string
*/
public function getPrice()
{
return (string) $this->data['message-price'];
}
/**
* @return string
*/
public function getNetwork()
{
return (string) $this->data['network'];
}
/**
* @return string
*/
public function getClientRef()
{
return (string) $this->data['client-ref'];
}
/**
* @return Receipt|null
*/
public function getReceipt()
{
return $this->receipt;
}
/**
* @return bool
*/
public function hasReceipt()
{
return $this->receipt instanceof Receipt;
}
}