class Veeqo::Allocation
Public Instance Methods
create(order_id:, warehouse_id:, line_items:)
click to toggle source
# 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)
click to toggle source
Calls superclass method
Veeqo::Actions::Delete#delete
# 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)
click to toggle source
# 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
Private Instance Methods
end_point()
click to toggle source
# File lib/veeqo/allocation.rb, line 28 def end_point ["orders", @order_id, "allocations"].compact.join("/") end