diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-08-12 14:54:10 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-08-12 14:54:10 +0300 |
commit | aab561a9cfee49977147dedeab77ad9e2bbfd8fe (patch) | |
tree | 174a425333233fc61d28651f05c5fdecf7126e1b | |
parent | c59135b89f896edc14002a10529756aff2a1d59b (diff) | |
download | py-gsxws-aab561a9cfee49977147dedeab77ad9e2bbfd8fe.tar.gz py-gsxws-aab561a9cfee49977147dedeab77ad9e2bbfd8fe.tar.bz2 py-gsxws-aab561a9cfee49977147dedeab77ad9e2bbfd8fe.zip |
Fixed SymptomIssue API support
-rw-r--r-- | gsxws/core.py | 5 | ||||
-rw-r--r-- | gsxws/repairs.py | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gsxws/core.py b/gsxws/core.py index d5b6d5e..55a086f 100644 --- a/gsxws/core.py +++ b/gsxws/core.py @@ -307,6 +307,11 @@ class GsxRequest(object): root.append(self.data) else: request_name = method + "Request" + + # @hack for Reported Symptom/Issue API which nests two ReportedSymptomIssueRequest elements + if method.endswith("Request"): + request_name = method + request = ET.SubElement(root, request_name) request.append(GSX_SESSION) diff --git a/gsxws/repairs.py b/gsxws/repairs.py index 15186a7..52945b7 100644 --- a/gsxws/repairs.py +++ b/gsxws/repairs.py @@ -54,9 +54,9 @@ class SymptomIssue(GsxObject): _namespace = "asp:" def fetch(self): - self._submit("requestData", "ReportedSymptomIssue", + self._submit("requestData", "ReportedSymptomIssueRequest", "ReportedSymptomIssueResponse") - return self._req.objects + return self._req.objects.reportedSymptomIssueResponse class Customer(GsxObject): |