Fabian Peter Hammerle 7 years ago
parent
commit
9bb0eb66e5
1 changed files with 0 additions and 33 deletions
  1. 0 33
      dingguo/__init__.py

+ 0 - 33
dingguo/__init__.py

@@ -164,20 +164,6 @@ class Discount(yaml.YAMLObject):
         assert amount.value >= 0
         self.amount = amount
 
-    def dict_repr(self):
-        return {
-            'name': self.name,
-            'value': self.amount.value,
-            'value_currency': self.amount.currency,
-            }
-
-    @staticmethod
-    def from_dict(attr):
-        return Discount(
-                name = attr['name'],
-                amount = Sum(attr['value'], attr['value_currency']),
-                )
-
     def __eq__(self, other):
         return (type(self) == type(other)
                 and vars(self) == vars(other))
@@ -362,16 +348,6 @@ class Transportation(Item):
             assert type(ticket_url) is unicode
             self.ticket_url = ticket_url
 
-    def dict_repr(self):
-        attr = super(Transportation, self).dict_repr()
-        attr.update({
-            'departure_point': self.departure_point,
-            'destination_point': self.destination_point,
-            'distance_metres': self.distance.metres if self.distance else None,
-            'route_map': self.route_map,
-            })
-        return attr
-
 class TaxiRide(Transportation):
 
     yaml_tag = u'!taxi-ride'
@@ -394,15 +370,6 @@ class TaxiRide(Transportation):
         assert departure_time is None or type(departure_time) is datetime.datetime
         self.departure_time = departure_time
 
-    def dict_repr(self):
-        attr = super(TaxiRide, self).dict_repr()
-        attr.update({
-            'arrival_time': self.arrival_time.strftime('%Y-%m-%d %H:%M') if self.arrival_time else None,
-            'departure_time': self.departure_time.strftime('%Y-%m-%d %H:%M') if self.departure_time else None,
-            'driver': self.driver,
-            })
-        return attr
-
 class OrderRegistry(yaml.YAMLObject):
 
     yaml_tag = u'!order-registry'