Skip to content

Commit

Permalink
Update OrderResponse Schema (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh3305 authored Jul 9, 2023
1 parent aa0a6e7 commit 7eb390e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.hrv.mart.orderlibrary.model.order.ProductOrdered
import java.time.LocalDateTime

data class OrderResponse (
val orderId: String,
val userId: String,
val products: List<CartResponse>,
val price: Long,
Expand All @@ -15,6 +16,7 @@ data class OrderResponse (
companion object {
fun parseFrom (order: Order, productOrdered: List<ProductOrdered>) =
OrderResponse(
orderId = order.orderId,
userId = order.userId,
price = order.price,
products = productOrdered
Expand Down

0 comments on commit 7eb390e

Please sign in to comment.