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

RecurlyClient.Types.AddOnCreate

Description

Contains the types generated from the schema AddOnCreate

Synopsis

Documentation

data AddOnCreate Source #

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

Full add-on details.

Constructors

AddOnCreate 

Fields

  • addOnCreateAccounting_code :: Maybe Text

    accounting_code: Accounting code for invoice line items for this add-on. If no value is provided, it defaults to add-on's code. If `item_code`/`item_id` is part of the request then `accounting_code` must be absent.

    Constraints:

    • Maximum length of 20
    • Must match pattern '/^[a-z0-9_+-]+$/'
  • addOnCreateAdd_on_type :: Maybe AddOnCreateAdd_on_type

    add_on_type: Whether the add-on type is fixed, or usage-based.

  • addOnCreateAvalara_service_type :: Maybe Int

    avalara_service_type: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to the documentation for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_service_type` must be absent.

    Constraints:

    • Minimum of 0.0
  • addOnCreateAvalara_transaction_type :: Maybe Int

    avalara_transaction_type: Used by Avalara for Communications taxes. The transaction type in combination with the service type describe how the add-on is taxed. Refer to the documentation for more available t/s types. If an `Item` is associated to the `AddOn`, then the `avalara_transaction_type` must be absent.

    Constraints:

    • Minimum of 0.0
  • addOnCreateCode :: Text

    code: The unique identifier for the add-on within its plan. If `item_code`/`item_id` is part of the request then `code` must be absent. If `item_code`/`item_id` is not present `code` is required.

    Constraints:

    • Maximum length of 50
  • addOnCreateCurrencies :: Maybe (NonEmpty AddOnPricing)

    currencies: * If `item_code`/`item_id` is part of the request and the item has a default currency, then `currencies` is optional. If the item does not have a default currency, then `currencies` is required. If `item_code`/`item_id` is not present `currencies` is required. * If the add-on's `tier_type` is `tiered`, `volume`, or `stairstep`, then `currencies` must be absent. * Must be absent if `add_on_type` is `usage` and `usage_type` is `percentage`.

    Constraints:

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

    default_quantity: Default quantity for the hosted pages.

  • addOnCreateDisplay_quantity :: Maybe Bool

    display_quantity: Determines if the quantity field is displayed on the hosted pages for the add-on.

  • addOnCreateItem_code :: Maybe Text

    item_code: Unique code to identify an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used.

    Constraints:

    • Maximum length of 50
    • Must match pattern '/^[a-z0-9_+-]+$/'
  • addOnCreateItem_id :: Maybe Text

    item_id: System-generated unique identifier for an item. Available when the `Credit Invoices` feature is enabled. If `item_id` and `item_code` are both present, `item_id` will be used.

    Constraints:

    • Maximum length of 13
  • addOnCreateLiability_gl_account_id :: Maybe Text

    liability_gl_account_id: The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.

    Constraints:

    • Maximum length of 13
  • addOnCreateMeasured_unit_id :: Maybe Text

    measured_unit_id: System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used.

    Constraints:

    • Maximum length of 13
  • addOnCreateMeasured_unit_name :: Maybe Text

    measured_unit_name: Name of a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used.

  • addOnCreateName :: Text

    name: Describes your add-on and will appear in subscribers' invoices. If `item_code`/`item_id` is part of the request then `name` must be absent. If `item_code`/`item_id` is not present `name` is required.

    Constraints:

    • Maximum length of 255
  • addOnCreateOptional :: Maybe Bool

    optional: Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API.

  • addOnCreatePercentage_tiers :: Maybe [PercentageTiersByCurrency]

    percentage_tiers: Array of objects which must have at least one set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. This feature is currently in development and requires approval and enablement, please contact support.

  • addOnCreatePerformance_obligation_id :: Maybe Text

    performance_obligation_id: The ID of a performance obligation. Performance obligations are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.

    Constraints:

    • Maximum length of 13
  • addOnCreatePlan_id :: Maybe Text

    plan_id

    Constraints:

    • Maximum length of 13
  • addOnCreateRevenue_gl_account_id :: Maybe Text

    revenue_gl_account_id: The ID of a general ledger account. General ledger accounts are only accessible as a part of the Recurly RevRec Standard and Recurly RevRec Advanced features.

    Constraints:

    • Maximum length of 13
  • addOnCreateRevenue_schedule_type :: Maybe AddOnCreateRevenue_schedule_type

    revenue_schedule_type: When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item.

  • addOnCreateTax_code :: Maybe Text

    tax_code: Optional field used by Avalara, Vertex, and Recurly's In-the-Box tax solution to determine taxation rules. You can pass in specific tax codes using any of these tax integrations. For Recurly's In-the-Box tax offering you can also choose to instead use simple values of `unknown`, `physical`, or `digital` tax codes. If `item_code`/`item_id` is part of the request then `tax_code` must be absent.

    Constraints:

    • Maximum length of 50
  • addOnCreateTier_type :: Maybe AddOnCreateTier_type

    tier_type: The pricing model for the add-on. For more information, click here. See our Guide for an overview of how to configure quantity-based pricing models.

  • addOnCreateTiers :: Maybe [Tier]

    tiers: If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier.

  • addOnCreateUsage_calculation_type :: Maybe AddOnCreateUsage_calculation_type

    usage_calculation_type: The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used.

  • addOnCreateUsage_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, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise.

  • addOnCreateUsage_timeframe :: Maybe AddOnCreateUsage_timeframe

    usage_timeframe: The time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods.

  • addOnCreateUsage_type :: Maybe AddOnCreateUsage_type

    usage_type: Type of usage, required if `add_on_type` is `usage`. See our Guide for an overview of how to configure usage add-ons.

mkAddOnCreate Source #

Create a new AddOnCreate with all required fields.

data AddOnCreateAdd_on_type Source #

Defines the enum schema located at components.schemas.AddOnCreate.properties.add_on_type in the specification.

Whether the add-on type is fixed, or usage-based.

Constructors

AddOnCreateAdd_on_typeOther Value

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

AddOnCreateAdd_on_typeTyped Text

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

AddOnCreateAdd_on_typeEnumFixed

Represents the JSON value "fixed"

AddOnCreateAdd_on_typeEnumUsage

Represents the JSON value "usage"

data AddOnCreateRevenue_schedule_type Source #

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

When this add-on is invoiced, the line item will use this revenue schedule. If `item_code`/`item_id` is part of the request then `revenue_schedule_type` must be absent in the request as the value will be set from the item.

Constructors

AddOnCreateRevenue_schedule_typeOther Value

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

AddOnCreateRevenue_schedule_typeTyped Text

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

AddOnCreateRevenue_schedule_typeEnumAt_range_end

Represents the JSON value "at_range_end"

AddOnCreateRevenue_schedule_typeEnumAt_range_start

Represents the JSON value "at_range_start"

AddOnCreateRevenue_schedule_typeEnumEvenly

Represents the JSON value "evenly"

AddOnCreateRevenue_schedule_typeEnumNever

Represents the JSON value "never"

data AddOnCreateTier_type Source #

Defines the enum schema located at components.schemas.AddOnCreate.properties.tier_type in the specification.

The pricing model for the add-on. For more information, click here. See our Guide for an overview of how to configure quantity-based pricing models.

Constructors

AddOnCreateTier_typeOther Value

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

AddOnCreateTier_typeTyped Text

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

AddOnCreateTier_typeEnumFlat

Represents the JSON value "flat"

AddOnCreateTier_typeEnumTiered

Represents the JSON value "tiered"

AddOnCreateTier_typeEnumStairstep

Represents the JSON value "stairstep"

AddOnCreateTier_typeEnumVolume

Represents the JSON value "volume"

data AddOnCreateUsage_calculation_type Source #

Defines the enum schema located at components.schemas.AddOnCreate.properties.usage_calculation_type in the specification.

The type of calculation to be employed for an add-on. Cumulative billing will sum all usage records created in the current billing cycle. Last-in-period billing will apply only the most recent usage record in the billing period. If no value is specified, cumulative billing will be used.

Constructors

AddOnCreateUsage_calculation_typeOther Value

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

AddOnCreateUsage_calculation_typeTyped Text

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

AddOnCreateUsage_calculation_typeEnumCumulative

Represents the JSON value "cumulative"

AddOnCreateUsage_calculation_typeEnumLast_in_period

Represents the JSON value "last_in_period"

data AddOnCreateUsage_timeframe Source #

Defines the enum schema located at components.schemas.AddOnCreate.properties.usage_timeframe in the specification.

The time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods.

Constructors

AddOnCreateUsage_timeframeOther Value

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

AddOnCreateUsage_timeframeTyped Text

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

AddOnCreateUsage_timeframeEnumBilling_period

Represents the JSON value "billing_period"

AddOnCreateUsage_timeframeEnumSubscription_term

Represents the JSON value "subscription_term"

data AddOnCreateUsage_type Source #

Defines the enum schema located at components.schemas.AddOnCreate.properties.usage_type in the specification.

Type of usage, required if `add_on_type` is `usage`. See our Guide for an overview of how to configure usage add-ons.

Constructors

AddOnCreateUsage_typeOther Value

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

AddOnCreateUsage_typeTyped Text

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

AddOnCreateUsage_typeEnumPrice

Represents the JSON value "price"

AddOnCreateUsage_typeEnumPercentage

Represents the JSON value "percentage"