module CurrencyCloud::ActionsPost::Find
Public Instance Methods
find(params = {})
click to toggle source
# File lib/currency_cloud/actions_post/find_post.rb, line 4 def find(params = {}) response = client.post('find', params) mixin_class.new(resource, self, response) end
first(params = {})
click to toggle source
# File lib/currency_cloud/actions_post/find_post.rb, line 9 def first(params = {}) entities = find(params.merge(per_page: 1)) || [] entities.first end
Private Instance Methods
mixin_class()
click to toggle source
# File lib/currency_cloud/actions_post/find_post.rb, line 16 def mixin_class unless CurrencyCloud.const_defined?(resource.capitalize, false) CurrencyCloud.const_set(resource.capitalize, Class.new(CurrencyCloud::ResourcefulCollection)) end CurrencyCloud.const_get(resource.capitalize, false) end