Class: OpenX::Services::Advertiser

Inherits:
Base
  • Object
show all
Defined in:
lib/openx/services/advertiser.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, #new_record?, openx_accessor, #save!

Constructor Details

#initialize(params = {}) ⇒ Advertiser

Returns a new instance of Advertiser.



21
22
23
24
25
# File 'lib/openx/services/advertiser.rb', line 21

def initialize(params = {})
  raise "need agency" unless params[:agency_id] || params[:agency]
  params[:agency_id] ||= params[:agency].id
  super(params)
end

Instance Method Details

#campaignsObject



27
28
29
# File 'lib/openx/services/advertiser.rb', line 27

def campaigns
  Campaign.find(:all, self.id)
end