Class: ModernTreasury::ConnectionController
- Inherits:
-
BaseController
- Object
- BaseController
- ModernTreasury::ConnectionController
- Defined in:
- lib/modern_treasury/controllers/connection_controller.rb
Overview
ConnectionController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#list_connections(per_page: nil, vendor_customer_id: nil, entity: nil, after_cursor: nil) ⇒ Array[Connection]
Get a list of all connections.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent
Constructor Details
This class inherits a constructor from ModernTreasury::BaseController
Instance Method Details
#list_connections(per_page: nil, vendor_customer_id: nil, entity: nil, after_cursor: nil) ⇒ Array[Connection]
Get a list of all connections. here identifier assigned by the vendor to your organization. vendor (i.e. bank). here
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/modern_treasury/controllers/connection_controller.rb', line 19 def list_connections(per_page: nil, vendor_customer_id: nil, entity: nil, after_cursor: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/api/connections', Server::DEFAULT) .query_param(new_parameter(per_page, key: 'per_page')) .query_param(new_parameter(vendor_customer_id, key: 'vendor_customer_id')) .query_param(new_parameter(entity, key: 'entity')) .query_param(new_parameter(after_cursor, key: 'after_cursor')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('basic_auth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(Connection.method(:from_hash)) .is_response_array(true)) .execute end |