Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
RecurlyClient.Operations.Get_coupon
Description
Contains the different functions to run the operation get_coupon
Synopsis
- get_coupon :: forall m. MonadHTTP m => Text -> ClientT m (Response Get_couponResponse)
- data Get_couponResponse
- get_couponWithConfiguration :: forall m. MonadHTTP m => Configuration -> Text -> m (Response Get_couponResponse)
- get_couponRaw :: forall m. MonadHTTP m => Text -> ClientT m (Response ByteString)
- get_couponWithConfigurationRaw :: forall m. MonadHTTP m => Configuration -> Text -> m (Response ByteString)
Documentation
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`. |
-> ClientT m (Response Get_couponResponse) | Monadic computation which returns the result of the operation |
GET /coupons/{coupon_id}
Fetch a coupon
data Get_couponResponse Source #
Represents a response of the operation get_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), Get_couponResponseError
is used.
Constructors
Get_couponResponseError String | Means either no matching case available or a parse error |
Get_couponResponse200 Coupon | A coupon. |
Get_couponResponse404 Error | Incorrect site or coupon ID. |
Get_couponResponseDefault Error | Unexpected error. |
Instances
Show Get_couponResponse Source # | |
Defined in RecurlyClient.Operations.Get_coupon Methods showsPrec :: Int -> Get_couponResponse -> ShowS # show :: Get_couponResponse -> String # showList :: [Get_couponResponse] -> ShowS # | |
Eq Get_couponResponse Source # | |
Defined in RecurlyClient.Operations.Get_coupon Methods (==) :: Get_couponResponse -> Get_couponResponse -> Bool # (/=) :: Get_couponResponse -> Get_couponResponse -> Bool # |
get_couponWithConfiguration 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`. |
-> m (Response Get_couponResponse) | Monadic computation which returns the result of the operation |
GET /coupons/{coupon_id}
The same as get_coupon
but accepts an explicit configuration.
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`. |
-> ClientT m (Response ByteString) | Monadic computation which returns the result of the operation |
GET /coupons/{coupon_id}
The same as get_coupon
but returns the raw ByteString
.
get_couponWithConfigurationRaw 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`. |
-> m (Response ByteString) | Monadic computation which returns the result of the operation |
GET /coupons/{coupon_id}
The same as get_coupon
but accepts an explicit configuration and returns the raw ByteString
.