Class: ActiveMerchant::Shipping::RateResponse

Inherits:
Response show all
Defined in:
lib/active_shipping/shipping/rate_response.rb

Instance Attribute Summary collapse

Attributes inherited from Response

#message, #params, #request, #test, #xml

Instance Method Summary collapse

Methods inherited from Response

#success?, #test?

Constructor Details

#initialize(success, message, params = {}, options = {}) ⇒ RateResponse

Returns a new instance of RateResponse.



8
9
10
11
# File 'lib/active_shipping/shipping/rate_response.rb', line 8

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

Instance Attribute Details

#ratesObject (readonly) Also known as: estimates, rate_estimates

Returns the value of attribute rates.



6
7
8
# File 'lib/active_shipping/shipping/rate_response.rb', line 6

def rates
  @rates
end