Copyright | (c) David Johnson 2014 |
---|---|
Maintainer | djohnson.m@gmail.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
https://stripe.com/docs/api#discounts
{-# LANGUAGE OverloadedStrings #-} import Web.Stripe import Web.Stripe.Discount import Web.Stripe.Customer main :: IO () main = do let config = StripeConfig (StripeKey "secret_key") result <- stripe config $ deleteCustomerDiscount (CustomerId "customer_id") case result of Right deleteResult -> print deleteResult Left stripeError -> print stripeError
Synopsis
- data DeleteCustomerDiscount
- deleteCustomerDiscount :: CustomerId -> StripeRequest DeleteCustomerDiscount
- data DeleteSubscriptionDiscount
- deleteSubscriptionDiscount :: CustomerId -> SubscriptionId -> StripeRequest DeleteSubscriptionDiscount
- data StripeDeleteResult = StripeDeleteResult {}
- newtype CustomerId = CustomerId Text
- newtype SubscriptionId = SubscriptionId {}
- data Discount = Discount {}
API
data DeleteCustomerDiscount Source #
Instances
type StripeReturn DeleteCustomerDiscount Source # | |
Defined in Web.Stripe.Discount |
deleteCustomerDiscount Source #
:: CustomerId | The |
-> StripeRequest DeleteCustomerDiscount |
Delete Customer
Discount
by CustomerId
data DeleteSubscriptionDiscount Source #
Instances
type StripeReturn DeleteSubscriptionDiscount Source # | |
Defined in Web.Stripe.Discount |
deleteSubscriptionDiscount Source #
:: CustomerId | The |
-> SubscriptionId | The |
-> StripeRequest DeleteSubscriptionDiscount |
Delete Subscription
Discount
by CustomerId
and SubscriptionId
Types
data StripeDeleteResult Source #
JSON returned from a Stripe
deletion request
Instances
newtype CustomerId Source #
CustomerId
for a Customer
Instances
newtype SubscriptionId Source #
SubscriptionId
for a Subscription
Instances
Instances
Eq Discount Source # | |
Data Discount Source # | |
Defined in Web.Stripe.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Discount -> c Discount # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Discount # toConstr :: Discount -> Constr # dataTypeOf :: Discount -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Discount) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Discount) # gmapT :: (forall b. Data b => b -> b) -> Discount -> Discount # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Discount -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Discount -> r # gmapQ :: (forall d. Data d => d -> u) -> Discount -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Discount -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Discount -> m Discount # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Discount -> m Discount # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Discount -> m Discount # | |
Ord Discount Source # | |
Defined in Web.Stripe.Types | |
Read Discount Source # | |
Show Discount Source # | |
FromJSON Discount Source # | JSON Instance for |