recurly-client-0.0.0.1: 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: * refund a specific amount which is divided across all the line items. * refund quantities of line items. If you want to refund the entire refundable amount on the invoice, the simplest way is to do `type=amount` without specifiying an `amount`.

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.