Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
:: Double | amount |
-> Text | interval |
-> Text | description |
-> NewSubscription |
createCustomerSubscription Source #
:: 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 #
:: 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 #
:: 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 #
:: 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.
Ideal | |
Creditcard | |
Mistercard | |
Sofort | |
Banktransfer | |
Directdebit | |
Belfius | |
Paypal | |
Bitcoin | |
Podiumcadeaukaart | |
Paysafecard | |
NewPaymentMethod Text |
Instances
Eq PaymentMethod Source # | |
Defined in Mollie.API.Types (==) :: PaymentMethod -> PaymentMethod -> Bool # (/=) :: PaymentMethod -> PaymentMethod -> Bool # | |
Read PaymentMethod Source # | |
Defined in Mollie.API.Types readsPrec :: Int -> ReadS PaymentMethod # readList :: ReadS [PaymentMethod] # | |
Show PaymentMethod Source # | |
Defined in Mollie.API.Types showsPrec :: Int -> PaymentMethod -> ShowS # show :: PaymentMethod -> String # showList :: [PaymentMethod] -> ShowS # | |
ToJSON PaymentMethod Source # | |
Defined in Mollie.API.Types toJSON :: PaymentMethod -> Value # toEncoding :: PaymentMethod -> Encoding # toJSONList :: [PaymentMethod] -> Value # toEncodingList :: [PaymentMethod] -> Encoding # | |
FromJSON PaymentMethod Source # | |
Defined in Mollie.API.Types parseJSON :: Value -> Parser PaymentMethod # parseJSONList :: Value -> Parser [PaymentMethod] # | |
ToText PaymentMethod Source # | |
Defined in Mollie.API.Types 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.
NewSubscription | |
|
Instances
Show NewSubscription Source # | |
Defined in Mollie.API.Types showsPrec :: Int -> NewSubscription -> ShowS # show :: NewSubscription -> String # showList :: [NewSubscription] -> ShowS # | |
ToJSON NewSubscription Source # | |
Defined in Mollie.API.Types 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.
SubscriptionPending | |
SubscriptionActive | |
SubscriptionCancelled | |
SubscriptionSuspended | |
SubscriptionCompleted |
Instances
Eq SubscriptionStatus Source # | |
Defined in Mollie.API.Types (==) :: SubscriptionStatus -> SubscriptionStatus -> Bool # (/=) :: SubscriptionStatus -> SubscriptionStatus -> Bool # | |
Read SubscriptionStatus Source # | |
Defined in Mollie.API.Types | |
Show SubscriptionStatus Source # | |
Defined in Mollie.API.Types showsPrec :: Int -> SubscriptionStatus -> ShowS # show :: SubscriptionStatus -> String # showList :: [SubscriptionStatus] -> ShowS # | |
FromJSON SubscriptionStatus Source # | |
Defined in Mollie.API.Types parseJSON :: Value -> Parser SubscriptionStatus # parseJSONList :: Value -> Parser [SubscriptionStatus] # | |
ToText SubscriptionStatus Source # | |
Defined in Mollie.API.Types toText :: SubscriptionStatus -> Text Source # |
data SubscriptionLinks Source #
Important links used for a subscription.
SubscriptionLinks | |
|
Instances
Show SubscriptionLinks Source # | |
Defined in Mollie.API.Types showsPrec :: Int -> SubscriptionLinks -> ShowS # show :: SubscriptionLinks -> String # showList :: [SubscriptionLinks] -> ShowS # | |
FromJSON SubscriptionLinks Source # | |
Defined in Mollie.API.Types 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.
Subscription | |
|
Instances
Show Subscription Source # | |
Defined in Mollie.API.Types showsPrec :: Int -> Subscription -> ShowS # show :: Subscription -> String # showList :: [Subscription] -> ShowS # | |
FromJSON Subscription Source # | |
Defined in Mollie.API.Types parseJSON :: Value -> Parser Subscription # parseJSONList :: Value -> Parser [Subscription] # |
Important links associated with List responses.
ListLinks | |
|
List response for any resource with metadata.
For more information see: https://www.mollie.com/nl/docs/reference/payments/list.
List | |
|
data ResponseError Source #
Response errors which could happen when requesting resources from Mollie.
Instances
Show ResponseError Source # | |
Defined in Mollie.API.Types showsPrec :: Int -> ResponseError -> ShowS # show :: ResponseError -> String # showList :: [ResponseError] -> ShowS # |