We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the following example, listCatalog is not filtering by types, such as ITEM.'
listCatalog
function getSquareCatalog($types = 'ITEM'){ $client = getApiClient(); $catalogApi = $client->getCatalogApi(); $cursor = 'initial'; $catalog = array(); while ($cursor){ if ($cursor == 'initial'){$cursor = null;} $apiResponse = $catalogApi->listCatalog($cursor, $types); if ($apiResponse->isSuccess()) { $listCatalogResponse = $apiResponse->getResult(); $catalog= array_merge ($catalog, $listCatalogResponse->getObjects()); $cursor = $listCatalogResponse->getCursor(); } } return $catalog; }
print("<pre>".print_r(getSquareCatalog(),true)."</pre>");
Returns all item types including ITEM, CATEGORY, TAX, DISCOUNT
The text was updated successfully, but these errors were encountered:
User issue, failed to realize I was calling getSquareCatalog() with null argument.
Sorry, something went wrong.
No branches or pull requests
In the following example,
listCatalog
is not filtering by types, such as ITEM.'print("<pre>".print_r(getSquareCatalog(),true)."</pre>");
Returns all item types including ITEM, CATEGORY, TAX, DISCOUNT
The text was updated successfully, but these errors were encountered: