Class: Killbill::Plugin::Invoice
- Inherits:
-
Notification
- Object
- PluginBase
- Notification
- Killbill::Plugin::Invoice
- Defined in:
- lib/killbill/invoice.rb
Instance Attribute Summary
Attributes inherited from PluginBase
#active, #clock, #conf_dir, #kb_apis, #logger, #plugin_name, #root
Instance Method Summary collapse
-
#build_item(item_model, amount, description = nil, type = :EXTERNAL_CHARGE) ⇒ Object
Helper method to build a new item from an existing one.
- #get_additional_invoice_items(invoice, dry_run, properties, context) ⇒ Object
Methods inherited from Notification
Methods inherited from PluginBase
#after_request, #initialize, #start_plugin, #stop_plugin
Constructor Details
This class inherits a constructor from Killbill::Plugin::PluginBase
Instance Method Details
#build_item(item_model, amount, description = nil, type = :EXTERNAL_CHARGE) ⇒ Object
Helper method to build a new item from an existing one
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/killbill/invoice.rb', line 14 def build_item(item_model, amount, description = nil, type = :EXTERNAL_CHARGE) item = Model::InvoiceItem.new item.created_date = item_model.created_date item.updated_date = item_model.updated_date item.invoice_id = item_model.invoice_id item.account_id = item_model.account_id item.currency = item_model.currency item.bundle_id = item_model.bundle_id item.subscription_id = item_model.subscription_id item.start_date = item_model.start_date item.end_date = item_model.end_date item.plan_name = item_model.plan_name item.phase_name = item_model.phase_name item.usage_name = item_model.usage_name item.linked_item_id = item_model.id item.id = SecureRandom.uuid item.invoice_item_type = type item.amount = amount item.description = description item.rate = nil item end |
#get_additional_invoice_items(invoice, dry_run, properties, context) ⇒ Object
8 9 10 |
# File 'lib/killbill/invoice.rb', line 8 def get_additional_invoice_items(invoice, dry_run, properties, context) [] end |