diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-08-14 15:49:05 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-08-14 15:49:05 +0300 |
commit | 491d967f2e0d6fc62724746a430fe27a9421e639 (patch) | |
tree | 2d7f3b65ba94f80b2aad605b27450b569fa5f7f7 /gsxws | |
parent | 9de65245974305a17637fd8711f3a88b5ff9db22 (diff) | |
download | py-gsxws-491d967f2e0d6fc62724746a430fe27a9421e639.tar.gz py-gsxws-491d967f2e0d6fc62724746a430fe27a9421e639.tar.bz2 py-gsxws-491d967f2e0d6fc62724746a430fe27a9421e639.zip |
Return symptoms and issues as two-tuples
Diffstat (limited to 'gsxws')
-rw-r--r-- | gsxws/repairs.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gsxws/repairs.py b/gsxws/repairs.py index b7716ae..d84372c 100644 --- a/gsxws/repairs.py +++ b/gsxws/repairs.py @@ -54,9 +54,20 @@ class SymptomIssue(GsxObject): _namespace = "asp:" def fetch(self): + result = [] self._submit("requestData", "ReportedSymptomIssue", "ReportedSymptomIssueResponse") - return self._req.objects.reportedSymptomIssueResponse + r = self._req.objects.reportedSymptomIssueResponse + + if r.symptoms is not None: + for s in r.symptoms: + result.append((s.reportedSymptomCode, s.reportedSymptomDesc,)) + + if r.issues is not None: + for s in r.issues: + result.append((s.reportedIssueCode, s.reportedIssueDesc,)) + + return result class CompTiaCode(GsxObject): |