Class: Mks::Rate::ChargeableService

Inherits:
ApplicationRecord show all
Defined in:
app/models/mks/rate/chargeable_service.rb

Instance Method Summary collapse

Methods inherited from ApplicationRecord

#json, json

Instance Method Details

#generate_bundleObject



19
20
21
22
23
24
# File 'app/models/mks/rate/chargeable_service.rb', line 19

def generate_bundle
  sb = ServiceBundle.create(code: code, name: name, percent_discount: 0,
                            description: "Default bundle for service '#{name}'",
                            service_delivery_unit_id: service_delivery_unit_id)
  sb.chargeable_services << self
end