google-ads-php icon indicating copy to clipboard operation
google-ads-php copied to clipboard

Incorrect constant's name in ConversionActionCategory enum

Open mateusdeitos-tiny opened this issue 3 years ago • 1 comments

[DO NOT INCLUDE ANY PERSONAL OR SENSITIVE DATA - MAKE SURE TO REDACT CONTENT WHEN NECESSARY]

Your client library and Google Ads API versions:

  • Client library version: v14.0.0
  • Google Ads API version: V10

Your environment:

  • PHP version: 7.4.30
  • OS: Linux 5.10.135-122.509.amzn2.x86_64
  • protobuf: 3.20.0
  • grpc: 1.45.0
  • Transport type: REST

Description of the bug:

Incorrect enum constant resulting in error while updating campaign conversion goals.

The constant in the ConversionActionCategoryEnum::PBDEFAULT should be DEFAULT.

The error occurs when using the name static method to get the category constant name and create the conversion goal's resourceName

According to the GoogleAds docs the constant should be DEFAULT

Steps to reproduce:

  • update a conversion goal with the default category using ConversionActionCategory::name(ConversionActionCategory::PBDEFAULT) as part of the resourceName

Expected behavior:

The constant's name should be DEFAULT

Request/Response Logs:

Response

{
	"errors": [
		{
			"errorCode": {
				"requestError": "BAD_RESOURCE_ID"
			},
			"message": "'PBDEFAULT' part of the resource name is invalid.",
			"location": {
				"fieldPathElements": [
					{
						"fieldName": "mutate_operations",
						"index": 6
					},
					{
						"fieldName": "campaign_conversion_goal_operation"
					},
					{
						"fieldName": "update"
					},
					{
						"fieldName": "resource_name"
					}
				]
			}
		}
	],
	"requestId": "BcgsrZpXuQhty5wpbuw3KA"
}

Anything else we should know about your project / environment:

mateusdeitos-tiny avatar Oct 07 '22 16:10 mateusdeitos-tiny

That should be already fixed since v11. Could you please try out the new version instead?

fiboknacky avatar Oct 12 '22 07:10 fiboknacky