lib/centaman/object/extra.rb in centaman-5.0.4 vs lib/centaman/object/extra.rb in centaman-5.0.5
- old
+ new
@@ -1,10 +1,12 @@
module Centaman
class Object::Extra < Centaman::Object
+ attr_reader :booking_time_id
attr_accessor :quantity
- def after_init(_args = {})
+ def after_init(args = {})
@quantity = 0
+ @booking_time_id = args.fetch(:booking_time_id, nil)
end
def price
@price ||= tax_inclusive ? calculate_price_before_tax : price_including_tax
end