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

RecurlyClient.Operations.Generate_unique_coupon_codes

Description

Contains the different functions to run the operation generate_unique_coupon_codes

Synopsis

Documentation

generate_unique_coupon_codes Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

coupon_id: Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`.

-> CouponBulkCreate

The request body to send

-> ClientT m (Response Generate_unique_coupon_codesResponse)

Monadic computation which returns the result of the operation

POST /coupons/{coupon_id}/generate

Generate unique coupon codes

data Generate_unique_coupon_codesResponse Source #

Represents a response of the operation generate_unique_coupon_codes.

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), Generate_unique_coupon_codesResponseError is used.

Constructors

Generate_unique_coupon_codesResponseError String

Means either no matching case available or a parse error

Generate_unique_coupon_codesResponse201 UniqueCouponCodeParams

A set of parameters that can be passed to the `list_unique_coupon_codes` endpoint to obtain only the newly generated `UniqueCouponCodes`.

Generate_unique_coupon_codesResponse400 Error

Invalid or unpermitted parameter.

Generate_unique_coupon_codesResponse404 Error

Incorrect site or coupon ID.

Generate_unique_coupon_codesResponseDefault Error

Unexpected error.

generate_unique_coupon_codesWithConfiguration Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> Text

coupon_id: Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`.

-> CouponBulkCreate

The request body to send

-> m (Response Generate_unique_coupon_codesResponse)

Monadic computation which returns the result of the operation

POST /coupons/{coupon_id}/generate

The same as generate_unique_coupon_codes but accepts an explicit configuration.

generate_unique_coupon_codesRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Text

coupon_id: Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`.

-> CouponBulkCreate

The request body to send

-> ClientT m (Response ByteString)

Monadic computation which returns the result of the operation

POST /coupons/{coupon_id}/generate

The same as generate_unique_coupon_codes but returns the raw ByteString.

generate_unique_coupon_codesWithConfigurationRaw Source #

Arguments

:: forall m. MonadHTTP m 
=> Configuration

The configuration to use in the request

-> Text

coupon_id: Coupon ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-10off`.

-> CouponBulkCreate

The request body to send

-> m (Response ByteString)

Monadic computation which returns the result of the operation

POST /coupons/{coupon_id}/generate

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