zinc-collective / compensated

Create value. Get Paid.
Other
13 stars 1 forks source link

Developer may explore the normalized event data-structure exposed by Compensated programmatically #51

Open zspencer opened 4 years ago

zspencer commented 4 years ago

At present, people have to either A) read the source or B) read the docs to understand what is available on an event normalized by Compensated. This adds significant cognitive overhead; and reduces adoption.

To mitigate that, we could sprout a Compensated::Event class and ensure that each of our adapters return an instance of it from their #normalize method; while ensuring it can be accessed using the standard event[:foo] syntax that our existing clients use.

This should include YARDoc for the data structures we're exposing on the event, so that tools like Solargraph and ctags can make reasonable suggestions for autocompletion.

This should not include changes to the underlying data structure, for now.