diff options
author | Filipp Lepalaan <f@230.to> | 2013-02-12 19:35:57 +0200 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-02-12 19:35:57 +0200 |
commit | a3ed8a72803bfe3dd65a2f6ac5c4f3264a68ced6 (patch) | |
tree | 658c891465b2f61f5881766f1d8ed5bbf94dedb8 /gsxws.py | |
parent | 96b86337a32098d5c320b76c9505f40995d4e385 (diff) | |
download | py-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-x | gsxws.py | 37 |
1 files changed, 29 insertions, 8 deletions
@@ -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 |