Skip to content

Commit 411c366

Browse files
author
Leon
committed
Method to set a reference
1 parent 263911c commit 411c366

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/MessagebirdMessage.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class MessagebirdMessage
77
public $body;
88
public $originator;
99
public $recipients;
10+
public $reference;
1011

1112
public static function create($body = '')
1213
{
@@ -15,7 +16,7 @@ public static function create($body = '')
1516

1617
public function __construct($body = '')
1718
{
18-
if (! empty($body)) {
19+
if (!empty($body)) {
1920
$this->body = trim($body);
2021
}
2122
}
@@ -45,6 +46,13 @@ public function setRecipients($recipients)
4546
return $this;
4647
}
4748

49+
public function setReference($reference)
50+
{
51+
$this->reference = $reference;
52+
53+
return $this;
54+
}
55+
4856
public function toJson()
4957
{
5058
return json_encode($this);

0 commit comments

Comments
 (0)