googleapis / googleapis/google-api-php-client

Method: Location get does not return price in serviceItems array

Open
#2,607 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
9.8k
Forks
3.5k
PR merge metrics
No merged PRs in 30d

Description

#### Environment details

- OS: MacOs
- PHP version: 8.3.7

#### Steps to reproduce

1. As mentioned in the documentation, i am trying to get data for a particular location and using below API, as the api returns the data, but in `serviceItems` price object is missing, As per [https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.ServiceItem
](https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.ServiceItem) below should be the object

```
{
"price": {
object ([Money](https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.Money))
},

// Union field service_item_info can be only one of the following:
"structuredServiceItem": {
object ([StructuredServiceItem](https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.StructuredServiceItem))
},
"freeFormServiceItem": {
object ([FreeFormServiceItem](https://developers.google.com/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.FreeFormServiceItem))
}
// End of list of possible types for union field service_item_info.
}
```
but in my case `price` node is missing

#### Code example

```php
$response = $client->authorize()->request('GET', 'https://mybusinessbusinessinformation.googleapis.com/v1/locations/xxxx?readMask=name,languageCode,storeCode,title,phoneNumbers,categories,storefrontAddress,websiteUri,regularHours,specialHours,serviceArea,labels,adWordsLocationExtensions,latlng,openInfo,metadata,profile,relationshipData,moreHours,serviceItems');

$response = json_decode($response->getBody());

```
I also tried using https://developers.google.com/oauthplayground, still same result price object is missing !

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.