lib/recurly/resources/usage.rb in recurly-3.28.0 vs lib/recurly/resources/usage.rb in recurly-4.0.0

- old
+ new

@@ -5,11 +5,11 @@ module Recurly module Resources class Usage < Resource # @!attribute amount - # @return [Float] The amount of usage. Can be positive, negative, or 0. If the Decimal Quantity feature is enabled, this value will be rounded to nine decimal places. Otherwise, all digits after the decimal will be stripped. If the usage-based add-on is billed with a percentage, your usage should be a monetary amount formatted in cents (e.g., $5.00 is "500"). + # @return [Float] The amount of usage. Can be positive, negative, or 0. No decimals allowed, we will strip them. If the usage-based add-on is billed with a percentage, your usage will be a monetary amount you will want to format in cents. (e.g., $5.00 is "500"). define_attribute :amount, Float # @!attribute billed_at # @return [DateTime] When the usage record was billed on an invoice. define_attribute :billed_at, DateTime @@ -37,19 +37,23 @@ # @!attribute recording_timestamp # @return [DateTime] When the usage was recorded in your system. define_attribute :recording_timestamp, DateTime # @!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). + # @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[SubscriptionAddOnTier]] The tiers and prices of the subscription based on the usage_timestamp. If tier_type = flat, tiers = null define_attribute :tiers, Array, { :item_type => :SubscriptionAddOnTier } # @!attribute unit_amount # @return [Float] Unit price define_attribute :unit_amount, Float + + # @!attribute unit_amount_decimal + # @return [String] Unit price that can optionally support a sub-cent value. + define_attribute :unit_amount_decimal, String # @!attribute updated_at # @return [DateTime] When the usage record was billed on an invoice. define_attribute :updated_at, DateTime