It's surprising that SpreeAvatax::SalesInvoice.generate(order) modifies the order, rather than just creating an invoice. Something like SpreeAvatax::SalesInvoice.calculate_and_set_taxes(order) would probably be a better name.
There are at least three generate methods defined in solidus_avatax right now. We'd probably want to update all of them and deprecate the generate name.
See discussion here.
It's surprising that
SpreeAvatax::SalesInvoice.generate(order)
modifies the order, rather than just creating an invoice. Something likeSpreeAvatax::SalesInvoice.calculate_and_set_taxes(order)
would probably be a better name.There are at least three
generate
methods defined in solidus_avatax right now. We'd probably want to update all of them and deprecate thegenerate
name.