update cart
This commit is contained in:
@@ -169,6 +169,25 @@ class ApiConstants {
|
||||
/// GET /categories/{categoryId}/products
|
||||
static const String getProductsByCategory = '/categories';
|
||||
|
||||
// ============================================================================
|
||||
// Cart Endpoints (Frappe ERPNext)
|
||||
// ============================================================================
|
||||
|
||||
/// Add items to cart
|
||||
/// POST /api/method/building_material.building_material.api.user_cart.add_to_cart
|
||||
/// Body: { "items": [{ "item_id": "...", "amount": 0, "quantity": 0 }] }
|
||||
static const String addToCart = '/building_material.building_material.api.user_cart.add_to_cart';
|
||||
|
||||
/// Remove items from cart
|
||||
/// POST /api/method/building_material.building_material.api.user_cart.remove_from_cart
|
||||
/// Body: { "item_ids": ["item_id1", "item_id2"] }
|
||||
static const String removeFromCart = '/building_material.building_material.api.user_cart.remove_from_cart';
|
||||
|
||||
/// Get user's cart items
|
||||
/// POST /api/method/building_material.building_material.api.user_cart.get_user_cart
|
||||
/// Body: { "limit_start": 0, "limit_page_length": 0 }
|
||||
static const String getUserCart = '/building_material.building_material.api.user_cart.get_user_cart';
|
||||
|
||||
// ============================================================================
|
||||
// Order Endpoints
|
||||
// ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user