| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
RecurlyClient.Types.CouponCreate
Description
Contains the types generated from the schema CouponCreate
Synopsis
- data CouponCreate = CouponCreate {
- couponCreateApplies_to_all_items :: Maybe Bool
- couponCreateApplies_to_all_plans :: Maybe Bool
- couponCreateApplies_to_non_plan_charges :: Maybe Bool
- couponCreateCode :: Text
- couponCreateCoupon_type :: Maybe CouponCreateCoupon_type
- couponCreateCurrencies :: Maybe [CouponPricing]
- couponCreateDiscount_percent :: Maybe Int
- couponCreateDiscount_type :: CouponCreateDiscount_type
- couponCreateDuration :: Maybe CouponCreateDuration
- couponCreateFree_trial_amount :: Maybe Int
- couponCreateFree_trial_unit :: Maybe CouponCreateFree_trial_unit
- couponCreateHosted_description :: Maybe Text
- couponCreateInvoice_description :: Maybe Text
- couponCreateItem_codes :: Maybe [Text]
- couponCreateMax_redemptions :: Maybe Int
- couponCreateMax_redemptions_per_account :: Maybe Int
- couponCreateName :: Text
- couponCreatePlan_codes :: Maybe [Text]
- couponCreateRedeem_by_date :: Maybe Text
- couponCreateRedemption_resource :: Maybe CouponCreateRedemption_resource
- couponCreateTemporal_amount :: Maybe Int
- couponCreateTemporal_unit :: Maybe CouponCreateTemporal_unit
- couponCreateUnique_code_template :: Maybe Text
- mkCouponCreate :: Text -> CouponCreateDiscount_type -> Text -> CouponCreate
- data CouponCreateCoupon_type
- data CouponCreateDiscount_type
- data CouponCreateDuration
- data CouponCreateFree_trial_unit
- data CouponCreateRedemption_resource
- data CouponCreateTemporal_unit
Documentation
data CouponCreate Source #
Defines the object schema located at components.schemas.CouponCreate.allOf in the specification.
Constructors
| CouponCreate | |
Fields
| |
Instances
| FromJSON CouponCreate Source # | |
Defined in RecurlyClient.Types.CouponCreate | |
| ToJSON CouponCreate Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods toJSON :: CouponCreate -> Value # toEncoding :: CouponCreate -> Encoding # toJSONList :: [CouponCreate] -> Value # toEncodingList :: [CouponCreate] -> Encoding # | |
| Show CouponCreate Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods showsPrec :: Int -> CouponCreate -> ShowS # show :: CouponCreate -> String # showList :: [CouponCreate] -> ShowS # | |
| Eq CouponCreate Source # | |
Defined in RecurlyClient.Types.CouponCreate | |
Arguments
| :: Text | |
| -> CouponCreateDiscount_type | |
| -> Text | |
| -> CouponCreate |
Create a new CouponCreate with all required fields.
data CouponCreateCoupon_type Source #
Defines the enum schema located at components.schemas.CouponCreate.allOf.properties.coupon_type in the specification.
Whether the coupon is "single_code" or "bulk". Bulk coupons will require a `unique_code_template` and will generate unique codes through the `/generate` endpoint.
Constructors
| CouponCreateCoupon_typeOther Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
| CouponCreateCoupon_typeTyped Text | This constructor can be used to send values to the server which are not present in the specification yet. |
| CouponCreateCoupon_typeEnumBulk | Represents the JSON value |
| CouponCreateCoupon_typeEnumSingle_code | Represents the JSON value |
Instances
| FromJSON CouponCreateCoupon_type Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods parseJSON :: Value -> Parser CouponCreateCoupon_type # parseJSONList :: Value -> Parser [CouponCreateCoupon_type] # | |
| ToJSON CouponCreateCoupon_type Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods toJSON :: CouponCreateCoupon_type -> Value # toEncoding :: CouponCreateCoupon_type -> Encoding # toJSONList :: [CouponCreateCoupon_type] -> Value # | |
| Show CouponCreateCoupon_type Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods showsPrec :: Int -> CouponCreateCoupon_type -> ShowS # show :: CouponCreateCoupon_type -> String # showList :: [CouponCreateCoupon_type] -> ShowS # | |
| Eq CouponCreateCoupon_type Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods (==) :: CouponCreateCoupon_type -> CouponCreateCoupon_type -> Bool # (/=) :: CouponCreateCoupon_type -> CouponCreateCoupon_type -> Bool # | |
data CouponCreateDiscount_type Source #
Defines the enum schema located at components.schemas.CouponCreate.allOf.properties.discount_type in the specification.
The type of discount provided by the coupon (how the amount discounted is calculated)
Constructors
| CouponCreateDiscount_typeOther Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
| CouponCreateDiscount_typeTyped Text | This constructor can be used to send values to the server which are not present in the specification yet. |
| CouponCreateDiscount_typeEnumFixed | Represents the JSON value |
| CouponCreateDiscount_typeEnumFree_trial | Represents the JSON value |
| CouponCreateDiscount_typeEnumPercent | Represents the JSON value |
Instances
| FromJSON CouponCreateDiscount_type Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods parseJSON :: Value -> Parser CouponCreateDiscount_type # parseJSONList :: Value -> Parser [CouponCreateDiscount_type] # | |
| ToJSON CouponCreateDiscount_type Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods toJSON :: CouponCreateDiscount_type -> Value # toEncoding :: CouponCreateDiscount_type -> Encoding # toJSONList :: [CouponCreateDiscount_type] -> Value # | |
| Show CouponCreateDiscount_type Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods showsPrec :: Int -> CouponCreateDiscount_type -> ShowS # show :: CouponCreateDiscount_type -> String # showList :: [CouponCreateDiscount_type] -> ShowS # | |
| Eq CouponCreateDiscount_type Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods (==) :: CouponCreateDiscount_type -> CouponCreateDiscount_type -> Bool # (/=) :: CouponCreateDiscount_type -> CouponCreateDiscount_type -> Bool # | |
data CouponCreateDuration Source #
Defines the enum schema located at components.schemas.CouponCreate.allOf.properties.duration in the specification.
This field does not apply when the discount_type is `free_trial`. - "single_use" coupons applies to the first invoice only. - "temporal" coupons will apply to invoices for the duration determined by the `temporal_unit` and `temporal_amount` attributes. - "forever" coupons will apply to invoices forever.
Constructors
| CouponCreateDurationOther Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
| CouponCreateDurationTyped Text | This constructor can be used to send values to the server which are not present in the specification yet. |
| CouponCreateDurationEnumForever | Represents the JSON value |
| CouponCreateDurationEnumSingle_use | Represents the JSON value |
| CouponCreateDurationEnumTemporal | Represents the JSON value |
Instances
| FromJSON CouponCreateDuration Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods parseJSON :: Value -> Parser CouponCreateDuration # parseJSONList :: Value -> Parser [CouponCreateDuration] # | |
| ToJSON CouponCreateDuration Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods toJSON :: CouponCreateDuration -> Value # toEncoding :: CouponCreateDuration -> Encoding # toJSONList :: [CouponCreateDuration] -> Value # toEncodingList :: [CouponCreateDuration] -> Encoding # | |
| Show CouponCreateDuration Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods showsPrec :: Int -> CouponCreateDuration -> ShowS # show :: CouponCreateDuration -> String # showList :: [CouponCreateDuration] -> ShowS # | |
| Eq CouponCreateDuration Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods (==) :: CouponCreateDuration -> CouponCreateDuration -> Bool # (/=) :: CouponCreateDuration -> CouponCreateDuration -> Bool # | |
data CouponCreateFree_trial_unit Source #
Defines the enum schema located at components.schemas.CouponCreate.allOf.properties.free_trial_unit in the specification.
Description of the unit of time the coupon is for. Used with `free_trial_amount` to determine the duration of time the coupon is for. Required if `discount_type` is `free_trial`.
Constructors
| CouponCreateFree_trial_unitOther Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
| CouponCreateFree_trial_unitTyped Text | This constructor can be used to send values to the server which are not present in the specification yet. |
| CouponCreateFree_trial_unitEnumDay | Represents the JSON value |
| CouponCreateFree_trial_unitEnumMonth | Represents the JSON value |
| CouponCreateFree_trial_unitEnumWeek | Represents the JSON value |
Instances
data CouponCreateRedemption_resource Source #
Defines the enum schema located at components.schemas.CouponCreate.allOf.properties.redemption_resource in the specification.
Whether the discount is for all eligible charges on the account, or only a specific subscription.
Constructors
| CouponCreateRedemption_resourceOther Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
| CouponCreateRedemption_resourceTyped Text | This constructor can be used to send values to the server which are not present in the specification yet. |
| CouponCreateRedemption_resourceEnumAccount | Represents the JSON value |
| CouponCreateRedemption_resourceEnumSubscription | Represents the JSON value |
Instances
data CouponCreateTemporal_unit Source #
Defines the enum schema located at components.schemas.CouponCreate.allOf.properties.temporal_unit in the specification.
If `duration` is "temporal" than `temporal_unit` is multiplied by `temporal_amount` to define the duration that the coupon will be applied to invoices for.
Constructors
| CouponCreateTemporal_unitOther Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
| CouponCreateTemporal_unitTyped Text | This constructor can be used to send values to the server which are not present in the specification yet. |
| CouponCreateTemporal_unitEnumDay | Represents the JSON value |
| CouponCreateTemporal_unitEnumMonth | Represents the JSON value |
| CouponCreateTemporal_unitEnumWeek | Represents the JSON value |
| CouponCreateTemporal_unitEnumYear | Represents the JSON value |
Instances
| FromJSON CouponCreateTemporal_unit Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods parseJSON :: Value -> Parser CouponCreateTemporal_unit # parseJSONList :: Value -> Parser [CouponCreateTemporal_unit] # | |
| ToJSON CouponCreateTemporal_unit Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods toJSON :: CouponCreateTemporal_unit -> Value # toEncoding :: CouponCreateTemporal_unit -> Encoding # toJSONList :: [CouponCreateTemporal_unit] -> Value # | |
| Show CouponCreateTemporal_unit Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods showsPrec :: Int -> CouponCreateTemporal_unit -> ShowS # show :: CouponCreateTemporal_unit -> String # showList :: [CouponCreateTemporal_unit] -> ShowS # | |
| Eq CouponCreateTemporal_unit Source # | |
Defined in RecurlyClient.Types.CouponCreate Methods (==) :: CouponCreateTemporal_unit -> CouponCreateTemporal_unit -> Bool # (/=) :: CouponCreateTemporal_unit -> CouponCreateTemporal_unit -> Bool # | |