Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
RecurlyClient.Operations.Refund_invoice
Description
Contains the different functions to run the operation refund_invoice
Synopsis
- refund_invoice :: forall m. MonadHTTP m => Text -> InvoiceRefund -> ClientT m (Response Refund_invoiceResponse)
- data Refund_invoiceResponse
- refund_invoiceWithConfiguration :: forall m. MonadHTTP m => Configuration -> Text -> InvoiceRefund -> m (Response Refund_invoiceResponse)
- refund_invoiceRaw :: forall m. MonadHTTP m => Text -> InvoiceRefund -> ClientT m (Response ByteString)
- refund_invoiceWithConfigurationRaw :: forall m. MonadHTTP m => Configuration -> Text -> InvoiceRefund -> m (Response ByteString)
Documentation
Arguments
:: forall m. MonadHTTP m | |
=> Text | invoice_id: Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. |
-> InvoiceRefund | The request body to send |
-> ClientT m (Response Refund_invoiceResponse) | Monadic computation which returns the result of the operation |
POST /invoices/{invoice_id}/refund
There are two ways to do a refund: * Apply a specific dollar/cent amount or percentage amount to an entire invoice, which will refund the resulting amount across all line items on the invoice. * If you want to refund the entire refundable amount on the invoice, the simplest way is to do `type=amount` without specifiying an `amount`. * Note: You must have the Credit Memos feature flag enabled on your site to utilize percentage amount refunds on invoices. * Apply a refund to one or more individual line items on an invoice. A line item can be refunded by a quantity amount, a specific dollar/cent amount, or a percentage amount and will only apply to the specific line item you are aiming to refund. * Note: You must have the Credit Memos feature flag enabled on your site to utilize specific dollar/cent amount and percentage amount refunds on line items.
data Refund_invoiceResponse Source #
Represents a response of the operation refund_invoice
.
The response constructor is chosen by the status code of the response. If no case matches (no specific case for the response code, no range case, no default case), Refund_invoiceResponseError
is used.
Constructors
Refund_invoiceResponseError String | Means either no matching case available or a parse error |
Refund_invoiceResponse201 Invoice | Returns the new credit invoice. |
Refund_invoiceResponse400 Error | Invalid or unpermitted parameter. |
Refund_invoiceResponse404 Error | Incorrect site or invoice ID. |
Refund_invoiceResponseDefault Error | Unexpected error. |
Instances
Show Refund_invoiceResponse Source # | |
Defined in RecurlyClient.Operations.Refund_invoice Methods showsPrec :: Int -> Refund_invoiceResponse -> ShowS # show :: Refund_invoiceResponse -> String # showList :: [Refund_invoiceResponse] -> ShowS # | |
Eq Refund_invoiceResponse Source # | |
Defined in RecurlyClient.Operations.Refund_invoice Methods (==) :: Refund_invoiceResponse -> Refund_invoiceResponse -> Bool # (/=) :: Refund_invoiceResponse -> Refund_invoiceResponse -> Bool # |
refund_invoiceWithConfiguration Source #
Arguments
:: forall m. MonadHTTP m | |
=> Configuration | The configuration to use in the request |
-> Text | invoice_id: Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. |
-> InvoiceRefund | The request body to send |
-> m (Response Refund_invoiceResponse) | Monadic computation which returns the result of the operation |
POST /invoices/{invoice_id}/refund
The same as refund_invoice
but accepts an explicit configuration.
Arguments
:: forall m. MonadHTTP m | |
=> Text | invoice_id: Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. |
-> InvoiceRefund | The request body to send |
-> ClientT m (Response ByteString) | Monadic computation which returns the result of the operation |
POST /invoices/{invoice_id}/refund
The same as refund_invoice
but returns the raw ByteString
.
refund_invoiceWithConfigurationRaw Source #
Arguments
:: forall m. MonadHTTP m | |
=> Configuration | The configuration to use in the request |
-> Text | invoice_id: Invoice ID or number. For ID no prefix is used e.g. `e28zov4fw0v2`. For number use prefix `number-`, e.g. `number-1000`. |
-> InvoiceRefund | The request body to send |
-> m (Response ByteString) | Monadic computation which returns the result of the operation |
POST /invoices/{invoice_id}/refund
The same as refund_invoice
but accepts an explicit configuration and returns the raw ByteString
.