Module: Paymill::Restful::Find

Included in:
Base
Defined in:
lib/paymill/restful/methods.rb

Instance Method Summary collapse

Instance Method Details

#find(model) ⇒ Object



31
32
33
34
35
# File 'lib/paymill/restful/methods.rb', line 31

def find( model )
  model = model.id if model.is_a? self
  response = Paymill.request( Http.get( Restful.demodulize_and_tableize( name ), model ) )
  new( response['data'] )
end