aboutsummaryrefslogtreecommitdiffstats
path: root/gsxlib.php
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2011-05-04 11:25:10 +0300
committerFilipp Lepalaan <filipp@mac.com>2011-05-04 11:25:10 +0300
commit72bd7dd166ac68949f4b0d8d8722deba276de00f (patch)
tree38c6d391a660f24e30214ce7f2b2313eeeb41e97 /gsxlib.php
parentd9b7519391b86f79573c756c357a84eda83fa725 (diff)
downloadgsxlib-72bd7dd166ac68949f4b0d8d8722deba276de00f.tar.gz
gsxlib-72bd7dd166ac68949f4b0d8d8722deba276de00f.tar.bz2
gsxlib-72bd7dd166ac68949f4b0d8d8722deba276de00f.zip
added partsPendingReturn()
Diffstat (limited to 'gsxlib.php')
-rw-r--r--gsxlib.php43
1 files changed, 40 insertions, 3 deletions
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;