Class: Killbill::Plugin::ActiveMerchant::RSpec::FakeJavaUserAccountApi

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

#initializeFakeJavaUserAccountApi

Returns a new instance of FakeJavaUserAccountApi.



123
124
125
# File 'lib/killbill/helpers/active_merchant/killbill_spec_helper.rb', line 123

def initialize
  @accounts = []
end

Instance Attribute Details

#accountsObject

Returns the value of attribute accounts.



121
122
123
# File 'lib/killbill/helpers/active_merchant/killbill_spec_helper.rb', line 121

def accounts
  @accounts
end

Instance Method Details

#get_account_by_id(id, context) ⇒ Object



127
128
129
# File 'lib/killbill/helpers/active_merchant/killbill_spec_helper.rb', line 127

def (id, context)
  @accounts.find { || .id == id.to_s }
end

#get_account_by_key(external_key, context) ⇒ Object



131
132
133
# File 'lib/killbill/helpers/active_merchant/killbill_spec_helper.rb', line 131

def (external_key, context)
  @accounts.find { || .external_key == external_key.to_s }
end