Class: Gecko::Record::OrderLineItem
- Defined in:
- lib/gecko/record/order_line_item.rb
Instance Method Summary collapse
Methods inherited from Base
demodulized_name, #initialize, #persisted?, #save
Methods included from Helpers::ValidationHelper
Methods included from Helpers::SerializationHelper
#_serialize, #as_json, #root, #serializable_hash, #serialize_attribute, #writeable?
Methods included from Helpers::InspectionHelper
Methods included from Helpers::AssociationHelper
Constructor Details
This class inherits a constructor from Gecko::Record::Base
Instance Method Details
#discounted_price ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/gecko/record/order_line_item.rb', line 30 def discounted_price if discount_amount&.nonzero? price - discount_amount else price * discount_multiplier end end |