Class: Veeqo::Allocation
- Includes:
- Veeqo::Actions::Delete
- Defined in:
- lib/veeqo/allocation.rb
Instance Method Summary collapse
- #create(order_id:, warehouse_id:, line_items:) ⇒ Object
- #delete(order_id, allocation_id) ⇒ Object
- #update(allocation_id, order_id:, line_items:, **attributes) ⇒ Object
Methods inherited from Base
Instance Method Details
#create(order_id:, warehouse_id:, line_items:) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/veeqo/allocation.rb', line 5 def create(order_id:, warehouse_id:, line_items:) @order_id = order_id create_resource( warehouse_id: warehouse_id, line_items_attributes: line_items, ) end |
#delete(order_id, allocation_id) ⇒ Object
21 22 23 24 |
# File 'lib/veeqo/allocation.rb', line 21 def delete(order_id, allocation_id) @order_id = order_id super(allocation_id) end |
#update(allocation_id, order_id:, line_items:, **attributes) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/veeqo/allocation.rb', line 13 def update(allocation_id, order_id:, line_items:, **attributes) @order_id = order_id update_resource( allocation_id, attributes.merge(line_items_attributes: line_items), ) end |