{-# LANGUAGE TemplateHaskell #-} module PayPal.Adaptive.Core.PayResponse.PaymentInfo.TransactionId where import Import newtype TransactionId = TransactionId { _unTransactionId :: Text } deriving (Eq, Show) instance FromJSON TransactionId where parseJSON = withText "TransactionId" $ return . TransactionId instance ToJSON TransactionId where toJSON (TransactionId a) = toJSON a $(makeLenses ''TransactionId)