// Get AdWordsUser from "~/adwords.properties".
AdWordsUser user = new AdWordsUser();
// Get the CampaignService.
ManagedCustomerServiceInterface managedCustomerService =
user.getService(AdWordsService.V201306.MANAGED_CUSTOMER_SERVICE);
// Create account.
ManagedCustomer customer = new ManagedCustomer();
customer.setName("Customer created by ManagedCustomerService #" + System.currentTimeMillis());
customer.setCurrencyCode("EUR");
customer.setDateTimeZone("Europe/London");
// Create operations.
ManagedCustomerOperation operation = new ManagedCustomerOperation();
operation.setOperand(customer);
operation.setOperator(Operator.ADD);
ManagedCustomerOperation[] operations = new ManagedCustomerOperation[] {operation};
// Add account.
ManagedCustomerReturnValue result = managedCustomerService.mutate(operations);
// Display accounts.
for (ManagedCustomer customerResult : result.getValue()) {
System.out.println("Account with customer ID \"" + customerResult.getCustomerId()
+ "\" was created.");