Hello, is the equivalent of BudgetOrderService supported in the Ads API? 
I'm following the instructions at 
https://developers.google.com/google-ads/api/docs/billing/billing-setups but 
it doesn't have any examples about how to use consolidated billing. I am 
trying to move an Account's billing underneath an existing consolidated 
billing Payment Account. However when I run the following code, a NEW 
payment account is created instead of attaching it to the existing one. 
Thanks!

Joel


PaymentsAccountInfo paiInfo = PaymentsAccountInfo.newBuilder()
    .setPaymentsAccountId("existing-payment-account-id")
    .setPaymentsAccountName(StringValue.of("existing-payment-account-name"))
    .setPaymentsProfileId("existing-payment-account-name"))
    .build();

BillingSetup bs = BillingSetup.newBuilder()
    .setId("existing-billing-setup-id")
    .setPaymentsAccountInfo(paiInfo)
    .setStartTimeType(TimeType.NOW)
    .build();

BillingSetupOperation customerOp = BillingSetupOperation.newBuilder()
    .setCreate(bs)
    .build();

try (BillingSetupServiceClient bsClient = 
googleAdsClient.getLatestVersion().createBillingSetupServiceClient();
    AccountBudgetProposalServiceClient abpClient = 
googleAdsClient.getLatestVersion().createAccountBudgetProposalServiceClient()
)
{
    MutateBillingSetupResponse mutateResponse = 
bsClient.mutateBillingSetup("1234567890", customerOp);

    AccountBudgetProposal proposal = AccountBudgetProposal.newBuilder()
        
.setBillingSetup(StringValue.of(mutateResponse.getResult().getResourceName()))
        .setProposalType(AccountBudgetProposalType.CREATE)
        .setProposedName(StringValue.of("Account Budget"))
        
.setProposedStartDateTime(StringValue.of(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd
 HH:mm:ss"))))
        .setProposedEndTimeType(TimeType.FOREVER)
        .setProposedSpendingLimitType(SpendingLimitType.INFINITE)
        .build();

    AccountBudgetProposalOperation abpOp = 
AccountBudgetProposalOperation.newBuilder()
        .setCreate(proposal)
        .build();

    MutateAccountBudgetProposalResponse abpResponse = 
abpClient.mutateAccountBudgetProposal(dbAccount.getExtAccountId(), abpOp);

}

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6de001fb-4b56-4b5a-9402-02b26e322a22%40googlegroups.com.

Reply via email to