Google::Adwords::AccountService - Interact with the Google Adwords


Google-Adwords documentation  | view source Contained in the Google-Adwords distribution.

Index


getMccAlerts()

    Description of the sub here

NAME

Top

Google::Adwords::AccountService - Interact with the Google Adwords AccountService API calls

VERSION

Top

This documentation refers to Google::Adwords::AccountService version 0.3

SYNOPSIS

Top

    use Google::Adwords::AccountService;
    use Google::Adwords::AccountInfo;
    use Google::Adwords::CoverageType;
    use Google::Adwords::EmailPromotionsPreferences;
    use Google::Adwords::CreditCard;
    use Google::Adwords::Address;

    my $service = Google::Adwords::AccountService->new();

    # login to the Adwords server
    $service->email($email)
            ->password($password)
            ->clientEmail($cemail)
           or
            ->clientCustomerId($ccustomerid)
            ->applicationToken($app_token)
            ->developerToken($dev_token);

    # getAccountInfo
    my $account = $service->getAccountInfo();
    print "currencyCode : " . $account->currencyCode . "\n";
    print "descriptiveName : " . $account->descriptiveName . "\n";

    # getClientAccounts
    my @emailaccounts = $service->getClientAccounts();
    print "getClientAccounts : " . join('|', @emailaccounts) . "\n";

    # updateAccountInfo
    $account->primaryBusinessCategory('Advertising, Marketing, SEO');
    my $ret_updateaccountinfo = $service->updateAccountInfo($account);

DESCRIPTION

Top

This module provides an interface to the Google Adword AccountService API calls.

METHODS

Top

getAccountInfo()

Description

Return the AdWords account specified by the client account header.

Usage

     my $accountinfo = $obj->getAccountInfo();

Parameters

None.

Returns

A Google::Adwords::AccountInfo object.

getClientAccounts()

Description

Gets the primary email address for each account managed by the effective user. If the effective user user has no client accounts, an empty array is returned.

Usage

    my @emails = $obj->getClientAccounts();

Parameters

None.

Returns

An array of account login emails.

updateAccountInfo()

Description

Updates the database to reflect the changes in the account object.

Usage

    my $ret = $obj->updateAccountInfo($account);

Parameters

* $account : a Google::Adwords::AccountInfo object.

Returns

1 on success

SEE ALSO

Top

* Google::Adwords::AccountInfo
* Google::Adwords::CoverageType
* Google::Adwords::EmailPromotionsPreferences
* Google::Adwords::CreditCard
* Google::Adwords::Address

AUTHORS

Top

Rohan Almeida <rohan@almeida.in>

Mathieu Jondet <mathieu@eulerian.com>

LICENSE AND COPYRIGHT

Top


Google-Adwords documentation  | view source Contained in the Google-Adwords distribution.