lib/recurly/requests/add_on_create.rb in recurly-4.15.0 vs lib/recurly/requests/add_on_create.rb in recurly-4.17.0

- old
+ new

@@ -61,11 +61,11 @@ # @!attribute optional # @return [Boolean] Whether the add-on is optional for the customer to include in their purchase on the hosted payment page. If false, the add-on will be included when a subscription is created through the Recurly UI. However, the add-on will not be included when a subscription is created through the API. define_attribute :optional, :Boolean # @!attribute percentage_tiers - # @return [Array[PercentageTiersByCurrency]] Array of objects which must have at least one set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without ending_amount value. + # @return [Array[PercentageTiersByCurrency]] Array of objects which must have at least one set of tiers per currency and the currency code. The tier_type must be `volume` or `tiered`, if not, it must be absent. There must be one tier without an `ending_amount` value which represents the final tier. define_attribute :percentage_tiers, Array, { :item_type => :PercentageTiersByCurrency } # @!attribute plan_id # @return [String] Plan ID define_attribute :plan_id, String @@ -81,15 +81,19 @@ # @!attribute tier_type # @return [String] The pricing model for the add-on. For more information, [click here](https://docs.recurly.com/docs/billing-models#section-quantity-based). See our [Guide](https://developers.recurly.com/guides/item-addon-guide.html) for an overview of how to configure quantity-based pricing models. define_attribute :tier_type, String # @!attribute tiers - # @return [Array[Tier]] If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier with an `ending_quantity` of 999999999 which is the default if not provided. + # @return [Array[Tier]] If the tier_type is `flat`, then `tiers` must be absent. The `tiers` object must include one to many tiers with `ending_quantity` and `unit_amount` for the desired `currencies`. There must be one tier without an `ending_quantity` value which represents the final tier. define_attribute :tiers, Array, { :item_type => :Tier } # @!attribute usage_percentage # @return [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, `tier_type` is `flat` and `usage_type` is percentage. Must be omitted otherwise. define_attribute :usage_percentage, Float + + # @!attribute usage_timeframe + # @return [String] The time at which usage totals are reset for billing purposes. Allows for `tiered` add-ons to accumulate usage over the course of multiple billing periods. + define_attribute :usage_timeframe, String # @!attribute usage_type # @return [String] Type of usage, required if `add_on_type` is `usage`. See our [Guide](https://developers.recurly.com/guides/usage-based-billing-guide.html) for an overview of how to configure usage add-ons. define_attribute :usage_type, String end