Open mociepka opened 9 years ago
It would be nice to have to_json method or to_dict or json serializer in prices. Now I use:
to_json
to_dict
price = {name: str(value) for name, value in obj._asdict().items()} del price['history']
but this doesn't look good.
I'd much rather finish implementing my idea that turns a Price into two Amounts.
Price
Amounts
+1 could serialize price during checkout process for instance and use it.
It would be nice to have
to_json
method orto_dict
or json serializer in prices. Now I use:but this doesn't look good.