diff options
author | Filipp Lepalaan <f@230.to> | 2013-05-02 22:31:31 +0300 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-05-02 22:31:31 +0300 |
commit | b854d9346a6aa72aa978928d03bc0f2b37be0fc9 (patch) | |
tree | e23cac43698e871fb9977d0c49c25d07390c21d0 /repairs.py | |
parent | a2ad9888148402b75d4f8a77da4c5fbca2f539cb (diff) | |
download | py-gsxws-b854d9346a6aa72aa978928d03bc0f2b37be0fc9.tar.gz py-gsxws-b854d9346a6aa72aa978928d03bc0f2b37be0fc9.tar.bz2 py-gsxws-b854d9346a6aa72aa978928d03bc0f2b37be0fc9.zip |
Refactoring in progress..
Diffstat (limited to 'repairs.py')
-rw-r--r-- | repairs.py | 31 |
1 files changed, 26 insertions, 5 deletions
@@ -2,14 +2,27 @@ gsxws/repairs.py """ import sys -from gsxws import connect, SESSION +from gsxws import connect class GsxObject(object): - data = dict() + + data = {} + def __init__(self, **kwargs): self.data = kwargs + def _make_type(self, new_dt): + """ + Creates the top-level datatype for the API call + """ + from gsxws import CLIENT, SESSION + dt = CLIENT.factory.create(new_dt) + + if SESSION: + dt.userSession = SESSION + + return dt class Customer(GsxObject): """ @@ -38,7 +51,9 @@ class RepairOrderLine(GsxObject): class Repair(GsxObject): - """docstring for Repair""" + """ + Abstract base class for the different GSX Repair types + """ customerAddress = None symptom = "" diagnosis = "" @@ -71,10 +86,16 @@ class CarryInRepair(Repair): fileName = "" fileData = "" diagnosedByTechId = "" - + class IndirectOnsiteRepair(Repair): - """docstring for IndirectOnsiteRepair""" + """ + The Create Indirect Onsite Repair API is designed to create the indirect onsite repairs. + When a service provider travels to the customer location to perform repair + on a unit eligible for onsite service, they create an indirect repair. + Once the repair is submitted, it is assigned a confirmation number, + which is a reference number to identify the repair. + """ pass |