Class: Magento::OrderItem
- Inherits:
-
Base
- Object
- Base
- Magento::OrderItem
show all
- Defined in:
- lib/magento/order_item.rb
Instance Attribute Summary
Attributes inherited from Base
#attributes
Class Method Summary
collapse
Instance Method Summary
collapse
#api_path, #commit
#id=, #initialize, #method_missing, #object_attributes=
Class Method Details
.find_by_order_id_and_id(order_id, id) ⇒ Object
8
9
10
|
# File 'lib/magento/order_item.rb', line 8
def find_by_order_id_and_id(order_id, id)
Magento::Order.find_by_id(order_id).order_items.select{ |i| i.id == id }.first
end
|
.find_by_order_number_and_id(order_number, id) ⇒ Object
4
5
6
|
# File 'lib/magento/order_item.rb', line 4
def find_by_order_number_and_id(order_number, id)
Magento::Order.find_by_increment_id(order_number).order_items.select{ |i| i.id == id }.first
end
|
Instance Method Details
#id ⇒ Object
13
14
15
|
# File 'lib/magento/order_item.rb', line 13
def id
self.item_id
end
|