summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Steel <martin@mediaburst.co.uk>2015-12-18 15:46:14 +0000
committerMartin Steel <martin@mediaburst.co.uk>2015-12-18 15:46:14 +0000
commitdd438dd8f2f2eaf01e13b4e20a915143ad817f5e (patch)
tree7934d806520e5b79e8218197558a669770fed70b
parent283df646816f8961600295956712e4b20be49daa (diff)
downloadclockwork-php-dd438dd8f2f2eaf01e13b4e20a915143ad817f5e.zip
clockwork-php-dd438dd8f2f2eaf01e13b4e20a915143ad817f5e.tar.gz
clockwork-php-dd438dd8f2f2eaf01e13b4e20a915143ad817f5e.tar.bz2
Add account type to balance call
-rwxr-xr-xclass-Clockwork.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/class-Clockwork.php b/class-Clockwork.php
index b38b886..67661a2 100755
--- a/class-Clockwork.php
+++ b/class-Clockwork.php
@@ -3,10 +3,10 @@
* Clockwork PHP API
*
* @package Clockwork
-* @copyright Mediaburst Ltd 2012
-* @license ISC
+* @copyright Mediaburst Ltd 2015
+* @license MIT
* @link http://www.clockworksms.com
-* @version 1.3.0
+* @version 1.3.2
*/
if ( !class_exists('ClockworkException') ) {
@@ -24,7 +24,7 @@ class Clockwork {
/*
* Version of this class
*/
- const VERSION = '1.3.1';
+ const VERSION = '1.3.2';
/**
* All Clockwork API calls start with BASE_URL
@@ -382,6 +382,7 @@ class Clockwork {
$balance = null;
$err_no = null;
$err_desc = null;
+ $account_type = null;
foreach ($resp_doc->documentElement->childNodes as $doc_child) {
switch ($doc_child->nodeName) {
@@ -400,6 +401,9 @@ class Clockwork {
}
}
break;
+ case "AccountType":
+ $account_type = $doc_child->nodeValue;
+ break;
case "ErrNo":
$err_no = $doc_child->nodeValue;
break;
@@ -415,7 +419,7 @@ class Clockwork {
throw new ClockworkException($err_desc, $err_no);
}
- return array( 'symbol' => $symbol, 'balance' => $balance, 'code' => $code );
+ return array( 'symbol' => $symbol, 'balance' => $balance, 'code' => $code, 'account_type' => $account_type );
}
/**