Class: OpenX::Services::Campaign
- Defined in:
- lib/openx/services/campaign.rb
Constant Summary collapse
- CPM =
Revenue types
1
- CPC =
2
- CPA =
3
- MONTHLY_TENANCY =
4
- REMNANT =
Campaign types
1
- HIGH =
2
- EXCLUSIVE =
3
Instance Method Summary collapse
- #banners ⇒ Object
-
#initialize(params = {}) ⇒ Campaign
constructor
A new instance of Campaign.
Methods inherited from Base
#<=>, establish_connection, has_one, #new_record?, openx_accessor, remote, with_connection
Methods included from Persistance::ClassMethods
Methods included from Persistance::InstanceMethods
Constructor Details
#initialize(params = {}) ⇒ Campaign
Returns a new instance of Campaign.
41 42 43 44 45 |
# File 'lib/openx/services/campaign.rb', line 41 def initialize(params = {}) raise ArgumentError.new("Missing advertiser_id") unless params[:advertiser_id] || params[:advertiser] params[:advertiser_id] ||= params[:advertiser].id super(params) end |