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

RecurlyClient.Operations.Create_coupon_redemption

Description

Contains the different functions to run the operation create_coupon_redemption

Synopsis

Documentation

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

-> CouponRedemptionCreate

The request body to send

-> ClientT m (Response Create_coupon_redemptionResponse)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/coupon_redemptions/active

Generate an active coupon redemption on an account or subscription

data Create_coupon_redemptionResponse Source #

Represents a response of the operation create_coupon_redemption.

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

Constructors

Create_coupon_redemptionResponseError String

Means either no matching case available or a parse error

Create_coupon_redemptionResponse200 CouponRedemption

Returns the new coupon redemption.

Create_coupon_redemptionResponse400 Error

Bad request; perhaps missing or invalid parameters.

Create_coupon_redemptionResponse404 Error

Incorrect site or account ID.

Create_coupon_redemptionResponse422 Error

A validation error.

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

-> CouponRedemptionCreate

The request body to send

-> m (Response Create_coupon_redemptionResponse)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/coupon_redemptions/active

The same as create_coupon_redemption but accepts an explicit configuration.

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

-> CouponRedemptionCreate

The request body to send

-> ClientT m (Response ByteString)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/coupon_redemptions/active

The same as create_coupon_redemption but returns the raw ByteString.

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

-> CouponRedemptionCreate

The request body to send

-> m (Response ByteString)

Monadic computation which returns the result of the operation

POST /accounts/{account_id}/coupon_redemptions/active

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