Pārlūkot izejas kodu

just use Order.find instead of load_attributes_from_response

Neil Costford 11 gadi atpakaļ
vecāks
revīzija
519325ec81
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  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