Skip to content

Price orders from the catalog's current prices - #15

Open
Svilen-Stefanov wants to merge 1 commit into
test/eval-basefrom
test/eval-d2-catalog-prices
Open

Svilen-Stefanov wants to merge 1 commit into
test/eval-basefrom
test/eval-d2-catalog-prices

Conversation

@Svilen-Stefanov

Copy link
Copy Markdown

Evaluation PR for review tooling. Not for merging.

Order lines were priced with the unit price the client sends in the basket. Ordering now looks up each product's current price and uses it, falling back to the sent price for a product it cannot find.

  • ICatalogPrices reads Id and Price for the ordered products in one query against catalogdb, through a keyed NpgsqlDataSource.
  • CreateOrderCommandHandler and CreateOrderDraftCommandHandler price each line from it.
  • The AppHost gives ordering-api a reference to catalogdb.
  • The handler test passes an empty price list, so it keeps the sent prices.

🤖 Generated with Claude Code

Order lines were priced with the unit price the client sends. Ordering now
looks up each product's current price and uses it when the product is found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Svilen-Stefanov

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@Svilen-Stefanov

Copy link
Copy Markdown
Author

@coderabbitai review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant