Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data RefundAPI route
- getRefunds :: RefundAPI route -> route :- ("refunds" :> Get '[HalJSON] (List Refund))
- getRefundsPaginated :: RefundAPI route -> route :- ("refunds" :> (QueryParam "limit" Int :> (QueryParam "from" RefundId :> Get '[HalJSON] (List Refund))))
- newRefund :: NewRefund
- createPaymentRefund :: RefundAPI route -> route :- ("payments" :> (Capture "paymentId" PaymentId :> ("refunds" :> (ReqBody '[JSON] NewRefund :> Post '[HalJSON] Refund))))
- getPaymentRefund :: RefundAPI route -> route :- ("payments" :> (Capture "paymentId" PaymentId :> ("refunds" :> (Capture "id" RefundId :> Get '[HalJSON] Refund))))
- cancelPaymentRefund :: RefundAPI route -> route :- ("payments" :> (Capture "paymentId" PaymentId :> ("refunds" :> (Capture "id" RefundId :> DeleteNoContent '[HalJSON] NoContent))))
Documentation
Instances
getRefunds :: RefundAPI route -> route :- ("refunds" :> Get '[HalJSON] (List Refund)) Source #
Handler to get a paginated list of refunds. Applies default pagination for newest 250 customers. See https://docs.mollie.com/reference/v2/refunds-api/list-refunds
getRefundsPaginated :: RefundAPI route -> route :- ("refunds" :> (QueryParam "limit" Int :> (QueryParam "from" RefundId :> Get '[HalJSON] (List Refund)))) Source #
Handler to get a paginated list of refunds. Offset the results by passing the last refund ID in the from
query param. The refund with this ID is included in the result set as well. See https://docs.mollie.com/reference/v2/refunds-api/list-refunds
Example for fetching the last 3 refunds:
import Mollie.API import Mollie.API.Refunds env <- createEnv "test_mollieapikeyexample" let refundsResult = runMollie env (getRefundsPaginated refundClient (Just 3) Nothing)
newRefund :: NewRefund Source #
Helper to create a minimal new refund. Defaults to refunding the total amount for the targeted payment.
createPaymentRefund :: RefundAPI route -> route :- ("payments" :> (Capture "paymentId" PaymentId :> ("refunds" :> (ReqBody '[JSON] NewRefund :> Post '[HalJSON] Refund)))) Source #
Handler to create a new refund for a specific payment. See https://docs.mollie.com/reference/v2/refunds-api/create-refund
getPaymentRefund :: RefundAPI route -> route :- ("payments" :> (Capture "paymentId" PaymentId :> ("refunds" :> (Capture "id" RefundId :> Get '[HalJSON] Refund)))) Source #
Handler to get a refund by its identifier for a specific payment. See https://docs.mollie.com/reference/v2/refunds-api/get-refund
cancelPaymentRefund :: RefundAPI route -> route :- ("payments" :> (Capture "paymentId" PaymentId :> ("refunds" :> (Capture "id" RefundId :> DeleteNoContent '[HalJSON] NoContent)))) Source #
Handler to cancel a refund by its identifier for a specific payment. See https://docs.mollie.com/reference/v2/refunds-api/cancel-refund