Module: Copy::Operations::Find::ClassMethods

Defined in:
lib/copy/operations/find.rb

Instance Method Summary collapse

Instance Method Details

#find(attibutes) ⇒ Copy::Base

Finds a given object

Parameters:

  • id (Integer)

    The id of the object that should be found

Returns:



9
10
11
12
13
# File 'lib/copy/operations/find.rb', line 9

def find(attibutes)
  id = attibutes.delete(:id)
  response = Copy.request(:get, nil, api_member_url({id: id}), {}, options_for_request(attributes))
  self.new(response["data"])
end