diff options
author | Filipp Lepalaan <f@230.to> | 2013-06-11 17:04:53 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-06-11 17:04:53 +0300 |
commit | 07773b42eb347c6a0062f3063edcc3368c3693ec (patch) | |
tree | 406abd749eff68427600f640f0e275d6e9e4feb3 /gsxws | |
parent | 449acd488373af847ee27aabf4da9a5f6c2b52a9 (diff) | |
parent | afdfa3695ab7266d6b49eb7f5d616bedd22d96f2 (diff) | |
download | py-gsxws-07773b42eb347c6a0062f3063edcc3368c3693ec.tar.gz py-gsxws-07773b42eb347c6a0062f3063edcc3368c3693ec.tar.bz2 py-gsxws-07773b42eb347c6a0062f3063edcc3368c3693ec.zip |
Merge branch 'master' of github.com:filipp/py-gsxws
Conflicts:
gsxws/products.py
Diffstat (limited to 'gsxws')
-rw-r--r-- | gsxws/products.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gsxws/products.py b/gsxws/products.py index ea2e648..c62021b 100644 --- a/gsxws/products.py +++ b/gsxws/products.py @@ -39,7 +39,7 @@ class Product(GsxObject): self.configCode = result.configCode return result - def warranty(self): + def warranty(self, parts=None): """ The Warranty Status API retrieves the same warranty details displayed on the GSX Coverage screen. @@ -51,10 +51,19 @@ class Product(GsxObject): u'Out Of Warranty (No Coverage)' >>> Product('DGKFL06JDHJP').warranty().estimatedPurchaseDate datetime.date(2011, 6, 2) + >>> Product('WQ8094DW0P1').warranty([(u'661-5070', u'Z26',)]) # doctest: +ELLIPSIS + {'warrantyStatus': 'Out Of Warranty (No Coverage)',... """ if hasattr(self, "alternateDeviceId"): if not self.serialNumber: self.activation() + try: + self.partNumbers = [] + for k, v in parts: + part = GsxObject(partNumber=k, comptiaCode=v) + self.partNumbers.append(part) + except Exception: + pass self._submit("unitDetail", "WarrantyStatus", "warrantyDetailInfo") self.warrantyDetails = self._req.objects |