Web.Stripe.Subscription
- data Subscription = Subscription {}
- data SubStatus
- newtype SubProrate = SubProrate {
- unSubProrate :: Bool
- newtype SubTrialEnd = SubTrialEnd {
- unSubTrialEnd :: Int
- newtype SubAtPeriodEnd = SubAtPeriodEnd {}
- updateSubRCard :: MonadIO m => RequestCard -> CustomerId -> PlanId -> Maybe CpnId -> Maybe SubProrate -> Maybe SubTrialEnd -> StripeT m Subscription
- updateSubToken :: MonadIO m => TokenId -> CustomerId -> PlanId -> Maybe CpnId -> Maybe SubProrate -> Maybe SubTrialEnd -> StripeT m Subscription
- cancelSub :: MonadIO m => CustomerId -> Maybe SubAtPeriodEnd -> StripeT m Subscription
- data UTCTime = UTCTime {
- utctDay :: Day
- utctDayTime :: DiffTime
- data SConfig = SConfig {}
- newtype StripeT m a = StripeT (StateT SConfig (ErrorT SFailure m) a)
- runStripeT :: MonadIO m => SConfig -> StripeT m a -> m (Either SFailure a)
Documentation
data Subscription Source
Represents a subscription in the Stripe API.
Constructors
Subscription | |
Fields
|
Instances
Show Subscription | |
JSON Subscription | Attempts to parse JSON into a |
Describes the various stages that a
newtype SubProrate Source
A boolean flag that determines whether or not to prorate switching plans during a billing cycle.
Constructors
SubProrate | |
Fields
|
Instances
newtype SubTrialEnd Source
UTC integer timestamp representing the end of the trial period that the customer receives before being charged for the first time.
Constructors
SubTrialEnd | |
Fields
|
Instances
newtype SubAtPeriodEnd Source
A boolean flag that determines whether or not the cancellation of the
Subscription
should be delayed until the end of the current period.
Constructors
SubAtPeriodEnd | |
Fields |
Instances
updateSubRCard :: MonadIO m => RequestCard -> CustomerId -> PlanId -> Maybe CpnId -> Maybe SubProrate -> Maybe SubTrialEnd -> StripeT m SubscriptionSource
Update the subscription associated with a Customer
, identified by
CustomerId
, in the Stripe system.
If SubTrialEnd
is provided, this will override the default trial period
of the plan to which the customer is subscribed.
updateSubToken :: MonadIO m => TokenId -> CustomerId -> PlanId -> Maybe CpnId -> Maybe SubProrate -> Maybe SubTrialEnd -> StripeT m SubscriptionSource
Behaves precisely like updateSubRCard
, but uses a Token
, identified by
TokenId
, rather than a RequestCard
.
cancelSub :: MonadIO m => CustomerId -> Maybe SubAtPeriodEnd -> StripeT m SubscriptionSource
Cancels the Subscription
associated with a Customer
, identified by
CustomerId
, in the Stripe system.
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.
Constructors
UTCTime | |
Fields
|
Configuration for the StripeT
monad transformer.
Defines the monad transformer under which all Stripe REST API resource calls take place.