Rohan Almeida > Google-Adwords-v1.8.2 > Google::Adwords::AccountService

Download:
Google-Adwords-v1.8.2.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  5
Open  2
View Bugs
Report a bug
Module Version: 0.4.0   Source   Latest Release: Google-Adwords-v1.14

NAME ^

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

VERSION ^

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

SYNOPSIS ^

    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 ^

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

METHODS ^

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

Returns

1 on success

SEE ALSO ^

AUTHORS ^

Rohan Almeida <rohan@almeida.in>

Mathieu Jondet <mathieu@eulerian.com>

LICENSE AND COPYRIGHT ^

Copyright (c) 2006 Rohan Almeida <rohan@almeida.in>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.