Module: CurrencyCloud::Actions::Find

Defined in:
lib/currency_cloud/actions/find.rb

Instance Method Summary collapse

Instance Method Details

#find(params = {}) ⇒ Object



4
5
6
7
# File 'lib/currency_cloud/actions/find.rb', line 4

def find(params = {})
  response = client.get('find', params)
  mixin_class.new(resource, self, response)
end

#first(params = {}) ⇒ Object



9
10
11
12
# File 'lib/currency_cloud/actions/find.rb', line 9

def first(params = {})
  entities = find(params.merge(per_page: 1)) || []
  entities.first
end