lib/magento/order.rb in magentor-0.1.8 vs lib/magento/order.rb in magentor-0.1.9
- old
+ new
@@ -82,17 +82,15 @@
# mixed orderIncrementId - order increment id
def cancel(*args)
commit('cancel', *args)
end
- def order_items
- self.items.collect do |item|
- OrderItem.new(item)
- end
+ def find_by_id(id)
+ info(list.select { |o| o.id == id }.first.increment_id)
end
- def find_by_id(id)
+ def find_by_increment_id(id)
info(id)
end
def find(find_type, options = {})
filters = {}
@@ -101,9 +99,15 @@
if find_type == :first
results.first
else
results
end
+ end
+ end
+
+ def order_items
+ self.items.collect do |item|
+ OrderItem.new(item)
end
end
end
end
\ No newline at end of file