Skip to content

Commit 9e5387f

Browse files
committed
Update examples to use v26
1 parent 8828009 commit 9e5387f

114 files changed

Lines changed: 773 additions & 773 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.

‎examples/account_management/create_customer.py‎

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

2727
from google.ads.googleads.client import GoogleAdsClient
2828
from google.ads.googleads.errors import GoogleAdsException
29-
from google.ads.googleads.v24.resources.types.customer import Customer
30-
from google.ads.googleads.v24.services.services.customer_service.client import (
29+
from google.ads.googleads.v26.resources.types.customer import Customer
30+
from google.ads.googleads.v26.services.services.customer_service.client import (
3131
CustomerServiceClient,
3232
)
33-
from google.ads.googleads.v24.services.types.customer_service import (
33+
from google.ads.googleads.v26.services.types.customer_service import (
3434
CreateCustomerClientResponse,
3535
)
3636

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

9191
# GoogleAdsClient will read the google-ads.yaml configuration file in the
9292
# home directory if none is specified.
93-
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
93+
googleads_client = GoogleAdsClient.load_from_storage(version="v26")
9494

9595
try:
9696
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.v24.services.services.google_ads_service.client import (
31+
from google.ads.googleads.v26.services.services.google_ads_service.client import (
3232
GoogleAdsServiceClient,
3333
)
34-
from google.ads.googleads.v24.services.services.customer_service.client import (
34+
from google.ads.googleads.v26.services.services.customer_service.client import (
3535
CustomerServiceClient,
3636
)
37-
from google.ads.googleads.v24.resources.types.customer_client import (
37+
from google.ads.googleads.v26.resources.types.customer_client import (
3838
CustomerClient,
3939
)
40-
from google.ads.googleads.v24.services.types.google_ads_service import (
40+
from google.ads.googleads.v26.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="v24")
241+
googleads_client = GoogleAdsClient.load_from_storage(version="v26")
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.v24.services.services.google_ads_service.client import (
31+
from google.ads.googleads.v26.services.services.google_ads_service.client import (
3232
GoogleAdsServiceClient,
3333
)
34-
from google.ads.googleads.v24.services.types.google_ads_service import (
34+
from google.ads.googleads.v26.services.types.google_ads_service import (
3535
SearchGoogleAdsRequest,
3636
SearchPagedResponse,
3737
GoogleAdsRow,
3838
)
39-
from google.ads.googleads.v24.resources.types.change_event import ChangeEvent
39+
from google.ads.googleads.v26.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="v24")
221+
googleads_client = GoogleAdsClient.load_from_storage(version="v26")
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 & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121

2222
from google.ads.googleads.client import GoogleAdsClient
2323
from google.ads.googleads.errors import GoogleAdsException
24-
from google.ads.googleads.v24.services.services.google_ads_service.client import (
24+
from google.ads.googleads.v26.services.services.google_ads_service.client import (
2525
GoogleAdsServiceClient,
2626
)
27-
from google.ads.googleads.v24.services.types.google_ads_service import (
27+
from google.ads.googleads.v26.services.types.google_ads_service import (
2828
SearchGoogleAdsRequest,
2929
SearchPagedResponse,
3030
GoogleAdsRow,
3131
)
32-
from google.ads.googleads.v24.resources.types.change_status import ChangeStatus
32+
from google.ads.googleads.v26.resources.types.change_status import ChangeStatus
3333

3434

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

110110
# GoogleAdsClient will read the google-ads.yaml configuration file in the
111111
# home directory if none is specified.
112-
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
112+
googleads_client = GoogleAdsClient.load_from_storage(version="v26")
113113

114114
try:
115115
main(googleads_client, args.customer_id)

‎examples/account_management/invite_user_with_access_role.py‎

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

2323
from google.ads.googleads.client import GoogleAdsClient
2424
from google.ads.googleads.errors import GoogleAdsException
25-
from google.ads.googleads.v24.services.services.customer_user_access_invitation_service.client import (
25+
from google.ads.googleads.v26.services.services.customer_user_access_invitation_service.client import (
2626
CustomerUserAccessInvitationServiceClient,
2727
)
28-
from google.ads.googleads.v24.services.types.customer_user_access_invitation_service import (
28+
from google.ads.googleads.v26.services.types.customer_user_access_invitation_service import (
2929
CustomerUserAccessInvitationOperation,
3030
MutateCustomerUserAccessInvitationResponse,
3131
)
32-
from google.ads.googleads.v24.resources.types.customer_user_access_invitation import (
32+
from google.ads.googleads.v26.resources.types.customer_user_access_invitation import (
3333
CustomerUserAccessInvitation,
3434
)
3535

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

@@ -127,7 +127,7 @@ def main(
127127

128128
# GoogleAdsClient will read the google-ads.yaml configuration file in the
129129
# home directory if none is specified.
130-
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
130+
googleads_client = GoogleAdsClient.load_from_storage(version="v26")
131131

132132
try:
133133
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.v24.services.services.customer_client_link_service.client import (
25+
from google.ads.googleads.v26.services.services.customer_client_link_service.client import (
2626
CustomerClientLinkServiceClient,
2727
)
28-
from google.ads.googleads.v24.services.types.customer_client_link_service import (
28+
from google.ads.googleads.v26.services.types.customer_client_link_service import (
2929
CustomerClientLinkOperation,
3030
MutateCustomerClientLinkResponse,
3131
)
32-
from google.ads.googleads.v24.resources.types.customer_client_link import (
32+
from google.ads.googleads.v26.resources.types.customer_client_link import (
3333
CustomerClientLink,
3434
)
35-
from google.ads.googleads.v24.services.services.google_ads_service.client import (
35+
from google.ads.googleads.v26.services.services.google_ads_service.client import (
3636
GoogleAdsServiceClient,
3737
)
38-
from google.ads.googleads.v24.services.types.google_ads_service import (
38+
from google.ads.googleads.v26.services.types.google_ads_service import (
3939
SearchPagedResponse,
4040
GoogleAdsRow,
4141
)
42-
from google.ads.googleads.v24.services.services.customer_manager_link_service.client import (
42+
from google.ads.googleads.v26.services.services.customer_manager_link_service.client import (
4343
CustomerManagerLinkServiceClient,
4444
)
45-
from google.ads.googleads.v24.services.types.customer_manager_link_service import (
45+
from google.ads.googleads.v26.services.types.customer_manager_link_service import (
4646
CustomerManagerLinkOperation,
4747
MutateCustomerManagerLinkResponse,
4848
)
49-
from google.ads.googleads.v24.resources.types.customer_manager_link import (
49+
from google.ads.googleads.v26.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="v24")
182+
googleads_client = GoogleAdsClient.load_from_storage(version="v26")
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525

2626
from google.ads.googleads.client import GoogleAdsClient
2727
from google.ads.googleads.errors import GoogleAdsException
28-
from google.ads.googleads.v24.services.services.customer_service.client import (
28+
from google.ads.googleads.v26.services.services.customer_service.client import (
2929
CustomerServiceClient,
3030
)
31-
from google.ads.googleads.v24.services.types.customer_service import (
31+
from google.ads.googleads.v26.services.types.customer_service import (
3232
ListAccessibleCustomersResponse,
3333
)
3434

@@ -54,7 +54,7 @@ def main(client: GoogleAdsClient) -> None:
5454
if __name__ == "__main__":
5555
# GoogleAdsClient will read the google-ads.yaml configuration file in the
5656
# home directory if none is specified.
57-
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
57+
googleads_client = GoogleAdsClient.load_from_storage(version="v26")
5858

5959
try:
6060
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.v24.services.services.google_ads_service.client import (
29+
from google.ads.googleads.v26.services.services.google_ads_service.client import (
3030
GoogleAdsServiceClient,
3131
)
32-
from google.ads.googleads.v24.services.types.google_ads_service import (
32+
from google.ads.googleads.v26.services.types.google_ads_service import (
3333
SearchGoogleAdsRequest,
3434
SearchPagedResponse,
3535
)
36-
from google.ads.googleads.v24.resources.types.customer_user_access import (
36+
from google.ads.googleads.v26.resources.types.customer_user_access import (
3737
CustomerUserAccess,
3838
)
39-
from google.ads.googleads.v24.services.services.customer_user_access_service.client import (
39+
from google.ads.googleads.v26.services.services.customer_user_access_service.client import (
4040
CustomerUserAccessServiceClient,
4141
)
42-
from google.ads.googleads.v24.services.types.customer_user_access_service import (
42+
from google.ads.googleads.v26.services.types.customer_user_access_service import (
4343
CustomerUserAccessOperation,
4444
MutateCustomerUserAccessResponse,
4545
)
@@ -233,7 +233,7 @@ def modify_user_access(
233233

234234
# GoogleAdsClient will read the google-ads.yaml configuration file in the
235235
# home directory if none is specified.
236-
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
236+
googleads_client = GoogleAdsClient.load_from_storage(version="v26")
237237
try:
238238
main(
239239
googleads_client,

‎examples/account_management/verify_advertiser_identity.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323

2424
from google.ads.googleads.client import GoogleAdsClient
2525
from google.ads.googleads.errors import GoogleAdsException
26-
from google.ads.googleads.v24.enums.types.identity_verification_program_status import (
26+
from google.ads.googleads.v26.enums.types.identity_verification_program_status import (
2727
IdentityVerificationProgramStatusEnum,
2828
)
29-
from google.ads.googleads.v24.services.services.identity_verification_service.client import (
29+
from google.ads.googleads.v26.services.services.identity_verification_service.client import (
3030
IdentityVerificationServiceClient,
3131
)
32-
from google.ads.googleads.v24.services.types.identity_verification_service import (
32+
from google.ads.googleads.v26.services.types.identity_verification_service import (
3333
GetIdentityVerificationResponse,
3434
IdentityVerification,
3535
IdentityVerificationProgress,
@@ -182,7 +182,7 @@ def start_identity_verification(
182182

183183
# GoogleAdsClient will read the google-ads.yaml configuration file in the
184184
# home directory if none is specified.
185-
googleads_client = GoogleAdsClient.load_from_storage(version="v24")
185+
googleads_client = GoogleAdsClient.load_from_storage(version="v26")
186186

187187
try:
188188
main(googleads_client, args.customer_id)

‎examples/advanced_operations/add_ad_customizer.py‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,25 @@
2424

2525
from google.ads.googleads.client import GoogleAdsClient
2626
from google.ads.googleads.errors import GoogleAdsException
27-
from google.ads.googleads.v24.common.types import AdTextAsset
28-
from google.ads.googleads.v24.resources.types import (
27+
from google.ads.googleads.v26.common.types import AdTextAsset
28+
from google.ads.googleads.v26.resources.types import (
2929
AdGroupAd,
3030
AdGroupCustomizer,
3131
CustomizerAttribute,
3232
)
33-
from google.ads.googleads.v24.services.services.ad_group_ad_service import (
33+
from google.ads.googleads.v26.services.services.ad_group_ad_service import (
3434
AdGroupAdServiceClient,
3535
)
36-
from google.ads.googleads.v24.services.services.ad_group_customizer_service import (
36+
from google.ads.googleads.v26.services.services.ad_group_customizer_service import (
3737
AdGroupCustomizerServiceClient,
3838
)
39-
from google.ads.googleads.v24.services.services.customizer_attribute_service import (
39+
from google.ads.googleads.v26.services.services.customizer_attribute_service import (
4040
CustomizerAttributeServiceClient,
4141
)
42-
from google.ads.googleads.v24.services.services.google_ads_service import (
42+
from google.ads.googleads.v26.services.services.google_ads_service import (
4343
GoogleAdsServiceClient,
4444
)
45-
from google.ads.googleads.v24.services.types import (
45+
from google.ads.googleads.v26.services.types import (
4646
AdGroupAdOperation,
4747
AdGroupCustomizerOperation,
4848
CustomizerAttributeOperation,
@@ -341,7 +341,7 @@ def create_ad_with_customizations(
341341
# GoogleAdsClient will read the google-ads.yaml configuration file in the
342342
# home directory if none is specified.
343343
googleads_client: GoogleAdsClient = GoogleAdsClient.load_from_storage(
344-
version="v24"
344+
version="v26"
345345
)
346346

347347
try:

0 commit comments

Comments
 (0)