Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data StripeRequest a = StripeRequest {}
- data StripeError = StripeError {}
- data StripeConfig = StripeConfig {}
- stripe :: FromJSON (StripeReturn a) => StripeConfig -> StripeRequest a -> IO (Either StripeError (StripeReturn a))
- stripeManager :: FromJSON (StripeReturn a) => Manager -> StripeConfig -> StripeRequest a -> IO (Either StripeError (StripeReturn a))
- stripeConn :: FromJSON (StripeReturn a) => Manager -> StripeConfig -> StripeRequest a -> IO (Either StripeError (StripeReturn a))
- withConnection :: (Manager -> IO (Either StripeError a)) -> IO (Either StripeError a)
- withManager :: (Manager -> IO (Either StripeError a)) -> IO (Either StripeError a)
- callAPI :: Manager -> (Value -> Result b) -> StripeConfig -> StripeRequest a -> IO (Either StripeError b)
Documentation
data StripeRequest a #
Stripe Request holding Method
, URL and Params
for a Request. Also
includes the function needed to decode the response.
data StripeError #
Stripe Error
Instances
Show StripeError | |
Defined in Web.Stripe.Error showsPrec :: Int -> StripeError -> ShowS # show :: StripeError -> String # showList :: [StripeError] -> ShowS # | |
FromJSON StripeError | |
Defined in Web.Stripe.Error parseJSON :: Value -> Parser StripeError # parseJSONList :: Value -> Parser [StripeError] # | |
Exception StripeError | |
Defined in Web.Stripe.Error |
data StripeConfig #
Stripe config
Instances
stripe :: FromJSON (StripeReturn a) => StripeConfig -> StripeRequest a -> IO (Either StripeError (StripeReturn a)) Source #
Create a request to Stripe
s API.
This function uses the global TLS manager from http-client-tls
via getGlobalManager
.
stripeManager :: FromJSON (StripeReturn a) => Manager -> StripeConfig -> StripeRequest a -> IO (Either StripeError (StripeReturn a)) Source #
Create a request to Stripe
s API using a Manager
.
stripeConn :: FromJSON (StripeReturn a) => Manager -> StripeConfig -> StripeRequest a -> IO (Either StripeError (StripeReturn a)) Source #
low-level
withConnection :: (Manager -> IO (Either StripeError a)) -> IO (Either StripeError a) Source #
withManager :: (Manager -> IO (Either StripeError a)) -> IO (Either StripeError a) Source #
callAPI :: Manager -> (Value -> Result b) -> StripeConfig -> StripeRequest a -> IO (Either StripeError b) Source #
Create a request to Stripe
s API using an existing Manager
This is a low-level function. In most cases you probably want to
use stripe
or stripeManager
.