Skip to content

Commit

Permalink
Changes for release v13_1.
Browse files Browse the repository at this point in the history
  • Loading branch information
BenRKarl committed Apr 28, 2023
1 parent 2853958 commit f63d7ba
Show file tree
Hide file tree
Showing 779 changed files with 3,522 additions and 78 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
* 21.1.0
- Google Ads API v13_1 release.
- Add Python versions 3.8, 3.9, and 3.10 to list of classifiers.
- Remove restatement functionality from upload_conversion_enhanvement example.
- Move examples/hotel_ads to examples/travel
- Update metadata_interceptor tests to dynamically retrieve Python version.

* 21.0.0
- Remove support for Google Ads API v11.
- Update examples to use recommended example PII.
Expand Down
31 changes: 1 addition & 30 deletions examples/remarketing/upload_conversion_enhancement.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ def main(
order_id,
conversion_date_time,
user_agent,
restatement_value,
currency_code,
):
"""The main method that creates all necessary entities for the example.
Expand All @@ -44,8 +42,6 @@ def main(
order_id: The unique ID (transaction ID) of the conversion.
conversion_date_time: The date and time of the conversion.
user_agent: The HTTP user agent of the conversion.
restatement_value: The enhancement value.
currency_code: The currency of the enhancement value.
"""
# [START create_adjustment]
conversion_action_service = client.get_service("ConversionActionService")
Expand Down Expand Up @@ -110,20 +106,7 @@ def main(
# enhancement are either both attributed as same-device or both
# attributed as cross-device.
conversion_adjustment.user_agent = user_agent

if restatement_value:
# Sets the new value of the conversion.
conversion_adjustment.restatement_value.adjusted_value = (
restatement_value
)
if currency_code:
# Sets the currency of the new value, if provided. Otherwise, the
# default currency from the conversion action is used, and if that
# is not set then the account currency is used.
conversion_adjustment.restatement_value.currency_code = (
currency_code
)
# [END create_conversion]
# [END create_adjustment]

# Creates the conversion adjustment upload service client.
conversion_adjustment_upload_service = client.get_service(
Expand Down Expand Up @@ -251,16 +234,6 @@ def normalize_and_hash(s):
type=str,
help="The HTTP user agent of the conversion.",
)
parser.add_argument(
"-v", "--restatement_value", type=float, help="The enhancement value.",
)
parser.add_argument(
"-y",
"--currency_code",
type=str,
required=True,
help="The currency of the conversion value.",
)
args = parser.parse_args()

try:
Expand All @@ -271,8 +244,6 @@ def normalize_and_hash(s):
args.order_id,
args.conversion_date_time,
args.user_agent,
args.restatement_value,
args.currency_code,
)
except GoogleAdsException as ex:
print(
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion google/ads/googleads/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
import google.ads.googleads.errors
import google.ads.googleads.util

VERSION = "21.0.0"
VERSION = "21.1.0"
11 changes: 11 additions & 0 deletions google/ads/googleads/v13/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,7 @@
"ListingGroupFilterTypeEnum": "google.ads.googleads.v13.enums.types.listing_group_filter_type_enum",
"ListingGroupFilterVerticalEnum": "google.ads.googleads.v13.enums.types.listing_group_filter_vertical",
"ListingGroupTypeEnum": "google.ads.googleads.v13.enums.types.listing_group_type",
"ListingTypeEnum": "google.ads.googleads.v13.enums.types.listing_type",
"LocalPlaceholderFieldEnum": "google.ads.googleads.v13.enums.types.local_placeholder_field",
"LocationExtensionTargetingCriterionFieldEnum": "google.ads.googleads.v13.enums.types.location_extension_targeting_criterion_field",
"LocationGroupRadiusUnitsEnum": "google.ads.googleads.v13.enums.types.location_group_radius_units",
Expand Down Expand Up @@ -571,6 +572,7 @@
"ServedAssetFieldTypeEnum": "google.ads.googleads.v13.enums.types.served_asset_field_type",
"SharedSetStatusEnum": "google.ads.googleads.v13.enums.types.shared_set_status",
"SharedSetTypeEnum": "google.ads.googleads.v13.enums.types.shared_set_type",
"ShoppingAddProductsToCampaignRecommendationEnum": "google.ads.googleads.v13.enums.types.shopping_add_products_to_campaign_recommendation_enum",
"SimulationModificationMethodEnum": "google.ads.googleads.v13.enums.types.simulation_modification_method",
"SimulationTypeEnum": "google.ads.googleads.v13.enums.types.simulation_type",
"SitelinkPlaceholderFieldEnum": "google.ads.googleads.v13.enums.types.sitelink_placeholder_field",
Expand Down Expand Up @@ -679,6 +681,7 @@
"CustomerErrorEnum": "google.ads.googleads.v13.errors.types.customer_error",
"CustomerFeedErrorEnum": "google.ads.googleads.v13.errors.types.customer_feed_error",
"CustomerManagerLinkErrorEnum": "google.ads.googleads.v13.errors.types.customer_manager_link_error",
"CustomerSkAdNetworkConversionValueSchemaErrorEnum": "google.ads.googleads.v13.errors.types.customer_sk_ad_network_conversion_value_schema_error",
"CustomerUserAccessErrorEnum": "google.ads.googleads.v13.errors.types.customer_user_access_error",
"CustomInterestErrorEnum": "google.ads.googleads.v13.errors.types.custom_interest_error",
"CustomizerAttributeErrorEnum": "google.ads.googleads.v13.errors.types.customizer_attribute_error",
Expand Down Expand Up @@ -863,6 +866,7 @@
"CustomerLabel": "google.ads.googleads.v13.resources.types.customer_label",
"CustomerManagerLink": "google.ads.googleads.v13.resources.types.customer_manager_link",
"CustomerNegativeCriterion": "google.ads.googleads.v13.resources.types.customer_negative_criterion",
"CustomerSkAdNetworkConversionValueSchema": "google.ads.googleads.v13.resources.types.customer_sk_ad_network_conversion_value_schema",
"CustomerUserAccess": "google.ads.googleads.v13.resources.types.customer_user_access",
"CustomerUserAccessInvitation": "google.ads.googleads.v13.resources.types.customer_user_access_invitation",
"CustomInterest": "google.ads.googleads.v13.resources.types.custom_interest",
Expand Down Expand Up @@ -1065,6 +1069,7 @@
"CustomerManagerLinkOperation": "google.ads.googleads.v13.services.types.customer_manager_link_service",
"CustomerNegativeCriterionOperation": "google.ads.googleads.v13.services.types.customer_negative_criterion_service",
"CustomerOperation": "google.ads.googleads.v13.services.types.customer_service",
"CustomerSkAdNetworkConversionValueSchemaOperation": "google.ads.googleads.v13.services.types.customer_sk_ad_network_conversion_value_schema_service",
"CustomerUserAccessInvitationOperation": "google.ads.googleads.v13.services.types.customer_user_access_invitation_service",
"CustomerUserAccessOperation": "google.ads.googleads.v13.services.types.customer_user_access_service",
"CustomInterestOperation": "google.ads.googleads.v13.services.types.custom_interest_service",
Expand Down Expand Up @@ -1356,6 +1361,9 @@
"MutateCustomerRequest": "google.ads.googleads.v13.services.types.customer_service",
"MutateCustomerResponse": "google.ads.googleads.v13.services.types.customer_service",
"MutateCustomerResult": "google.ads.googleads.v13.services.types.customer_service",
"MutateCustomerSkAdNetworkConversionValueSchemaRequest": "google.ads.googleads.v13.services.types.customer_sk_ad_network_conversion_value_schema_service",
"MutateCustomerSkAdNetworkConversionValueSchemaResponse": "google.ads.googleads.v13.services.types.customer_sk_ad_network_conversion_value_schema_service",
"MutateCustomerSkAdNetworkConversionValueSchemaResult": "google.ads.googleads.v13.services.types.customer_sk_ad_network_conversion_value_schema_service",
"MutateCustomerUserAccessInvitationRequest": "google.ads.googleads.v13.services.types.customer_user_access_invitation_service",
"MutateCustomerUserAccessInvitationResponse": "google.ads.googleads.v13.services.types.customer_user_access_invitation_service",
"MutateCustomerUserAccessInvitationResult": "google.ads.googleads.v13.services.types.customer_user_access_invitation_service",
Expand Down Expand Up @@ -1702,6 +1710,9 @@
"CustomerServiceClient": "google.ads.googleads.v13.services.services.customer_service",
"CustomerServiceTransport": "google.ads.googleads.v13.services.services.customer_service.transports",
"CustomerServiceGrpcTransport": "google.ads.googleads.v13.services.services.customer_service.transports",
"CustomerSkAdNetworkConversionValueSchemaServiceClient": "google.ads.googleads.v13.services.services.customer_sk_ad_network_conversion_value_schema_service",
"CustomerSkAdNetworkConversionValueSchemaServiceTransport": "google.ads.googleads.v13.services.services.customer_sk_ad_network_conversion_value_schema_service.transports",
"CustomerSkAdNetworkConversionValueSchemaServiceGrpcTransport": "google.ads.googleads.v13.services.services.customer_sk_ad_network_conversion_value_schema_service.transports",
"CustomerUserAccessInvitationServiceClient": "google.ads.googleads.v13.services.services.customer_user_access_invitation_service",
"CustomerUserAccessInvitationServiceTransport": "google.ads.googleads.v13.services.services.customer_user_access_invitation_service.transports",
"CustomerUserAccessInvitationServiceGrpcTransport": "google.ads.googleads.v13.services.services.customer_user_access_invitation_service.transports",
Expand Down
2 changes: 2 additions & 0 deletions google/ads/googleads/v13/common/types/ad_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations


import proto # type: ignore

Expand Down
4 changes: 3 additions & 1 deletion google/ads/googleads/v13/common/types/ad_type_infos.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations

from typing import MutableSequence

import proto # type: ignore
Expand Down Expand Up @@ -954,7 +956,7 @@ class ResponsiveDisplayAdInfo(proto.Message):
Square logo images to be used in the ad. Valid image types
are GIF, JPEG, and PNG. The minimum size is 128x128 and the
aspect ratio must be 1:1 (+-1%). Combined with
``square_logo_images``, the maximum is 5.
``logo_images``, the maximum is 5.
headlines (MutableSequence[google.ads.googleads.v13.common.types.AdTextAsset]):
Short format headlines for the ad. The
maximum length is 30 characters. At least 1 and
Expand Down
2 changes: 2 additions & 0 deletions google/ads/googleads/v13/common/types/asset_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations

from typing import MutableSequence

import proto # type: ignore
Expand Down
2 changes: 2 additions & 0 deletions google/ads/googleads/v13/common/types/asset_set_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations

from typing import MutableSequence

import proto # type: ignore
Expand Down
36 changes: 36 additions & 0 deletions google/ads/googleads/v13/common/types/asset_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations

from typing import MutableSequence

import proto # type: ignore
Expand Down Expand Up @@ -344,6 +346,11 @@ class LeadFormAsset(proto.Message):

class LeadFormField(proto.Message):
r"""One input field instance within a form.
This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
Expand All @@ -358,6 +365,15 @@ class LeadFormField(proto.Message):
question fields. Minimum of 2 answers required
and maximum of 12 allowed.
This field is a member of `oneof`_ ``answers``.
has_location_answer (bool):
Answer configuration for location question. If true,
campaign/account level location data (state, city, business
name etc) will be rendered on the Lead Form. Starting V13.1,
has_location_answer can only be set for "What is your
preferred dealership?" question, for advertisers with
Location Assets setup at campaign/account level.
This field is a member of `oneof`_ ``answers``.
"""

Expand All @@ -372,10 +388,18 @@ class LeadFormField(proto.Message):
oneof="answers",
message="LeadFormSingleChoiceAnswers",
)
has_location_answer: bool = proto.Field(
proto.BOOL, number=3, oneof="answers",
)


class LeadFormCustomQuestionField(proto.Message):
r"""One custom question input field instance within a form.
This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
Expand All @@ -387,6 +411,15 @@ class LeadFormCustomQuestionField(proto.Message):
question. Minimum of 2 answers and maximum of 12
allowed.
This field is a member of `oneof`_ ``answers``.
has_location_answer (bool):
Answer configuration for location question. If true,
campaign/account level location data (state, city, business
name etc) will be rendered on the Lead Form. Starting V13.1,
has_location_answer can only be set for "What is your
preferred dealership?" question, for advertisers with
Location Assets setup at campaign/account level.
This field is a member of `oneof`_ ``answers``.
"""

Expand All @@ -399,6 +432,9 @@ class LeadFormCustomQuestionField(proto.Message):
oneof="answers",
message="LeadFormSingleChoiceAnswers",
)
has_location_answer: bool = proto.Field(
proto.BOOL, number=3, oneof="answers",
)


class LeadFormSingleChoiceAnswers(proto.Message):
Expand Down
2 changes: 2 additions & 0 deletions google/ads/googleads/v13/common/types/asset_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations


import proto # type: ignore

Expand Down
2 changes: 2 additions & 0 deletions google/ads/googleads/v13/common/types/audiences.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations

from typing import MutableSequence

import proto # type: ignore
Expand Down
2 changes: 2 additions & 0 deletions google/ads/googleads/v13/common/types/bidding.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations


import proto # type: ignore

Expand Down
2 changes: 2 additions & 0 deletions google/ads/googleads/v13/common/types/click_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations


import proto # type: ignore

Expand Down
2 changes: 2 additions & 0 deletions google/ads/googleads/v13/common/types/criteria.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations

from typing import MutableSequence

import proto # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations

from typing import MutableSequence

import proto # type: ignore
Expand Down Expand Up @@ -129,11 +131,13 @@ class CriterionCategoryLocaleAvailability(proto.Message):
COUNTRY_AND_LANGUAGE (both country and language will be
set).
country_code (str):
Code of the country.
The ISO-3166-1 alpha-2 country code
associated with the category.
This field is a member of `oneof`_ ``_country_code``.
language_code (str):
Code of the language.
ISO 639-1 code of the language associated
with the category.
This field is a member of `oneof`_ ``_language_code``.
"""
Expand Down
2 changes: 2 additions & 0 deletions google/ads/googleads/v13/common/types/custom_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations


import proto # type: ignore

Expand Down
2 changes: 2 additions & 0 deletions google/ads/googleads/v13/common/types/customizer_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations


import proto # type: ignore

Expand Down
2 changes: 2 additions & 0 deletions google/ads/googleads/v13/common/types/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations


import proto # type: ignore

Expand Down
4 changes: 3 additions & 1 deletion google/ads/googleads/v13/common/types/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations

from typing import MutableSequence

import proto # type: ignore
Expand Down Expand Up @@ -663,7 +665,7 @@ class StructuredSnippetFeedItem(proto.Message):


class SitelinkFeedItem(proto.Message):
r"""Represents a sitelink extension.
r"""Represents a sitelink.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
Expand Down
2 changes: 2 additions & 0 deletions google/ads/googleads/v13/common/types/feed_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import annotations


import proto # type: ignore

Expand Down
Loading

0 comments on commit f63d7ba

Please sign in to comment.