feat: Implement Cancel Order functionality with command, handler, and validation
This commit is contained in:
@@ -254,6 +254,7 @@ message GetWithdrawalRequestsRequest
|
||||
google.protobuf.StringValue week_number = 3;
|
||||
int32 page_index = 4;
|
||||
int32 page_size = 5;
|
||||
string iban_number = 6;
|
||||
}
|
||||
|
||||
message GetWithdrawalRequestsResponse
|
||||
@@ -277,6 +278,9 @@ message WithdrawalRequestModel
|
||||
string processed_by = 11;
|
||||
string reason = 12;
|
||||
google.protobuf.Timestamp created = 13;
|
||||
string bank_reference_id = 14;
|
||||
string bank_tracking_code = 15;
|
||||
string payment_failure_reason = 16;
|
||||
}
|
||||
|
||||
// ============ Worker Control APIs ============
|
||||
|
||||
@@ -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