Re: Problem or Bug - creating or editing a TargetCpa Bidding with TargetCpaBiddingScheme()

2015-09-14 Thread Anthony Madrigal
Hey Valentin, 

For any object of type *Money* in AdWords API, you will need to set the 
microAmount 
.
 
You were getting an error since your microAmount of 100 is invalid. $1.00 
is equivalent to 1,000,000 micro units, so please use a valid amount.

If you are still facing issues after modifying this, please let me know.

Regards,
Anthony
AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/89397aa4-78cd-406c-a9bd-b6400cc7470f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Problem or Bug - creating or editing a TargetCpa Bidding with TargetCpaBiddingScheme()

2015-09-14 Thread Valentin
Hey,

I have a *problem creating or editing a TargetCpa Bidding strategy 
(TargetCpaBiddingScheme) with the Adwords PHP libary v201506*.

We're using the following code:

$biddingStrategyService =$user->GetService('BiddingStrategyService', 
ADWORDS_VERSION);

$sharedBiddingStrategy = new SharedBiddingStrategy();
$sharedBiddingStrategy->status = 'ENABLED';
$sharedBiddingStrategy->name = 'example strategy name';
 
$biddingScheme = new TargetCpaBiddingScheme();
$biddingScheme->targetCpa = new money('100'); 
$sharedBiddingStrategy->biddingScheme = $biddingScheme;

$operation = new BiddingStrategyOperation();

$operation->operator = 'ADD';
$operation->operand = $sharedBiddingStrategy;
 
$result = $biddingStrategyService->mutate(array($operation)); 
$newBiddingStrategy = $result->value[0];



Here is what the API returns: *[RequestError.UNKNOWN @ 
operations[0].operand.biddingScheme.targetCpa] *

However, if I remove the line *$biddingScheme->targetCpa = new 
money('100');* from the example above it says: * [RequiredError.REQUIRED @ 
operations[0].operand.biddingScheme.targetCpa]*

That doesn't make sense to me. Whats wrong with that line? Or is that a bug 
in the PHP library or even worse the Adwords API itself?

Any help appreciated! 

Thanks in advance,

Valentin

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/dc099291-5c7a-4eb3-ab0a-45984677b48a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.