Class: Returnly::Builders::CustomerReturn
- Inherits:
-
Object
- Object
- Returnly::Builders::CustomerReturn
- Defined in:
- lib/returnly/builders/customer_return.rb
Class Method Summary collapse
Class Method Details
.build_by_return_items(return_items) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/returnly/builders/customer_return.rb', line 5 def build_by_return_items(return_items) Spree::CustomerReturn.create( return_items: return_items, stock_location_id: stock_location_id(return_items.first) ) end |
.build_by_stock_location(stock_location) ⇒ Object
12 13 14 |
# File 'lib/returnly/builders/customer_return.rb', line 12 def build_by_stock_location(stock_location) Spree::CustomerReturn.new(stock_location: stock_location) end |