Safe Haskell | None |
---|
Web.Stripe.Customer
- data Customer = Customer {}
- newtype CustomerId = CustomerId {
- unCustomerId :: Text
- newtype Email = Email {}
- createCustomer :: MonadIO m => Maybe RequestCard -> Maybe CpnId -> Maybe Email -> Maybe Description -> Maybe PlanId -> Maybe Int -> StripeT m Customer
- createCustomerByTokenId :: MonadIO m => Maybe TokenId -> Maybe CpnId -> Maybe Email -> Maybe Description -> Maybe PlanId -> Maybe Int -> StripeT m Customer
- updateCustomer :: MonadIO m => Customer -> Maybe RequestCard -> Maybe CpnId -> Maybe Email -> Maybe Description -> StripeT m Customer
- updateCustomerById :: MonadIO m => CustomerId -> Maybe RequestCard -> Maybe CpnId -> Maybe Email -> Maybe Description -> StripeT m Customer
- updateCustomerByTokenId :: MonadIO m => Customer -> Maybe TokenId -> Maybe CpnId -> Maybe Email -> Maybe Description -> StripeT m Customer
- updateCustomerByIdByTokenId :: MonadIO m => CustomerId -> Maybe TokenId -> Maybe CpnId -> Maybe Email -> Maybe Description -> StripeT m Customer
- getCustomer :: MonadIO m => CustomerId -> StripeT m Customer
- getCustomers :: MonadIO m => Maybe Count -> Maybe Offset -> StripeT m [Customer]
- delCustomer :: MonadIO m => Customer -> StripeT m Bool
- delCustomerById :: MonadIO m => CustomerId -> StripeT m Bool
- newtype Count = Count {}
- newtype Offset = Offset {}
- newtype Description = Description {}
- data UTCTime = UTCTime {
- utctDay :: Day
- utctDayTime :: DiffTime
- 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 customer in the Stripe system.
Constructors
Customer | |
Fields
|
newtype CustomerId Source
Represents a 'Customer'\'s ID in the Stripe system.
Constructors
CustomerId | |
Fields
|
Instances
Represents a standard email address.
createCustomer :: MonadIO m => Maybe RequestCard -> Maybe CpnId -> Maybe Email -> Maybe Description -> Maybe PlanId -> Maybe Int -> StripeT m CustomerSource
Create a new Customer
in the Stripe system.
createCustomerByTokenId :: MonadIO m => Maybe TokenId -> Maybe CpnId -> Maybe Email -> Maybe Description -> Maybe PlanId -> Maybe Int -> StripeT m CustomerSource
Create a new Customer
in the Stripe system using a TokenId.
updateCustomer :: MonadIO m => Customer -> Maybe RequestCard -> Maybe CpnId -> Maybe Email -> Maybe Description -> StripeT m CustomerSource
Update an existing Customer
in the Stripe system.
updateCustomerById :: MonadIO m => CustomerId -> Maybe RequestCard -> Maybe CpnId -> Maybe Email -> Maybe Description -> StripeT m CustomerSource
Update an existing Customer
, identified by CustomerId
, in the Stripe
system.
updateCustomerByTokenId :: MonadIO m => Customer -> Maybe TokenId -> Maybe CpnId -> Maybe Email -> Maybe Description -> StripeT m CustomerSource
Update an existing Customer
in the Stripe system.
updateCustomerByIdByTokenId :: MonadIO m => CustomerId -> Maybe TokenId -> Maybe CpnId -> Maybe Email -> Maybe Description -> StripeT m CustomerSource
Update an existing Customer
, identified by CustomerId
, in the Stripe
system.
getCustomer :: MonadIO m => CustomerId -> StripeT m CustomerSource
Retrieves a specific Customer
based on its CustomerId
.
delCustomer :: MonadIO m => Customer -> StripeT m BoolSource
Deletes a Customer
if it exists. If it does not, an
InvalidRequestError
will be thrown indicating this.
delCustomerById :: MonadIO m => CustomerId -> StripeT m BoolSource
Deletes a Customer
, identified by its CustomerId
, if it exists. If it
does not, an InvalidRequestError
will be thrown indicating this.
A maximum number of objects that the Stripe API will return. This value should be between 1 and 100, inclusive.
A positive integer that is an offset into the array of objects returned by the Stripe API.
newtype Description Source
Describes an object in the Stripe system.
Constructors
Description | |
Fields |
Instances
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
|
data StripeConfig Source
Configuration for the StripeT
monad transformer.
Constructors
StripeConfig | |
Fields |
Instances
Show StripeConfig | |
Monad m => MonadState StripeConfig (StripeT m) |
Defines the monad transformer under which all Stripe REST API resource calls take place.
Constructors
StripeT (StateT StripeConfig (ErrorT StripeFailure m) a) |
Instances
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
.