lib/magento/order.rb in magentor-0.2.12 vs lib/magento/order.rb in magentor-0.2.13
- old
+ new
@@ -94,9 +94,12 @@
def find(find_type, options = {})
filters = {}
options.each_pair { |k, v| filters[k] = {:eq => v} }
results = list(filters)
+
+ raise ApiError "100 -> Requested order not exists." if results.blank?
+
if find_type == :first
info(results.first.increment_id)
else
results.collect do |o|
info(o.increment_id)
\ No newline at end of file