| Safe Haskell | None |
|---|
Network.PayPal.Types
- 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.
Constructors
| Signature ByteString |
data Credentials Source
Constructors
| Credentials | |
Fields
| |
Constructors
| Success res | |
| Failure [Message] | |
| ParseFailure [(ByteString, ByteString)] String |
Classes
Methods
toText :: a -> ByteStringSource
Instances
Methods
fromText :: ByteString -> Maybe aSource
class ToVariables a whereSource
Methods
toVariables :: a -> [(ByteString, ByteString)]Source
Instances
| 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
Methods
fromVariables :: Map ByteString ByteString -> Either String aSource
Instances
class ToVariables req => PayPalRequest req whereSource
Associated Types
data PayPalResponse req :: *Source
Methods
decodeResponse :: Map ByteString ByteString -> Status (PayPalResponse req)Source
Instances
| 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