Class: BillingIntegration

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/billing_integration.rb

Constant Summary collapse

@@providers =
Set.new

Class Method Summary collapse

Class Method Details

.currentObject



3
4
5
# File 'app/models/billing_integration.rb', line 3

def self.current
  self.first :conditions => ["environment = ? AND active = ?", RAILS_ENV, true]
end

.providersObject



15
16
17
# File 'app/models/billing_integration.rb', line 15

def self.providers
  @@providers.to_a
end

.registerObject



11
12
13
# File 'app/models/billing_integration.rb', line 11

def self.register
  @@providers.add(self)
end