Browse Source

Merge pull request #63 from Shopify/feature/expose_smartcollection#order

add order to ShopifyAPI::SmartCollection
Neil Costford 11 years ago
parent
commit
c9a53d6157
1 changed files with 5 additions and 0 deletions
  1. 5 0
      lib/shopify_api/resources/smart_collection.rb

+ 5 - 0
lib/shopify_api/resources/smart_collection.rb

@@ -6,5 +6,10 @@ module ShopifyAPI
     def products
       Product.find(:all, :params => {:collection_id => self.id})
     end
+
+    def order(options={})
+      load_attributes_from_response(put(:order, options, only_id))
+    end
+
   end
 end