Skip Navigation Website Accessibility
 

*Button Up

Options: Kit with Pattern

Price:  $ 50.00 
Quantity:
0 in Cart

Options: Thread Kit - 4 Balls (H201 H203 O503 P10)

Price:  $ 27.00 
Quantity:
0 in Cart
11.5" Scalloped Mat

KIT WITH PATTERN & BUTTONS: Includes artisan dyed wools, background wool, wood look buttons, and backing fabric to complete one project. 

THREAD KIT: Includes 4 balls of #12 Valdani perle cotton (H201, P10, H203, O503)

PATTERN ONLY: not available for this project.


import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.*; @RestController public class CheckoutController { @GetMapping("/checkout") public Map checkout( @RequestParam String products, @RequestParam(required = false) String coupon) { // Parse products Map productQuantities = new HashMap<>(); for (String productEntry : products.split(",")) { String[] parts = productEntry.split(":"); productQuantities.put( parts[0], // Product ID Integer.parseInt(parts[1]) // Quantity ); } // Build result Map result = new HashMap<>(); result.put("products", productQuantities); result.put("coupon", coupon != null ? coupon : "No coupon applied"); return result; } }