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

Instance Method Summary collapse

Instance Method Details

#oversize?Boolean

Returns:

  • (Boolean)


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

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

#total_weightObject



13
14
15
# File 'app/services/shipping/shipping_command.rb', line 13

def total_weight
  shipping_lines.sum(&:weight_per_qty)
end