class IronBank::Resources::RatePlanCharge
A rate plan charge belongs to a subscription rate plan.
Public Class Methods
excluded_fields()
click to toggle source
Calls superclass method
# File lib/iron_bank/resources/rate_plan_charge.rb, line 10 def self.excluded_fields super + single_resource_query_fields end
single_resource_query_fields()
click to toggle source
# File lib/iron_bank/resources/rate_plan_charge.rb, line 14 def self.single_resource_query_fields %w[RolloverBalance Price] end
Public Instance Methods
price()
click to toggle source
NOTE: price
was only available when (1) the pricing model for the
charge is either "Flat Fee" or "Per Unit" AND (2) the charge was queried through ZOQL, i.e, using `IronBank::Charge#where` method. Testing Zuora REST API (using the `IronBank::Charge#find` method) shows that Zuora does not return a `price` attribute in their response. This means we consider #price to be a remain from the SOAP ZOQL query operation. We are deprecating this method without replacement. Instead, users should be fetching the `#tiers` for the current charge and get the price information from there.
# File lib/iron_bank/resources/rate_plan_charge.rb, line 41 def price nil end
rollover_balance()
click to toggle source
# File lib/iron_bank/resources/rate_plan_charge.rb, line 27 def rollover_balance remote[:rollover_balance] || reload.remote[:rollover_balance] end