Safe Haskell | None |
---|---|
Language | Haskell2010 |
Contains the different functions to run the operation postPromotionCodes
Synopsis
- postPromotionCodes :: forall m. MonadHTTP m => PostPromotionCodesRequestBody -> ClientT m (Response PostPromotionCodesResponse)
- data PostPromotionCodesRequestBody = PostPromotionCodesRequestBody {
- postPromotionCodesRequestBodyActive :: Maybe Bool
- postPromotionCodesRequestBodyCode :: Maybe Text
- postPromotionCodesRequestBodyCoupon :: Text
- postPromotionCodesRequestBodyCustomer :: Maybe Text
- postPromotionCodesRequestBodyExpand :: Maybe [Text]
- postPromotionCodesRequestBodyExpiresAt :: Maybe Int
- postPromotionCodesRequestBodyMaxRedemptions :: Maybe Int
- postPromotionCodesRequestBodyMetadata :: Maybe Object
- postPromotionCodesRequestBodyRestrictions :: Maybe PostPromotionCodesRequestBodyRestrictions'
- mkPostPromotionCodesRequestBody :: Text -> PostPromotionCodesRequestBody
- data PostPromotionCodesRequestBodyRestrictions' = PostPromotionCodesRequestBodyRestrictions' {}
- mkPostPromotionCodesRequestBodyRestrictions' :: PostPromotionCodesRequestBodyRestrictions'
- data PostPromotionCodesResponse
Documentation
:: forall m. MonadHTTP m | |
=> PostPromotionCodesRequestBody | The request body to send |
-> ClientT m (Response PostPromotionCodesResponse) | Monadic computation which returns the result of the operation |
POST /v1/promotion_codes
<p>A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.</p>
data PostPromotionCodesRequestBody Source #
Defines the object schema located at paths./v1/promotion_codes.POST.requestBody.content.application/x-www-form-urlencoded.schema
in the specification.
PostPromotionCodesRequestBody | |
|
Instances
mkPostPromotionCodesRequestBody Source #
Create a new PostPromotionCodesRequestBody
with all required fields.
data PostPromotionCodesRequestBodyRestrictions' Source #
Defines the object schema located at paths./v1/promotion_codes.POST.requestBody.content.application/x-www-form-urlencoded.schema.properties.restrictions
in the specification.
Settings that restrict the redemption of the promotion code.
PostPromotionCodesRequestBodyRestrictions' | |
|
mkPostPromotionCodesRequestBodyRestrictions' :: PostPromotionCodesRequestBodyRestrictions' Source #
Create a new PostPromotionCodesRequestBodyRestrictions'
with all required fields.
data PostPromotionCodesResponse Source #
Represents a response of the operation postPromotionCodes
.
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), PostPromotionCodesResponseError
is used.
PostPromotionCodesResponseError String | Means either no matching case available or a parse error |
PostPromotionCodesResponse200 PromotionCode | Successful response. |
PostPromotionCodesResponseDefault Error | Error response. |