See what’s new and what we fixed in the latest version of our client libraries.
If you want to better understand how we make our SDKs, and how our API specification works with templates to create a complete SDK, check out How Square makes its SDKs. Below we’ll get into what’s new and improved in version 2.2.1 of our SDKs.
API specification changes
One of the easiest ways to describe the changes in the latest version is to look at the square/connect-api-specification using GitHub’s compare view. You‘ll notice between versions 2.2.0 and 2.2.1 we had commits from different team members, and even a bug fix from one of our developers.
The commit messages alone only show some of the detail. You can get additional details in the full diff. This version fixes some of the v1 models that, in some cases, prevented developers from getting all of the information back from the API when using the SDK.
One of the most anticipated SDK features is support for v1 pagination. All client libraries now have methods like
SquareConnectApiClient::getV1BatchTokenFromHeaders($http_headers for PHP to process the returned headers and get the appropriate token that you can then use to request the next page of results.
The last change in this release is improved documentation for SDK model methods that get and set properties. Viewing the generated documentation for a model (for example, the transaction model for PHP) now tells you explicitly which methods you will need to use to access the underlying data.
You can download or upgrade the latest version of our SDKs from your favorite package manager.
If you have any suggestions, fixes, or issues with our current SDKs, feel free to raise an issue or draft a PR in the relevant GitHub repository. You can also discuss the SDKs on our developer Slack — head to squ.re/slack for an invite.