Hi,
I am trying to add account billing by calling BillingSetupService using an
existing paymentAccountId which is in format xxxxxxxxxxxxxxxx. But it
throws invalid format as expected format is xxxx-xxxx-xxxx-xxxx (dashes are
required as opposed to adwords api).
Trouble is looks like there is a bug in Google ads java client library as
it expects payment account resource name with long paymentAccountId
BillingSetup billingSetup = BillingSetup.newBuilder()
// BUG: Google Ads api accepts only long PaymentsAccountId
while
// creating ResourceNames.paymentsAccount, but requires
String
// in format "xxxx-xxxx-xxxx-xxxx"
.setPaymentsAccount(StringValue.of(ResourceNames.paymentsAccount(anAccountID,
Long.valueOf(aBilling.getPaymentsAccountId()))))
Below is my request and response while adding the billingsetup. Can you
please confirm if above steps are correct and this is indeed a bug?? or is
there any other way of getting this work?
Request
-------
MethodName:
google.ads.googleads.v2.services.BillingSetupService/MutateBillingSetup
Endpoint: googleads.googleapis.com:443
Headers: {developer-token=REDACTED, login-customer-id=aaaaaaa,
x-goog-api-client=gl-java/1.8.0_201 gapic/ gax/1.45.0 grpc/1.21.0}
Body: customer_id: "bbbbb"
operation {
create {
start_time_type: NOW
payments_account {
value: "customers/bbbbb/paymentsAccounts/xxxxxxxxxxxxxxxx"
}
end_time_type: FOREVER
}
}
Response
--------
Headers:
Metadata(content-type=application/grpc,request-id=hM4Hr0B0AlzCIMLI1qlSsg,date=Fri,
10 Jan 2020 14:49:07 GMT,alt-svc=quic=":443"; ma=2592000;
v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443";
ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443";
ma=2592000,h3-Q043=":443"; ma=2592000)
Body: null
Failure message: errors {
error_code {
billing_setup_error: INVALID_PAYMENTS_ACCOUNT
}
message: "The requested payments account needs either a correctly
formatted id (xxxx-xxxx-xxxx-xxxx), or a non-blank name."
}
Thanks,
Alok
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/a0b1cdf9-f77c-4e05-b6ff-e6490005d64d%40googlegroups.com.