Data sources
1) I use this releas https://github.com/googleapis/google-api-php-client/releases of google client api library - for php 7.4 https://prnt.sc/l-WHG_rzCgGt - this one
2) And use this samples library https://github.com/googleads/googleads-shopping-samples/tree/main/php to make some requests to my Google Shopping (Google Merchant) account.
My problen IS:
When I try to call such function in my script.php file, it trow the error.
public function get_info($accountId) { $status = $this->session->service->merchantsupport->renderaccountissues( $this->session->merchantId, '{ "contentOption": "CONTENT_OPTION_UNSPECIFIED" }'); return $status; }
The error is: Fatal error: Uncaught TypeError: Argument 2 passed to Google\Service\ShoppingContent\Resource\Merchantsupport::renderaccountissues() must be an instance of Google\Service\ShoppingContent\RenderAccountIssuesRequestPayload, string given, called in /home/tatam0/tadam/test/php_merchant_api/AccountstatusesSample.php on line 65 and defined in /home/tatam0/tadam/test/php_merchant_api/vendor/google/apiclient-services/src/ShoppingContent/Resource/Merchantsupport.php:54
Here is documentation on this funtcion renderaccountissues() https://developers.google.com/shopping-content/reference/rest/v2.1/merchantsupport/renderaccountissu...
https://prnt.sc/iKGzL5HCHGTx - I did as it says
What does mean "must be an instance of RenderAccountIssuesRequestPayload"? I do not understand, how can I change my php-code to make this funnction work correctly?
can somebody show a php code example, how i can make an instance of the RenderAccountIssuesRequestPayload class?
https://prnt.sc/U-RGCTKuK9gu - here is a definition of this class