| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
RecurlyClient.Types.Coupon
Description
Contains the types generated from the schema Coupon
Synopsis
- data Coupon = Coupon {
- couponApplies_to_all_items :: Maybe Bool
- couponApplies_to_all_plans :: Maybe Bool
- couponApplies_to_non_plan_charges :: Maybe Bool
- couponCode :: Maybe Text
- couponCoupon_type :: Maybe CouponCoupon_type
- couponCreated_at :: Maybe JsonDateTime
- couponDiscount :: Maybe CouponDiscount
- couponDuration :: Maybe CouponDuration
- couponExpired_at :: Maybe JsonDateTime
- couponFree_trial_amount :: Maybe Int
- couponFree_trial_unit :: Maybe CouponFree_trial_unit
- couponHosted_page_description :: Maybe Text
- couponId :: Maybe Text
- couponInvoice_description :: Maybe Text
- couponItems :: Maybe [ItemMini]
- couponMax_redemptions :: Maybe Int
- couponMax_redemptions_per_account :: Maybe Int
- couponName :: Maybe Text
- couponObject :: Maybe Text
- couponPlans :: Maybe [PlanMini]
- couponRedeem_by :: Maybe JsonDateTime
- couponRedemption_resource :: Maybe CouponRedemption_resource
- couponState :: Maybe CouponState
- couponTemporal_amount :: Maybe Int
- couponTemporal_unit :: Maybe CouponTemporal_unit
- couponUnique_code_template :: Maybe Text
- couponUnique_coupon_code :: Maybe CouponUnique_coupon_code
- couponUnique_coupon_codes_count :: Maybe Int
- couponUpdated_at :: Maybe JsonDateTime
- mkCoupon :: Coupon
- data CouponCoupon_type
- data CouponDuration
- data CouponFree_trial_unit
- data CouponRedemption_resource
- data CouponState
- data CouponTemporal_unit
- data CouponUnique_coupon_code = CouponUnique_coupon_code {
- couponUnique_coupon_codeBulk_coupon_code :: Maybe Text
- couponUnique_coupon_codeBulk_coupon_id :: Maybe Text
- couponUnique_coupon_codeCode :: Maybe Text
- couponUnique_coupon_codeCreated_at :: Maybe JsonDateTime
- couponUnique_coupon_codeExpired_at :: Maybe JsonDateTime
- couponUnique_coupon_codeId :: Maybe Text
- couponUnique_coupon_codeObject :: Maybe Text
- couponUnique_coupon_codeRedeemed_at :: Maybe JsonDateTime
- couponUnique_coupon_codeState :: Maybe CouponUnique_coupon_codeState
- couponUnique_coupon_codeUpdated_at :: Maybe JsonDateTime
- mkCouponUnique_coupon_code :: CouponUnique_coupon_code
- data CouponUnique_coupon_codeState
Documentation
Defines the object schema located at components.schemas.Coupon in the specification.
Constructors
| Coupon | |
Fields
| |
data CouponCoupon_type Source #
Defines the enum schema located at components.schemas.Coupon.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
| CouponCoupon_typeOther Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
| CouponCoupon_typeTyped Text | This constructor can be used to send values to the server which are not present in the specification yet. |
| CouponCoupon_typeEnumBulk | Represents the JSON value |
| CouponCoupon_typeEnumSingle_code | Represents the JSON value |
Instances
| FromJSON CouponCoupon_type Source # | |
Defined in RecurlyClient.Types.Coupon Methods parseJSON :: Value -> Parser CouponCoupon_type # parseJSONList :: Value -> Parser [CouponCoupon_type] # | |
| ToJSON CouponCoupon_type Source # | |
Defined in RecurlyClient.Types.Coupon Methods toJSON :: CouponCoupon_type -> Value # toEncoding :: CouponCoupon_type -> Encoding # toJSONList :: [CouponCoupon_type] -> Value # toEncodingList :: [CouponCoupon_type] -> Encoding # | |
| Show CouponCoupon_type Source # | |
Defined in RecurlyClient.Types.Coupon Methods showsPrec :: Int -> CouponCoupon_type -> ShowS # show :: CouponCoupon_type -> String # showList :: [CouponCoupon_type] -> ShowS # | |
| Eq CouponCoupon_type Source # | |
Defined in RecurlyClient.Types.Coupon Methods (==) :: CouponCoupon_type -> CouponCoupon_type -> Bool # (/=) :: CouponCoupon_type -> CouponCoupon_type -> Bool # | |
data CouponDuration Source #
Defines the enum schema located at components.schemas.Coupon.properties.duration in the specification.
- "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.
Constructors
| CouponDurationOther Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
| CouponDurationTyped Text | This constructor can be used to send values to the server which are not present in the specification yet. |
| CouponDurationEnumForever | Represents the JSON value |
| CouponDurationEnumSingle_use | Represents the JSON value |
| CouponDurationEnumTemporal | Represents the JSON value |
Instances
| FromJSON CouponDuration Source # | |
Defined in RecurlyClient.Types.Coupon Methods parseJSON :: Value -> Parser CouponDuration # parseJSONList :: Value -> Parser [CouponDuration] # | |
| ToJSON CouponDuration Source # | |
Defined in RecurlyClient.Types.Coupon Methods toJSON :: CouponDuration -> Value # toEncoding :: CouponDuration -> Encoding # toJSONList :: [CouponDuration] -> Value # toEncodingList :: [CouponDuration] -> Encoding # | |
| Show CouponDuration Source # | |
Defined in RecurlyClient.Types.Coupon Methods showsPrec :: Int -> CouponDuration -> ShowS # show :: CouponDuration -> String # showList :: [CouponDuration] -> ShowS # | |
| Eq CouponDuration Source # | |
Defined in RecurlyClient.Types.Coupon Methods (==) :: CouponDuration -> CouponDuration -> Bool # (/=) :: CouponDuration -> CouponDuration -> Bool # | |
data CouponFree_trial_unit Source #
Defines the enum schema located at components.schemas.Coupon.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.
Constructors
| CouponFree_trial_unitOther Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
| CouponFree_trial_unitTyped Text | This constructor can be used to send values to the server which are not present in the specification yet. |
| CouponFree_trial_unitEnumDay | Represents the JSON value |
| CouponFree_trial_unitEnumMonth | Represents the JSON value |
| CouponFree_trial_unitEnumWeek | Represents the JSON value |
Instances
| FromJSON CouponFree_trial_unit Source # | |
Defined in RecurlyClient.Types.Coupon Methods parseJSON :: Value -> Parser CouponFree_trial_unit # parseJSONList :: Value -> Parser [CouponFree_trial_unit] # | |
| ToJSON CouponFree_trial_unit Source # | |
Defined in RecurlyClient.Types.Coupon Methods toJSON :: CouponFree_trial_unit -> Value # toEncoding :: CouponFree_trial_unit -> Encoding # toJSONList :: [CouponFree_trial_unit] -> Value # toEncodingList :: [CouponFree_trial_unit] -> Encoding # | |
| Show CouponFree_trial_unit Source # | |
Defined in RecurlyClient.Types.Coupon Methods showsPrec :: Int -> CouponFree_trial_unit -> ShowS # show :: CouponFree_trial_unit -> String # showList :: [CouponFree_trial_unit] -> ShowS # | |
| Eq CouponFree_trial_unit Source # | |
Defined in RecurlyClient.Types.Coupon Methods (==) :: CouponFree_trial_unit -> CouponFree_trial_unit -> Bool # (/=) :: CouponFree_trial_unit -> CouponFree_trial_unit -> Bool # | |
data CouponRedemption_resource Source #
Defines the enum schema located at components.schemas.Coupon.properties.redemption_resource in the specification.
Whether the discount is for all eligible charges on the account, or only a specific subscription.
Constructors
| CouponRedemption_resourceOther Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
| CouponRedemption_resourceTyped Text | This constructor can be used to send values to the server which are not present in the specification yet. |
| CouponRedemption_resourceEnumAccount | Represents the JSON value |
| CouponRedemption_resourceEnumSubscription | Represents the JSON value |
Instances
| FromJSON CouponRedemption_resource Source # | |
Defined in RecurlyClient.Types.Coupon Methods parseJSON :: Value -> Parser CouponRedemption_resource # parseJSONList :: Value -> Parser [CouponRedemption_resource] # | |
| ToJSON CouponRedemption_resource Source # | |
Defined in RecurlyClient.Types.Coupon Methods toJSON :: CouponRedemption_resource -> Value # toEncoding :: CouponRedemption_resource -> Encoding # toJSONList :: [CouponRedemption_resource] -> Value # | |
| Show CouponRedemption_resource Source # | |
Defined in RecurlyClient.Types.Coupon Methods showsPrec :: Int -> CouponRedemption_resource -> ShowS # show :: CouponRedemption_resource -> String # showList :: [CouponRedemption_resource] -> ShowS # | |
| Eq CouponRedemption_resource Source # | |
Defined in RecurlyClient.Types.Coupon Methods (==) :: CouponRedemption_resource -> CouponRedemption_resource -> Bool # (/=) :: CouponRedemption_resource -> CouponRedemption_resource -> Bool # | |
data CouponState Source #
Defines the enum schema located at components.schemas.Coupon.properties.state in the specification.
Indicates if the coupon is redeemable, and if it is not, why.
Constructors
| CouponStateOther Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
| CouponStateTyped Text | This constructor can be used to send values to the server which are not present in the specification yet. |
| CouponStateEnumExpired | Represents the JSON value |
| CouponStateEnumMaxed_out | Represents the JSON value |
| CouponStateEnumRedeemable | Represents the JSON value |
Instances
| FromJSON CouponState Source # | |
Defined in RecurlyClient.Types.Coupon | |
| ToJSON CouponState Source # | |
Defined in RecurlyClient.Types.Coupon Methods toJSON :: CouponState -> Value # toEncoding :: CouponState -> Encoding # toJSONList :: [CouponState] -> Value # toEncodingList :: [CouponState] -> Encoding # | |
| Show CouponState Source # | |
Defined in RecurlyClient.Types.Coupon Methods showsPrec :: Int -> CouponState -> ShowS # show :: CouponState -> String # showList :: [CouponState] -> ShowS # | |
| Eq CouponState Source # | |
Defined in RecurlyClient.Types.Coupon | |
data CouponTemporal_unit Source #
Defines the enum schema located at components.schemas.Coupon.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
| CouponTemporal_unitOther Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
| CouponTemporal_unitTyped Text | This constructor can be used to send values to the server which are not present in the specification yet. |
| CouponTemporal_unitEnumDay | Represents the JSON value |
| CouponTemporal_unitEnumMonth | Represents the JSON value |
| CouponTemporal_unitEnumWeek | Represents the JSON value |
| CouponTemporal_unitEnumYear | Represents the JSON value |
Instances
| FromJSON CouponTemporal_unit Source # | |
Defined in RecurlyClient.Types.Coupon Methods parseJSON :: Value -> Parser CouponTemporal_unit # parseJSONList :: Value -> Parser [CouponTemporal_unit] # | |
| ToJSON CouponTemporal_unit Source # | |
Defined in RecurlyClient.Types.Coupon Methods toJSON :: CouponTemporal_unit -> Value # toEncoding :: CouponTemporal_unit -> Encoding # toJSONList :: [CouponTemporal_unit] -> Value # toEncodingList :: [CouponTemporal_unit] -> Encoding # | |
| Show CouponTemporal_unit Source # | |
Defined in RecurlyClient.Types.Coupon Methods showsPrec :: Int -> CouponTemporal_unit -> ShowS # show :: CouponTemporal_unit -> String # showList :: [CouponTemporal_unit] -> ShowS # | |
| Eq CouponTemporal_unit Source # | |
Defined in RecurlyClient.Types.Coupon Methods (==) :: CouponTemporal_unit -> CouponTemporal_unit -> Bool # (/=) :: CouponTemporal_unit -> CouponTemporal_unit -> Bool # | |
data CouponUnique_coupon_code Source #
Defines the object schema located at components.schemas.Coupon.properties.unique_coupon_code.allOf in the specification.
Will be populated when the Coupon being returned is a \`UniqueCouponCode\`.
Constructors
| CouponUnique_coupon_code | |
Fields
| |
Instances
| FromJSON CouponUnique_coupon_code Source # | |
Defined in RecurlyClient.Types.Coupon Methods parseJSON :: Value -> Parser CouponUnique_coupon_code # parseJSONList :: Value -> Parser [CouponUnique_coupon_code] # | |
| ToJSON CouponUnique_coupon_code Source # | |
Defined in RecurlyClient.Types.Coupon Methods toJSON :: CouponUnique_coupon_code -> Value # toEncoding :: CouponUnique_coupon_code -> Encoding # toJSONList :: [CouponUnique_coupon_code] -> Value # | |
| Show CouponUnique_coupon_code Source # | |
Defined in RecurlyClient.Types.Coupon Methods showsPrec :: Int -> CouponUnique_coupon_code -> ShowS # show :: CouponUnique_coupon_code -> String # showList :: [CouponUnique_coupon_code] -> ShowS # | |
| Eq CouponUnique_coupon_code Source # | |
Defined in RecurlyClient.Types.Coupon Methods (==) :: CouponUnique_coupon_code -> CouponUnique_coupon_code -> Bool # (/=) :: CouponUnique_coupon_code -> CouponUnique_coupon_code -> Bool # | |
mkCouponUnique_coupon_code :: CouponUnique_coupon_code Source #
Create a new CouponUnique_coupon_code with all required fields.
data CouponUnique_coupon_codeState Source #
Defines the enum schema located at components.schemas.Coupon.properties.unique_coupon_code.allOf.properties.state in the specification.
Indicates if the unique coupon code is redeemable or why not.
Constructors
| CouponUnique_coupon_codeStateOther Value | This case is used if the value encountered during decoding does not match any of the provided cases in the specification. |
| CouponUnique_coupon_codeStateTyped Text | This constructor can be used to send values to the server which are not present in the specification yet. |
| CouponUnique_coupon_codeStateEnumExpired | Represents the JSON value |
| CouponUnique_coupon_codeStateEnumInactive | Represents the JSON value |
| CouponUnique_coupon_codeStateEnumMaxed_out | Represents the JSON value |
| CouponUnique_coupon_codeStateEnumRedeemable | Represents the JSON value |
Instances
| FromJSON CouponUnique_coupon_codeState Source # | |
Defined in RecurlyClient.Types.Coupon Methods parseJSON :: Value -> Parser CouponUnique_coupon_codeState # parseJSONList :: Value -> Parser [CouponUnique_coupon_codeState] # | |
| ToJSON CouponUnique_coupon_codeState Source # | |
Defined in RecurlyClient.Types.Coupon Methods toJSON :: CouponUnique_coupon_codeState -> Value # toEncoding :: CouponUnique_coupon_codeState -> Encoding # toJSONList :: [CouponUnique_coupon_codeState] -> Value # toEncodingList :: [CouponUnique_coupon_codeState] -> Encoding # | |
| Show CouponUnique_coupon_codeState Source # | |
Defined in RecurlyClient.Types.Coupon Methods showsPrec :: Int -> CouponUnique_coupon_codeState -> ShowS # show :: CouponUnique_coupon_codeState -> String # showList :: [CouponUnique_coupon_codeState] -> ShowS # | |
| Eq CouponUnique_coupon_codeState Source # | |
Defined in RecurlyClient.Types.Coupon | |