Class: OpenX::Services::Agency

Inherits:
Base
  • Object
show all
Defined in:
lib/openx/services/agency.rb

Constant Summary

Constants inherited from Base

Base::CONFIGURATION_YAML

Instance Method Summary collapse

Methods inherited from Base

#<=>, configuration, configuration=, connection, connection=, create!, destroy, #destroy, find, has_one, #initialize, #new_record?, openx_accessor, #save!

Constructor Details

This class inherits a constructor from OpenX::Services::Base

Instance Method Details

#advertisersObject



26
27
28
# File 'lib/openx/services/agency.rb', line 26

def advertisers
  Advertiser.find(:all, self.id)
end

#create_advertiser!(params = {}) ⇒ Object



20
21
22
23
24
# File 'lib/openx/services/agency.rb', line 20

def create_advertiser!(params = {})
  Advertiser.create!(params.merge({
    :agency   => self,
  }))
end

#publishersObject



30
31
32
# File 'lib/openx/services/agency.rb', line 30

def publishers
  Publisher.find(:all, self.id)
end