Class: Recurly::Resources::SubscriptionAddOn

Inherits:
Recurly::Resource show all
Defined in:
lib/recurly/resources/subscription_add_on.rb

Instance Attribute Summary collapse

Attributes inherited from Recurly::Resource

#attributes

Method Summary

Methods inherited from Recurly::Resource

#==, #get_response, #inspect, #requires_client?, #to_json, #to_s

Methods included from Schema::SchemaFactory

#schema

Methods included from Schema::ResourceCaster

#cast

Methods included from Schema::SchemaValidator

#get_did_you_mean, #validate!, #validate_attribute!

Instance Attribute Details

#add_on ⇒ AddOnMini

Returns Just the important parts.

Returns:



11
# File 'lib/recurly/resources/subscription_add_on.rb', line 11

define_attribute :add_on, :AddOnMini

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



15
# File 'lib/recurly/resources/subscription_add_on.rb', line 15

define_attribute :add_on_source, String

#created_at ⇒ DateTime

Returns Created at.

Returns:

  • (DateTime) —

    Created at



19
# File 'lib/recurly/resources/subscription_add_on.rb', line 19

define_attribute :created_at, DateTime

#expired_at ⇒ DateTime

Returns Expired at.

Returns:

  • (DateTime) —

    Expired at



23
# File 'lib/recurly/resources/subscription_add_on.rb', line 23

define_attribute :expired_at, DateTime

#id ⇒ String

Returns Subscription Add-on ID.

Returns:

  • (String) —

    Subscription Add-on ID



27
# File 'lib/recurly/resources/subscription_add_on.rb', line 27

define_attribute :id, String

#object ⇒ String

Returns Object type.

Returns:

  • (String) —

    Object type



31
# File 'lib/recurly/resources/subscription_add_on.rb', line 31

define_attribute :object, String

#percentage_tiers ⇒ Array[SubscriptionAddOnPercentageTier]

Returns 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. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage. 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.

Returns:

  • (Array[SubscriptionAddOnPercentageTier]) —

    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. Use only if add_on.tier_type is tiered or volume and add_on.usage_type is percentage. 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.



35
# File 'lib/recurly/resources/subscription_add_on.rb', line 35

define_attribute :percentage_tiers, Array, { :item_type => :SubscriptionAddOnPercentageTier }

#quantity ⇒ Integer

Returns Add-on quantity.

Returns:

  • (Integer) —

    Add-on quantity



39
# File 'lib/recurly/resources/subscription_add_on.rb', line 39

define_attribute :quantity, Integer

#revenue_schedule_type ⇒ String

Returns Revenue schedule type.

Returns:

  • (String) —

    Revenue schedule type



43
# File 'lib/recurly/resources/subscription_add_on.rb', line 43

define_attribute :revenue_schedule_type, String

#subscription_id ⇒ String

Returns Subscription ID.

Returns:

  • (String) —

    Subscription ID



47
# File 'lib/recurly/resources/subscription_add_on.rb', line 47

define_attribute :subscription_id, String

#tier_type ⇒ String

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

Returns:

  • (String) —

    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.



51
# File 'lib/recurly/resources/subscription_add_on.rb', line 51

define_attribute :tier_type, String

#tiers ⇒ Array[SubscriptionAddOnTier]

Returns If tiers are provided in the request, all existing tiers on the Subscription Add-on will be removed and replaced by the tiers in the request. If add_on.tier_type is tiered or volume and add_on.usage_type is percentage use percentage_tiers instead. There must be one tier without an ending_quantity value which represents the final tier.

Returns:

  • (Array[SubscriptionAddOnTier]) —

    If tiers are provided in the request, all existing tiers on the Subscription Add-on will be removed and replaced by the tiers in the request. If add_on.tier_type is tiered or volume and add_on.usage_type is percentage use percentage_tiers instead. There must be one tier without an ending_quantity value which represents the final tier.



55
# File 'lib/recurly/resources/subscription_add_on.rb', line 55

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

#unit_amount ⇒ Float

Returns Supports up to 2 decimal places.

Returns:

  • (Float) —

    Supports up to 2 decimal places.



59
# File 'lib/recurly/resources/subscription_add_on.rb', line 59

define_attribute :unit_amount, Float

#unit_amount_decimal ⇒ String

Returns Supports up to 9 decimal places.

Returns:

  • (String) —

    Supports up to 9 decimal places.



63
# File 'lib/recurly/resources/subscription_add_on.rb', line 63

define_attribute :unit_amount_decimal, String

#updated_at ⇒ DateTime

Returns Updated at.

Returns:

  • (DateTime) —

    Updated at



67
# File 'lib/recurly/resources/subscription_add_on.rb', line 67

define_attribute :updated_at, DateTime

#usage_calculation_type ⇒ String

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

Returns:

  • (String) —

    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.



71
# File 'lib/recurly/resources/subscription_add_on.rb', line 71

define_attribute :usage_calculation_type, String

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

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.



75
# File 'lib/recurly/resources/subscription_add_on.rb', line 75

define_attribute :usage_percentage, Float

#usage_timeframe ⇒ String

Returns The time at which usage totals are reset for billing purposes.

Returns:

  • (String) —

    The time at which usage totals are reset for billing purposes.



79
# File 'lib/recurly/resources/subscription_add_on.rb', line 79

define_attribute :usage_timeframe, String