Order API is not Order AI
[copied notes from Mattermost]
Towards 'making this sane' and could be implemented immediately -> for example - one would be to immediately start returning ->
a notice -> 'warning: incompatible set of input params - Order API can not create coherent line-item(s)'.
When being presented with incompatible data -> e.g. if total_amount = 10; tax_amount = 0.25; financial_type_id = 1;
That's an impossible set of input params. Yes - they are still being handled right now - but results will be unpredictable b/c it is simply impossible to create a co-herent line_item with those input params.
I have some more notes in 21187 - will park them in my own atrium for now. Key one is that one
Another one could be that if presented with line_items and a total_amount at the Contribution level - then that all better be adding up or else ->
a notice -> 'warning: incompatible set of input params - Order API can not create coherent line-item(s)'.
At this stage the API can still attempt - but alerting people would be a first step towards to no longer accept incoherent input. Order API is not Order AI :-)