Class: Killbill::Plugin::ActiveMerchant::RSpec::FakeJavaTenantUserApi

Inherits:
Object
  • Object
show all
Defined in:
lib/killbill/helpers/active_merchant/killbill_spec_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(per_tenant_config = {}) ⇒ FakeJavaTenantUserApi

Returns a new instance of FakeJavaTenantUserApi.



172
173
174
# File 'lib/killbill/helpers/active_merchant/killbill_spec_helper.rb', line 172

def initialize(per_tenant_config = {})
  @per_tenant_config = per_tenant_config
end

Instance Attribute Details

#per_tenant_configObject

Returns the value of attribute per_tenant_config.



170
171
172
# File 'lib/killbill/helpers/active_merchant/killbill_spec_helper.rb', line 170

def per_tenant_config
  @per_tenant_config
end

Instance Method Details

#get_tenant_values_for_key(key, context) ⇒ Object



176
177
178
179
180
181
182
# File 'lib/killbill/helpers/active_merchant/killbill_spec_helper.rb', line 176

def get_tenant_values_for_key(key, context)
  result = @per_tenant_config[context.tenant_id.to_s]
  if result
    return [result]
  end
  nil
end