Skip to content

Commit

Permalink
backend/enhc : order creation dump
Browse files Browse the repository at this point in the history
  • Loading branch information
aayushagarwal2001 committed Dec 18, 2024
1 parent a6db5a2 commit e926f85
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,21 @@ data CreateOrderResp = CreateOrderResp
id :: Text,
order_id :: Text,
payment_links :: Maybe PaymentLinks,
sdk_payload :: SDKPayload
sdk_payload :: SDKPayload,
sdk_payload_json :: Maybe Value
}
deriving stock (Show, Generic)
deriving anyclass (FromJSON, ToJSON, ToSchema)
deriving anyclass (ToJSON, ToSchema)

instance FromJSON CreateOrderResp where
parseJSON = withObject "CreateOrderResp" $ \v -> do
status <- v .: "status"
order_id <- v .: "order_id"
id <- v .: "id"
payment_links <- v .: "payment_links"
sdk_payload <- v .: "sdk_payload"
sdk_payload_json <- v .: "sdk_payload"
return (CreateOrderResp status id order_id payment_links sdk_payload sdk_payload_json)

data PaymentLinks = PaymentLinks
{ web :: Maybe BaseUrl,
Expand Down

0 comments on commit e926f85

Please sign in to comment.