Testing the sandbox api with the SDK (v2.0.1), using the listLocations method, I receive the following InvalidArgumentException: "Invalid value for 'capabilities', must be one of 'CREDIT_CARD_PROCESSING'" Out of the three returned locations, the first one does not have 'capabilities' data and the entire request fails at this point. The only option I can see at this point is editing the SDK code which is the last thing I want to do. My code is as follows:
$locationApi = new \SquareConnect\Api\LocationApi(); $listLocations = $locationApi->listLocations($sandboxAccessToken);
Anyone have any ideas?
Hi! we actually had a bug in our SDK generation process that broke the SDKs for a day or so. If you redownload from github now, you code should work fine.
Thanks!
Thank you for the quick reply. I can see in the master branch that the Location model does not have that check. I can get the SDK through github. I was using packagist.org, which still references 2.0.1
Thank you.
Ahh! good catch! we just incremented to 2.0.2 so now you should be able to update easily with composer.
Excellent, thank you, however, 2.0.2 isn't up on packagist yet.
That should be fixed now. Let me know if you have any more troubles!
Square Community