stripe-core-2.3.0: Stripe API for Haskell - Pure Core

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

Web.Stripe.Subscription

Contents

Description

https://stripe.com/docs/api#subscriptions

{-# LANGUAGE OverloadedStrings #-}
import Web.Stripe
import Web.Stripe.Subscription
import Web.Stripe.Customer
import Web.Stripe.Plan

main :: IO ()
main = do
  let config = StripeConfig (StripeKey "secret_key")
  result <- stripe config $ createCustomer
  case result of
    (Left stripeError) -> print stripeError
    (Right (Customer { customerId = cid })) -> do
      result <- stripe config $ createPlan (PlanId "free plan")
                                           (Amount 0)
                                           USD
                                           Month
                                           (PlanName "sample plan")
      case result of
        (Left stripeError) -> print stripeError
        (Right (Plan { planId = pid })) -> do
           result <- stripe config $ createSubscription cid pid
           case result of
             (Left stripeError)   -> print stripeError
             (Right subscription) -> print subscription

Synopsis

API

createSubscription #

Arguments

:: CustomerId

The CustomerId upon which to create the Subscription

-> PlanId

The PlanId to associate the Subscription with

-> StripeRequest CreateSubscription 

Types

newtype ApplicationFeePercent #

ApplicationFeePercent

Instances

Eq ApplicationFeePercent # 
Data ApplicationFeePercent # 

Methods

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

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

toConstr :: ApplicationFeePercent -> Constr #

dataTypeOf :: ApplicationFeePercent -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord ApplicationFeePercent # 
Read ApplicationFeePercent # 
Show ApplicationFeePercent # 
ToStripeParam ApplicationFeePercent # 
StripeHasParam UpdateSubscription ApplicationFeePercent # 
StripeHasParam CreateSubscription ApplicationFeePercent # 

newtype AtPeriodEnd #

A flag that if set to true will delay the cancellation of the subscription until the end of the current period.

Constructors

AtPeriodEnd Bool 

Instances

Eq AtPeriodEnd # 
Data AtPeriodEnd # 

Methods

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

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

toConstr :: AtPeriodEnd -> Constr #

dataTypeOf :: AtPeriodEnd -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord AtPeriodEnd # 
Read AtPeriodEnd # 
Show AtPeriodEnd # 
ToStripeParam AtPeriodEnd # 
StripeHasParam CancelSubscription AtPeriodEnd # 

newtype CustomerId #

Constructors

CustomerId Text 

Instances

Eq CustomerId # 
Data CustomerId # 

Methods

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

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

toConstr :: CustomerId -> Constr #

dataTypeOf :: CustomerId -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord CustomerId # 
Read CustomerId # 
Show CustomerId # 
FromJSON CustomerId #

JSON Instance for CustomerId

ToStripeParam CustomerId # 
StripeHasParam CreateCardToken CustomerId # 
StripeHasParam GetInvoiceItems CustomerId # 
StripeHasParam GetInvoiceLineItems CustomerId # 
StripeHasParam GetCharges CustomerId # 
StripeHasParam CreateCharge CustomerId # 
StripeHasParam GetCustomers (EndingBefore CustomerId) # 
StripeHasParam GetCustomers (StartingAfter CustomerId) # 
type ExpandsTo CustomerId # 

newtype CouponId #

Constructors

CouponId Text 

Instances

Eq CouponId # 
Data CouponId # 

Methods

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

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

toConstr :: CouponId -> Constr #

dataTypeOf :: CouponId -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord CouponId # 
Read CouponId # 
Show CouponId # 
ToStripeParam CouponId # 
StripeHasParam UpdateSubscription CouponId # 
StripeHasParam CreateSubscription CouponId # 
StripeHasParam UpdateCustomer CouponId # 
StripeHasParam CreateCustomer CouponId # 
StripeHasParam GetCoupons (EndingBefore CouponId) # 
StripeHasParam GetCoupons (StartingAfter CouponId) # 

data Coupon #

Coupon Object

Instances

Eq Coupon # 

Methods

(==) :: Coupon -> Coupon -> Bool #

(/=) :: Coupon -> Coupon -> Bool #

Data Coupon # 

Methods

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

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

toConstr :: Coupon -> Constr #

dataTypeOf :: Coupon -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord Coupon # 
Read Coupon # 
Show Coupon # 
FromJSON Coupon #

JSON Instance for Coupon

newtype EndingBefore a #

Pagination Option for StripeList

Constructors

EndingBefore a 

Instances

StripeHasParam GetTransfers (EndingBefore TransferId) # 
StripeHasParam GetSubscriptionsByCustomerId (EndingBefore SubscriptionId) # 
StripeHasParam GetSubscriptions (EndingBefore SubscriptionId) # 
StripeHasParam GetRefunds (EndingBefore RefundId) # 
StripeHasParam GetRecipients (EndingBefore RecipientId) # 
StripeHasParam GetPlans (EndingBefore PlanId) # 
StripeHasParam GetInvoiceItems (EndingBefore InvoiceItemId) # 
StripeHasParam GetInvoiceLineItems (EndingBefore InvoiceLineItemId) # 
StripeHasParam GetInvoices (EndingBefore InvoiceId) # 
StripeHasParam GetEvents (EndingBefore EventId) # 
StripeHasParam GetCustomers (EndingBefore CustomerId) # 
StripeHasParam GetCoupons (EndingBefore CouponId) # 
StripeHasParam GetCharges (EndingBefore ChargeId) # 
StripeHasParam GetRecipientCards (EndingBefore CardId) # 
StripeHasParam GetCustomerCards (EndingBefore CardId) # 
StripeHasParam GetBalanceTransactionHistory (EndingBefore TransactionId) # 
StripeHasParam GetApplicationFeeRefunds (EndingBefore RefundId) # 
StripeHasParam GetApplicationFees (EndingBefore ApplicationFeeId) # 
Eq a => Eq (EndingBefore a) # 
Data a => Data (EndingBefore a) # 

Methods

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

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

toConstr :: EndingBefore a -> Constr #

dataTypeOf :: EndingBefore a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (EndingBefore a) # 
Read a => Read (EndingBefore a) # 
Show a => Show (EndingBefore a) # 
ToStripeParam param => ToStripeParam (EndingBefore param) # 

newtype ExpandParams #

Type of Expansion Parameters for use on Stripe objects

Constructors

ExpandParams 

Fields

Instances

Eq ExpandParams # 
Data ExpandParams # 

Methods

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

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

toConstr :: ExpandParams -> Constr #

dataTypeOf :: ExpandParams -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord ExpandParams # 
Read ExpandParams # 
Show ExpandParams # 
ToStripeParam ExpandParams # 
StripeHasParam GetTransfers ExpandParams # 
StripeHasParam GetTransfer ExpandParams # 
StripeHasParam GetSubscriptionsByCustomerId ExpandParams # 
StripeHasParam GetSubscriptions ExpandParams # 
StripeHasParam GetSubscription ExpandParams # 
StripeHasParam GetRefunds ExpandParams # 
StripeHasParam GetRefund ExpandParams # 
StripeHasParam GetRecipients ExpandParams # 
StripeHasParam GetRecipient ExpandParams # 
StripeHasParam GetInvoiceItems ExpandParams # 
StripeHasParam GetInvoiceItem ExpandParams # 
StripeHasParam GetInvoices ExpandParams # 
StripeHasParam GetInvoice ExpandParams # 
StripeHasParam GetCustomers ExpandParams # 
StripeHasParam GetCustomer ExpandParams # 
StripeHasParam GetCharges ExpandParams # 
StripeHasParam GetCharge ExpandParams # 
StripeHasParam CreateCharge ExpandParams # 
StripeHasParam GetRecipientCards ExpandParams # 
StripeHasParam GetCustomerCards ExpandParams # 
StripeHasParam GetRecipientCard ExpandParams # 
StripeHasParam GetCustomerCard ExpandParams # 
StripeHasParam GetBalanceTransaction ExpandParams # 
StripeHasParam GetApplicationFeeRefunds ExpandParams # 
StripeHasParam GetApplicationFeeRefund ExpandParams # 
StripeHasParam GetApplicationFees ExpandParams # 
StripeHasParam GetApplicationFee ExpandParams # 

newtype Limit #

Pagination Option for StripeList

Constructors

Limit Int 

Instances

Eq Limit # 

Methods

(==) :: Limit -> Limit -> Bool #

(/=) :: Limit -> Limit -> Bool #

Data Limit # 

Methods

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

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

toConstr :: Limit -> Constr #

dataTypeOf :: Limit -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord Limit # 

Methods

compare :: Limit -> Limit -> Ordering #

(<) :: Limit -> Limit -> Bool #

(<=) :: Limit -> Limit -> Bool #

(>) :: Limit -> Limit -> Bool #

(>=) :: Limit -> Limit -> Bool #

max :: Limit -> Limit -> Limit #

min :: Limit -> Limit -> Limit #

Read Limit # 
Show Limit # 

Methods

showsPrec :: Int -> Limit -> ShowS #

show :: Limit -> String #

showList :: [Limit] -> ShowS #

ToStripeParam Limit # 
StripeHasParam GetTransfers Limit # 
StripeHasParam GetSubscriptionsByCustomerId Limit # 
StripeHasParam GetSubscriptions Limit # 
StripeHasParam GetRefunds Limit # 
StripeHasParam GetRecipients Limit # 
StripeHasParam GetPlans Limit # 
StripeHasParam GetInvoiceItems Limit # 
StripeHasParam GetInvoiceLineItems Limit # 
StripeHasParam GetInvoices Limit # 
StripeHasParam GetEvents Limit # 
StripeHasParam GetCustomers Limit # 
StripeHasParam GetCoupons Limit # 
StripeHasParam GetCharges Limit # 
StripeHasParam GetRecipientCards Limit # 
StripeHasParam GetCustomerCards Limit # 
StripeHasParam GetBalanceTransactionHistory Limit # 
StripeHasParam GetApplicationFeeRefunds Limit # 
StripeHasParam GetApplicationFees Limit # 

newtype MetaData #

Type of MetaData for use on Stripe objects

Constructors

MetaData [(Text, Text)] 

Instances

Eq MetaData # 
Data MetaData # 

Methods

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

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

toConstr :: MetaData -> Constr #

dataTypeOf :: MetaData -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord MetaData # 
Read MetaData # 
Show MetaData # 
FromJSON MetaData # 
ToStripeParam MetaData # 
StripeHasParam UpdateTransfer MetaData # 
StripeHasParam CreateTransfer MetaData # 
StripeHasParam UpdateSubscription MetaData # 
StripeHasParam CreateSubscription MetaData # 
StripeHasParam UpdateRefund MetaData # 
StripeHasParam CreateRefund MetaData # 
StripeHasParam UpdateRecipient MetaData # 
StripeHasParam CreateRecipient MetaData # 
StripeHasParam UpdatePlan MetaData # 
StripeHasParam CreatePlan MetaData # 
StripeHasParam UpdateInvoiceItem MetaData # 
StripeHasParam CreateInvoiceItem MetaData # 
StripeHasParam UpdateInvoice MetaData # 
StripeHasParam CreateInvoice MetaData # 
StripeHasParam UpdateDispute MetaData # 
StripeHasParam UpdateCustomer MetaData # 
StripeHasParam CreateCustomer MetaData # 
StripeHasParam UpdateCoupon MetaData # 
StripeHasParam CreateCoupon MetaData # 
StripeHasParam UpdateCharge MetaData # 
StripeHasParam CreateCharge MetaData # 
StripeHasParam UpdateApplicationFeeRefund MetaData # 
StripeHasParam CreateApplicationFeeRefund MetaData # 

newtype PlanId #

PlanId for a Plan

Constructors

PlanId Text 

Instances

Eq PlanId # 

Methods

(==) :: PlanId -> PlanId -> Bool #

(/=) :: PlanId -> PlanId -> Bool #

Data PlanId # 

Methods

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

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

toConstr :: PlanId -> Constr #

dataTypeOf :: PlanId -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord PlanId # 
Read PlanId # 
Show PlanId # 
ToStripeParam PlanId # 
StripeHasParam UpdateSubscription PlanId # 
StripeHasParam CreateCustomer PlanId # 
StripeHasParam GetPlans (EndingBefore PlanId) # 
StripeHasParam GetPlans (StartingAfter PlanId) # 

newtype Prorate #

Prorate

Constructors

Prorate Bool 

Instances

Eq Prorate # 

Methods

(==) :: Prorate -> Prorate -> Bool #

(/=) :: Prorate -> Prorate -> Bool #

Data Prorate # 

Methods

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

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

toConstr :: Prorate -> Constr #

dataTypeOf :: Prorate -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord Prorate # 
Read Prorate # 
Show Prorate # 
ToStripeParam Prorate # 
StripeHasParam UpdateSubscription Prorate # 
StripeHasParam CreateSubscription Prorate # 

newtype Quantity #

Generic Quantity type to be used with Customer, Subscription and InvoiceLineItem API requests

Constructors

Quantity Int 

Instances

Eq Quantity # 
Data Quantity # 

Methods

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

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

toConstr :: Quantity -> Constr #

dataTypeOf :: Quantity -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord Quantity # 
Read Quantity # 
Show Quantity # 
ToStripeParam Quantity # 
StripeHasParam UpdateSubscription Quantity # 
StripeHasParam CreateSubscription Quantity # 
StripeHasParam CreateCustomer Quantity # 

newtype StartingAfter a #

Pagination Option for StripeList

Constructors

StartingAfter a 

Instances

StripeHasParam GetTransfers (StartingAfter TransferId) # 
StripeHasParam GetSubscriptionsByCustomerId (StartingAfter SubscriptionId) # 
StripeHasParam GetSubscriptions (StartingAfter SubscriptionId) # 
StripeHasParam GetRefunds (StartingAfter RefundId) # 
StripeHasParam GetRecipients (StartingAfter RecipientId) # 
StripeHasParam GetPlans (StartingAfter PlanId) # 
StripeHasParam GetInvoiceItems (StartingAfter InvoiceItemId) # 
StripeHasParam GetInvoiceLineItems (StartingAfter InvoiceLineItemId) # 
StripeHasParam GetInvoices (StartingAfter InvoiceId) # 
StripeHasParam GetEvents (StartingAfter EventId) # 
StripeHasParam GetCustomers (StartingAfter CustomerId) # 
StripeHasParam GetCoupons (StartingAfter CouponId) # 
StripeHasParam GetCharges (StartingAfter ChargeId) # 
StripeHasParam GetRecipientCards (StartingAfter CardId) # 
StripeHasParam GetCustomerCards (StartingAfter CardId) # 
StripeHasParam GetBalanceTransactionHistory (StartingAfter TransactionId) # 
StripeHasParam GetApplicationFeeRefunds (StartingAfter RefundId) # 
StripeHasParam GetApplicationFees (StartingAfter ApplicationFeeId) # 
Eq a => Eq (StartingAfter a) # 
Data a => Data (StartingAfter a) # 

Methods

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

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

toConstr :: StartingAfter a -> Constr #

dataTypeOf :: StartingAfter a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (StartingAfter a) # 
Read a => Read (StartingAfter a) # 
Show a => Show (StartingAfter a) # 
ToStripeParam param => ToStripeParam (StartingAfter param) # 

data StripeList a #

Generic handling of Stripe JSON arrays

Constructors

StripeList 

Fields

Instances

Eq a => Eq (StripeList a) # 

Methods

(==) :: StripeList a -> StripeList a -> Bool #

(/=) :: StripeList a -> StripeList a -> Bool #

Data a => Data (StripeList a) # 

Methods

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

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

toConstr :: StripeList a -> Constr #

dataTypeOf :: StripeList a -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord a => Ord (StripeList a) # 
Read a => Read (StripeList a) # 
Show a => Show (StripeList a) # 
FromJSON a => FromJSON (StripeList a) #

JSON Instance for StripeList

data Subscription #

Subscription Object

Instances

Eq Subscription # 
Data Subscription # 

Methods

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

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

toConstr :: Subscription -> Constr #

dataTypeOf :: Subscription -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord Subscription # 
Read Subscription # 
Show Subscription # 
FromJSON Subscription #

JSON Instance for Subscription

newtype SubscriptionId #

Constructors

SubscriptionId 

Instances

Eq SubscriptionId # 
Data SubscriptionId # 

Methods

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

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

toConstr :: SubscriptionId -> Constr #

dataTypeOf :: SubscriptionId -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord SubscriptionId # 
Read SubscriptionId # 
Show SubscriptionId # 
FromJSON SubscriptionId #

JSON Instance for SubscriptionId

ToStripeParam SubscriptionId # 
StripeHasParam CreateInvoiceItem SubscriptionId # 
StripeHasParam GetUpcomingInvoice SubscriptionId # 
StripeHasParam GetInvoiceLineItems SubscriptionId # 
StripeHasParam CreateInvoice SubscriptionId # 
StripeHasParam GetSubscriptionsByCustomerId (EndingBefore SubscriptionId) # 
StripeHasParam GetSubscriptionsByCustomerId (StartingAfter SubscriptionId) # 
StripeHasParam GetSubscriptions (EndingBefore SubscriptionId) # 
StripeHasParam GetSubscriptions (StartingAfter SubscriptionId) # 

data SubscriptionStatus #

Status of a Subscription

Instances

Eq SubscriptionStatus # 
Data SubscriptionStatus # 

Methods

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

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

toConstr :: SubscriptionStatus -> Constr #

dataTypeOf :: SubscriptionStatus -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord SubscriptionStatus # 
Read SubscriptionStatus # 
Show SubscriptionStatus # 
FromJSON SubscriptionStatus #

JSON Instance for SubscriptionStatus

newtype TaxPercent #

Constructors

TaxPercent Double 

Instances

Eq TaxPercent # 
Data TaxPercent # 

Methods

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

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

toConstr :: TaxPercent -> Constr #

dataTypeOf :: TaxPercent -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord TaxPercent # 
Read TaxPercent # 
Show TaxPercent # 
ToStripeParam TaxPercent # 
StripeHasParam UpdateSubscription TaxPercent # 
StripeHasParam CreateSubscription TaxPercent # 

newtype TrialEnd #

TrialEnd for a Plan

Constructors

TrialEnd UTCTime 

Instances

Eq TrialEnd # 
Data TrialEnd # 

Methods

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

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

toConstr :: TrialEnd -> Constr #

dataTypeOf :: TrialEnd -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord TrialEnd # 
Read TrialEnd # 
Show TrialEnd # 
ToStripeParam TrialEnd # 
StripeHasParam UpdateSubscription TrialEnd # 
StripeHasParam CreateSubscription TrialEnd # 
StripeHasParam CreateCustomer TrialEnd #