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_onAddOnMini

Returns Just the important parts.

Returns:



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

define_attribute :add_on, :AddOnMini

#add_on_sourceString

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_atDateTime

Returns Created at.

Returns:

  • (DateTime)

    Created at



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

define_attribute :created_at, DateTime

#expired_atDateTime

Returns Expired at.

Returns:

  • (DateTime)

    Expired at



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

define_attribute :expired_at, DateTime

#idString

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

#objectString

Returns Object type.

Returns:

  • (String)

    Object type



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

define_attribute :object, String

#quantityInteger

Returns Add-on quantity.

Returns:

  • (Integer)

    Add-on quantity



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

define_attribute :quantity, Integer

#revenue_schedule_typeString

Returns Revenue schedule type.

Returns:

  • (String)

    Revenue schedule type



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

define_attribute :revenue_schedule_type, String

#subscription_idString

Returns Subscription ID.

Returns:

  • (String)

    Subscription ID



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

define_attribute :subscription_id, String

#tier_typeString

Returns The pricing model for the add-on. For more information, [click here](docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](developers.recurly.com/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models.

Returns:



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

define_attribute :tier_type, String

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

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.



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

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

#unit_amountFloat

Returns Supports up to 2 decimal places.

Returns:

  • (Float)

    Supports up to 2 decimal places.



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

define_attribute :unit_amount, Float

#unit_amount_decimalString

Returns Supports up to 9 decimal places.

Returns:

  • (String)

    Supports up to 9 decimal places.



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

define_attribute :unit_amount_decimal, String

#updated_atDateTime

Returns Updated at.

Returns:

  • (DateTime)

    Updated at



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

define_attribute :updated_at, DateTime

#usage_percentageFloat

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.



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

define_attribute :usage_percentage, Float