Class Campaign
In: tests/lib/campaign.rb
Parent: Object

Methods

Attributes

ag_current  [RW] 
cid  [RW] 
offer  [RW] 
type  [RW] 

Public Class methods

Returns a campaign obj at the ads page (step 1)

Oats.data[‘Campaign’][‘reuse’] will supply Campaign.current if exists

Parameters: Supplied in this order, or as a Hash

 type:: :search, :display, or :offer
 oid:: offer id (when type = offer)

Examples:

 Campaign.add_new(:type => 'search', :product_name => 'test', :advertiser => 'test')
 Campaign.add_new(:display)
 Campaign.add_new(:offer, 12345)

Returns a campaign for Campaign.reuse or current if there is any

Initialize Campaign class

Parameters: Supplied in this order, or as a Hash

 cid:: campaign id
 type:: :search, :display, or :offer
 oid:: offer id (when type = offer)

Examples:

 Campaign.new(:cid => '12345', :type => 'search')
 Campaign.new(12345)
 Campaign.new(12345, :display)
 Campaign.new(:offer, 12345)

Public Instance methods

Open register/ads page of a campaign for Agency or Admin

Apply actions to Admin Email page

 action(s):: Comma separated list of actions, applied sequentially

Apply actions to Admin Phone page

 action(s):: Comma separated list of actions, applied sequentially

Apply actions to Admin Page

 action(s):: Comma separated list of actions, applied sequentially

Apply actions to Admin Email page

 action(s):: Comma separated list of actions, applied sequentially

Return current CID of campaign or look it up in the current URL

Use cids when multiple campaigns suppose to be picked up

Performs Campaign step-4 AdGroup related operations using the block if given option: if ‘ba’, uploads a GIF file for LBAs

Example: # Use platform and own text instead of OATS, and add creative.

 campaign.step4 do
  Creative.master_ad "save", {:headline1 => 'My headline1.' }
  AdGroup.new.add_creative

end

Web Publisher Campaign Setup. Returns names (or id) of the acted WPCs.

 action(s):: (Array of ) action string(s), applied sequentially when the
       action is applicable.  Default: END
 wpc_id_or_names:: An integer WPC_ID or (array of) WPC name string(s)
       All names which RegExp match to the input string will be acted on.
      If omitted, setup all existing WPCs.
      If first name is '-', setup all WPCs except for listed ones.
 is_check_wpc_names:: If true, raises error unless input WPCs exist.
      Otherwise ignores WPCs that are not found.

Example:

 campaign.wpc_setup("PROVISION") # Provision all WPCS that can be provisioned
 campaign.wpc_setup %w[END STOP], "Yahoo Site Submit DMA" # END or STOP Yahoo
 campaign.wpc_setup "PROVISION,AUTO RUN", "-,Google" # Provision and AutoRun

[Validate]