From 72bd7dd166ac68949f4b0d8d8722deba276de00f Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Wed, 4 May 2011 11:25:10 +0300 Subject: added partsPendingReturn() --- gsxlib.php | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) (limited to 'gsxlib.php') diff --git a/gsxlib.php b/gsxlib.php index ca133f4..6e0caf8 100644 --- a/gsxlib.php +++ b/gsxlib.php @@ -107,6 +107,43 @@ class GsxLib } + public function partsPendingReturn($repairData = null) + { + $fields = array( + 'repairType' => 'CA', // default to Carry In repairs + 'repairStatus' => 'Open', // and current ones + 'purchaseOrderNumber' => '', + 'sroNumber' => '', + 'repairConfirmationNumber' => '', + 'serialNumber' => '', + 'shipToCode' => '', + 'customerFirstName' => '', + 'customerLastName' => '', + 'customerEmailAddress' => '', + 'createdFromDate' => '', + 'createdToDate' => '', + ); + + if ($repairData) { + foreach ($fields as $f) { + if (array_key_exists($f, $repairData)) { + $fields[$f] = $repairData[$f]; + } + } + } + + $req = array('PartsPendingReturn' => array('repairData' => $fields)); + + return $this->request($req)->partsPendingResponse; + + } + + public function compTiaCodes() + { + $result = $this->request(array('ComptiaCodeLookup' => array())); + return $result->comptiaInfo; + } + /** * Return details for given dispatch ID * @param string $dispatchId @@ -158,9 +195,9 @@ class GsxLib exit('Invalid serial number: ' . $serialNumber); } - $a = array( - 'WarrantyStatus' => array('unitDetail' => array('serialNumber' => $serialNumber)) - ); + $a = array('WarrantyStatus' => array( + 'unitDetail' => array('serialNumber' => $serialNumber) + )); return $this->request($a)->warrantyDetailInfo; -- cgit v1.2.3