Sha256: 17c847bebb447dead143b61d94e7bfcdb5b43930ae39d1a0aa80332088505c37
Contents?: true
Size: 608 Bytes
Versions: 14
Compression:
Stored size: 608 Bytes
Contents
module CurrencyCloud module Actions module Find def find(params = {}) response = client.get('find', params) mixin_class.new(resource, self, response) end def first(params = {}) entities = find(params.merge(per_page: 1)) || [] entities.first end private def mixin_class unless CurrencyCloud.const_defined?(resource.capitalize) CurrencyCloud.const_set(resource.capitalize, Class.new(CurrencyCloud::ResourcefulCollection)) end CurrencyCloud.const_get(resource.capitalize) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems