Class: Mosaic::Sdk::Models::Bank

Inherits:
Base
  • Object
show all
Defined in:
lib/mosaic/sdk/models/bank.rb

Overview

Represents the collection of banks from the Mosaic API.

Allows listing banks via the /v2/banks endpoint.

Examples:

List all banks

banks = Mosaic::Sdk.Bank.list

Search for banks

banks = Mosaic::Sdk.Bank.list('My Bank')

Access a bank by ID

bank = Mosaic::Sdk.Bank(42)
bank.data  # => { 'id' => 42, 'name' => 'My Bank', ... }

Defined Under Namespace

Classes: Instance

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Mosaic::Sdk::Models::Base

Instance Method Details

#createvoid

This method returns an undefined value.

Bank creation is not supported by the Mosaic API.

Raises:

  • (NotImplementedError)

    Bank creation is not supported

#list(query = nil) ⇒ Array<Instance>

Lists banks, optionally filtered by a search query.

Parameters:

  • query (String, nil) (defaults to: nil)

    an optional search string to filter results

Returns:

  • (Array<Instance>)

    array of bank instances