Method: ActiveShipping::RateEstimate#total_price

Defined in:
lib/active_shipping/rate_estimate.rb

#total_priceInteger Also known as: price

The total price of the shipments in cents.

Returns:

  • (Integer)


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