Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- readPaypal :: String -> IO (Vector PaypalEntry)
- readPaypal path = do
- readBS <- Data.ByteString.Lazy.readFile path
- let eitherVector = decode HasHeader readBS
- return $ case eitherVector of
- Left errMsg -> error errMsg
- Right vec -> vec
- data PaypalEntry = PaypalEntry
- { peDate :: Text
- , peTime :: Text
- , peTimeZone :: Text
- , peName :: Text
- , peType :: Text
- , peStatus :: Text
- , peCurrency :: Text
- , peAmount :: Text
- , peReceiptID :: Text
- , peBalance :: Text
- } deriving (Generic, Show)
- instance FromRecord PaypalEntry
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement