aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws/repairs.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-08-13 10:49:28 +0300
committerFilipp Lepalaan <f@230.to>2013-08-13 10:49:31 +0300
commit774c8ed94e07f75fe38d5067dfea9b19bb32e77d (patch)
tree72ccaa73df9a6e128b7738be603eededeaf58c21 /gsxws/repairs.py
parent388a47255e334b083be7058ab16e7fb0084240de (diff)
downloadpy-gsxws-774c8ed94e07f75fe38d5067dfea9b19bb32e77d.tar.gz
py-gsxws-774c8ed94e07f75fe38d5067dfea9b19bb32e77d.tar.bz2
py-gsxws-774c8ed94e07f75fe38d5067dfea9b19bb32e77d.zip
Added WholeUnitExchange
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