Skip to content

Commit

Permalink
add getMessageStatus and add getBalance
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii committed Dec 12, 2014
1 parent 3c25057 commit a47acce
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Turbosms.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,24 @@ public function saveToDb($text, $phone, $message) {
$model->save();
}

/**
* Get balance
*
* @return int
*/
public function getBalance() {
$result = $this->client->GetCreditBalance();
return intval($result->GetCreditBalanceResult);
}

/**
* @param $messageId
*
* @return mixed
*/
public function getMessageStatus($messageId) {
$result = $this->client->GetMessageStatus(['MessageId' => $messageId]);
return $result->GetMessageStatusResult;
}

}

0 comments on commit a47acce

Please sign in to comment.