aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2014-03-27 00:12:58 +0200
committerFilipp Lepalaan <filipp@mac.com>2014-03-27 00:12:58 +0200
commit2e8cef4bddba9213495fa8f9fcd4938311ac606f (patch)
tree8747290f427a8dfa46abe63eb32c1316e690192b /gsxws
parent29be8ee83d7ff862b533bc20e670a1bdc5bc0b4f (diff)
downloadpy-gsxws-2e8cef4bddba9213495fa8f9fcd4938311ac606f.tar.gz
py-gsxws-2e8cef4bddba9213495fa8f9fcd4938311ac606f.tar.bz2
py-gsxws-2e8cef4bddba9213495fa8f9fcd4938311ac606f.zip
Adding RepairOrReplace support
Diffstat (limited to 'gsxws')
-rw-r--r--gsxws/escalations.py4
-rw-r--r--gsxws/repairs.py20
2 files changed, 24 insertions, 0 deletions
diff --git a/gsxws/escalations.py b/gsxws/escalations.py
index 1ad2706..70f7732 100644
--- a/gsxws/escalations.py
+++ b/gsxws/escalations.py
@@ -86,6 +86,10 @@ class Escalation(GsxObject):
return Lookup(escalationId=self.escalationId).lookup("GeneralEscalationDetailsLookup")
def get_notes(self):
+ """
+ Returns all the notes of this escalation.
+ Should probably be run after a lookup()
+ """
return self.objects.escalationNotes.iterchildren()
diff --git a/gsxws/repairs.py b/gsxws/repairs.py
index 502b9d6..dd9afd3 100644
--- a/gsxws/repairs.py
+++ b/gsxws/repairs.py
@@ -297,6 +297,26 @@ class IndirectOnsiteRepair(Repair):
"repairConfirmation")
+class RepairOrReplace(Repair):
+ """
+ The Create Repair or Replace API allows users to submit Repair-Or-Replace information to GSX.
+ The submissions creates a GSX RoR Repair in the system.
+ """
+ COVERAGE_OPTIONS = (
+ ('N', 'No Damage'),
+ ('A1', 'Battery Service'),
+ ('A2', 'Returnable Damage'),
+ ('A3', 'Non-returnable Damage'),
+ ('X', 'Non-returnable damage covered by AppleCare+'),
+ ('RPL', 'Replace'),
+ ('Z', 'Override to Out of Warranty when part is covered by Variable Warranty')
+ )
+
+ def create(self):
+ self._namespace = "asp:"
+ return self._submit("repairData", "CreateRepairOrReplace", "repairConfirmation")
+
+
class WholeUnitExchange(Repair):
"""
The Create Whole Unit Exchange API allows the service providers to send