Skip to content

Can't use PATCH for Business Information #6605

Description

@richardczeiger

Hi there,
I've gotten pretty much everything working nicely except for any function requiring HTTP: PATCH.
For example, updating Location data for a Google Business Profile.
Here's my code:

$locationData = (object) [
	'title' => "MY_NEW_LOCATION_PROFILE_TITLE"
];
$locationData = json_encode($locationData);

$locationName 		= 'locations/###################'; // Checked and confirmed using get()!
$params['updateMask'] 	= 'title'; // Field updated 
$serviceBusiness 	= new Google_Service_MyBusinessBusinessInformation($client);
$updateLocation 	= $serviceBusiness->locations->patch($locationName, $locationData, $params);
vard_dump($updateLocation);

The $client is good because I can run locations->get() and accounts_locations->listAccountsLocations() and even categories->listCategories() without issue. I confirmed the $locationName using locations->get().

But for some reason locations->patch() always dies. I believe it is because of the PATCH http type (as opposed to GET or POST).

Any ideas??

Cheers,
Richard :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions