5.5 Run it
dotnet run --urls http://localhost:5080grace has never ordered. Her first order comes to 74.00, under the live rule's 100:
curl -X POST http://localhost:5080/orders -H 'Content-Type: application/json' \
-d '{"customerId":"grace","paymentToken":"tok_visa","lines":[{"sku":"TEE","quantity":2},{"sku":"MUG","quantity":2}]}'It goes through. hopper has never ordered either, and orders nine mugs, 108.00:
curl -X POST http://localhost:5080/orders -H 'Content-Type: application/json' \
-d '{"customerId":"hopper","paymentToken":"tok_visa","lines":[{"sku":"MUG","quantity":9}]}'"We could not take this order without a check. You have not been charged."Nothing was reserved and nobody was charged: the train stopped at the gate.
SDK Reference
Gate | Decide | AddDecisionRecording | Write a decider | Try a decider in shadow | Test a train's decisions
Next: 5.6 Read the decisions