Skip to content

Commit 9caef27

Browse files
authored
BAM-284: add idempotency support for ordering sdk (#79)
**Associated JIRA tasks** BAM-284: https://kodypay.atlassian.net/browse/BAM-284 **What the code does.** Introduce intempotency_uuid to the update status and refund methods. **Does this code change break backwards compatibility?.** Yes, I have change the order of the fields UpdateStatus endpoint and RefundStatus. However, they are not used by any customer yet. Will inform Blackfire integration engineer who is current implementing the updateStatus endpoint once this is release. Also, I will create a quick fix if it breaks kp-core.
1 parent 01c5341 commit 9caef27

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/proto/com/kodypay/grpc/ordering/v1/order.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ message UpdateOrderStatusRequest {
5454

5555
// New status for the order.
5656
OrderStatus new_status = 3;
57+
58+
// UUID idempotency key. Will be generated by client.
59+
string idempotency_uuid = 4;
5760
}
5861

5962
message UpdateOrderStatusResponse {
@@ -73,6 +76,8 @@ message RefundItemRequest {
7376
repeated RefundItem items = 3;
7477
// Optional reason for the refund.
7578
optional string reason = 4;
79+
// UUID idempotency key. Will be generated by client.
80+
string idempotency_uuid = 5;
7681

7782
message RefundItem {
7883
string order_item_id = 1;
@@ -98,6 +103,8 @@ message RefundOrderRequest {
98103
string order_id = 2;
99104
// Optional reason for the refund.
100105
optional string reason = 3;
106+
// UUID idempotency key. Will be generated by client.
107+
string idempotency_uuid = 4;
101108
}
102109

103110
// Response for refunding an entire order.

0 commit comments

Comments
 (0)