Skip to content
Merged
Show file tree
Hide file tree
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 @@ -999,7 +999,9 @@ mkOfferResp offer = do
cashbackAmount = read $ T.unpack order_breakup.cashback_amount,
benefitType = benefitType',
offerCode = offer_code,
productDiscounts
productDiscounts,
minimumAmount = Nothing,
counters = Nothing
}
where
Juspay.OfferResp {offer_id, status, offer_code, offer_description, ui_configs, order_breakup} = offer
Expand Down
12 changes: 11 additions & 1 deletion lib/mobility-core/src/Kernel/External/Payment/Interface/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,17 @@ data OfferResp = OfferResp
cashbackAmount :: HighPrecMoney,
benefitType :: Text, -- "CASHBACK" or "DISCOUNT"
offerCode :: Text,
productDiscounts :: Maybe [ProductDiscount]
productDiscounts :: Maybe [ProductDiscount],
minimumAmount :: Maybe HighPrecMoney,
counters :: Maybe OfferCounters
}
deriving (Generic, Show, FromJSON, ToJSON)
deriving anyclass (ToSchema)

data OfferCounters = OfferCounters
{ frequencyType :: Maybe Text,
appliedCount :: Maybe Int,
maxApplyCount :: Maybe Int
}
deriving (Generic, Show, FromJSON, ToJSON)
deriving anyclass (ToSchema)
Expand Down
Loading