| 
					
				 | 
			
			
				@@ -1,11 +1,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 module ShopifyAPI 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   class FulfillmentOrder < Base 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    def self.all(options = {}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      order_id = options.dig(:params, :order_id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      raise ShopifyAPI::ValidationException, "'order_id' is required" if order_id.nil? || order_id == '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    def self.find(scope, *args) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if scope == :all 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        order_id = args.first&.dig(:params, :order_id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        raise ShopifyAPI::ValidationException, "'order_id' is required" if order_id.blank? 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      order = ::ShopifyAPI::Order.new(id: order_id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      order.fulfillment_orders 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        order = ::ShopifyAPI::Order.new(id: order_id) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        order.fulfillment_orders(args.first[:params].except(:order_id)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        super(scope, *args) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      end 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     end 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     def fulfillments(options = {}) 
			 |