aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws
diff options
context:
space:
mode:
Diffstat (limited to 'gsxws')
-rw-r--r--gsxws/returns.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/gsxws/returns.py b/gsxws/returns.py
index 42c002f..977a4cb 100644
--- a/gsxws/returns.py
+++ b/gsxws/returns.py
@@ -100,18 +100,10 @@ class Return(GsxObject):
the registered parts.
The API returns the Bulk Return Id with the packing list.
"""
- dt = self._make_type("ns1:registerPartsForBulkReturnRequestType")
- self.data['bulkReturnOrder'] = parts
- dt.bulkPartsRegistrationRequest = self.data
-
- result = self.submit("RegisterPartsForBulkReturn", dt, "bulkPartsRegistrationData")
-
- pdf = base64.b64decode(result.packingList)
- of = tempfile.NamedTemporaryFile(suffix=".pdf", delete=False)
- of.write(pdf)
- result.packingList = of.name
-
- return result
+ self.bulkReturnOrder = parts
+ self._submit("RegisterPartsForBulkReturnRequest", "RegisterPartsForBulkReturn",
+ "bulkPartsRegistrationData")
+ return self._req.objects[0]
def update_parts(self, confirmation, parts):
"""