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

RecurlyClient.Operations.Create_line_item

Description

Contains the different functions to run the operation create_line_item

Synopsis

Documentation

create_line_item 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`.

-> LineItemCreate

The request body to send

-> ClientT m (Response Create_line_itemResponse)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/line_items

When using the Credit Invoices feature, utilize the purchases endpoint in order to immediately post credit to a credit invoice.

data Create_line_itemResponse Source #

Represents a response of the operation create_line_item.

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_line_itemResponseError is used.

Constructors

Create_line_itemResponseError String

Means either no matching case available or a parse error

Create_line_itemResponse201 LineItem

Returns the new line item.

Create_line_itemResponse404 Error

Incorrect site or account ID.

Create_line_itemResponse422 Error

A validation error.

Create_line_itemResponseDefault Error

Unexpected error.

create_line_itemWithConfiguration 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`.

-> LineItemCreate

The request body to send

-> m (Response Create_line_itemResponse)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/line_items

The same as create_line_item but accepts an explicit configuration.

create_line_itemRaw 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`.

-> LineItemCreate

The request body to send

-> ClientT m (Response ByteString)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/line_items

The same as create_line_item but returns the raw ByteString.

create_line_itemWithConfigurationRaw 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`.

-> LineItemCreate

The request body to send

-> m (Response ByteString)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/line_items

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