Class: Recurly::Requests::SubscriptionAddOnUpdate
- Inherits:
-
Recurly::Request
- Object
- Recurly::Request
- Recurly::Requests::SubscriptionAddOnUpdate
- Defined in:
- lib/recurly/requests/subscription_add_on_update.rb
Instance Attribute Summary collapse
-
#add_on_source ⇒ String
Used to determine where the associated add-on data is pulled from.
-
#code ⇒ String
If a code is provided without an id, the subscription add-on attributes will be set to the current value for those attributes on the plan add-on unless provided in the request.
-
#id ⇒ String
When an id is provided, the existing subscription add-on attributes will persist unless overridden in the request.
-
#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
Quantity.
-
#revenue_schedule_type ⇒ String
Revenue schedule type.
-
#tiers ⇒ Array[SubscriptionAddOnTier]
If the plan add-on's `tier_type` is `flat`, then `tiers` must be absent.
-
#unit_amount ⇒ Float
Allows up to 2 decimal places.
-
#unit_amount_decimal ⇒ String
Allows up to 9 decimal places.
-
#usage_percentage ⇒ Float
The percentage taken of the monetary amount of usage tracked.
Attributes inherited from Recurly::Request
Method Summary
Methods inherited from Recurly::Request
Methods included from Schema::SchemaFactory
Methods included from Schema::RequestCaster
Methods included from Schema::ResourceCaster
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.
11 |
# File 'lib/recurly/requests/subscription_add_on_update.rb', line 11 define_attribute :add_on_source, String |
#code ⇒ String
Returns If a code is provided without an id, the subscription add-on attributes will be set to the current value for those attributes on the plan add-on unless provided in the request. 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_update.rb', line 15 define_attribute :code, String |
#id ⇒ String
Returns When an id is provided, the existing subscription add-on attributes will persist unless overridden in the request.
19 |
# File 'lib/recurly/requests/subscription_add_on_update.rb', line 19 define_attribute :id, 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.
23 |
# File 'lib/recurly/requests/subscription_add_on_update.rb', line 23 define_attribute :percentage_tiers, Array, { :item_type => :SubscriptionAddOnPercentageTier } |
#quantity ⇒ Integer
Returns Quantity.
27 |
# File 'lib/recurly/requests/subscription_add_on_update.rb', line 27 define_attribute :quantity, Integer |
#revenue_schedule_type ⇒ String
Returns Revenue schedule type.
31 |
# File 'lib/recurly/requests/subscription_add_on_update.rb', line 31 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 without an `ending_quantity` value which represents the final tier.
35 |
# File 'lib/recurly/requests/subscription_add_on_update.rb', line 35 define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier } |
#unit_amount ⇒ Float
Returns Allows up to 2 decimal places. 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` cannot be provided.
39 |
# File 'lib/recurly/requests/subscription_add_on_update.rb', line 39 define_attribute :unit_amount, Float |
#unit_amount_decimal ⇒ String
Returns Allows up to 9 decimal places. 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_decimal` cannot be provided. Only supported when the plan add-on's `add_on_type` = `usage`. If `unit_amount_decimal` is provided, `unit_amount` cannot be provided.
43 |
# File 'lib/recurly/requests/subscription_add_on_update.rb', line 43 define_attribute :unit_amount_decimal, 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.
47 |
# File 'lib/recurly/requests/subscription_add_on_update.rb', line 47 define_attribute :usage_percentage, Float |