aboutsummaryrefslogtreecommitdiffstats
path: root/gsxws.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <f@230.to>2013-02-12 19:35:57 +0200
committerFilipp Lepalaan <f@230.to>2013-02-12 19:35:57 +0200
commita3ed8a72803bfe3dd65a2f6ac5c4f3264a68ced6 (patch)
tree658c891465b2f61f5881766f1d8ed5bbf94dedb8 /gsxws.py
parent96b86337a32098d5c320b76c9505f40995d4e385 (diff)
downloadpy-gsxws-a3ed8a72803bfe3dd65a2f6ac5c4f3264a68ced6.tar.gz
py-gsxws-a3ed8a72803bfe3dd65a2f6ac5c4f3264a68ced6.tar.bz2
py-gsxws-a3ed8a72803bfe3dd65a2f6ac5c4f3264a68ced6.zip
Implement updating KGB Serial Numbers
Diffstat (limited to 'gsxws.py')
-rwxr-xr-xgsxws.py37
1 files changed, 29 insertions, 8 deletions
diff --git a/gsxws.py b/gsxws.py
index 4116fd9..91cec0d 100755
--- a/gsxws.py
+++ b/gsxws.py
@@ -486,8 +486,8 @@ class Repair(GsxObject):
"""
The Update Carry-In Repair API allows the service providers
to update the existing open carry-in repairs.
- This API assists in addition/deletion of parts and addition of notes to a repair.
- On successful update, the repair confirmation number and
+ This API assists in addition/deletion of parts and addition of notes
+ to a repair. On successful update, the repair confirmation number and
quote for any newly added parts would be returned.
In case of any validation error or unsuccessful update, a fault code is issued.
@@ -499,6 +499,26 @@ class Repair(GsxObject):
"""
pass
+ def update_kgb_sn(self, sn):
+ """
+ Description:
+ The KGB Serial Number Update API is always to be used on
+ whole unit repairs that are in a released state.
+ This API allows users to provide the KGB serial number for the
+ whole unit exchange repairs. It also checks for the privilege
+ to create/ update whole unit exchange repairs
+ before updating the whole unit exchange repair.
+ Context:
+ The API is to be used on whole unit repairs that are in a released state.
+ This API can be invoked only after carry-in repair creation API.
+ """
+ dt = self._make_type('ns1:updateKGBSerialNumberRequestType')
+ dt.repairConfirmationNumber = self.data['dispatchId']
+ dt.serialNumber = sn
+
+ result = CLIENT.service.KGBSerialNumberUpdate(dt)
+ return result
+
def lookup(self):
"""
The Repair Lookup API mimics the front-end repair search functionality.
@@ -692,12 +712,13 @@ if __name__ == '__main__':
connect(**vars(args))
- f = 'tests/create_carryin_repair.json'
+ #f = 'tests/create_carryin_repair.json'
#f = 'tests/update_escalation.json'
- fp = open(f, 'r')
- data = json.load(fp)
- data['requestReviewByApple'] = False
- rep = Repair(**data)
- print rep.create_carryin()
+ #fp = open(f, 'r')
+ #data = json.load(fp)
+ #data['requestReviewByApple'] = False
+ #rep = Repair(dispatchId='')
+ #print rep.update_kgb_sn('')
+
\ No newline at end of file