Explorar o código

just use Order.find instead of load_attributes_from_response

Neil Costford %!s(int64=11) %!d(string=hai) anos
pai
achega
519325ec81
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      lib/shopify_api/resources/customer.rb

+ 3 - 3
lib/shopify_api/resources/customer.rb

@@ -2,9 +2,9 @@ module ShopifyAPI
   class Customer < Base
     include Metafields
 
-    def orders(options = {}); load_attributes_from_response(get(:orders, options)); end
-    
-    class DefaultAddress < Base
+    def orders
+      Order.find(:all, :params => {:customer_id => self.id})
     end
+
   end
 end