Spend amount by the purchase order

2014-07-06 Thread Dzu
Hello,

we have bill:


Bill to:, details:

Product, Account, Order name, Purchase Order, Amount (EU)



And here is *Purchase Order* and *Amount (EU),  *amout is all money of order
*, *is way to see how much is spent money by *Purchase Order *in *yesterday* 
or custom date?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Getting Null Pointer Exception when downloading adhoc report

2014-07-06 Thread Jyothi Vejju
Hi Danial,

The problem was the wrong set of clientId and clientSecret being passed.
Even if the refresh token is wrong, it shows NPE.

A better error message would have helped :)

Thanks,
Jyothi

On Friday, July 4, 2014 1:46:39 PM UTC, Danial Klimkin wrote:
>
> Hello Jyothi,
>
>
> Thank you. The library maintainer will investigate this and follow up 
> within the bug.
>
>
> -Danial, AdWords API Team.
>
>
> On Friday, July 4, 2014 1:39:07 PM UTC+4, Jyothi Vejju wrote:
>>
>> Hi Danial,
>>
>> I have logged this issue on the library bug tracker.
>> https://github.com/googleads/googleads-java-lib/issues/19
>>
>> Thanks,
>> Jyothi
>>
>> On Friday, July 4, 2014 9:07:43 AM UTC, Danial Klimkin wrote:
>>>
>>> Hello Jyothi,
>>>
>>>
>>> Please log this as an issue on the library bug tracker:
>>>
>>>   https://github.com/googleads/googleads-java-lib/issues
>>>
>>> The library should report a better error on what's missing.
>>>
>>>
>>> -Danial, AdWords API Team.
>>>
>>>
>>> On Friday, July 4, 2014 8:30:01 AM UTC+4, Jyothi Vejju wrote:

 Hey Danial,

 Yes, none of the parameters is null. I am printing those values to 
 check the same. 
 I am not reading it from ads.properties file, and getting the 
 parameters from database.

 When I read parameters from ads.properties file, it works. But getting 
 them from database does n't work.


 On Thursday, July 3, 2014 2:04:06 PM UTC, Danial Klimkin wrote:
>
> Hello Jyothi,
>
>
> Please make sure all the parameters you are passing are not null. 
> Also, did you set up the ads.properties file?
>
>
> -Danial, AdWords API Team.
>
>
> On Thursday, July 3, 2014 4:07:51 PM UTC+4, Jyothi Vejju wrote:
>>
>>
>> Hi,
>>
>> I am trying to get account level stats using adhoc reports.
>> But when I run my program, I get this error :
>>
>> Caused by: java.lang.NullPointerException
>> at 
>> com.google.api.client.repackaged.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
>> at 
>> com.google.api.client.util.Preconditions.checkNotNull(Preconditions.java:127)
>> at 
>> com.google.api.client.json.jackson2.JacksonFactory.createJsonParser(JacksonFactory.java:96)
>> at 
>> com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:85)
>> at 
>> com.google.api.client.json.JsonObjectParser.parseAndClose(JsonObjectParser.java:81)
>> at 
>> com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:88)
>> at 
>> com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
>> at 
>> com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
>> at 
>> com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
>> at 
>> com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:247)
>> at 
>> com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
>> at 
>> com.google.api.ads.common.lib.auth.OAuth2Helper.callRefreshToken(OAuth2Helper.java:70)
>> at 
>> com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:144)
>> ...
>>
>> The code is :
>> Credential oAuth2Credential = 
>> new OfflineCredentials.Builder().forApi(Api.ADWORDS)
>> 
>> .withClientSecrets(clientId, clientSecret)
>> 
>> .withRefreshToken(refreshToken)
>> 
>> .build().generateCredential();
>> 
>> AdWordsSession session = new 
>> AdWordsSession.Builder().withDeveloperToken(developerToken)
>>   
>>.withOAuth2Credential(oAuth2Credential)
>>   
>>.build();
>>
>> Can someone help me with the possible causes?
>>
>> Thanks,
>> Jyothi
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this 

Re: ReportDefinition "Cost" field format change?

2014-07-06 Thread Oliver
In the v201402 release notes:
https://developers.google.com/adwords/api/docs/reference/

there is a section that says:

ReturnMoneyMicros defaults to true

Money fields 

 will 
be returned in micros by default. You can enable the old behavior by 
sending the ReturnMoneyMicros header with the value of false. Note: This 
field will be removed in the future.
Maybe that's what happened?

Oliver


On Sunday, July 6, 2014 5:21:19 PM UTC+1, stiggywigget wrote:
>
> Minor correction. 
> $xml = ReportUtils::DownloadReport($reportDefinition, $filepath = NULL, 
> $user, NULL);
>
> On Sunday, July 6, 2014 12:14:00 PM UTC-4, stiggywigget wrote:
>>
>> The docs clearly state that for a CAMPAIGN_PERFORMANCE_REPORT field 
>> "Cost" is type Money.
>>
>> $user->LoadService('ReportDefinitionService', ADWORDS_VERSION);
>>
>> // Create selector.
>> $selector = new Selector();
>> $selector->fields = array('CampaignId', 'CampaignName', 'Status', 
>> 'Clicks', 'Cost', 'Date');
>>
>> // Report definition.
>> $reportDefinition = new ReportDefinition();
>> $reportDefinition->reportName = 'Report';
>> $reportDefinition->dateRangeType = 'LAST_7_DAYS';
>> $reportDefinition->reportType = 'CAMPAIGN_PERFORMANCE_REPORT';
>> $reportDefinition->downloadFormat = 'XML';
>> $reportDefinition->selector = $selector;
>>
>> $xml_data = DownloadReport($user, $reportDefinition);
>>
>> For v201309:
>> > clicks='15' cost='40.24' day='2014-06-30' />
>>
>> For v201402:
>> > clicks='15' cost='4024' day='2014-06-30' />
>>
>> Please help!
>>
>> On Saturday, July 5, 2014 9:59:29 PM UTC-4, stiggywigget wrote:
>>>
>>> Cost field is a decimal value "7.44" in XML format for API v201309 (PHP)
>>> Cost field is a integer value "744" in XML format for API v201402 
>>> (PHP)
>>>
>>> I haven't found an explanation for this change.
>>>
>>> TIA.
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ReportDefinition "Cost" field format change?

2014-07-06 Thread stiggywigget
Minor correction. 
$xml = ReportUtils::DownloadReport($reportDefinition, $filepath = NULL, 
$user, NULL);

On Sunday, July 6, 2014 12:14:00 PM UTC-4, stiggywigget wrote:
>
> The docs clearly state that for a CAMPAIGN_PERFORMANCE_REPORT field "Cost" 
> is type Money.
>
> $user->LoadService('ReportDefinitionService', ADWORDS_VERSION);
>
> // Create selector.
> $selector = new Selector();
> $selector->fields = array('CampaignId', 'CampaignName', 'Status', 
> 'Clicks', 'Cost', 'Date');
>
> // Report definition.
> $reportDefinition = new ReportDefinition();
> $reportDefinition->reportName = 'Report';
> $reportDefinition->dateRangeType = 'LAST_7_DAYS';
> $reportDefinition->reportType = 'CAMPAIGN_PERFORMANCE_REPORT';
> $reportDefinition->downloadFormat = 'XML';
> $reportDefinition->selector = $selector;
>
> $xml_data = DownloadReport($user, $reportDefinition);
>
> For v201309:
>  clicks='15' cost='40.24' day='2014-06-30' />
>
> For v201402:
>  clicks='15' cost='4024' day='2014-06-30' />
>
> Please help!
>
> On Saturday, July 5, 2014 9:59:29 PM UTC-4, stiggywigget wrote:
>>
>> Cost field is a decimal value "7.44" in XML format for API v201309 (PHP)
>> Cost field is a integer value "744" in XML format for API v201402 
>> (PHP)
>>
>> I haven't found an explanation for this change.
>>
>> TIA.
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ReportDefinition "Cost" field format change?

2014-07-06 Thread stiggywigget
The docs clearly state that for a CAMPAIGN_PERFORMANCE_REPORT field "Cost" 
is type Money.

$user->LoadService('ReportDefinitionService', ADWORDS_VERSION);

// Create selector.
$selector = new Selector();
$selector->fields = array('CampaignId', 'CampaignName', 'Status', 'Clicks', 
'Cost', 'Date');

// Report definition.
$reportDefinition = new ReportDefinition();
$reportDefinition->reportName = 'Report';
$reportDefinition->dateRangeType = 'LAST_7_DAYS';
$reportDefinition->reportType = 'CAMPAIGN_PERFORMANCE_REPORT';
$reportDefinition->downloadFormat = 'XML';
$reportDefinition->selector = $selector;

$xml_data = DownloadReport($user, $reportDefinition);

For v201309:


For v201402:


Please help!

On Saturday, July 5, 2014 9:59:29 PM UTC-4, stiggywigget wrote:
>
> Cost field is a decimal value "7.44" in XML format for API v201309 (PHP)
> Cost field is a integer value "744" in XML format for API v201402 (PHP)
>
> I haven't found an explanation for this change.
>
> TIA.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.