Class: BridgeBankin::Bank

Inherits:
BridgeObject show all
Extended by:
API::Resource
Defined in:
lib/bridge_bankin/bank.rb

Overview

Bank resource

Constant Summary collapse

RESOURCE_TYPE =
"bank"

Constants inherited from BridgeObject

BridgeBankin::BridgeObject::HIDDEN_ATTRIBUTES

Class Method Summary collapse

Methods inherited from BridgeObject

#==, convert_to_bridge_object, #initialize, #to_hash, #to_json

Constructor Details

This class inherits a constructor from BridgeBankin::BridgeObject

Class Method Details

.find(id:, **params) ⇒ Bank

Retrieve a single bank

Parameters:

  • id (Integer)

    the id of the requested resource

  • params (Hash)

    any params that might be required (or optional) to communicate with the API

Returns:

  • (Bank)

    the requested bank


33
34
35
36
# File 'lib/bridge_bankin/bank.rb', line 33

def find(id:, **params)
  data = api_client.get("/v2/banks/#{id}", params)
  convert_to_bridge_object(data)
end

.list(**params) ⇒ Array<Bank>

List all banks supported by the Bridge API

Parameters:

  • params (Hash)

    any params that might be required (or optional) to communicate with the API

Returns:

  • (Array<Bank>)

    the supported banks list


20
21
22
23
# File 'lib/bridge_bankin/bank.rb', line 20

def list(**params)
  data = api_client.get("/v2/banks", params)
  convert_to_bridge_object(data)
end