diff --git a/src/SMS/Webhook/DeliveryReceipt.php b/src/SMS/Webhook/DeliveryReceipt.php index 65f5158b..d4b6cfe9 100644 --- a/src/SMS/Webhook/DeliveryReceipt.php +++ b/src/SMS/Webhook/DeliveryReceipt.php @@ -149,7 +149,6 @@ class DeliveryReceipt 'message-timestamp', 'messageId', 'msisdn', - 'network-code', 'price', 'status', 'to' @@ -227,12 +226,15 @@ public function __construct(array $data) $this->messageTimestamp = new DateTimeImmutable($data['message-timestamp']); $this->messageId = $data['messageId']; $this->msisdn = $data['msisdn']; - $this->networkCode = $data['network-code']; $this->price = $data['price']; $this->status = $data['status']; $this->to = $data['to']; $this->apiKey = $data['api-key']; + if (isset($data['network-code'])) { + $this->networkCode = $data['network-code']; + } + if (isset($data['client-ref'])) { $this->clientRef = $data['client-ref']; }