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

RecurlyClient.Types.SubscriptionAddOnCreate

Description

Contains the types generated from the schema SubscriptionAddOnCreate

Synopsis

Documentation

data SubscriptionAddOnCreate Source #

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

Constructors

SubscriptionAddOnCreate 

Fields

  • subscriptionAddOnCreateAdd_on_source :: Maybe SubscriptionAddOnCreateAdd_on_source

    add_on_source: Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog.

  • subscriptionAddOnCreateCode :: Text

    code: If `add_on_source` is set to `plan_add_on` or left blank, then plan's add-on `code` should be used. If `add_on_source` is set to `item`, then the `code` from the associated item should be used.

    Constraints:

    • Maximum length of 50
  • subscriptionAddOnCreatePercentage_tiers :: Maybe (NonEmpty SubscriptionAddOnPercentageTier)

    percentage_tiers: If percentage tiers are provided in the request, all existing percentage tiers on the Subscription Add-on will be removed and replaced by the percentage tiers in the request. There must be one tier without ending_amount value which represents the final tier. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage. This feature is currently in development and requires approval and enablement, please contact support.

    Constraints:

    • Must have a minimum of 1 items
  • subscriptionAddOnCreateQuantity :: Maybe Int

    quantity

    Constraints:

    • Minimum of 0.0
  • subscriptionAddOnCreateRevenue_schedule_type :: Maybe SubscriptionAddOnCreateRevenue_schedule_type

    revenue_schedule_type

  • subscriptionAddOnCreateTiers :: Maybe (NonEmpty SubscriptionAddOnTier)

    tiers: If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount`. There must be one tier without an `ending_quantity` value which represents the final tier. See our Guide for an overview of how to configure quantity-based pricing models.

    Constraints:

    • Must have a minimum of 1 items
  • subscriptionAddOnCreateUnit_amount :: Maybe Float

    unit_amount: Allows up to 2 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount` cannot be provided.

    Constraints:

    • Maxium of 1000000.0
    • Minimum of 0.0
  • subscriptionAddOnCreateUnit_amount_decimal :: Maybe Text

    unit_amount_decimal: Allows up to 9 decimal places. Optionally, override the add-on's default unit amount. If the plan add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `unit_amount_decimal` cannot be provided. Only supported when the plan add-on's `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.

    Constraints:

    • Maxium of 1000000.0
    • Minimum of 0.0
  • subscriptionAddOnCreateUsage_percentage :: Maybe Float

    usage_percentage: The percentage taken of the monetary amount of usage tracked. This can be up to 4 decimal places. A value between 0.0 and 100.0. Required if `add_on_type` is usage and `usage_type` is percentage. Must be omitted otherwise. `usage_percentage` does not support tiers. See our Guide for an overview of how to configure usage add-ons.

    Constraints:

    • Maxium of 100.0
    • Minimum of 0.0

data SubscriptionAddOnCreateAdd_on_source Source #

Defines the enum schema located at components.schemas.SubscriptionAddOnCreate.properties.add_on_source in the specification.

Used to determine where the associated add-on data is pulled from. If this value is set to `plan_add_on` or left blank, then add-on data will be pulled from the plan's add-ons. If the associated `plan` has `allow_any_item_on_subscriptions` set to `true` and this field is set to `item`, then the associated add-on data will be pulled from the site's item catalog.

Constructors

SubscriptionAddOnCreateAdd_on_sourceOther Value

This case is used if the value encountered during decoding does not match any of the provided cases in the specification.

SubscriptionAddOnCreateAdd_on_sourceTyped Text

This constructor can be used to send values to the server which are not present in the specification yet.

SubscriptionAddOnCreateAdd_on_sourceEnumPlan_add_on

Represents the JSON value "plan_add_on"

SubscriptionAddOnCreateAdd_on_sourceEnumItem

Represents the JSON value "item"

data SubscriptionAddOnCreateRevenue_schedule_type Source #

Defines the enum schema located at components.schemas.SubscriptionAddOnCreate.properties.revenue_schedule_type in the specification.

Constructors

SubscriptionAddOnCreateRevenue_schedule_typeOther Value

This case is used if the value encountered during decoding does not match any of the provided cases in the specification.

SubscriptionAddOnCreateRevenue_schedule_typeTyped Text

This constructor can be used to send values to the server which are not present in the specification yet.

SubscriptionAddOnCreateRevenue_schedule_typeEnumAt_range_end

Represents the JSON value "at_range_end"

SubscriptionAddOnCreateRevenue_schedule_typeEnumAt_range_start

Represents the JSON value "at_range_start"

SubscriptionAddOnCreateRevenue_schedule_typeEnumEvenly

Represents the JSON value "evenly"

SubscriptionAddOnCreateRevenue_schedule_typeEnumNever

Represents the JSON value "never"