Skip to content

Commit f31fe4c

Browse files
committed
update to set transactional mode with boolean
1 parent 2d2431e commit f31fe4c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/Octopush/Api/Client.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ class Client
7070
*/
7171
private $requestMode = self::REQUEST_MODE_REAL;
7272

73+
/**
74+
* Allows you to choose transactional mode.
75+
*
76+
* @var bool
77+
*/
78+
private $transactional = false;
79+
7380
/**
7481
* Lists the key fields of the application you want to add in the sha1 hash.
7582
*
@@ -123,6 +130,11 @@ public function setRequestKeys($requestKeys)
123130
$this->requestKeys = $requestKeys;
124131
}
125132

133+
public function setTransactional()
134+
{
135+
$this->transactional=true;
136+
}
137+
126138
/**
127139
* Sends a simple SMS.
128140
*
@@ -144,6 +156,10 @@ public function send($smsText)
144156
'request_mode' => $this->requestMode,
145157
];
146158

159+
if ($this->transactional) {
160+
$data['transactional'] = 1;
161+
}
162+
147163
if ($this->withReplies) {
148164
$data['with_replies'] = 1;
149165
}

0 commit comments

Comments
 (0)