lib/friendly_shipping/rate.rb in friendly_shipping-0.3.4 vs lib/friendly_shipping/rate.rb in friendly_shipping-0.4.0
- old
+ new
@@ -7,33 +7,34 @@
:amounts,
:remote_service_id,
:delivery_date,
:warnings,
:errors,
- :data,
- :original_request,
- :original_response
+ :data
+ # @param [FriendlyShipping::ShippingMethod] shipping_method The rate's shipping method
+ # @param [Hash] amounts The amounts (as Money objects) that make up the rate
+ # @param [Integer] remote_service_id The remote service ID for the rate
+ # @param [Time] delivery_date The delivery date for the rate
+ # @param [Array] warnings Any warnings that were generated
+ # @param [Array] errors Any errors that were generated
+ # @param [Hash] data Additional data related to the rate
def initialize(
shipping_method:,
amounts:,
remote_service_id: nil,
delivery_date: nil,
warnings: [],
errors: [],
- data: {},
- original_request: nil,
- original_response: nil
+ data: {}
)
@remote_service_id = remote_service_id
@shipping_method = shipping_method
@amounts = amounts
@delivery_date = delivery_date
@warnings = warnings
@errors = errors
@data = data
- @original_request = original_request
- @original_response = original_response
end
def total_amount
raise NoAmountsGiven if amounts.empty?