| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Mollie.API.Customers
Synopsis
- customersPath :: Text
- newCustomer :: Text -> Text -> NewCustomer
- createCustomer :: NewCustomer -> Mollie (Either ResponseError Customer)
- getCustomer :: Text -> Mollie (Either ResponseError Customer)
- getCustomers :: Int -> Int -> Mollie (Either ResponseError (List Customer))
- createCustomerPayment :: Text -> NewPayment -> Mollie (Either ResponseError Payment)
- getCustomerPayments :: Text -> Int -> Int -> Mollie (Either ResponseError (List Payment))
- data NewCustomer = NewCustomer {}
- data Customer = Customer {}
- data Mode
- data PaymentStatus
- data PaymentMethod
- data RecurringType
- data NewPayment = NewPayment {
- newPayment_amount :: Double
- newPayment_description :: Text
- newPayment_redirectUrl :: Maybe Text
- newPayment_webhookUrl :: Maybe Text
- newPayment_method :: Maybe PaymentMethod
- newPayment_metadata :: Maybe Value
- newPayment_locale :: Maybe Text
- newPayment_recurringType :: Maybe RecurringType
- newPayment_customerId :: Maybe Text
- newPayment_issuer :: Maybe Text
- newPayment_billingAddress :: Maybe Text
- newPayment_billingCity :: Maybe Text
- newPayment_billingRegion :: Maybe Text
- newPayment_billingPostal :: Maybe Text
- newPayment_billingCountry :: Maybe Text
- newPayment_shippingAddress :: Maybe Text
- newPayment_shippingCity :: Maybe Text
- newPayment_shippingRegion :: Maybe Text
- newPayment_shippingPostal :: Maybe Text
- newPayment_shippingCountry :: Maybe Text
- newPayment_billingEmail :: Maybe Text
- newPayment_dueDate :: Maybe Text
- newPayment_consumerName :: Maybe Text
- newPayment_consumerAccount :: Maybe Text
- newPayment_customerReference :: Maybe Text
- data Payment = Payment {
- payment_id :: Text
- payment_mode :: Mode
- payment_createdDatetime :: UTCTime
- payment_status :: PaymentStatus
- payment_paidDatetime :: Maybe UTCTime
- payment_cancelledDatetime :: Maybe UTCTime
- payment_expiredDatetime :: Maybe UTCTime
- payment_expiryPeriod :: Maybe Text
- payment_amount :: Text
- payment_amountRefunded :: Maybe Text
- payment_amountRemaining :: Maybe Text
- payment_description :: Text
- payment_method :: Maybe PaymentMethod
- payment_metadata :: Maybe Value
- payment_locale :: Maybe Text
- payment_profileId :: Text
- payment_customerId :: Maybe Text
- payment_mandateId :: Maybe Text
- payment_settlementId :: Maybe Text
- payment_links :: PaymentLinks
- payment_details :: Maybe Object
- data PaymentLinks = PaymentLinks {}
- data List a = List {
- list_totalCount :: Int
- list_offset :: Int
- list_count :: Int
- list_data :: [a]
- list_links :: Maybe ListLinks
- data ListLinks = ListLinks {}
- data ResponseError
Documentation
customersPath :: Text Source #
Customer resource's path, relative to API's versioned url.
Arguments
| :: Text | name |
| -> Text | |
| -> NewCustomer |
Helper to create a minimal new customer.
createCustomer :: NewCustomer -> Mollie (Either ResponseError Customer) Source #
Handler to create a new customer.
For more information see: https://www.mollie.com/en/docs/reference/customers/create.
Arguments
| :: Text | customerId |
| -> Mollie (Either ResponseError Customer) |
Handler to get a customer by its identifier.
For more information see: https://www.mollie.com/en/docs/reference/customers/get.
Handler to get a list of customers. Because the list endpoint is paginated this handler requires an offset and a count. The maximum amount of customers returned with a single call is 250.
For more information see: https://www.mollie.com/en/docs/reference/customers/list.
createCustomerPayment Source #
Arguments
| :: Text | customerId |
| -> NewPayment | |
| -> Mollie (Either ResponseError Payment) |
Handler to create a new payment for a specific customer.
For more information see: https://www.mollie.com/en/docs/reference/customers/create-payment.
Handler to get a list of payments for a specific customer. Because the list endpoint is paginated this handler requires an offset and a count. The maximum amount of payments returned with a single call is 250.
For more information see: https://www.mollie.com/en/docs/reference/customers/list-payments.
data NewCustomer Source #
Structure to request a new customer with.
For more information see: https://www.mollie.com/en/docs/reference/customers/create.
Constructors
| NewCustomer | |
Fields
| |
Instances
| Show NewCustomer Source # | |
Defined in Mollie.API.Types Methods showsPrec :: Int -> NewCustomer -> ShowS # show :: NewCustomer -> String # showList :: [NewCustomer] -> ShowS # | |
| ToJSON NewCustomer Source # | |
Defined in Mollie.API.Types Methods toJSON :: NewCustomer -> Value # toEncoding :: NewCustomer -> Encoding # toJSONList :: [NewCustomer] -> Value # toEncodingList :: [NewCustomer] -> Encoding # | |
Representation of an customer available at Mollie.
For more information see: https://www.mollie.com/en/docs/reference/customers/get.
Constructors
| Customer | |
Fields
| |
All available API modes.
data PaymentStatus Source #
All possible statusses which can be assigned to a payment. When an important status changes occurs Mollie will notify the application by requesting the configured Webhook. Note that some changes will never be known to the application.
For more information see: https://www.mollie.com/en/docs/status.
Constructors
| PaymentOpen | Payment has been created. This is the initial status. |
| PaymentCancelled | Customer has cancelled the payment. |
| PaymentPending | The payment process has been started. No notification. |
| PaymentExpired | The payment has expired. Some payment methods (like |
| PaymentFailed | The payment can't be completed. |
| PaymentPaid | The payment was successful. This is the success status. |
| PaymentPaidout | Mollie has transfered the payment to your bankaccount. No notification. |
| PaymentRefunded | You requested a refund for the payment. |
| PaymentChargedBack | The customer dispute the payment. This is possible with |
Instances
| Eq PaymentStatus Source # | |
Defined in Mollie.API.Types Methods (==) :: PaymentStatus -> PaymentStatus -> Bool # (/=) :: PaymentStatus -> PaymentStatus -> Bool # | |
| Read PaymentStatus Source # | |
Defined in Mollie.API.Types Methods readsPrec :: Int -> ReadS PaymentStatus # readList :: ReadS [PaymentStatus] # | |
| Show PaymentStatus Source # | |
Defined in Mollie.API.Types Methods showsPrec :: Int -> PaymentStatus -> ShowS # show :: PaymentStatus -> String # showList :: [PaymentStatus] -> ShowS # | |
| FromJSON PaymentStatus Source # | |
Defined in Mollie.API.Types Methods parseJSON :: Value -> Parser PaymentStatus # parseJSONList :: Value -> Parser [PaymentStatus] # | |
| ToText PaymentStatus Source # | |
Defined in Mollie.API.Types Methods toText :: PaymentStatus -> Text Source # | |
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 RecurringType Source #
All available recurring types.
Instances
| Eq RecurringType Source # | |
Defined in Mollie.API.Types Methods (==) :: RecurringType -> RecurringType -> Bool # (/=) :: RecurringType -> RecurringType -> Bool # | |
| Read RecurringType Source # | |
Defined in Mollie.API.Types Methods readsPrec :: Int -> ReadS RecurringType # readList :: ReadS [RecurringType] # | |
| Show RecurringType Source # | |
Defined in Mollie.API.Types Methods showsPrec :: Int -> RecurringType -> ShowS # show :: RecurringType -> String # showList :: [RecurringType] -> ShowS # | |
| ToJSON RecurringType Source # | |
Defined in Mollie.API.Types Methods toJSON :: RecurringType -> Value # toEncoding :: RecurringType -> Encoding # toJSONList :: [RecurringType] -> Value # toEncodingList :: [RecurringType] -> Encoding # | |
| FromJSON RecurringType Source # | |
Defined in Mollie.API.Types Methods parseJSON :: Value -> Parser RecurringType # parseJSONList :: Value -> Parser [RecurringType] # | |
| ToText RecurringType Source # | |
Defined in Mollie.API.Types Methods toText :: RecurringType -> Text Source # | |
data NewPayment Source #
Structure to request a new payment with.
For more information see: https://www.mollie.com/en/docs/reference/payments/create.
Constructors
| NewPayment | |
Fields
| |
Instances
| Show NewPayment Source # | |
Defined in Mollie.API.Types Methods showsPrec :: Int -> NewPayment -> ShowS # show :: NewPayment -> String # showList :: [NewPayment] -> ShowS # | |
| ToJSON NewPayment Source # | |
Defined in Mollie.API.Types Methods toJSON :: NewPayment -> Value # toEncoding :: NewPayment -> Encoding # toJSONList :: [NewPayment] -> Value # toEncodingList :: [NewPayment] -> Encoding # | |
Representation of a payment made with Mollie.
Note that the amounts are curently returned as text because Mollie does not return them as valid json numbers.
For more information see: https://www.mollie.com/nl/docs/reference/payments/get.
Constructors
| Payment | |
Fields
| |
data PaymentLinks Source #
Important links used for a payment.
Constructors
| PaymentLinks | |
Fields
| |
Instances
| Show PaymentLinks Source # | |
Defined in Mollie.API.Types Methods showsPrec :: Int -> PaymentLinks -> ShowS # show :: PaymentLinks -> String # showList :: [PaymentLinks] -> ShowS # | |
| FromJSON PaymentLinks Source # | |
Defined in Mollie.API.Types | |
List response for any resource with metadata.
For more information see: https://www.mollie.com/nl/docs/reference/payments/list.
Constructors
| List | |
Fields
| |
Important links associated with List responses.
Constructors
| ListLinks | |
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 # | |