Module: PrintfulAPI::APIOperations::Get::ClassMethods

Defined in:
lib/printful_api/api_operations/get.rb

Instance Method Summary collapse

Instance Method Details

#get(id, opts = {}) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/printful_api/api_operations/get.rb', line 13

def get( id, opts={} )

	data = PrintfulAPI.request( :GET, "#{opts.delete(:resource_path) || self.resource_path}/#{id}" )

	model = self.new
	model.load_data( data )

	model

end