Method: ActiveShipping::RateEstimate#total_price
- Defined in:
- lib/active_shipping/rate_estimate.rb
#total_price ⇒ Integer Also known as: price
The total price of the shipments in cents.
102 103 104 105 106 |
# File 'lib/active_shipping/rate_estimate.rb', line 102 def total_price @total_price || @package_rates.sum { |pr| pr[:rate] } rescue NoMethodError raise ArgumentError.new("RateEstimate must have a total_price set, or have a full set of valid package rates.") end |