Class: OpenX::Services::Agency

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

Instance Method Summary collapse

Methods inherited from Base

#<=>, establish_connection, has_one, #initialize, #new_record?, openx_accessor, remote, with_connection

Methods included from Persistance::ClassMethods

#create!, #destroy, #find

Methods included from Persistance::InstanceMethods

#destroy, #save!

Constructor Details

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

Instance Method Details

#advertisersObject



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

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

#create_advertiser!(params = {}) ⇒ Object



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

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

#publishersObject



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

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