aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws/repairs.py
diff options
context:
space:
mode:
Diffstat (limited to 'gsxws/repairs.py')
-rw-r--r--gsxws/repairs.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/gsxws/repairs.py b/gsxws/repairs.py
index be01a1b..79049fb 100644
--- a/gsxws/repairs.py
+++ b/gsxws/repairs.py
@@ -45,7 +45,6 @@ class RepairOrderLine(GsxObject):
class ServicePart(GsxObject):
"A generic service part (for PartInfo and whatnot)"
-
def __init__(self, number, *args, **kwargs):
super(ServicePart, self).__init__(*args, **kwargs)
@@ -57,12 +56,9 @@ class ServicePart(GsxObject):
class Repair(GsxObject):
"Base class for the different GSX Repair types"
-
def __init__(self, number=None, **kwargs):
-
self._namespace = "asp:"
super(Repair, self).__init__(**kwargs)
-
if number is not None:
self.dispatchId = number
@@ -267,6 +263,20 @@ class IndirectOnsiteRepair(Repair):
"repairConfirmation")
+class WholeUnitExchange(Repair):
+ """
+ The Create Whole Unit Exchange API allows the service providers to send
+ all the information required to create a whole unit exchange repair.
+ GSX validates the information and if all the validations go through,
+ it obtains a quote for repair and creates the whole unit exchange repair.
+ The quote is sent as part of the response.
+ If a validation error occurs, a fault code is issued.
+ """
+ def create(self):
+ self._namespace = "asp:"
+ return self._submit("repairData", "CreateWholeUnitExchange", "repairConfirmation")
+
+
if __name__ == '__main__':
import doctest
from core import connect