Skip to content

Commit 651c284

Browse files
authored
Changes for release v22. (#1032)
1 parent c7535c7 commit 651c284

File tree

1,837 files changed

+419837
-799
lines changed

Some content is hidden

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

1,837 files changed

+419837
-799
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
* 28.1.0
2+
- Google Ads API v22_0 release.
3+
14
* 28.0.0
25
- Google Ads API v21_0 release.
36
- Updated to Google Ads API v19_0 and v20_0 to include EU political advertising changes.

Dockerfile

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,25 @@
1-
ARG image_name=ubuntu:20.04
2-
FROM ${image_name}
1+
FROM ubuntu:24.04
32

43
ARG DEBIAN_FRONTEND=noninteractive
4+
ARG PYTHON_VERSIONS="3.13 3.12 3.11 3.10 3.9"
5+
56
ENV TZ=Etc/GMT
7+
ENV PATH="$PATH:/root/.local/bin"
8+
ENV NOX_DEFAULT_VENV_BACKEND=uv
9+
10+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
611
COPY . /google-ads-python
12+
13+
RUN uv python install ${PYTHON_VERSIONS} && \
14+
uv tool install nox[uv]
15+
716
RUN apt-get update -qy && \
17+
apt-get upgrade -qy && \
818
apt-get install -qy --no-install-recommends \
919
ca-certificates \
1020
curl \
11-
gnupg2 && \
12-
. /etc/os-release && \
13-
echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu ${UBUNTU_CODENAME} main" > /etc/apt/sources.list.d/deadsnakes.list && \
14-
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F23C5A6CF475977595C89F51BA6932366A755776 && \
15-
apt-get update -qy && \
16-
apt-get install -qy --no-install-recommends \
21+
gnupg2 \
1722
git \
18-
openssh-client \
19-
python3.8 \
20-
python3.8-distutils \
21-
python3.9 \
22-
python3.10 \
23-
python3.11 \
24-
python3.12 && \
25-
curl -fsSo /tmp/get-pip.py https://bootstrap.pypa.io/pip/3.8/get-pip.py && \
26-
python3.8 /tmp/get-pip.py && \
27-
python3.8 -m pip install --no-cache-dir --upgrade pip && \
28-
python3.9 /tmp/get-pip.py && \
29-
python3.9 -m pip install --no-cache-dir --upgrade pip && \
30-
python3.10 /tmp/get-pip.py && \
31-
python3.10 -m pip install --no-cache-dir --upgrade pip && \
32-
python3.11 /tmp/get-pip.py && \
33-
python3.11 -m pip install --no-cache-dir --upgrade pip && \
34-
python3.12 /tmp/get-pip.py && \
35-
python3.12 -m pip install --no-cache-dir --upgrade pip && \
36-
rm /tmp/get-pip.py && \
37-
python3 -m pip install --no-cache-dir "nox>=2020.12.31,<2022.6" && \
38-
rm -rf /var/cache/apt/lists
23+
openssh-client
3924

4025
WORKDIR "/google-ads-python"

examples/account_management/create_customer.py

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

2828
from google.ads.googleads.client import GoogleAdsClient
2929
from google.ads.googleads.errors import GoogleAdsException
30-
from google.ads.googleads.v21.resources.types.customer import Customer
31-
from google.ads.googleads.v21.services.services.customer_service.client import (
30+
from google.ads.googleads.v22.resources.types.customer import Customer
31+
from google.ads.googleads.v22.services.services.customer_service.client import (
3232
CustomerServiceClient,
3333
)
34-
from google.ads.googleads.v21.services.types.customer_service import (
34+
from google.ads.googleads.v22.services.types.customer_service import (
3535
CreateCustomerClientResponse,
3636
)
3737

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

9292
# GoogleAdsClient will read the google-ads.yaml configuration file in the
9393
# home directory if none is specified.
94-
googleads_client = GoogleAdsClient.load_from_storage(version="v21")
94+
googleads_client = GoogleAdsClient.load_from_storage(version="v22")
9595

9696
try:
9797
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.v21.services.services.google_ads_service.client import (
31+
from google.ads.googleads.v22.services.services.google_ads_service.client import (
3232
GoogleAdsServiceClient,
3333
)
34-
from google.ads.googleads.v21.services.services.customer_service.client import (
34+
from google.ads.googleads.v22.services.services.customer_service.client import (
3535
CustomerServiceClient,
3636
)
37-
from google.ads.googleads.v21.resources.types.customer_client import (
37+
from google.ads.googleads.v22.resources.types.customer_client import (
3838
CustomerClient,
3939
)
40-
from google.ads.googleads.v21.services.types.google_ads_service import (
40+
from google.ads.googleads.v22.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="v21")
241+
googleads_client = GoogleAdsClient.load_from_storage(version="v22")
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.v21.services.services.google_ads_service.client import (
31+
from google.ads.googleads.v22.services.services.google_ads_service.client import (
3232
GoogleAdsServiceClient,
3333
)
34-
from google.ads.googleads.v21.services.types.google_ads_service import (
34+
from google.ads.googleads.v22.services.types.google_ads_service import (
3535
SearchGoogleAdsRequest,
3636
SearchPagedResponse,
3737
GoogleAdsRow,
3838
)
39-
from google.ads.googleads.v21.resources.types.change_event import ChangeEvent
39+
from google.ads.googleads.v22.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="v21")
221+
googleads_client = GoogleAdsClient.load_from_storage(version="v22")
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
@@ -22,15 +22,15 @@
2222

2323
from google.ads.googleads.client import GoogleAdsClient
2424
from google.ads.googleads.errors import GoogleAdsException
25-
from google.ads.googleads.v21.services.services.google_ads_service.client import (
25+
from google.ads.googleads.v22.services.services.google_ads_service.client import (
2626
GoogleAdsServiceClient,
2727
)
28-
from google.ads.googleads.v21.services.types.google_ads_service import (
28+
from google.ads.googleads.v22.services.types.google_ads_service import (
2929
SearchGoogleAdsRequest,
3030
SearchPagedResponse,
3131
GoogleAdsRow,
3232
)
33-
from google.ads.googleads.v21.resources.types.change_status import ChangeStatus
33+
from google.ads.googleads.v22.resources.types.change_status import ChangeStatus
3434

3535

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

111111
# GoogleAdsClient will read the google-ads.yaml configuration file in the
112112
# home directory if none is specified.
113-
googleads_client = GoogleAdsClient.load_from_storage(version="v21")
113+
googleads_client = GoogleAdsClient.load_from_storage(version="v22")
114114

115115
try:
116116
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
@@ -23,18 +23,18 @@
2323

2424
from google.ads.googleads.client import GoogleAdsClient
2525
from google.ads.googleads.errors import GoogleAdsException
26-
from google.ads.googleads.v21.services.services.customer_user_access_invitation_service.client import (
26+
from google.ads.googleads.v22.services.services.customer_user_access_invitation_service.client import (
2727
CustomerUserAccessInvitationServiceClient,
2828
)
29-
from google.ads.googleads.v21.services.types.customer_user_access_invitation_service import (
29+
from google.ads.googleads.v22.services.types.customer_user_access_invitation_service import (
3030
CustomerUserAccessInvitationOperation,
3131
MutateCustomerUserAccessInvitationResponse,
3232
)
33-
from google.ads.googleads.v21.resources.types.customer_user_access_invitation import (
33+
from google.ads.googleads.v22.resources.types.customer_user_access_invitation import (
3434
CustomerUserAccessInvitation,
3535
)
3636

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

@@ -115,7 +115,7 @@ def main(
115115

116116
# GoogleAdsClient will read the google-ads.yaml configuration file in the
117117
# home directory if none is specified.
118-
googleads_client = GoogleAdsClient.load_from_storage(version="v21")
118+
googleads_client = GoogleAdsClient.load_from_storage(version="v22")
119119

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

2727
from google.ads.googleads.client import GoogleAdsClient
2828
from google.ads.googleads.errors import GoogleAdsException
29-
from google.ads.googleads.v21.services.services.customer_service.client import (
29+
from google.ads.googleads.v22.services.services.customer_service.client import (
3030
CustomerServiceClient,
3131
)
32-
from google.ads.googleads.v21.services.types.customer_service import (
32+
from google.ads.googleads.v22.services.types.customer_service import (
3333
ListAccessibleCustomersResponse,
3434
)
3535

@@ -55,7 +55,7 @@ def main(client: GoogleAdsClient) -> None:
5555
if __name__ == "__main__":
5656
# GoogleAdsClient will read the google-ads.yaml configuration file in the
5757
# home directory if none is specified.
58-
googleads_client = GoogleAdsClient.load_from_storage(version="v21")
58+
googleads_client = GoogleAdsClient.load_from_storage(version="v22")
5959

6060
try:
6161
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.v21.services.services.google_ads_service.client import (
29+
from google.ads.googleads.v22.services.services.google_ads_service.client import (
3030
GoogleAdsServiceClient,
3131
)
32-
from google.ads.googleads.v21.services.types.google_ads_service import (
32+
from google.ads.googleads.v22.services.types.google_ads_service import (
3333
SearchGoogleAdsRequest,
3434
SearchPagedResponse,
3535
)
36-
from google.ads.googleads.v21.resources.types.customer_user_access import (
36+
from google.ads.googleads.v22.resources.types.customer_user_access import (
3737
CustomerUserAccess,
3838
)
39-
from google.ads.googleads.v21.services.services.customer_user_access_service.client import (
39+
from google.ads.googleads.v22.services.services.customer_user_access_service.client import (
4040
CustomerUserAccessServiceClient,
4141
)
42-
from google.ads.googleads.v21.services.types.customer_user_access_service import (
42+
from google.ads.googleads.v22.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="v21")
222+
googleads_client = GoogleAdsClient.load_from_storage(version="v22")
223223
try:
224224
main(
225225
googleads_client,

0 commit comments

Comments
 (0)