aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gsxws/products.py11
-rw-r--r--setup.py8
2 files changed, 14 insertions, 5 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
diff --git a/setup.py b/setup.py
index 0b28ea6..1ca66e1 100644
--- a/setup.py
+++ b/setup.py
@@ -2,9 +2,9 @@ from setuptools import setup, find_packages
setup(
name="gsxws",
- version="0.3",
+ version="0.4",
description="Apple GSX integration.",
- install_requires = ['suds'],
+ install_requires=['PyYAML'],
classifiers=[
"Environment :: Web Environment",
"Intended Audience :: Developers",
@@ -15,8 +15,8 @@ setup(
],
keywords="gsx, python",
author="Filipp Lepalaan",
- author_email="filipp@mcare.fi",
+ author_email="filipp@fps.ee",
url="https://github.com/filipp/py-gsxws",
license="BSD",
- packages = find_packages(),
+ packages=find_packages(),
)