Create apiv4 payment api
In order to be able to search for payments we need to be able to search for payment rows (rows with is_payment = TRUE) in the financial_trxn table and for the entity bridge to be able to find it's way from there to the contribution table.
This gives us the ability to say find all contributions with a payment with a payment instrument of 'Check' or find the contribution where the payment's trxn value is y
The scope I would be looking for is
- can use any of the fields in financial_trxn as a filter
- can logically link to the contribution (probably through bridge entities)
- forces 'is_payment' as a filter (only gets payments)
- the create action calls Payment.create
- the update & delete actions are blocked
This effectively gives us parity with the v3 api albeit with more options provided through the apiv4 layer itself.
Note that I think this is likely blocked on other feature requests which @mattwire will add notes on