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

RecurlyClient.Types.CouponCreate

Description

Contains the types generated from the schema CouponCreate

Synopsis

Documentation

data CouponCreate Source #

Defines the object schema located at components.schemas.CouponCreate.allOf in the specification.

Constructors

CouponCreate 

Fields

  • couponCreateApplies_to_all_items :: Maybe Bool

    applies_to_all_items: To apply coupon to Items in your Catalog, include a list of `item_codes` in the request that the coupon will apply to. Or set value to true to apply to all Items in your Catalog. The following values are not permitted when `applies_to_all_items` is included: `free_trial_amount` and `free_trial_unit`.

  • couponCreateApplies_to_all_plans :: Maybe Bool

    applies_to_all_plans: The coupon is valid for all plans if true. If false then `plans` will list the applicable plans.

  • couponCreateApplies_to_non_plan_charges :: Maybe Bool

    applies_to_non_plan_charges: The coupon is valid for one-time, non-plan charges if true.

  • couponCreateCode :: Text

    code: The code the customer enters to redeem the coupon.

  • couponCreateCoupon_type :: Maybe CouponCreateCoupon_type

    coupon_type: 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.

  • couponCreateCurrencies :: Maybe [CouponPricing]

    currencies: Fixed discount currencies by currency. Required if the coupon type is `fixed`. This parameter should contain the coupon discount values

  • couponCreateDiscount_percent :: Maybe Int

    discount_percent: The percent of the price discounted by the coupon. Required if `discount_type` is `percent`.

  • couponCreateDiscount_type :: CouponCreateDiscount_type

    discount_type: The type of discount provided by the coupon (how the amount discounted is calculated)

  • couponCreateDuration :: Maybe CouponCreateDuration

    duration: 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.

  • couponCreateFree_trial_amount :: Maybe Int

    free_trial_amount: Sets the duration of time the `free_trial_unit` is for. Required if `discount_type` is `free_trial`.

    Constraints:

    • Maxium of 9999.0
    • Minimum of 1.0
  • couponCreateFree_trial_unit :: Maybe CouponCreateFree_trial_unit

    free_trial_unit: 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`.

  • couponCreateHosted_description :: Maybe Text

    hosted_description: This description will show up when a customer redeems a coupon on your Hosted Payment Pages, or if you choose to show the description on your own checkout page.

  • couponCreateInvoice_description :: Maybe Text

    invoice_description: Description of the coupon on the invoice.

    Constraints:

    • Maximum length of 255
  • couponCreateItem_codes :: Maybe [Text]

    item_codes: List of item codes to which this coupon applies. Sending `item_codes` is only permitted when `applies_to_all_items` is set to false. The following values are not permitted when `item_codes` is included: `free_trial_amount` and `free_trial_unit`.

  • couponCreateMax_redemptions :: Maybe Int

    max_redemptions: A maximum number of redemptions for the coupon. The coupon will expire when it hits its maximum redemptions.

  • couponCreateMax_redemptions_per_account :: Maybe Int

    max_redemptions_per_account: Redemptions per account is the number of times a specific account can redeem the coupon. Set redemptions per account to `1` if you want to keep customers from gaming the system and getting more than one discount from the coupon campaign.

  • couponCreateName :: Text

    name: The internal name for the coupon.

  • couponCreatePlan_codes :: Maybe [Text]

    plan_codes: List of plan codes to which this coupon applies. Required if `applies_to_all_plans` is false. Overrides `applies_to_all_plans` when `applies_to_all_plans` is true.

  • couponCreateRedeem_by_date :: Maybe Text

    redeem_by_date: The date and time the coupon will expire and can no longer be redeemed. Time is always 11:59:59, the end-of-day Pacific time.

  • couponCreateRedemption_resource :: Maybe CouponCreateRedemption_resource

    redemption_resource: Whether the discount is for all eligible charges on the account, or only a specific subscription.

  • couponCreateTemporal_amount :: Maybe Int

    temporal_amount: If `duration` is "temporal" than `temporal_amount` is an integer which is multiplied by `temporal_unit` to define the duration that the coupon will be applied to invoices for.

  • couponCreateTemporal_unit :: Maybe CouponCreateTemporal_unit

    temporal_unit: 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.

  • couponCreateUnique_code_template :: Maybe Text

    unique_code_template: On a bulk coupon, the template from which unique coupon codes are generated. - You must start the template with your coupon_code wrapped in single quotes. - Outside of single quotes, use a 9 for a character that you want to be a random number. - Outside of single quotes, use an "x" for a character that you want to be a random letter. - Outside of single quotes, use an * for a character that you want to be a random number or letter. - Use single quotes ' ' for characters that you want to remain static. These strings can be alphanumeric and may contain a - _ or +. For example: "'abc-'****'-def'"

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

CouponCreateCoupon_typeEnumSingle_code

Represents the JSON value "single_code"

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

CouponCreateDiscount_typeEnumFree_trial

Represents the JSON value "free_trial"

CouponCreateDiscount_typeEnumPercent

Represents the JSON value "percent"

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

CouponCreateDurationEnumSingle_use

Represents the JSON value "single_use"

CouponCreateDurationEnumTemporal

Represents the JSON value "temporal"

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

CouponCreateFree_trial_unitEnumMonth

Represents the JSON value "month"

CouponCreateFree_trial_unitEnumWeek

Represents the JSON value "week"

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

CouponCreateRedemption_resourceEnumSubscription

Represents the JSON value "subscription"

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

CouponCreateTemporal_unitEnumMonth

Represents the JSON value "month"

CouponCreateTemporal_unitEnumWeek

Represents the JSON value "week"

CouponCreateTemporal_unitEnumYear

Represents the JSON value "year"