diff options
Diffstat (limited to 'gsxws')
-rw-r--r-- | gsxws/comms.py | 2 | ||||
-rw-r--r-- | gsxws/repairs.py | 18 |
2 files changed, 16 insertions, 4 deletions
diff --git a/gsxws/comms.py b/gsxws/comms.py index 59e7f23..c2896fb 100644 --- a/gsxws/comms.py +++ b/gsxws/comms.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + from core import GsxObject 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 |