Class: Shipping::ShippingCommand

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::API, ActiveModel::Attributes, ActiveModel::Validations, ActiveModel::Validations::Callbacks, StripAttributes
Defined in:
app/services/shipping/shipping_command.rb

Overview

Service object: shipping command.

Instance Method Summary collapse

Instance Method Details

#oversize?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'app/services/shipping/shipping_command.rb', line 21

def oversize?
  shipping_lines.any?(&:oversize?)
end

#total_weightObject



17
18
19
# File 'app/services/shipping/shipping_command.rb', line 17

def total_weight
  shipping_lines.sum(&:weight_per_qty)
end