From d036009b8bd13e360d3336b9aa97d49e1386551a Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Wed, 18 Nov 2015 22:43:15 +0200 Subject: Cleanup --- gsxws/core.py | 3 +++ gsxws/repairs.py | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/gsxws/core.py b/gsxws/core.py index 17f6556..4e18bdd 100644 --- a/gsxws/core.py +++ b/gsxws/core.py @@ -484,6 +484,9 @@ class GsxObject(object): req = GsxRequest(**{'GsxObject': self}) return ET.tostring(req.data, encoding='utf-8') + def __str__(self): + return str(self._data) + class GsxRequestObject(GsxObject): "The GSX-friendly representation of this GsxObject" diff --git a/gsxws/repairs.py b/gsxws/repairs.py index 768ff06..f5baf48 100644 --- a/gsxws/repairs.py +++ b/gsxws/repairs.py @@ -8,12 +8,12 @@ from core import GsxObject, GsxError, validate from lookups import Lookup REPAIR_TYPES = ( - ('CA', "Carry-In/Non-Replinished"), - ('NE', "Return Before Replace"), - ('NT', "No Trouble Found"), - ('ON', "Onsite (Indirect/Direct)"), - ('RR', "Repair Or Replace/Whole Unit Mail-In"), - ('WH', "Mail-In"), + ('CA', 'Carry-In/Non-Replinished'), + ('NE', 'Return Before Replace'), + ('NT', 'No Trouble Found'), + ('ON', 'Onsite (Indirect/Direct)'), + ('RR', 'Repair Or Replace/Whole Unit Mail-In'), + ('WH', 'Mail-In'), ) REPAIR_STATUSES = ( @@ -348,13 +348,13 @@ class RepairOrReplace(Repair): 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+'), + ('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') + ('Z', 'Override to Out of Warranty when part is covered by Variable Warranty'), ) def create(self): -- cgit v1.2.3