x

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?

 

 

1,599 Views
Message 1 of 6
Report
5 REPLIES 5
Alumni

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! 

1,595 Views
Message 2 of 6
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.

1,588 Views
Message 3 of 6
Report
Alumni

Ahh! good catch! we just incremented to 2.0.2 so now you should be able to update easily with composer. 

1,581 Views
Message 4 of 6
Report

Excellent, thank you, however, 2.0.2 isn't up on packagist yet.

1,576 Views
Message 5 of 6
Report
Alumni

That should be fixed now. Let me know if you have any more troubles! 

1,574 Views
Message 6 of 6
Report