Class: ForestAdminDatasourceMambuPayments::Collections::PayeeVerificationRequest
- Inherits:
-
BaseCollection
- Object
- ForestAdminDatasourceToolkit::Collection
- BaseCollection
- ForestAdminDatasourceMambuPayments::Collections::PayeeVerificationRequest
- Defined in:
- lib/forest_admin_datasource_mambu_payments/collections/payee_verification_request.rb
Overview
Payee Verification Requests are emitted by Numeral when an outgoing verification is sent (via the ‘Trigger payee verification` smart action on external accounts) or when an incoming verification arrives from the network. From Forest’s perspective they are read-only: send and simulate are lifecycle operations exposed as smart-action plugins (see TriggerPayeeVerification) rather than collection writes.
Constant Summary collapse
- ENUM_STATUS =
%w[completed failed].freeze
- ENUM_FAILURE_CODE =
%w[business_error technical_error psp_technical_error].freeze
- ENUM_DIRECTION =
%w[outgoing incoming].freeze
- ENUM_SCHEME =
%w[vop].freeze
- ENUM_MATCHING_RESULT =
%w[match close_match no_match impossible_match].freeze
Constants inherited from BaseCollection
BaseCollection::BOOL_OPS, BaseCollection::ColumnSchema, BaseCollection::DATE_OPS, BaseCollection::ForestException, BaseCollection::ID_OPS, BaseCollection::Leaf, BaseCollection::NUMBER_OPS, BaseCollection::Operators, BaseCollection::STRING_OPS
Instance Method Summary collapse
-
#initialize(datasource) ⇒ PayeeVerificationRequest
constructor
A new instance of PayeeVerificationRequest.
- #serialize(record) ⇒ Object
Methods inherited from BaseCollection
#aggregate, client_resource, #fetch_by_ids, #list
Constructor Details
#initialize(datasource) ⇒ PayeeVerificationRequest
Returns a new instance of PayeeVerificationRequest.
18 19 20 21 22 |
# File 'lib/forest_admin_datasource_mambu_payments/collections/payee_verification_request.rb', line 18 def initialize(datasource) super(datasource, 'MambuPayeeVerificationRequest') define_schema reconcile_filter_operators! end |
Instance Method Details
#serialize(record) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/forest_admin_datasource_mambu_payments/collections/payee_verification_request.rb', line 24 def serialize(record) a = attrs_of(record) { 'id' => a['id'], 'object' => a['object'], 'status' => a['status'], 'failure_code' => a['failure_code'], 'status_details' => a['status_details'], 'direction' => a['direction'], 'scheme' => a['scheme'], 'request' => a['request'], 'matching_result' => a['matching_result'], 'payee_suggested_name' => a['payee_suggested_name'], 'matching_details' => a['matching_details'], 'scheme_data' => a['scheme_data'], 'metadata' => a['metadata'], 'response_received_at' => a['response_received_at'], 'created_at' => a['created_at'] } end |