Class: FaithTeams::API::V2::Resource::Fund

Inherits:
Base show all
Defined in:
lib/faithteams/api/v2/resource/fund.rb

Overview

Fund resource

Instance Method Summary collapse

Methods inherited from Base

#create, #delete, #find, #update

Methods inherited from GatewayBase

#initialize, #valid_connection?

Constructor Details

This class inherits a constructor from FaithTeams::API::V2::GatewayBase

Instance Method Details

#search(**args) ⇒ Array<Entity::Fund>

Parameters:

  • args (Hash)

    These are ignored as no filters are available for this endpoint

Returns:

Raises:



12
13
14
15
16
17
# File 'lib/faithteams/api/v2/resource/fund.rb', line 12

def search(**args)
  data = connection.get(path: "/funds")["data"]
  return [] unless data

  data.map { |r| Entity::Fund.new(attributes: r) }
end