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

RecurlyClient.Operations.Create_coupon

Description

Contains the different functions to run the operation create_coupon

Synopsis

Documentation

create_coupon Source #

Arguments

:: forall m. MonadHTTP m 
=> CouponCreate

The request body to send

-> ClientT m (Response Create_couponResponse)

Monadic computation which returns the result of the operation

POST /coupons

Create a new coupon

data Create_couponResponse Source #

Represents a response of the operation create_coupon.

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

Constructors

Create_couponResponseError String

Means either no matching case available or a parse error

Create_couponResponse201 Coupon

A new coupon.

Create_couponResponse400 Error

Bad request, perhaps invalid JSON?

Create_couponResponse404 Error

Incorrect site ID.

Create_couponResponse422 Error

Invalid request parameters.

Create_couponResponseDefault Error

Unexpected error.

create_couponWithConfiguration Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> CouponCreate

The request body to send

-> m (Response Create_couponResponse)

Monadic computation which returns the result of the operation

POST /coupons

The same as create_coupon but accepts an explicit configuration.

create_couponRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> CouponCreate

The request body to send

-> ClientT m (Response ByteString)

Monadic computation which returns the result of the operation

POST /coupons

The same as create_coupon but returns the raw ByteString.

create_couponWithConfigurationRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> CouponCreate

The request body to send

-> m (Response ByteString)

Monadic computation which returns the result of the operation

POST /coupons

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