Class: Omniship::RateResponse

Inherits:
Response show all
Defined in:
lib/omniship/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.



6
7
8
9
# File 'lib/omniship/rate_response.rb', line 6

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.



4
5
6
# File 'lib/omniship/rate_response.rb', line 4

def rates
  @rates
end