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

RecurlyClient.Types.Plan

Description

Contains the types generated from the schema Plan

Synopsis

Documentation

data Plan Source #

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

Full plan details.

Constructors

Plan 

Fields

  • planAccounting_code :: Maybe Text

    accounting_code: Accounting code for invoice line items for the plan. If no value is provided, it defaults to plan's code.

    Constraints:

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

    allow_any_item_on_subscriptions: Used to determine whether items can be assigned as add-ons to individual subscriptions. If `true`, items can be assigned as add-ons to individual subscription add-ons. If `false`, only plan add-ons can be used.

  • planAuto_renew :: Maybe Bool

    auto_renew: Subscriptions will automatically inherit this value once they are active. If `auto_renew` is `true`, then a subscription will automatically renew its term at renewal. If `auto_renew` is `false`, then a subscription will expire at the end of its term. `auto_renew` can be overridden on the subscription record itself.

  • planAvalara_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 plan is taxed. Refer to the documentation for more available t/s types.

    Constraints:

    • Minimum of 0.0
  • planAvalara_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 plan is taxed. Refer to the documentation for more available t/s types.

    Constraints:

    • Minimum of 0.0
  • planCode :: Text

    code: Unique code to identify the plan. This is used in Hosted Payment Page URLs and in the invoice exports.

    Constraints:

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

    created_at

  • planCurrencies :: Maybe (NonEmpty PlanPricing)

    currencies

    Constraints:

    • Must have a minimum of 1 items
  • planCustom_fields :: Maybe CustomFields

    custom_fields: The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.

  • planDeleted_at :: Maybe JsonDateTime

    deleted_at

  • planDescription :: Maybe Text

    description: Optional description, not displayed.

  • planDunning_campaign_id :: Maybe Text

    dunning_campaign_id: Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this plan. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used.

  • planHosted_pages :: Maybe PlanHostedPages

    hosted_pages

  • planId :: Maybe Text

    id

    Constraints:

    • Maximum length of 13
  • planInterval_length :: Maybe Int

    interval_length: Length of the plan's billing interval in `interval_unit`.

    Constraints:

    • Minimum of 1.0
  • planInterval_unit :: Maybe PlanInterval_unit

    interval_unit: Unit for the plan's billing interval.

  • planName :: Text

    name: This name describes your plan and will appear on the Hosted Payment Page and the subscriber's invoice.

    Constraints:

    • Maximum length of 255
  • planObject :: Maybe Text

    object

  • planPricing_model :: Maybe PlanPricing_model

    pricing_model: A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease.

  • planRamp_intervals :: Maybe [PlanRampInterval]

    ramp_intervals

  • planRevenue_schedule_type :: Maybe PlanRevenue_schedule_type

    revenue_schedule_type

  • planSetup_fee_accounting_code :: Maybe Text

    setup_fee_accounting_code: Accounting code for invoice line items for the plan's setup fee. If no value is provided, it defaults to plan's accounting code.

    Constraints:

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

    setup_fee_revenue_schedule_type

  • planState :: Maybe PlanState

    state: The current state of the plan.

  • planTax_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.

    Constraints:

    • Maximum length of 50
  • planTax_exempt :: Maybe Bool

    tax_exempt: `true` exempts tax on the plan, `false` applies tax on the plan.

  • planTotal_billing_cycles :: Maybe Int

    total_billing_cycles: Automatically terminate subscriptions after a defined number of billing cycles. Number of billing cycles before the plan automatically stops renewing, defaults to `null` for continuous, automatic renewal.

    Constraints:

    • Minimum of 0.0
  • planTrial_length :: Maybe Int

    trial_length: Length of plan's trial period in `trial_units`. `0` means `no trial`.

    Constraints:

    • Minimum of 0.0
  • planTrial_requires_billing_info :: Maybe Bool

    trial_requires_billing_info: Allow free trial subscriptions to be created without billing info. Should not be used if billing info is needed for initial invoice due to existing uninvoiced charges or setup fee.

  • planTrial_unit :: Maybe PlanTrial_unit

    trial_unit: Units for the plan's trial period.

  • planUpdated_at :: Maybe JsonDateTime

    updated_at

  • planVertex_transaction_type :: Maybe Text

    vertex_transaction_type: Used by Vertex for tax calculations. Possible values are `sale`, `rental`, `lease`.

Instances

Instances details
FromJSON Plan Source # 
Instance details

Defined in RecurlyClient.Types.Plan

ToJSON Plan Source # 
Instance details

Defined in RecurlyClient.Types.Plan

Show Plan Source # 
Instance details

Defined in RecurlyClient.Types.Plan

Methods

showsPrec :: Int -> Plan -> ShowS #

show :: Plan -> String #

showList :: [Plan] -> ShowS #

Eq Plan Source # 
Instance details

Defined in RecurlyClient.Types.Plan

Methods

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

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

mkPlan Source #

Arguments

:: Text

planCode

-> Text

planName

-> Plan 

Create a new Plan with all required fields.

data PlanInterval_unit Source #

Defines the enum schema located at components.schemas.Plan.properties.interval_unit in the specification.

Unit for the plan's billing interval.

Constructors

PlanInterval_unitOther Value

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

PlanInterval_unitTyped Text

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

PlanInterval_unitEnumDays

Represents the JSON value "days"

PlanInterval_unitEnumMonths

Represents the JSON value "months"

data PlanPricing_model Source #

Defines the enum schema located at components.schemas.Plan.properties.pricing_model in the specification.

A fixed pricing model has the same price for each billing period. A ramp pricing model defines a set of Ramp Intervals, where a subscription changes price on a specified cadence of billing periods. The price change could be an increase or decrease.

Constructors

PlanPricing_modelOther Value

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

PlanPricing_modelTyped Text

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

PlanPricing_modelEnumFixed

Represents the JSON value "fixed"

PlanPricing_modelEnumRamp

Represents the JSON value "ramp"

data PlanRevenue_schedule_type Source #

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

Constructors

PlanRevenue_schedule_typeOther Value

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

PlanRevenue_schedule_typeTyped Text

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

PlanRevenue_schedule_typeEnumAt_range_end

Represents the JSON value "at_range_end"

PlanRevenue_schedule_typeEnumAt_range_start

Represents the JSON value "at_range_start"

PlanRevenue_schedule_typeEnumEvenly

Represents the JSON value "evenly"

PlanRevenue_schedule_typeEnumNever

Represents the JSON value "never"

data PlanSetup_fee_revenue_schedule_type Source #

Defines the enum schema located at components.schemas.Plan.properties.setup_fee_revenue_schedule_type in the specification.

Constructors

PlanSetup_fee_revenue_schedule_typeOther Value

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

PlanSetup_fee_revenue_schedule_typeTyped Text

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

PlanSetup_fee_revenue_schedule_typeEnumAt_range_end

Represents the JSON value "at_range_end"

PlanSetup_fee_revenue_schedule_typeEnumAt_range_start

Represents the JSON value "at_range_start"

PlanSetup_fee_revenue_schedule_typeEnumEvenly

Represents the JSON value "evenly"

PlanSetup_fee_revenue_schedule_typeEnumNever

Represents the JSON value "never"

data PlanState Source #

Defines the enum schema located at components.schemas.Plan.properties.state in the specification.

The current state of the plan.

Constructors

PlanStateOther Value

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

PlanStateTyped Text

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

PlanStateEnumActive

Represents the JSON value "active"

PlanStateEnumInactive

Represents the JSON value "inactive"

data PlanTrial_unit Source #

Defines the enum schema located at components.schemas.Plan.properties.trial_unit in the specification.

Units for the plan's trial period.

Constructors

PlanTrial_unitOther Value

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

PlanTrial_unitTyped Text

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

PlanTrial_unitEnumDays

Represents the JSON value "days"

PlanTrial_unitEnumMonths

Represents the JSON value "months"