diff options
-rw-r--r-- | gsxws/core.py | 9 | ||||
-rw-r--r-- | gsxws/repairs.py | 3 |
2 files changed, 5 insertions, 7 deletions
diff --git a/gsxws/core.py b/gsxws/core.py index 4e35c76..2579310 100644 --- a/gsxws/core.py +++ b/gsxws/core.py @@ -300,6 +300,9 @@ class GsxObject(object): value = base64.b64encode(value.read()) + if isinstance(value, bool): + value = "Y" if value else "N" + if isinstance(value, int): value = str(value) @@ -309,12 +312,6 @@ class GsxObject(object): if isinstance(value, time): value = value.strftime(self._formats['tf']) - if isinstance(value, bool): - value = "Y" if value else "N" - - if isinstance(value, date): - value = value.strftime(self._formats['df']) - self._data[name] = value def __getattr__(self, name): diff --git a/gsxws/repairs.py b/gsxws/repairs.py index 5ba0861..4d0d1f5 100644 --- a/gsxws/repairs.py +++ b/gsxws/repairs.py @@ -181,7 +181,8 @@ class CarryInRepair(Repair): GSX validates the information and if all of the validations go through, it obtains a quote for the repair and creates the carry-in repair - >>> CarryInRepair(customerAddress=Customer(firstName='Filipp'))._data + >>> CarryInRepair(requestReviewByApple=True).requestReviewByApple + 'Y' """ _namespace = "emea:" |