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

RecurlyClient.Operations.Preview_invoice

Description

Contains the different functions to run the operation preview_invoice

Synopsis

Documentation

preview_invoice Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

account_id: Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.

-> InvoiceCreate

The request body to send

-> ClientT m (Response Preview_invoiceResponse)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/invoices/preview

Preview new invoice for pending line items

data Preview_invoiceResponse Source #

Represents a response of the operation preview_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), Preview_invoiceResponseError is used.

Constructors

Preview_invoiceResponseError String

Means either no matching case available or a parse error

Preview_invoiceResponse200 InvoiceCollection

Returns the invoice previews.

Preview_invoiceResponse400 Error

Bad request, perhaps invalid JSON?

Preview_invoiceResponse404 Error

Incorrect site or account ID.

Preview_invoiceResponse422 Error

Invalid parameter or pending line items.

Preview_invoiceResponseDefault Error

Unexpected error.

preview_invoiceWithConfiguration Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> Text

account_id: Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.

-> InvoiceCreate

The request body to send

-> m (Response Preview_invoiceResponse)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/invoices/preview

The same as preview_invoice but accepts an explicit configuration.

preview_invoiceRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

account_id: Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.

-> InvoiceCreate

The request body to send

-> ClientT m (Response ByteString)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/invoices/preview

The same as preview_invoice but returns the raw ByteString.

preview_invoiceWithConfigurationRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> Text

account_id: Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.

-> InvoiceCreate

The request body to send

-> m (Response ByteString)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/invoices/preview

The same as preview_invoice but accepts an explicit configuration and returns the raw ByteString.