Class: Shipping::ShippingItem

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

Instance Method Summary collapse

Instance Method Details

#oversize?Boolean

Returns:

  • (Boolean)


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

def oversize?
  return false if sku == 'TBS-KIT' # this sku has by default a length of 48 inches but this one is divided what means it has a different length
  shipping_length >= 48 || shipping_width >= 48 || shipping_height >= 48
end

#weight_per_qtyObject



18
19
20
# File 'app/services/shipping/shipping_item.rb', line 18

def weight_per_qty
  qty_shipped * base_weight
end