aboutsummaryrefslogtreecommitdiffstats
path: root/gsx.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@0x00.co>2013-01-24 21:40:14 +0200
committerFilipp Lepalaan <f@0x00.co>2013-01-24 21:40:14 +0200
commitd1232951b0be61a86af001aa3057b4b279574047 (patch)
tree4a95c260ef2c67d5863fd8037d723a8abda87d0a /gsx.py
parent7f096a1c9e1da551e4505e1abf37ef4779df909c (diff)
downloadpy-gsxws-d1232951b0be61a86af001aa3057b4b279574047.tar.gz
py-gsxws-d1232951b0be61a86af001aa3057b4b279574047.tar.bz2
py-gsxws-d1232951b0be61a86af001aa3057b4b279574047.zip
Implement Repair Detail and Repair Status
Diffstat (limited to 'gsx.py')
-rwxr-xr-xgsx.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/gsx.py b/gsx.py
index 53fde24..2aa38c1 100755
--- a/gsx.py
+++ b/gsx.py
@@ -516,18 +516,30 @@ class Repair(GsxObject):
"""
pass
- def get_status():
+ def get_status(self, numbers=None):
"""
The Repair Status API retrieves the status
for the submitted repair confirmation number(s).
"""
- pass
+ dt = self._make_type('ns1:repairStatusRequestType')
+ dt.userSession = SESSION
+ dt.repairConfirmationNumbers = [self.data['dispatchId']]
+ result = CLIENT.service.RepairStatus(dt)
+
+ if len(result.repairStatus) == 1:
+ return result.repairStatus[0]
+ else:
+ return result.repairStatus
def get_details(self):
+ """
+ The Repair Details API includes the shipment information similar to the Repair Lookup API.
+ """
dt = CLIENT.factory.create('ns0:repairDetailsRequestType')
dt.dispatchId = self.data['dispatchId']
dt.userSession = SESSION
results = CLIENT.service.RepairDetails(dt)
+ return results.lookupResponseData[0]
class Communication(GsxObject):
def get_content():