module Crm::Core::Mixins::Findable::ClassMethods

@api public

Public Instance Methods

find(id) click to toggle source

Returns the requested item. @param id [String] the ID of the item. @return [BasicResource] @raise [Errors::ResourceNotFound]

if the ID could not be found or the base type did not match.

@api public

# File lib/crm/core/mixins/findable.rb, line 18
def find(id)
  if id.blank?
    raise Crm::Errors::ResourceNotFound.new(
        "Items could not be found.", [id])
  end
  new({'id' => id}).reload
end