Class: Recurly::Requests::SubscriptionAddOnCreate

Inherits:
Recurly::Request show all
Defined in:
lib/recurly/requests/subscription_add_on_create.rb

Instance Attribute Summary collapse

Attributes inherited from Recurly::Request

#attributes

Method Summary

Methods inherited from Recurly::Request

#==, #to_s

Methods included from Schema::SchemaFactory

#schema

Methods included from Schema::RequestCaster

#cast_request

Methods included from Schema::ResourceCaster

#cast

Methods included from Schema::SchemaValidator

#get_did_you_mean, #validate!, #validate_attribute!

Instance Attribute Details

#add_on_source ⇒ String

Returns 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.

Returns:

  • (String) —

    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.



11
# File 'lib/recurly/requests/subscription_add_on_create.rb', line 11

define_attribute :add_on_source, String

#code ⇒ String

Returns 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.

Returns:

  • (String) —

    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.



15
# File 'lib/recurly/requests/subscription_add_on_create.rb', line 15

define_attribute :code, String

#quantity ⇒ Integer

Returns Quantity.

Returns:

  • (Integer) —

    Quantity



19
# File 'lib/recurly/requests/subscription_add_on_create.rb', line 19

define_attribute :quantity, Integer

#revenue_schedule_type ⇒ String

Returns Revenue schedule type.

Returns:

  • (String) —

    Revenue schedule type



23
# File 'lib/recurly/requests/subscription_add_on_create.rb', line 23

define_attribute :revenue_schedule_type, String

#tiers ⇒ Array[SubscriptionAddOnTier]

Returns 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 with an ending_quantity of 999999999 which is the default if not provided. See our Guide for an overview of how to configure quantity-based pricing models.

Returns:

  • (Array[SubscriptionAddOnTier]) —

    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 with an ending_quantity of 999999999 which is the default if not provided. See our Guide for an overview of how to configure quantity-based pricing models.



27
# File 'lib/recurly/requests/subscription_add_on_create.rb', line 27

define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier }

#unit_amount ⇒ Float

Returns * 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 must be absent.

Returns:

  • (Float) —
    • 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 must be absent.


31
# File 'lib/recurly/requests/subscription_add_on_create.rb', line 31

define_attribute :unit_amount, Float

#usage_percentage ⇒ Float

Returns 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.

Returns:

  • (Float) —

    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.



35
# File 'lib/recurly/requests/subscription_add_on_create.rb', line 35

define_attribute :usage_percentage, Float