Created
September 11, 2018 10:30
-
-
Save rafaels88/a0de3e1b5154dd0063de83fb9e0631af to your computer and use it in GitHub Desktop.
Quiqup - Opus Step
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Quiqup.DispatchOrderStagePipeline do | |
use Opus.Pipeline | |
step :assign_courier | |
step :next_stage | |
def assign_courier(%{order: order} = pipeline) do | |
put_in(pipeline, [:courier], order.courier) | |
end | |
def next_stage(%{order: order, courier: courier}) do | |
# ... | |
end | |
end | |
Quiqup.DispatchOrderStagePipeline.call(%{order: order}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment