diff options
author | Filipp Lepalaan <filipp@mac.com> | 2011-05-04 11:25:10 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2011-05-04 11:25:10 +0300 |
commit | 72bd7dd166ac68949f4b0d8d8722deba276de00f (patch) | |
tree | 38c6d391a660f24e30214ce7f2b2313eeeb41e97 /gsxlib.php | |
parent | d9b7519391b86f79573c756c357a84eda83fa725 (diff) | |
download | gsxlib-72bd7dd166ac68949f4b0d8d8722deba276de00f.tar.gz gsxlib-72bd7dd166ac68949f4b0d8d8722deba276de00f.tar.bz2 gsxlib-72bd7dd166ac68949f4b0d8d8722deba276de00f.zip |
added partsPendingReturn()
Diffstat (limited to 'gsxlib.php')
-rw-r--r-- | gsxlib.php | 43 |
1 files changed, 40 insertions, 3 deletions
@@ -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; |