diff options
author | Filipp Lepalaan <f@230.to> | 2013-06-11 17:03:25 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-06-11 17:03:25 +0300 |
commit | 449acd488373af847ee27aabf4da9a5f6c2b52a9 (patch) | |
tree | a0a9b6aab8d14fbbc50dd81dc9c8fd8738004895 /gsxws | |
parent | 2f8a8907bb4985696f624f45982c2b6af9887674 (diff) | |
download | py-gsxws-449acd488373af847ee27aabf4da9a5f6c2b52a9.tar.gz py-gsxws-449acd488373af847ee27aabf4da9a5f6c2b52a9.tar.bz2 py-gsxws-449acd488373af847ee27aabf4da9a5f6c2b52a9.zip |
Adding warranty status check with IMEI code (WIP)
Diffstat (limited to 'gsxws')
-rw-r--r-- | gsxws/products.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gsxws/products.py b/gsxws/products.py index 3042109..ea2e648 100644 --- a/gsxws/products.py +++ b/gsxws/products.py @@ -52,6 +52,10 @@ class Product(GsxObject): >>> Product('DGKFL06JDHJP').warranty().estimatedPurchaseDate datetime.date(2011, 6, 2) """ + if hasattr(self, "alternateDeviceId"): + if not self.serialNumber: + self.activation() + self._submit("unitDetail", "WarrantyStatus", "warrantyDetailInfo") self.warrantyDetails = self._req.objects return self.warrantyDetails @@ -108,10 +112,11 @@ class Product(GsxObject): GsxError: Provided serial number does not belong to an iOS Device... """ self._namespace = "glob:" - act = self._submit("FetchIOSActivationDetailsRequest", - "FetchIOSActivationDetails", - "activationDetailsInfo") - return act + ad = self._submit("FetchIOSActivationDetailsRequest", + "FetchIOSActivationDetails", + "activationDetailsInfo") + self.serialNumber = ad.serialNumber + return ad if __name__ == '__main__': |