Skip to content

Commit 02df57d

Browse files
authored
Changes for release 24_0. (#1071)
1 parent db5163a commit 02df57d

1,918 files changed

Lines changed: 443079 additions & 922 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
* 30.1.0
2+
- Google Ads API v24 release.
3+
- Update examples to use Google Ads API v24.
4+
- Fix apply_incentive example to make country code required. (#1070)
5+
- Fix 'UnaryUnaryCall' object has no attribute 'exception' error in async requests (#1061)
6+
- Update Generate Forecast Metrics example for v24
7+
18
* 30.0.0
29
- Google Ads API v23_2 release.
310
- Fix config module so that login_customer_id=None doesn't raise an error.

examples/account_management/create_customer.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,17 @@
2020
account.
2121
"""
2222

23-
2423
import argparse
2524
import sys
2625
from datetime import datetime
2726

2827
from google.ads.googleads.client import GoogleAdsClient
2928
from google.ads.googleads.errors import GoogleAdsException
30-
from google.ads.googleads.v23.resources.types.customer import Customer
31-
from google.ads.googleads.v23.services.services.customer_service.client import (
29+
from google.ads.googleads.v24.resources.types.customer import Customer
30+
from google.ads.googleads.v24.services.services.customer_service.client import (
3231
CustomerServiceClient,
3332
)
34-
from google.ads.googleads.v23.services.types.customer_service import (
33+
from google.ads.googleads.v24.services.types.customer_service import (
3534
CreateCustomerClientResponse,
3635
)
3736

@@ -91,7 +90,7 @@ def main(client: GoogleAdsClient, manager_customer_id: str) -> None:
9190

9291
# GoogleAdsClient will read the google-ads.yaml configuration file in the
9392
# home directory if none is specified.
94-
googleads_client = GoogleAdsClient.load_from_storage(version="v23")
93+
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
9594

9695
try:
9796
main(googleads_client, args.manager_customer_id)

examples/account_management/get_account_hierarchy.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828

2929
from google.ads.googleads.client import GoogleAdsClient
3030
from google.ads.googleads.errors import GoogleAdsException
31-
from google.ads.googleads.v23.services.services.google_ads_service.client import (
31+
from google.ads.googleads.v24.services.services.google_ads_service.client import (
3232
GoogleAdsServiceClient,
3333
)
34-
from google.ads.googleads.v23.services.services.customer_service.client import (
34+
from google.ads.googleads.v24.services.services.customer_service.client import (
3535
CustomerServiceClient,
3636
)
37-
from google.ads.googleads.v23.resources.types.customer_client import (
37+
from google.ads.googleads.v24.resources.types.customer_client import (
3838
CustomerClient,
3939
)
40-
from google.ads.googleads.v23.services.types.google_ads_service import (
40+
from google.ads.googleads.v24.services.types.google_ads_service import (
4141
SearchPagedResponse,
4242
GoogleAdsRow,
4343
)
@@ -238,7 +238,7 @@ def print_account_hierarchy(
238238

239239
# GoogleAdsClient will read the google-ads.yaml configuration file in the
240240
# home directory if none is specified.
241-
googleads_client = GoogleAdsClient.load_from_storage(version="v23")
241+
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
242242
try:
243243
main(googleads_client, args.login_customer_id)
244244
except GoogleAdsException as ex:

examples/account_management/get_change_details.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
from google.ads.googleads.client import GoogleAdsClient
2929
from google.ads.googleads.errors import GoogleAdsException
3030
from google.ads.googleads.util import get_nested_attr
31-
from google.ads.googleads.v23.services.services.google_ads_service.client import (
31+
from google.ads.googleads.v24.services.services.google_ads_service.client import (
3232
GoogleAdsServiceClient,
3333
)
34-
from google.ads.googleads.v23.services.types.google_ads_service import (
34+
from google.ads.googleads.v24.services.types.google_ads_service import (
3535
SearchGoogleAdsRequest,
3636
SearchPagedResponse,
3737
GoogleAdsRow,
3838
)
39-
from google.ads.googleads.v23.resources.types.change_event import ChangeEvent
39+
from google.ads.googleads.v24.resources.types.change_event import ChangeEvent
4040

4141

4242
# [START get_change_details]
@@ -218,7 +218,7 @@ def main(client: GoogleAdsClient, customer_id: str) -> None:
218218

219219
# GoogleAdsClient will read the google-ads.yaml configuration file in the
220220
# home directory if none is specified.
221-
googleads_client = GoogleAdsClient.load_from_storage(version="v23")
221+
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
222222
try:
223223
main(googleads_client, args.customer_id)
224224
except GoogleAdsException as ex:

examples/account_management/get_change_summary.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,20 @@
1616

1717
"""This example gets a list of which resources have been changed in an account."""
1818

19-
2019
import argparse
2120
import sys
2221

2322
from google.ads.googleads.client import GoogleAdsClient
2423
from google.ads.googleads.errors import GoogleAdsException
25-
from google.ads.googleads.v23.services.services.google_ads_service.client import (
24+
from google.ads.googleads.v24.services.services.google_ads_service.client import (
2625
GoogleAdsServiceClient,
2726
)
28-
from google.ads.googleads.v23.services.types.google_ads_service import (
27+
from google.ads.googleads.v24.services.types.google_ads_service import (
2928
SearchGoogleAdsRequest,
3029
SearchPagedResponse,
3130
GoogleAdsRow,
3231
)
33-
from google.ads.googleads.v23.resources.types.change_status import ChangeStatus
32+
from google.ads.googleads.v24.resources.types.change_status import ChangeStatus
3433

3534

3635
# [START get_change_summary]
@@ -110,7 +109,7 @@ def main(client: GoogleAdsClient, customer_id: str) -> None:
110109

111110
# GoogleAdsClient will read the google-ads.yaml configuration file in the
112111
# home directory if none is specified.
113-
googleads_client = GoogleAdsClient.load_from_storage(version="v23")
112+
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
114113

115114
try:
116115
main(googleads_client, args.customer_id)

examples/account_management/invite_user_with_access_role.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,23 @@
1717
The invitation is to manage a customer account with a desired access role.
1818
"""
1919

20-
2120
import argparse
2221
import sys
2322

2423
from google.ads.googleads.client import GoogleAdsClient
2524
from google.ads.googleads.errors import GoogleAdsException
26-
from google.ads.googleads.v23.services.services.customer_user_access_invitation_service.client import (
25+
from google.ads.googleads.v24.services.services.customer_user_access_invitation_service.client import (
2726
CustomerUserAccessInvitationServiceClient,
2827
)
29-
from google.ads.googleads.v23.services.types.customer_user_access_invitation_service import (
28+
from google.ads.googleads.v24.services.types.customer_user_access_invitation_service import (
3029
CustomerUserAccessInvitationOperation,
3130
MutateCustomerUserAccessInvitationResponse,
3231
)
33-
from google.ads.googleads.v23.resources.types.customer_user_access_invitation import (
32+
from google.ads.googleads.v24.resources.types.customer_user_access_invitation import (
3433
CustomerUserAccessInvitation,
3534
)
3635

37-
# AccessRoleEnum is part of google.ads.googleads.v23.enums.types.access_role
36+
# AccessRoleEnum is part of google.ads.googleads.v24.enums.types.access_role
3837
# but it's accessed via client.enums.AccessRoleEnum, so direct import for type hint might not be strictly needed for the parameter.
3938
# The field invitation.access_role expects an int (the enum value).
4039

@@ -115,7 +114,7 @@ def main(
115114

116115
# GoogleAdsClient will read the google-ads.yaml configuration file in the
117116
# home directory if none is specified.
118-
googleads_client = GoogleAdsClient.load_from_storage(version="v23")
117+
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
119118

120119
try:
121120
main(

examples/account_management/link_manager_to_client.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,31 @@
2222

2323
from google.ads.googleads.client import GoogleAdsClient
2424
from google.ads.googleads.errors import GoogleAdsException
25-
from google.ads.googleads.v23.services.services.customer_client_link_service.client import (
25+
from google.ads.googleads.v24.services.services.customer_client_link_service.client import (
2626
CustomerClientLinkServiceClient,
2727
)
28-
from google.ads.googleads.v23.services.types.customer_client_link_service import (
28+
from google.ads.googleads.v24.services.types.customer_client_link_service import (
2929
CustomerClientLinkOperation,
3030
MutateCustomerClientLinkResponse,
3131
)
32-
from google.ads.googleads.v23.resources.types.customer_client_link import (
32+
from google.ads.googleads.v24.resources.types.customer_client_link import (
3333
CustomerClientLink,
3434
)
35-
from google.ads.googleads.v23.services.services.google_ads_service.client import (
35+
from google.ads.googleads.v24.services.services.google_ads_service.client import (
3636
GoogleAdsServiceClient,
3737
)
38-
from google.ads.googleads.v23.services.types.google_ads_service import (
38+
from google.ads.googleads.v24.services.types.google_ads_service import (
3939
SearchPagedResponse,
4040
GoogleAdsRow,
4141
)
42-
from google.ads.googleads.v23.services.services.customer_manager_link_service.client import (
42+
from google.ads.googleads.v24.services.services.customer_manager_link_service.client import (
4343
CustomerManagerLinkServiceClient,
4444
)
45-
from google.ads.googleads.v23.services.types.customer_manager_link_service import (
45+
from google.ads.googleads.v24.services.types.customer_manager_link_service import (
4646
CustomerManagerLinkOperation,
4747
MutateCustomerManagerLinkResponse,
4848
)
49-
from google.ads.googleads.v23.resources.types.customer_manager_link import (
49+
from google.ads.googleads.v24.resources.types.customer_manager_link import (
5050
CustomerManagerLink,
5151
)
5252

@@ -179,7 +179,7 @@ def main(
179179

180180
# GoogleAdsClient will read the google-ads.yaml configuration file in the
181181
# home directory if none is specified.
182-
googleads_client = GoogleAdsClient.load_from_storage(version="v23")
182+
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
183183
try:
184184
main(googleads_client, args.customer_id, args.manager_customer_id)
185185
except GoogleAdsException as ex:

examples/account_management/list_accessible_customers.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,15 @@
2020
documentation: https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid
2121
"""
2222

23-
2423
import sys
2524
from typing import List
2625

2726
from google.ads.googleads.client import GoogleAdsClient
2827
from google.ads.googleads.errors import GoogleAdsException
29-
from google.ads.googleads.v23.services.services.customer_service.client import (
28+
from google.ads.googleads.v24.services.services.customer_service.client import (
3029
CustomerServiceClient,
3130
)
32-
from google.ads.googleads.v23.services.types.customer_service import (
31+
from google.ads.googleads.v24.services.types.customer_service import (
3332
ListAccessibleCustomersResponse,
3433
)
3534

@@ -55,7 +54,7 @@ def main(client: GoogleAdsClient) -> None:
5554
if __name__ == "__main__":
5655
# GoogleAdsClient will read the google-ads.yaml configuration file in the
5756
# home directory if none is specified.
58-
googleads_client = GoogleAdsClient.load_from_storage(version="v23")
57+
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
5958

6059
try:
6160
main(googleads_client)

examples/account_management/update_user_access.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@
2626

2727
from google.ads.googleads.client import GoogleAdsClient
2828
from google.ads.googleads.errors import GoogleAdsException
29-
from google.ads.googleads.v23.services.services.google_ads_service.client import (
29+
from google.ads.googleads.v24.services.services.google_ads_service.client import (
3030
GoogleAdsServiceClient,
3131
)
32-
from google.ads.googleads.v23.services.types.google_ads_service import (
32+
from google.ads.googleads.v24.services.types.google_ads_service import (
3333
SearchGoogleAdsRequest,
3434
SearchPagedResponse,
3535
)
36-
from google.ads.googleads.v23.resources.types.customer_user_access import (
36+
from google.ads.googleads.v24.resources.types.customer_user_access import (
3737
CustomerUserAccess,
3838
)
39-
from google.ads.googleads.v23.services.services.customer_user_access_service.client import (
39+
from google.ads.googleads.v24.services.services.customer_user_access_service.client import (
4040
CustomerUserAccessServiceClient,
4141
)
42-
from google.ads.googleads.v23.services.types.customer_user_access_service import (
42+
from google.ads.googleads.v24.services.types.customer_user_access_service import (
4343
CustomerUserAccessOperation,
4444
MutateCustomerUserAccessResponse,
4545
)
@@ -219,7 +219,7 @@ def modify_user_access(
219219

220220
# GoogleAdsClient will read the google-ads.yaml configuration file in the
221221
# home directory if none is specified.
222-
googleads_client = GoogleAdsClient.load_from_storage(version="v23")
222+
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
223223
try:
224224
main(
225225
googleads_client,

examples/account_management/verify_advertiser_identity.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,19 @@
1717
If required and not already started, it also starts the verification process.
1818
"""
1919

20-
2120
import argparse
2221
import sys
2322
from typing import Optional
2423

2524
from google.ads.googleads.client import GoogleAdsClient
2625
from google.ads.googleads.errors import GoogleAdsException
27-
from google.ads.googleads.v23.enums.types.identity_verification_program_status import (
26+
from google.ads.googleads.v24.enums.types.identity_verification_program_status import (
2827
IdentityVerificationProgramStatusEnum,
2928
)
30-
from google.ads.googleads.v23.services.services.identity_verification_service.client import (
29+
from google.ads.googleads.v24.services.services.identity_verification_service.client import (
3130
IdentityVerificationServiceClient,
3231
)
33-
from google.ads.googleads.v23.services.types.identity_verification_service import (
32+
from google.ads.googleads.v24.services.types.identity_verification_service import (
3433
GetIdentityVerificationResponse,
3534
IdentityVerification,
3635
IdentityVerificationProgress,
@@ -183,7 +182,7 @@ def start_identity_verification(
183182

184183
# GoogleAdsClient will read the google-ads.yaml configuration file in the
185184
# home directory if none is specified.
186-
googleads_client = GoogleAdsClient.load_from_storage(version="v23")
185+
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
187186

188187
try:
189188
main(googleads_client, args.customer_id)

0 commit comments

Comments
 (0)