From f405dc504b62e5b8157429fe36a1f96d83c97b61 Mon Sep 17 00:00:00 2001 From: Erik Tobiassen Date: Wed, 30 Mar 2016 23:12:52 +0200 Subject: warrantyStatus method updated for May upgrade - Added shipTo to the $serialNumber array. - Added warranty status example. --- examples/warranty_status.php | 54 ++++++++++++++++++++++++++++++++++++++++++++ gsxlib.php | 5 ++-- 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 examples/warranty_status.php diff --git a/examples/warranty_status.php b/examples/warranty_status.php new file mode 100644 index 0000000..6ae77ed --- /dev/null +++ b/examples/warranty_status.php @@ -0,0 +1,54 @@ +warrantyStatus($serialnumber, $ship_to); + } catch (SoapFault $e) { + var_dump($e->faultstring); + die; + } + + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Serial Number: serialNumber ?>
Warranty Status: warrantyStatus ?>
Days remaining: daysRemaining ?>
Estimated Purchase Date: estimatedPurchaseDate ?>
Purchase Country: purchaseCountry ?>
Product Description: productDescription ?>
Config Description: configDescription ?>
Activation Lock Status: activationLockStatus ?>
diff --git a/gsxlib.php b/gsxlib.php index 59e4281..0edc724 100644 --- a/gsxlib.php +++ b/gsxlib.php @@ -478,11 +478,12 @@ class GsxLib /** * A shortcut for checking warranty status of device + * UPDATE: Now includes shipTo as per GSX update May 2016. */ - public function warrantyStatus($serialNumber) + public function warrantyStatus($serialNumber, $ship_to) { if(!is_array($serialNumber)) { - $serialNumber = array('serialNumber' => $serialNumber); + $serialNumber = array('serialNumber' => $serialNumber, 'shipTo' => $ship_to); } if(array_key_exists('alternateDeviceId', $serialNumber)) { -- cgit v1.2.3