Safe Haskell | None |
---|
- data Security = Signature ByteString
- data Credentials = Credentials {}
- data Status res
- = Success res
- | Failure [Message]
- | ParseFailure [(ByteString, ByteString)] String
- class ToText a where
- toText :: a -> ByteString
- class FromText a where
- fromText :: ByteString -> Maybe a
- class ToVariables a where
- toVariables :: a -> [(ByteString, ByteString)]
- class FromVariables a where
- fromVariables :: Map ByteString ByteString -> Either String a
- class ToVariables req => PayPalRequest req where
- data PayPalResponse req :: *
- decodeResponse :: Map ByteString ByteString -> Status (PayPalResponse req)
- decodeResponseChecking :: PayPalRequest req => [(ByteString, ByteString)] -> Status (PayPalResponse req)
- toTextTime :: FormatTime t => t -> ByteString
- fromTextTime :: ParseTime t => ByteString -> Maybe t
Types
Security. Signature only at present: Certificate security is not yet supported.
data Credentials Source
Credentials | |
|
Success res | |
Failure [Message] | |
ParseFailure [(ByteString, ByteString)] String |
Classes
toText :: a -> ByteStringSource
fromText :: ByteString -> Maybe aSource
class ToVariables a whereSource
toVariables :: a -> [(ByteString, ByteString)]Source
ToVariables GetButtonDetails | |
ToVariables Options | |
ToVariables Subscription | |
ToVariables ShoppingCart | |
ToVariables Payment | |
FormatTime t => ToVariables (ButtonSearch t) | |
ButtonType bt => ToVariables (Item bt) | |
(ToText (NONHOSTED buttonCode), ButtonType bt) => ToVariables (CreateButton (NONHOSTED buttonCode) bt) | |
ButtonType bt => ToVariables (CreateButton HOSTED bt) |
class FromVariables a whereSource
class ToVariables req => PayPalRequest req whereSource
data PayPalResponse req :: *Source
decodeResponse :: Map ByteString ByteString -> Status (PayPalResponse req)Source
PayPalRequest GetButtonDetails | |
(FormatTime t, ParseTime t) => PayPalRequest (ButtonSearch t) | |
(ToText (NONHOSTED buttonCode), ButtonType bt) => PayPalRequest (CreateButton (NONHOSTED buttonCode) bt) | |
ButtonType bt => PayPalRequest (CreateButton HOSTED bt) |
Helpers
decodeResponseChecking :: PayPalRequest req => [(ByteString, ByteString)] -> Status (PayPalResponse req)Source
Check for errors, then delegate to decodeResponse if there aren't any.
toTextTime :: FormatTime t => t -> ByteStringSource
fromTextTime :: ParseTime t => ByteString -> Maybe tSource