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

RecurlyClient.Operations.Preview_purchase

Description

Contains the different functions to run the operation preview_purchase

Synopsis

Documentation

preview_purchase Source #

Arguments

:: forall m. MonadHTTP m 
=> PurchaseCreate

The request body to send

-> ClientT m (Response Preview_purchaseResponse)

Monadic computation which returns the result of the operation

POST /purchases/preview

A purchase is a checkout containing at least one or more subscriptions or one-time charges (line items) and supports both coupon and gift card redemptions. All items purchased will be on one invoice and paid for with one transaction.

data Preview_purchaseResponse Source #

Represents a response of the operation preview_purchase.

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

Constructors

Preview_purchaseResponseError String

Means either no matching case available or a parse error

Preview_purchaseResponse200 InvoiceCollection

Returns preview of the new invoices

Preview_purchaseResponse400 Error

Bad request; perhaps missing or invalid parameters.

Preview_purchaseResponse422 Error

Purchase cannot be previewed for the specified reason.

Preview_purchaseResponseDefault Error

Unexpected error.

preview_purchaseWithConfiguration Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> PurchaseCreate

The request body to send

-> m (Response Preview_purchaseResponse)

Monadic computation which returns the result of the operation

POST /purchases/preview

The same as preview_purchase but accepts an explicit configuration.

preview_purchaseRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> PurchaseCreate

The request body to send

-> ClientT m (Response ByteString)

Monadic computation which returns the result of the operation

POST /purchases/preview

The same as preview_purchase but returns the raw ByteString.

preview_purchaseWithConfigurationRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> PurchaseCreate

The request body to send

-> m (Response ByteString)

Monadic computation which returns the result of the operation

POST /purchases/preview

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