recurly-client-0.1.0.0: Client for Recurly subscription management
Safe HaskellSafe-Inferred
LanguageHaskell2010

RecurlyClient.Operations.Refund_invoice

Description

Contains the different functions to run the operation refund_invoice

Synopsis

Documentation

refund_invoice Source #

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.

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.

refund_invoiceRaw Source #

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.