aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@0x00.co>2013-03-22 13:01:20 +0200
committerFilipp Lepalaan <f@0x00.co>2013-03-22 13:01:20 +0200
commit22fb95be1f2c702f035dec7b733fc2e2157769bc (patch)
tree4e651bc6bb2f68f66481bc7085ca09046a682b54 /gsxws.py
parent90cb38e43979668112ed6c38da8a8734ea30eee1 (diff)
downloadpy-gsxws-22fb95be1f2c702f035dec7b733fc2e2157769bc.tar.gz
py-gsxws-22fb95be1f2c702f035dec7b733fc2e2157769bc.tar.bz2
py-gsxws-22fb95be1f2c702f035dec7b733fc2e2157769bc.zip
Raise GsxError on kgb_update
Diffstat (limited to 'gsxws.py')
-rwxr-xr-xgsxws.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/gsxws.py b/gsxws.py
index 2ede93b..a87e892 100755
--- a/gsxws.py
+++ b/gsxws.py
@@ -433,7 +433,10 @@ class Returns(GsxObject):
The Return Report API returns a list of all parts that are returned
or pending for return, based on the search criteria.
"""
- pass
+ dt = self._make_type('ns1:returnReportRequestType')
+ dt.returnRequestData = self.data
+
+ return self.submit('ReturnReport', dt, 'returnResponseData')
def get_label(self, part_number):
"""
@@ -478,6 +481,7 @@ class Returns(GsxObject):
the proforma label for a given Bulk Return Id.
You can create a parts bulk return by using the Register Parts for Bulk Return API.
"""
+ pass
def register_parts(self):
"""
@@ -485,6 +489,7 @@ class Returns(GsxObject):
the registered parts.
The API returns the Bulk Return Id with the packing list.
"""
+ pass
def get_pending(self):
"""
@@ -609,7 +614,11 @@ class Repair(GsxObject):
dt.repairConfirmationNumber = self.data['dispatchId']
dt.serialNumber = sn
- result = CLIENT.service.KGBSerialNumberUpdate(dt)
+ try:
+ result = CLIENT.service.KGBSerialNumberUpdate(dt)
+ except suds.WebFault, e:
+ raise GsxError(fault=e)
+
root = ET.fromstring(result).findall('*//%s' % 'UpdateKGBSerialNumberResponse')
return GsxResponse.Process(root[0])
@@ -771,6 +780,10 @@ def connect(
environment='ut',
region='emea',
locale=LOCALE):
+ """
+ Establishes connection with GSX Web Services.
+ Returns the session ID of the new connection.
+ """
global SESSION
global LOCALE