Class: Workarea::SetShippingEstimationAddress
- Inherits:
-
Object
- Object
- Workarea::SetShippingEstimationAddress
- Defined in:
- app/services/workarea/set_shipping_estimation_address.rb
Instance Method Summary collapse
-
#initialize(checkout, location, user = nil) ⇒ SetShippingEstimationAddress
constructor
A new instance of SetShippingEstimationAddress.
- #perform ⇒ Object
Constructor Details
#initialize(checkout, location, user = nil) ⇒ SetShippingEstimationAddress
Returns a new instance of SetShippingEstimationAddress.
5 6 7 8 9 |
# File 'app/services/workarea/set_shipping_estimation_address.rb', line 5 def initialize(checkout, location, user = nil) @checkout = checkout @location = location @user = user end |
Instance Method Details
#perform ⇒ Object
11 12 13 14 15 |
# File 'app/services/workarea/set_shipping_estimation_address.rb', line 11 def perform return if shipping.nil? set_address unless shipping.address.present? recalculate_price end |