Safe Haskell | None |
---|---|
Language | Haskell98 |
- data Plan = Plan {}
- amount :: Plan -> Int
- data PlanInterval
- = Monthly
- | Yearly
- | UnknownPlan Text
- newtype PlanId = PlanId {}
- newtype PlanTrialDays = PlanTrialDays {}
- createPlan :: MonadIO m => Plan -> StripeT m ()
- getPlan :: MonadIO m => PlanId -> StripeT m Plan
- getPlans :: MonadIO m => Maybe Count -> Maybe Offset -> StripeT m [Plan]
- delPlan :: MonadIO m => Plan -> StripeT m Bool
- delPlanById :: MonadIO m => PlanId -> StripeT m Bool
- newtype Amount = Amount {}
- newtype Count = Count {}
- newtype Currency = Currency {
- unCurrency :: Text
- newtype Offset = Offset {}
- data StripeConfig = StripeConfig {}
- newtype StripeT m a = StripeT (StateT StripeConfig (ErrorT StripeFailure m) a)
- runStripeT :: MonadIO m => StripeConfig -> StripeT m a -> m (Either StripeFailure a)
Documentation
Represents a plan in the Stripe system.
Plan | |
|
data PlanInterval Source
Represents the billing cycle for a plan. If an interval identifier is not
known, UnknownPlan
is used to carry the original identifier supplied by
Stripe.
Represents the identifier for a given Plan
in the Stripe system.
newtype PlanTrialDays Source
Represents the length of the trial period. That is, the number of days before the customer is billed.
delPlan :: MonadIO m => Plan -> StripeT m Bool Source
Deletes a Plan
if it exists. If it does not, an InvalidRequestError
will be thrown indicating this.
Represents an amount in cents in the Stripe system.
A maximum number of objects that the Stripe API will return. This value should be between 1 and 100, inclusive.
Represents a currency (e.g., "usd") in the Stripe system. This is a 3-letter ISO code.
A positive integer that is an offset into the array of objects returned by the Stripe API.
data StripeConfig Source
Configuration for the StripeT
monad transformer.
Show StripeConfig | |
Monad m => MonadState StripeConfig (StripeT m) |
Defines the monad transformer under which all Stripe REST API resource calls take place.
StripeT (StateT StripeConfig (ErrorT StripeFailure m) a) |
MonadTrans StripeT | |
Monad m => MonadError StripeFailure (StripeT m) | |
Monad m => MonadState StripeConfig (StripeT m) | |
(Monad m, Functor m) => Alternative (StripeT m) | |
Monad m => Monad (StripeT m) | |
Functor m => Functor (StripeT m) | |
Monad m => MonadPlus (StripeT m) | |
(Monad m, Functor m) => Applicative (StripeT m) | |
MonadIO m => MonadIO (StripeT m) |
runStripeT :: MonadIO m => StripeConfig -> StripeT m a -> m (Either StripeFailure a) Source
Runs the StripeT
monad transformer with a given StripeConfig
. This will
handle all of the authorization dance steps necessary to utilize the
Stripe API.
Its use is demonstrated in other functions, such as query
.