Safe Haskell | None |
---|
- data Token = Token {}
- newtype TokenId = TokenId {}
- createToken :: MonadIO m => RequestCard -> StripeT m Token
- getToken :: MonadIO m => TokenId -> StripeT m Token
- tokRq :: [Text] -> StripeRequest
- data UTCTime = UTCTime {
- utctDay :: Day
- utctDayTime :: DiffTime
- newtype Amount = Amount {}
- data Card = Card {
- cardType :: Text
- cardCountry :: Maybe Text
- cardLastFour :: Text
- cardExpMonth :: Int
- cardExpYear :: Int
- cardFingerprint :: Text
- cardChecks :: CardChecks
- newtype Currency = Currency {
- unCurrency :: Text
- 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 token in the Stripe system.
Represents the identifier for a given Token
in the Stripe system.
createToken :: MonadIO m => RequestCard -> StripeT m TokenSource
Creates a Token
in the Stripe system.
tokRq :: [Text] -> StripeRequestSource
Convenience function to create a StripeRequest
specific to tokens.
data UTCTime
This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.
UTCTime | |
|
Represents an amount in cents in the Stripe system.
Represents a credit card in the Stripe system.
Card | |
|
Represents a currency (e.g., usd) in the Stripe system. This is a 3-letter ISO code.
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) |
Monad m => MonadError StripeFailure (StripeT m) | |
Monad m => MonadState StripeConfig (StripeT m) | |
Monad m => Monad (StripeT m) | |
Functor m => Functor (StripeT m) | |
Monad m => MonadPlus (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
.