feat: Implement Cancel Order functionality with command, handler, and validation
This commit is contained in:
@@ -64,6 +64,12 @@ service UserOrderContract
|
||||
};
|
||||
|
||||
// Order Management
|
||||
rpc CancelOrder(CancelOrderRequest) returns (CancelOrderResponse){
|
||||
option (google.api.http) = {
|
||||
post: "/CancelOrder"
|
||||
body: "*"
|
||||
};
|
||||
};
|
||||
rpc UpdateOrderStatus(UpdateOrderStatusRequest) returns (UpdateOrderStatusResponse){
|
||||
option (google.api.http) = {
|
||||
post: "/UpdateOrderStatus"
|
||||
@@ -342,3 +348,19 @@ message DecimalValue
|
||||
|
||||
sfixed32 nanos = 2;
|
||||
}
|
||||
|
||||
// CancelOrder Messages
|
||||
message CancelOrderRequest
|
||||
{
|
||||
int64 order_id = 1;
|
||||
string cancel_reason = 2;
|
||||
bool refund_payment = 3;
|
||||
}
|
||||
|
||||
message CancelOrderResponse
|
||||
{
|
||||
int64 order_id = 1;
|
||||
int32 status = 2;
|
||||
string message = 3;
|
||||
bool refund_processed = 4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user