Class: ForestAdminDatasourceMambuPayments::Collections::ConnectedAccount

Inherits:
BaseCollection
  • Object
show all
Defined in:
lib/forest_admin_datasource_mambu_payments/collections/connected_account.rb

Constant Summary collapse

OneToManySchema =
ForestAdminDatasourceToolkit::Schema::Relations::OneToManySchema

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

Methods inherited from BaseCollection

#aggregate, client_resource, #fetch_by_ids, #list

Constructor Details

#initialize(datasource) ⇒ ConnectedAccount

Returns a new instance of ConnectedAccount.



9
10
11
12
13
14
# File 'lib/forest_admin_datasource_mambu_payments/collections/connected_account.rb', line 9

def initialize(datasource)
  super(datasource, 'MambuConnectedAccount')
  define_schema
  define_relations
  reconcile_filter_operators!
end

Instance Method Details

#serialize(record) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/forest_admin_datasource_mambu_payments/collections/connected_account.rb', line 16

def serialize(record)
  a = attrs_of(record)
  {
    'id' => a['id'],
    'object' => a['object'],
    'name' => a['name'],
    'distinguished_name' => a['distinguished_name'],
    'type' => a['type'],
    'currency' => a['currency'],
    'bank_id' => a['bank_id'],
    'bank_name' => a['bank_name'],
    'bank_code' => a['bank_code'],
    'bank_code_format' => a['bank_code_format'],
    'bank_address' => a['bank_address'],
    'account_number' => a['account_number'],
    'account_number_format' => a['account_number_format'],
    'settlement_account' => a['settlement_account'],
    'creditor_identifier' => a['creditor_identifier'],
    'legal_entity_identifier' => a['legal_entity_identifier'],
    'receiving_agent' => a['receiving_agent'],
    'services_activated' => a['services_activated'],
    'file_auto_approval' => a['file_auto_approval'],
    'return_auto_approval' => a['return_auto_approval'],
    'incoming_instant_payment_auto_approval' => a['incoming_instant_payment_auto_approval'],
    'address' => a['address'],
    'metadata' => a['metadata'],
    'bank_data' => a['bank_data'],
    'account_number_generation_settings' => a['account_number_generation_settings'],
    'disabled_at' => a['disabled_at'],
    'created_at' => a['created_at']
  }
end