Class: Killbill::Plugin::Api::NotificationPluginApi
- Defined in:
- lib/killbill/gen/plugin-api/notification_plugin_api.rb
Direct Known Subclasses
CatalogPluginApi, CurrencyPluginApi, EntitlementPluginApi, InvoicePluginApi, PaymentControlPluginApi, PaymentPluginApi
Instance Attribute Summary
Attributes inherited from JPlugin
#delegate_plugin, #rack_handler
Instance Method Summary collapse
-
#initialize(real_class_name, services = {}) ⇒ NotificationPluginApi
constructor
A new instance of NotificationPluginApi.
- #on_event(killbillEvent) ⇒ Object
Methods inherited from JPlugin
#is_active, #logger, #start_plugin, #stop_plugin
Constructor Details
#initialize(real_class_name, services = {}) ⇒ NotificationPluginApi
Returns a new instance of NotificationPluginApi.
37 38 39 |
# File 'lib/killbill/gen/plugin-api/notification_plugin_api.rb', line 37 def initialize(real_class_name, services = {}) super(real_class_name, services) end |
Instance Method Details
#on_event(killbillEvent) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/killbill/gen/plugin-api/notification_plugin_api.rb', line 43 def on_event(killbillEvent) # conversion for killbillEvent [type = org.killbill.billing.notification.plugin.api.ExtBusEvent] killbillEvent = Killbill::Plugin::Model::ExtBusEvent.new.to_ruby(killbillEvent) unless killbillEvent.nil? begin @delegate_plugin.on_event(killbillEvent) rescue Exception => e = "Failure in on_event: #{e}" unless e.backtrace.nil? = "#{message}\n#{e.backtrace.join("\n")}" end logger.warn raise Java::org.killbill.billing.payment.plugin.api.PaymentPluginApiException.new("on_event failure", e.) ensure @delegate_plugin.after_request end end |