Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method: Location get does not return price in serviceItems array #5288

Open
syedMSohaib opened this issue Jun 25, 2024 · 0 comments
Open

Method: Location get does not return price in serviceItems array #5288

syedMSohaib opened this issue Jun 25, 2024 · 0 comments

Comments

@syedMSohaib
Copy link

Environment details

  • OS: MacOs
  • PHP version: 8.3.7
  • Package name and version: "google/apiclient": "^2.15.0"

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
    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

$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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant