Class: Recurly::Resources::SubscriptionAddOn
- Inherits:
-
Recurly::Resource
- Object
- Recurly::Resource
- Recurly::Resources::SubscriptionAddOn
- Defined in:
- lib/recurly/resources/subscription_add_on.rb
Instance Attribute Summary collapse
-
#add_on ⇒ AddOnMini
Just the important parts.
-
#add_on_source ⇒ String
Used to determine where the associated add-on data is pulled from.
-
#created_at ⇒ DateTime
Created at.
-
#expired_at ⇒ DateTime
Expired at.
-
#id ⇒ String
Subscription Add-on ID.
-
#object ⇒ String
Object type.
-
#percentage_tiers ⇒ 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.
-
#quantity ⇒ Integer
Add-on quantity.
-
#revenue_schedule_type ⇒ String
Revenue schedule type.
-
#subscription_id ⇒ String
Subscription ID.
-
#tier_type ⇒ String
The pricing model for the add-on.
-
#tiers ⇒ 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.
-
#unit_amount ⇒ Float
Supports up to 2 decimal places.
-
#unit_amount_decimal ⇒ String
Supports up to 9 decimal places.
-
#updated_at ⇒ DateTime
Updated at.
-
#usage_calculation_type ⇒ String
The type of calculation to be employed for an add-on.
-
#usage_percentage ⇒ Float
The percentage taken of the monetary amount of usage tracked.
-
#usage_timeframe ⇒ String
The time at which usage totals are reset for billing purposes.
Attributes inherited from Recurly::Resource
Method Summary
Methods inherited from Recurly::Resource
#==, #get_response, #inspect, #requires_client?, #to_json, #to_s
Methods included from Schema::SchemaFactory
Methods included from Schema::ResourceCaster
Methods included from Schema::SchemaValidator
#get_did_you_mean, #validate!, #validate_attribute!
Instance Attribute Details
#add_on ⇒ AddOnMini
Returns Just the important parts.
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.
15 |
# File 'lib/recurly/resources/subscription_add_on.rb', line 15 define_attribute :add_on_source, String |
#created_at ⇒ DateTime
Returns Created at.
19 |
# File 'lib/recurly/resources/subscription_add_on.rb', line 19 define_attribute :created_at, DateTime |
#expired_at ⇒ DateTime
Returns 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.
27 |
# File 'lib/recurly/resources/subscription_add_on.rb', line 27 define_attribute :id, String |
#object ⇒ String
Returns 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.
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.
39 |
# File 'lib/recurly/resources/subscription_add_on.rb', line 39 define_attribute :quantity, Integer |
#revenue_schedule_type ⇒ String
Returns 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.
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](docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](recurly.com/developers/guides/item-addon-guide.html) 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.
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.
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.
63 |
# File 'lib/recurly/resources/subscription_add_on.rb', line 63 define_attribute :unit_amount_decimal, String |
#updated_at ⇒ DateTime
Returns 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.
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.
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.
79 |
# File 'lib/recurly/resources/subscription_add_on.rb', line 79 define_attribute :usage_timeframe, String |