class ReactiveShipping::RateResponse
The `RateResponse` object is returned by the {ReactiveShipping::Carrier#find_rates} call. The most important method is {#rates}, which will return a list of possible shipping options with an estimated price.
@note Some carriers provide more information than others, so not all attributes
will be set, depending on what carrier you are using.
@!attribute rates
The available rate options for the shipment, with an estimated price. @return [Array<ReactiveShipping::RateEstimate>]
Attributes
estimates[R]
rate_estimates[R]
rates[R]
Public Class Methods
new(success, message, params = {}, options = {})
click to toggle source
Initializes a new RateResponse
instance.
@param success (see ReactiveShipping::Response#initialize) @param message (see ReactiveShipping::Response#initialize) @param params (see ReactiveShipping::Response#initialize) @option options (see ReactiveShipping::Response#initialize) @option options [Array<ReactiveShipping::RateEstimate>] :rates The rate estimates to
populate the {#rates} method with.
Calls superclass method
# File lib/reactive_shipping/rate_response.rb, line 25 def initialize(success, message, params = {}, options = {}) @rates = Array(options[:estimates] || options[:rates] || options[:rate_estimates]) super end