浏览代码

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

add order to ShopifyAPI::SmartCollection
Neil Costford 11 年之前
父节点
当前提交
c9a53d6157
共有 1 个文件被更改,包括 5 次插入0 次删除
  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