Sha256: bbd6cb1c806d4193a2e11fdb102a9645a50f6829ed77453f6c83f5b1606d3c02

Contents?: true

Size: 339 Bytes

Versions: 2

Compression:

Stored size: 339 Bytes

Contents

module ActiveShipping
  class RateResponse < Response
    attr_reader :rates

    def initialize(success, message, params = {}, options = {})
      @rates = Array(options[:estimates] || options[:rates] || options[:rate_estimates])
      super
    end

    alias_method :estimates, :rates
    alias_method :rate_estimates, :rates
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_shipping-1.0.0.pre2 lib/active_shipping/rate_response.rb
active_shipping-1.0.0.pre1 lib/active_shipping/rate_response.rb