diff options
Diffstat (limited to 'gsxws/products.py')
-rw-r--r-- | gsxws/products.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gsxws/products.py b/gsxws/products.py index 1552ec2..fe31e7f 100644 --- a/gsxws/products.py +++ b/gsxws/products.py @@ -76,6 +76,9 @@ class Product(object): self._gsx._submit("unitDetail", "WarrantyStatus", "warrantyDetailInfo") self.warrantyDetails = self._gsx._req.objects + self.productDescription = self.warrantyDetails.productDescription + self.description = self.productDescription.lstrip('~VIN,') + return self.warrantyDetails def parts(self): @@ -143,8 +146,19 @@ class Product(object): """ Returns true if this iOS device is unlocked """ - import re - return ad.unlocked or (re.search("Unlock", ad.nextTetherPolicyDetails) is not None) + return ad.unlocked or ("unlock" in ad.nextTetherPolicyDetails) + + @property + def is_iphone(self): + return self.description.startswith('iPhone') + + @property + def is_ipad(self): + return self.description.startswith('iPad') + + @property + def is_ios(self): + return self.is_iphone or self.is_ipad @property def has_warranty(self): |