Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6BHcz4muRH44T3br3
30 lines
1.4 KiB
Plaintext
30 lines
1.4 KiB
Plaintext
# An agent's session through the 2.2.0 SDK client: search, then callers, then source
|
|
|
|
## search_code {query: return money to the customer, k: 2}
|
|
1. 0.406 PaymentService#refund payments/src/main/java/shop/payments/PaymentService.java:23
|
|
public String refund(String customerId, BigDecimal amount)
|
|
// Returns money to the customer's card after a cancelled order.
|
|
2. 0.227 CardGateway#authorize payments/src/main/java/shop/payments/CardGateway.java:9
|
|
abstract String authorize(String customerId, BigDecimal amount)
|
|
// Asks the processor to take the amount from the customer's card. Returns a receipt id.
|
|
|
|
## find_usages {symbol: PaymentService#refund}
|
|
1 usage(s) of PaymentService#refund (resolved)
|
|
orders/src/main/java/shop/orders/OrderService.java:43 in OrderService#cancelOrder [unresolved: matched by name]
|
|
payments.refund(order.customerId(), order.total());
|
|
1 of these could not be resolved by the symbol solver; check them by hand
|
|
|
|
## get_source {name: OrderService#cancelOrder}
|
|
// orders/src/main/java/shop/orders/OrderService.java:38
|
|
/**
|
|
* Cancels an order, puts the stock back on the shelf and returns the money to the customer.
|
|
*/
|
|
public void cancelOrder(String orderId) {
|
|
Order order = orders.findById(orderId).orElseThrow();
|
|
for (String sku : order.skus()) {
|
|
inventory.release(sku, 1);
|
|
}
|
|
payments.refund(order.customerId(), order.total());
|
|
notifier.sendCancellation(order.customerId(), orderId);
|
|
}
|