| Copyright | (c) David Johnson 2014 |
|---|---|
| Maintainer | djohnson.m@gmail.com |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Web.Stripe
Description
import Web.Stripe
import Web.Stripe.Account
main :: IO ()
main = do
let config = StripeConfig "secret_key"
result <- stripe config getAccountDetails
case result of
Right details -> print details
Left stripeError -> print stripeError
Synopsis
- newtype StripeKey = StripeKey {}
- data StripeConfig = StripeConfig {}
- module Web.Stripe.StripeRequest
- module Web.Stripe.Error
- stripe :: FromJSON (StripeReturn a) => StripeConfig -> StripeRequest a -> IO (Either StripeError (StripeReturn a))
- showAmount :: Currency -> Int -> String
Documentation
Stripe secret key
Constructors
| StripeKey | |
Fields | |
Instances
| Eq StripeKey | |
| Data StripeKey | |
Defined in Web.Stripe.Client Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StripeKey -> c StripeKey # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StripeKey # toConstr :: StripeKey -> Constr # dataTypeOf :: StripeKey -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StripeKey) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StripeKey) # gmapT :: (forall b. Data b => b -> b) -> StripeKey -> StripeKey # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StripeKey -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StripeKey -> r # gmapQ :: (forall d. Data d => d -> u) -> StripeKey -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> StripeKey -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> StripeKey -> m StripeKey # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StripeKey -> m StripeKey # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StripeKey -> m StripeKey # | |
| Ord StripeKey | |
| Read StripeKey | |
| Show StripeKey | |
data StripeConfig #
Stripe config
Constructors
| StripeConfig | |
Fields | |
Instances
module Web.Stripe.StripeRequest
module Web.Stripe.Error
stripe :: FromJSON (StripeReturn a) => StripeConfig -> StripeRequest a -> IO (Either StripeError (StripeReturn a)) #
Create a request to Stripes API.
This function uses the global TLS manager from http-client-tls
via getGlobalManager.