Hi,
I'm trying to create a budget via WCF Connected service in VS2017 (netcore
2.0) app. I'm using v201710 version.
Code:
/// Create the campaign budget.
Budget budget = new Budget
{
deliveryMethod = BudgetBudgetDeliveryMethod.STANDARD,
amount = new Money { microAmount = 50000000 },
isExplicitlyShared = false
};
BudgetOperation budgetOperation = new BudgetOperation();
budgetOperation.@operator = Operator.ADD;
budgetOperation.operand = budget;
var operations = new BudgetOperation[] { budgetOperation };
try
{
BudgetReturnValue budgetRetval =
Client.mutateAsync(_soapHeader, operations).Result.rval;
//Client.CloseAsync();
return budgetRetval.value[0];
}
catch (Exception e)
{
throw new System.ApplicationException("Failed to add
budget.", e);
}
It is failing with - [RangeError.TOO_LOW @ operations[0].operand.amount,
RequiredError.REQUIRED @ operations[0].operator] - even though both amount
and operator are assigned.
The client is constructed via Activator.CreateInstance<T>() where T
is BudgetServiceInterfaceClient from WCF generated class.
For example, the same setup but getAsync for the budget works fine.
Any ideas what could be wrong? When I use .NET 4.6.1 ad AdWords client
library, the budget creation works fine.
Any help appreciated.
Thanks,
Martin
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/1abd3b96-1ca8-4ed2-a300-0861c6f158c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.