aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-09-08 16:08:16 +0300
committerFilipp Lepalaan <f@230.to>2013-09-08 16:08:16 +0300
commitedb0fc6fa64d24119964e074d0740790c7fe73bd (patch)
tree7dbb72dd8dcf93b4556c898e061d26456e82fa35
parent09a3af9f9b80e56b0b8540ff10cee34c6ce43bf6 (diff)
downloadpy-gsxws-edb0fc6fa64d24119964e074d0740790c7fe73bd.tar.gz
py-gsxws-edb0fc6fa64d24119964e074d0740790c7fe73bd.tar.bz2
py-gsxws-edb0fc6fa64d24119964e074d0740790c7fe73bd.zip
Put properties back
-rw-r--r--gsxws/products.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/gsxws/products.py b/gsxws/products.py
index c16485e..12a8aa3 100644
--- a/gsxws/products.py
+++ b/gsxws/products.py
@@ -144,22 +144,28 @@ class Product(GsxObject):
import re
return ad.unlocked or (re.search("Unlock", ad.nextTetherPolicyDetails) is not None)
+ @property
def is_vintage(self):
- title = self.warrantyDetails.productDescription
+ title = self.warrantyDetails.productDescription or ''
return title.startswith('~VIN,')
+ @property
def is_locked(self):
return not self.is_unlocked()
+ @property
def parts_covered(self):
return self.warrantyDetails.partCovered is True
+ @property
def labor_covered(self):
return self.warrantyDetails.laborCovered is True
+ @property
def parts_and_labor_covered(self):
return self.parts_covered and self.labor_covered
+ @property
def has_onsite(self):
from datetime import date
try: