Module: PrintfulAPI::APIOperations::List::ClassMethods
- Defined in:
- lib/printful_api/api_operations/list.rb
Instance Method Summary collapse
- #list(filters = {}, opts = {}) ⇒ Object (also: #all)
Instance Method Details
#list(filters = {}, opts = {}) ⇒ Object Also known as: all
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/printful_api/api_operations/list.rb', line 13 def list( filters={}, opts={} ) data_list = PrintfulAPI.request( :GET, opts.delete(:resource_path) || self.resource_path, params: filters ) data_list.collect do |data| model = self.new model.load_data( data ) model end end |