| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Mollie.API.Subscriptions
Synopsis
- subscriptionsPath :: Text
- newSubscription :: Double -> Text -> Text -> NewSubscription
- createCustomerSubscription :: Text -> NewSubscription -> Mollie (Either ResponseError Subscription)
- getCustomerSubscription :: Text -> Text -> Mollie (Either ResponseError Subscription)
- getCustomerSubscriptions :: Text -> Int -> Int -> Mollie (Either ResponseError (List Subscription))
- cancelCustomerSubscription :: Text -> Text -> Mollie (Either ResponseError Subscription)
- data PaymentMethod
- data NewSubscription = NewSubscription {}
- data SubscriptionStatus
- data SubscriptionLinks = SubscriptionLinks {}
- data Subscription = Subscription {
- subscription_id :: Text
- subscription_customerId :: Text
- subscription_mode :: Mode
- subscription_createdDatetime :: UTCTime
- subscription_status :: SubscriptionStatus
- subscription_amount :: Text
- subscription_times :: Maybe Int
- subscription_interval :: Text
- subscription_description :: Text
- subscription_method :: Maybe PaymentMethod
- subscription_cancelledDatetime :: Maybe UTCTime
- subscription_links :: SubscriptionLinks
- data ListLinks = ListLinks {}
- data List a = List {
- list_totalCount :: Int
- list_offset :: Int
- list_count :: Int
- list_data :: [a]
- list_links :: Maybe ListLinks
- data ResponseError
Documentation
subscriptionsPath :: Text Source #
Subscriptions resource's path, relative to API's versioned customer resource url.
Arguments
| :: Double | amount |
| -> Text | interval |
| -> Text | description |
| -> NewSubscription |
createCustomerSubscription Source #
Arguments
| :: Text | customerId |
| -> NewSubscription | |
| -> Mollie (Either ResponseError Subscription) |
Handler to create a new subscription for a specific customer.
For more information see: https://www.mollie.com/en/docs/reference/subscriptions/create.
getCustomerSubscription Source #
Arguments
| :: Text | customerId |
| -> Text | subscriptionId |
| -> Mollie (Either ResponseError Subscription) |
Handler to get a subscription by its identifier from a specific customer.
For more information see: https://www.mollie.com/en/docs/reference/subscriptions/get.
getCustomerSubscriptions Source #
Arguments
| :: Text | customerId |
| -> Int | offset |
| -> Int | count |
| -> Mollie (Either ResponseError (List Subscription)) |
Handler to get a list of subscriptions for a specific customer. Because the list endpoint is paginated this handler requires an offset and a count. The maximum amount of subscriptions returned with a single call is 250.
For more information see: https://www.mollie.com/en/docs/reference/subscriptions/list.
cancelCustomerSubscription Source #
Arguments
| :: Text | customerId |
| -> Text | subscriptionId |
| -> Mollie (Either ResponseError Subscription) |
Handler to cancel a subscription by its identifier for a specific customer.
For more information see: https://www.mollie.com/en/docs/reference/subscriptions/delete.
data PaymentMethod Source #
All possible payment methods.
Constructors
| Ideal | |
| Creditcard | |
| Mistercard | |
| Sofort | |
| Banktransfer | |
| Directdebit | |
| Belfius | |
| Paypal | |
| Bitcoin | |
| Podiumcadeaukaart | |
| Paysafecard | |
| NewPaymentMethod Text |
Instances
| Eq PaymentMethod Source # | |
Defined in Mollie.API.Types Methods (==) :: PaymentMethod -> PaymentMethod -> Bool # (/=) :: PaymentMethod -> PaymentMethod -> Bool # | |
| Read PaymentMethod Source # | |
Defined in Mollie.API.Types Methods readsPrec :: Int -> ReadS PaymentMethod # readList :: ReadS [PaymentMethod] # | |
| Show PaymentMethod Source # | |
Defined in Mollie.API.Types Methods showsPrec :: Int -> PaymentMethod -> ShowS # show :: PaymentMethod -> String # showList :: [PaymentMethod] -> ShowS # | |
| ToJSON PaymentMethod Source # | |
Defined in Mollie.API.Types Methods toJSON :: PaymentMethod -> Value # toEncoding :: PaymentMethod -> Encoding # toJSONList :: [PaymentMethod] -> Value # toEncodingList :: [PaymentMethod] -> Encoding # | |
| FromJSON PaymentMethod Source # | |
Defined in Mollie.API.Types Methods parseJSON :: Value -> Parser PaymentMethod # parseJSONList :: Value -> Parser [PaymentMethod] # | |
| ToText PaymentMethod Source # | |
Defined in Mollie.API.Types Methods toText :: PaymentMethod -> Text Source # | |
data NewSubscription Source #
Structure to request a new subscription with.
For more information see: https://www.mollie.com/en/docs/reference/subscriptions/create.
Constructors
| NewSubscription | |
Fields
| |
Instances
| Show NewSubscription Source # | |
Defined in Mollie.API.Types Methods showsPrec :: Int -> NewSubscription -> ShowS # show :: NewSubscription -> String # showList :: [NewSubscription] -> ShowS # | |
| ToJSON NewSubscription Source # | |
Defined in Mollie.API.Types Methods toJSON :: NewSubscription -> Value # toEncoding :: NewSubscription -> Encoding # toJSONList :: [NewSubscription] -> Value # toEncodingList :: [NewSubscription] -> Encoding # | |
data SubscriptionStatus Source #
All possible statusses a subscription could be assigned.
For more information see: https://www.mollie.com/en/docs/reference/subscriptions/get.
Constructors
| SubscriptionPending | |
| SubscriptionActive | |
| SubscriptionCancelled | |
| SubscriptionSuspended | |
| SubscriptionCompleted |
Instances
| Eq SubscriptionStatus Source # | |
Defined in Mollie.API.Types Methods (==) :: SubscriptionStatus -> SubscriptionStatus -> Bool # (/=) :: SubscriptionStatus -> SubscriptionStatus -> Bool # | |
| Read SubscriptionStatus Source # | |
Defined in Mollie.API.Types Methods readsPrec :: Int -> ReadS SubscriptionStatus # readList :: ReadS [SubscriptionStatus] # | |
| Show SubscriptionStatus Source # | |
Defined in Mollie.API.Types Methods showsPrec :: Int -> SubscriptionStatus -> ShowS # show :: SubscriptionStatus -> String # showList :: [SubscriptionStatus] -> ShowS # | |
| FromJSON SubscriptionStatus Source # | |
Defined in Mollie.API.Types Methods parseJSON :: Value -> Parser SubscriptionStatus # parseJSONList :: Value -> Parser [SubscriptionStatus] # | |
| ToText SubscriptionStatus Source # | |
Defined in Mollie.API.Types Methods toText :: SubscriptionStatus -> Text Source # | |
data SubscriptionLinks Source #
Important links used for a subscription.
Constructors
| SubscriptionLinks | |
Fields
| |
Instances
| Show SubscriptionLinks Source # | |
Defined in Mollie.API.Types Methods showsPrec :: Int -> SubscriptionLinks -> ShowS # show :: SubscriptionLinks -> String # showList :: [SubscriptionLinks] -> ShowS # | |
| FromJSON SubscriptionLinks Source # | |
Defined in Mollie.API.Types Methods parseJSON :: Value -> Parser SubscriptionLinks # parseJSONList :: Value -> Parser [SubscriptionLinks] # | |
data Subscription Source #
Representation of a subscription available at Mollie.
For more information see: https://www.mollie.com/en/docs/reference/subscriptions/get.
Constructors
| Subscription | |
Fields
| |
Instances
| Show Subscription Source # | |
Defined in Mollie.API.Types Methods showsPrec :: Int -> Subscription -> ShowS # show :: Subscription -> String # showList :: [Subscription] -> ShowS # | |
| FromJSON Subscription Source # | |
Defined in Mollie.API.Types | |
Important links associated with List responses.
Constructors
| ListLinks | |
Fields
| |
List response for any resource with metadata.
For more information see: https://www.mollie.com/nl/docs/reference/payments/list.
Constructors
| List | |
Fields
| |
data ResponseError Source #
Response errors which could happen when requesting resources from Mollie.
Constructors
| ClientError Int Error | |
| ServerError Int | |
| UnexpectedResponse |
Instances
| Show ResponseError Source # | |
Defined in Mollie.API.Types Methods showsPrec :: Int -> ResponseError -> ShowS # show :: ResponseError -> String # showList :: [ResponseError] -> ShowS # | |