Skip to content

Instantly share code, notes, and snippets.

@surrealdetective
Last active March 17, 2020 01:17
Show Gist options
  • Save surrealdetective/568f225b3aba7dad647fff68226f7c66 to your computer and use it in GitHub Desktop.
Save surrealdetective/568f225b3aba7dad647fff68226f7c66 to your computer and use it in GitHub Desktop.
inventory_location_ids = Inventory::Location.for_market('BAY').pluck(:id)
orders =
Order
.for_partner(:att)
.active
.where(inventory_location_id: inventory_location_ids)
# orders = Order.where(public_id: [list])
orders.each do |order|
OrdersCommands::EnableDropOff.new(
order: order,
created_by: Employee.system,
reason: DropOffDetail::MANUAL_CONVERT_LIST_OF_ORDERS,
disable_notification: true,
)
)
WindowsCommands::ScheduleDropOff.new(order: order, date: drop_off_date, created_by: Employee.system).call!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment