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

RecurlyClient.Operations.Create_invoice

Description

Contains the different functions to run the operation create_invoice

Synopsis

Documentation

create_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 Create_invoiceResponse)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/invoices

Create an invoice for pending line items

data Create_invoiceResponse Source #

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

Constructors

Create_invoiceResponseError String

Means either no matching case available or a parse error

Create_invoiceResponse201 InvoiceCollection

Returns the new invoices.

Create_invoiceResponse400 Error

Bad request, perhaps invalid JSON?

Create_invoiceResponse404 Error

Incorrect site or account ID.

Create_invoiceResponse422 ErrorMayHaveTransaction

Invalid parameters, no pending line items, or error running the transaction.

Create_invoiceResponseDefault Error

Unexpected error.

create_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 Create_invoiceResponse)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/invoices

The same as create_invoice but accepts an explicit configuration.

create_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

The same as create_invoice but returns the raw ByteString.

create_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

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