lib/recurly/requests/add_on_update.rb in recurly-3.9.0 vs lib/recurly/requests/add_on_update.rb in recurly-3.10.0
- old
+ new
@@ -28,10 +28,18 @@
# @!attribute id
# @return [String] Add-on ID
define_attribute :id, String
+ # @!attribute measured_unit_id
+ # @return [String] System-generated unique identifier for a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used.
+ define_attribute :measured_unit_id, String
+
+ # @!attribute measured_unit_name
+ # @return [String] Name of a measured unit to be associated with the add-on. Either `measured_unit_id` or `measured_unit_name` are required when `add_on_type` is `usage`. If `measured_unit_id` and `measured_unit_name` are both present, `measured_unit_id` will be used.
+ define_attribute :measured_unit_name, String
+
# @!attribute name
# @return [String] Describes your add-on and will appear in subscribers' invoices. If an `Item` is associated to the `AddOn` then `name` must be absent.
define_attribute :name, String
# @!attribute optional
@@ -47,8 +55,12 @@
define_attribute :tax_code, 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.
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 and `usage_type` is percentage. Must be omitted otherwise. `usage_percentage` does not support tiers.
+ define_attribute :usage_percentage, Float
end
end
end