Closed gje4 closed 5 years ago
Hey George! 👋
Good spot on CustomCartItem
not being fully fleshed out.
[String: any]
I guess would work and make it pretty flexible, but would lose any type safety we have for adding new items to the cart ahead of time. What's required on a custom cart item for it to be useful? Assuming name, description, price? Could those be added to the class instead?
Could also end up simplifying that buildCustomItem
method by having something like a toDictionary()
on the CustomCartItem
. Spitballin' there.
Allows the user to follow the docs and pass a custom object that represents a product. It is up to the user to follow the docs to make sure the payload has all of the required data.
This is unlike other moltin objects as it is meant to give the user freedom to pass through their needed data, ie shipping and other add ons.
Do not think should remove CustomCartItem yet
Status
Notes
Do not think should remove CustomCartItem yet