lib/currency_plugin_test/api.rb in killbill-currency-plugin-test-1.1.1 vs lib/currency_plugin_test/api.rb in killbill-currency-plugin-test-1.1.2

- old
+ new

@@ -4,24 +4,10 @@ module Killbill module CurrencyPlugin class TestPlugin < Killbill::Plugin::Currency - def initialize() - @raise_exception = false - super() - end - - - def start_plugin - super - end - - # return DB connections to the Pool if required - def after_request - end - def get_base_currencies(options = {}) ['USD'] end def get_latest_conversion_date(base_currency, options = {}) @@ -31,21 +17,19 @@ def get_conversion_dates(base_currency, options = {}) [Time.now.utc] end def get_current_rates(base_currency, options = {}) - - rate = Killbill::Plugin::Model::Rate.new - rate.base_currency = base_currency - rate.currency = 'BRL' - rate.value = 12.3 + rate = Killbill::Plugin::Model::Rate.new + rate.base_currency = base_currency + rate.currency = 'BRL' + rate.value = 12.3 rate.conversion_date = Time.now.utc [rate] end def get_rates(base_currency, conversion_date, options = {}) get_current_rates(base_currency, options) end - end end end