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

#quantity ⇒ Integer

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_type ⇒ String

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_id ⇒ String

Returns Subscription ID.

Returns:

  • (String) —

    Subscription ID



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

define_attribute :subscription_id, String

#tier_type ⇒ String

Returns The type of tiering used by the Add-on.

Returns:

  • (String) —

    The type of tiering used by the Add-on.



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

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.

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_amount ⇒ Float

Returns This is priced in the subscription's currency.

Returns:

  • (Float) —

    This is priced in the subscription's currency.



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

define_attribute :unit_amount, Float

#updated_at ⇒ DateTime

Returns Updated at.

Returns:

  • (DateTime) —

    Updated at



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

define_attribute :updated_at, DateTime

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



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

define_attribute :usage_percentage, Float