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

RecurlyClient.Types.Coupon

Description

Contains the types generated from the schema Coupon

Synopsis

Documentation

data Coupon Source #

Defines the object schema located at components.schemas.Coupon in the specification.

Constructors

Coupon 

Fields

Instances

Instances details
FromJSON Coupon Source # 
Instance details

Defined in RecurlyClient.Types.Coupon

ToJSON Coupon Source # 
Instance details

Defined in RecurlyClient.Types.Coupon

Show Coupon Source # 
Instance details

Defined in RecurlyClient.Types.Coupon

Eq Coupon Source # 
Instance details

Defined in RecurlyClient.Types.Coupon

Methods

(==) :: Coupon -> Coupon -> Bool #

(/=) :: Coupon -> Coupon -> Bool #

mkCoupon :: Coupon Source #

Create a new Coupon with all required 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 "bulk"

CouponCoupon_typeEnumSingle_code

Represents the JSON value "single_code"

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 "forever"

CouponDurationEnumSingle_use

Represents the JSON value "single_use"

CouponDurationEnumTemporal

Represents the JSON value "temporal"

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 "day"

CouponFree_trial_unitEnumMonth

Represents the JSON value "month"

CouponFree_trial_unitEnumWeek

Represents the JSON value "week"

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 "account"

CouponRedemption_resourceEnumSubscription

Represents the JSON value "subscription"

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 "expired"

CouponStateEnumMaxed_out

Represents the JSON value "maxed_out"

CouponStateEnumRedeemable

Represents the JSON value "redeemable"

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 "day"

CouponTemporal_unitEnumMonth

Represents the JSON value "month"

CouponTemporal_unitEnumWeek

Represents the JSON value "week"

CouponTemporal_unitEnumYear

Represents the JSON value "year"

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

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 "expired"

CouponUnique_coupon_codeStateEnumInactive

Represents the JSON value "inactive"

CouponUnique_coupon_codeStateEnumMaxed_out

Represents the JSON value "maxed_out"

CouponUnique_coupon_codeStateEnumRedeemable

Represents the JSON value "redeemable"