Lotus direction on business classes?

Hey all,

What’s the Lotus direction on business classes, often generically called service classes?

For example: After updating (increasing) a product quantity, I need to update all related backordered orders status.

So it would be a class to do cross repositories calls:

  1. update product (via product repository)
  2. find related orders (via order repository) - also includes business code
  3. update orders (via order repository)

Hello @phstc Did you gave a look at Lotus::Interactor from lotus-utils?

Great, thanks!

The interactor_test helped me to understand it better.

I saw in the yard docs @params.valid?, does Lotus add .valid? to Hash objects?

i.e. https://github.com/lotus/utils/blob/master/lib/lotus/interactor.rb#L213

Nope, we’re trying to build a framework without monkey-patching Ruby core and stdlib. That is an instance of Lotus::Action::Params.