aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gsxws/products.py8
-rw-r--r--tests/test_gsxws.py3
2 files changed, 11 insertions, 0 deletions
diff --git a/gsxws/products.py b/gsxws/products.py
index b268457..281c097 100644
--- a/gsxws/products.py
+++ b/gsxws/products.py
@@ -98,6 +98,14 @@ class Product(object):
self.productDescription = self.warrantyDetails.productDescription
self.description = self.productDescription.lstrip('~VIN,')
+ self.repair_strategies = []
+
+ try:
+ for i in self.warrantyDetails.availableRepairStrategies:
+ self.repair_strategies.append(i.availableRepairStrategy)
+ except AttributeError:
+ pass
+
return self.warrantyDetails
def parts(self):
diff --git a/tests/test_gsxws.py b/tests/test_gsxws.py
index ad32fa8..db0c10d 100644
--- a/tests/test_gsxws.py
+++ b/tests/test_gsxws.py
@@ -348,6 +348,9 @@ class TestRemoteWarrantyFunctions(TestCase):
self.product = Product(os.getenv('GSX_SN'))
self.wty = self.product.warranty(ship_to=os.getenv('GSX_SHIPTO'))
+ def test_repair_strategies(self):
+ self.assertEqual(self.product.repair_strategies[0], 'Carry-in')
+
def test_acplus_status(self):
self.assertTrue(self.wty.acPlusFlag)