Class: ForestAdminDatasourceMambuPayments::Plugins::Relations::LinkIncomingPaymentToExpectedPayments

Inherits:
TwoStepLinkPlugin
  • Object
show all
Defined in:
lib/forest_admin_datasource_mambu_payments/plugins/relations/link_incoming_payment_to_expected_payments.rb

Overview

IncomingPayment <-> ExpectedPayment matched through two reconciliations sharing a transaction (cross-pivot resolution). Install at the datasource level: @agent.use(plugin, {}).

Constant Summary

Constants inherited from TwoStepLinkPlugin

TwoStepLinkPlugin::ComputedDefinition

Instance Method Summary collapse

Methods inherited from TwoStepLinkPlugin

link, #run, virtual_fk

Instance Method Details

#install_source_filter(collection) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/forest_admin_datasource_mambu_payments/plugins/relations/link_incoming_payment_to_expected_payments.rb', line 11

def install_source_filter(collection)
  TwoStepCrossReconciliationFilter.install(collection,
                                           fk_name: 'incoming_payment_id',
                                           src_payment_type: 'incoming_payment',
                                           dst_payment_type: 'expected_payment',
                                           target_field: 'id')
end