Class: ForestAdminDatasourceMambuPayments::Plugins::Relations::LinkIncomingPaymentToTransactions

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

Overview

IncomingPayment <-> Transaction through the Reconciliation pivot (Reconciliation.payment_id + payment_type = incoming_payment). 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
# File 'lib/forest_admin_datasource_mambu_payments/plugins/relations/link_incoming_payment_to_transactions.rb', line 11

def install_source_filter(collection)
  TwoStepReconciliationFilter.install(collection,
                                      fk_name: 'incoming_payment_id',
                                      payment_type: 'incoming_payment',
                                      target_field: 'id')
end