NAME

Yahoo::Marketing::Service - a base class for Service modules

SYNOPSIS

This module is a base class for various Service modules (CampaignService, AdGroupService, ForecastService, etc) to inherit from. It should not be used directly.

There are some methods common to all Services that are documented below.

See also perldoc Yahoo::Marketing::AccountService ...::AdGroupService ...::AdService ...::BasicReportService ...::BidInformationService ...::BudgetingService ...::CampaignService ...::ExcludedWordsService ...::ForecastService ...::KeywordResearchService ...::KeywordService ...::LocationService ...::MasterAccountService ...::UserManagementService

Please see the API docs at

http://searchmarketing.yahoo.com/developer/docs/V7/gsg/index.php#services

for details about what methods are available from each of the Services.

EXPORT

No exported functions

METHODS

simple_type_exceptions

Return all simple data type exceptions

new

Creates a new instance.

username

Get/set the username to be used for requests

password

Get/set the password to be used for requests

license

Get/set the license to be used for requests

version

Get/set the version to be used for requests

uri

Get/set the URI to be used for requests.

Defaults to http://marketing.ews.yahooapis.com/V7

master_account

Get/set the master account to be used for requests

account

Get/set the account to be used for requests. Not all requests require an account. Any service that deals with Campaigns (or Ad Groups, Ads, or Keywords) requires account to be set.

http://searchmarketing.yahoo.com/developer/docs/V7/gsg/requests.php#header

immortal

If set to a true value, Yahoo::Marketing service objects will not die when a SOAP fault is encountered. Instead, $service->fault will be set to the ApiFault returned in the SOAP response.

Defaults to false.

on_behalf_of_username

Get/set the onBehalfOfUsername to be used for requests.

http://searchmarketing.yahoo.com/developer/docs/V7/gsg/auth.php#onbehalfof

on_behalf_of_password

Get/set the onBehalfOfPassword to be used for requests.

http://searchmarketing.yahoo.com/developer/docs/V7/gsg/auth.php#onbehalfof

use_wsse_security_headers

If set to a true value, requests will use the WSSE headers for authentication. See http://schemas.xmlsoap.org/ws/2002/04/secext/

Defaults to true.

use_location_service

If set to a true value, LocationService will be used to determine the correct endpoint URL based on the account being used.

Defaults to true.

cache

Allows the user to pass in a Cache::Cache object to be used for cacheing WSDL information and account locations.

Defaults to using Cache::FileCache

cache_expire_time

Set the amount of time WSDL information should be cached.

Defaults to 1 day.

purge_cache

Purges all expired items from the cache. See purge() documentation in perldoc Cache::Cache.

clear_cache

Clears all items from the cache. See clear() documentation in perldoc Cache::Cache.

last_command_group

After a request, this will be set to the name of the last command group used.

remaining_quota

After a request, this will be set to the amount of quota associated with the last command group used.

wsdl_init

Accesses the appropriate wsdl and parses it to determine how to serialize / deserialize requests and responses. Note that you must have set the endpoint.

If you do not call it, calling any soap method on the service will force it to be called.

parse_config

Usage: ->parse_config( path => '/path/to/config.yml', section => 'some_section', # for example, 'sandbox' );

Defaults: path => 'yahoo-marketing.yml' # in current working directory section => 'default'

Attempts to parse the given config file, or yahoo-marketing.ysm in the current directory if no path is specified.

parse_config() returns $self, so you can do things like this:

my $service = Yahoo::Marketing::CampaignService->new->parse_config();

The default config section used is 'default'

Note that "default_account", "default_on_behalf_of_username", and "default_on_behalf_of_password" are not required. If present, they will be used to set "account", "on_behalf_of_username", and "on_behalf_of_password" *if* those values have not already been set.

See example config file in the EXAMPLES section of perldoc Yahoo::Marketing