Implementing REST APIs with Embedded Privacy

class OrderResource(serializers.ModelSerializer):
class Meta:
model = Order
fields = (
'id',
'subtotal',
'commission',
'tip_amount',
'items',
... etc. ...
)
class CustomerOrderResource(serializers.ModelSerializer):
class Meta:
model = Order
fields = (
'id',
'subtotal',
'tip_amount'
...
)
class DriverOrderResource(serializers.ModelSerializer):
class Meta:
model = Order
fields = (
'id',
'subtotal',
...
)
class RestaurantOrderResource(serializers.ModelSerializer):
class Meta:
model = Order
fields = (
'id',
'subtotal',
'commission',
...
)

--

--

Get more from your neighborhood. Order now at www.doordash.com.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store