Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend/enhc/ph order sdk dump #738

Open
wants to merge 1 commit into
base: prodHotPush-Common
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,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