- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
SDK and Sandbox locations "Invalid value for 'capabilities', must be one of 'CREDIT_CARD_PROCESSING'
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?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
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!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Ahh! good catch! we just incremented to 2.0.2 so now you should be able to update easily with composer.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
Excellent, thank you, however, 2.0.2 isn't up on packagist yet.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
That should be fixed now. Let me know if you have any more troubles!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report