diff options
author | Filipp Lepalaan <f@230.to> | 2013-05-06 09:10:11 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-05-06 09:10:11 +0300 |
commit | 6a6d4fe0e52d2b396c1eabebf4622df1d69e410a (patch) | |
tree | 6c8e0734d3dc191f8c5c243cf05ca17c13cf7b90 /gsxlib.php | |
parent | 7b76e29ab3c9258c87f318aaa9f66e10ac976e66 (diff) | |
download | gsxlib-6a6d4fe0e52d2b396c1eabebf4622df1d69e410a.tar.gz gsxlib-6a6d4fe0e52d2b396c1eabebf4622df1d69e410a.tar.bz2 gsxlib-6a6d4fe0e52d2b396c1eabebf4622df1d69e410a.zip |
Added warranty check with IMEI code, updated README
Diffstat (limited to 'gsxlib.php')
-rw-r--r-- | gsxlib.php | 23 |
1 files changed, 16 insertions, 7 deletions
@@ -180,14 +180,15 @@ class GsxLib public function fetchiOsActivation($query) { - $like = self::looksLike($query); - - $request = array('FetchIOSActivationDetails' => array( - $like => $query - )); - + if( !is_array($query )) { + $like = self::looksLike( $query ); + $query = array( $like => $query ); + } + + $request = array( 'FetchIOSActivationDetails' => $query ); + return $this->request($request)->activationDetailsInfo; - + } public function createCarryInRepair($repairData) @@ -424,6 +425,14 @@ class GsxLib $serialNumber = array('serialNumber' => $serialNumber); } + if( array_key_exists( 'alternateDeviceId', $serialNumber )) { + # checking warranty with IMEI code - must run activation check first + $ad = $this->fetchiOsActivation( $serialNumber ); + $wty = $this->warrantyStatus( $ad->serialNumber ); + $wty->activationDetails = $ad; + return $wty; + } + $req = array( 'WarrantyStatus' => array( 'unitDetail' => $serialNumber )); return $this->request($req)->warrantyDetailInfo; |