Class: ForestAdminDatasourceMambuPayments::Plugins::SmartActions::TriggerPayeeVerification
- Inherits:
-
ForestAdminDatasourceCustomizer::Plugins::Plugin
- Object
- ForestAdminDatasourceCustomizer::Plugins::Plugin
- ForestAdminDatasourceMambuPayments::Plugins::SmartActions::TriggerPayeeVerification
- Defined in:
- lib/forest_admin_datasource_mambu_payments/plugins/smart_actions/trigger_payee_verification.rb
Overview
Triggers Numeral’s asynchronous external-account verification (a.k.a. Verification of Payee / VOP). The API returns immediately with status ‘pending_verification`; the actual result lands ~30s later via webhook.
Constant Summary collapse
- BaseAction =
ForestAdminDatasourceCustomizer::Decorators::Action::BaseAction
- ActionScope =
ForestAdminDatasourceCustomizer::Decorators::Action::Types::ActionScope
- NAMES =
{ single: 'Trigger payee verification', bulk: 'Trigger payee verification on selected accounts' }.freeze
Instance Method Summary collapse
Instance Method Details
#run(_datasource_customizer, collection_customizer = nil, options = {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/forest_admin_datasource_mambu_payments/plugins/smart_actions/trigger_payee_verification.rb', line 14 def run(_datasource_customizer, collection_customizer = nil, = {}) datasource = [:datasource] record_id_field = [:record_id_field] raise ArgumentError, 'TriggerPayeeVerification plugin requires :datasource' unless datasource raise ArgumentError, 'TriggerPayeeVerification plugin requires :record_id_field' unless record_id_field raise ArgumentError, 'TriggerPayeeVerification plugin requires a collection' unless collection_customizer Helpers.normalize_scopes([:scopes]).each do |scope_key| collection_customizer.add_action(NAMES[scope_key], build_action(datasource, scope_key, record_id_field)) end end |