Skip to content

Commit ecb9f49

Browse files
authored
Merge pull request #36 from dstotijn/fix-optional-type-details
Fix optional type details
2 parents f5baf25 + a2d7aca commit ecb9f49

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/MessageBird/Client.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Client
1212
const ENDPOINT = 'https://rest.messagebird.com';
1313
const CHATAPI_ENDPOINT = 'https://chat.messagebird.com/1';
1414

15-
const CLIENT_VERSION = '1.6.3';
15+
const CLIENT_VERSION = '1.6.4';
1616

1717
/**
1818
* @var string

src/MessageBird/Objects/Message.php

+8-2
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,19 @@ class Message extends Base
138138
* @param $keyword
139139
* @param $tariff
140140
* @param $mid
141+
* @param $member
141142
*/
142-
public function setPremiumSms($shortcode, $keyword, $tariff, $mid)
143+
public function setPremiumSms($shortcode, $keyword, $tariff, $mid = null, $member = null)
143144
{
144145
$this->typeDetails['shortcode'] = $shortcode;
145146
$this->typeDetails['keyword'] = $keyword;
146147
$this->typeDetails['tariff'] = $tariff;
147-
$this->typeDetails['mid'] = $mid;
148+
if ($mid != null) {
149+
$this->typeDetails['mid'] = $mid;
150+
}
151+
if ($member != null) {
152+
$this->typeDetails['member'] = $member;
153+
}
148154

149155
$this->type = self::TYPE_PREMIUM;
150156
}

0 commit comments

Comments
 (0)