aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws/repairs.py
diff options
context:
space:
mode:
Diffstat (limited to 'gsxws/repairs.py')
-rw-r--r--gsxws/repairs.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/gsxws/repairs.py b/gsxws/repairs.py
index 89eba81..0f45f81 100644
--- a/gsxws/repairs.py
+++ b/gsxws/repairs.py
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
"gsxws/repairs.py"
-import re
import sys
import logging
@@ -169,15 +168,15 @@ class Repair(GsxObject):
self._namespace = "core:"
details = self._submit("RepairDetailsRequest", "RepairDetails", "lookupResponseData")
- # fix tracking URL if available
+ # fix tracking URL, if available
for i, p in enumerate(details.partsInfo):
try:
- url = re.sub('<<TRKNO>>', p.deliveryTrackingNumber, p.carrierURL)
+ url = p.carrierURL.replace('<<TRKNO>>', p.deliveryTrackingNumber)
details.partsInfo[i].carrierURL = url
except AttributeError:
pass
- self.details = details
+ self._details = details
return details
@@ -210,7 +209,9 @@ class CarryInRepair(Repair):
it obtains a quote for the repair and creates the carry-in repair.
"""
self._namespace = "emea:"
- return self._submit("repairData", "CreateCarryIn", "repairConfirmation")
+ result = self._submit("repairData", "CreateCarryIn", "repairConfirmation")
+ self.dispatchId = result.confirmationNumber
+ return result
def update(self, newdata):
"""