Safe Haskell | None |
---|---|
Language | Haskell2010 |
Web.Stripe.Client.HttpClient
Contents
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.
Constructors
StripeRequest | |
data StripeError #
Stripe Error
Constructors
StripeError | |
Fields |
Instances
Show StripeError | |
Defined in Web.Stripe.Error Methods showsPrec :: Int -> StripeError -> ShowS # show :: StripeError -> String # showList :: [StripeError] -> ShowS # | |
FromJSON StripeError | |
Defined in Web.Stripe.Error | |
Exception StripeError | |
Defined in Web.Stripe.Error Methods toException :: StripeError -> SomeException # fromException :: SomeException -> Maybe StripeError # displayException :: StripeError -> String # |
data StripeConfig #
Stripe config
Constructors
StripeConfig | |
Fields |
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
.