stripe-haskell-2.6.1: Stripe API for Haskell

Copyright(c) David Johnson 2014
Maintainerdjohnson.m@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Web.Stripe

Description

https://stripe.com/docs/api

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

Documentation

newtype StripeKey #

Stripe secret key

Constructors

StripeKey 
Instances
Eq StripeKey 
Instance details

Defined in Web.Stripe.Client

Data StripeKey 
Instance details

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 
Instance details

Defined in Web.Stripe.Client

Read StripeKey 
Instance details

Defined in Web.Stripe.Client

Show StripeKey 
Instance details

Defined in Web.Stripe.Client

data StripeConfig #

Stripe config

Instances
Eq StripeConfig 
Instance details

Defined in Web.Stripe.Client

Data StripeConfig 
Instance details

Defined in Web.Stripe.Client

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StripeConfig -> c StripeConfig #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StripeConfig #

toConstr :: StripeConfig -> Constr #

dataTypeOf :: StripeConfig -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StripeConfig) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StripeConfig) #

gmapT :: (forall b. Data b => b -> b) -> StripeConfig -> StripeConfig #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StripeConfig -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StripeConfig -> r #

gmapQ :: (forall d. Data d => d -> u) -> StripeConfig -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StripeConfig -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StripeConfig -> m StripeConfig #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StripeConfig -> m StripeConfig #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StripeConfig -> m StripeConfig #

Ord StripeConfig 
Instance details

Defined in Web.Stripe.Client

Read StripeConfig 
Instance details

Defined in Web.Stripe.Client

Show StripeConfig 
Instance details

Defined in Web.Stripe.Client

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.

showAmount #

Show an amount accounting for zero currencies

https://support.stripe.com/questions/which-zero-decimal-currencies-does-stripe-support