Download the PHP package mapmyplan/basiq-sdk-php without Composer
On this page you can find all versions of the php package mapmyplan/basiq-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package basiq-sdk-php
Basiq.io PHP SDK
This is the documentation for the PHP SDK for Basiq.io API
Introduction
Basiq.io PHP SDK is a set of tools you can use to easily communicate with Basiq API. If you want to get familiar with the API docs, click here.
The SDK is organized to mirror the HTTP API's functionality and hierarchy. The top level object needed for SDKs functionality is the Session object which requires your API key to be instantiated. You can grab your API key on the dashboard.
Changelog
1.2.0 Added support for waitForAccounts, Refactored jobs search
1.1.0 Added support for secondaryLoginId
0.9.1beta - getTransactions now receives limit parameter. Fixed bug on refresh all connections
0.9.0beta - Initial release
Getting started
Now that you have your API key, you can use the following command to install the SDK:
Next step is to import the used classes into your namespace. A list of classes you will probably use the most:
Common usage examples
Fetching a list of institutions
You can fetch a list of supported financial institutions. The function returns a list of Institution structs.
You can specify the version of API when instantiating Session object. When the version is not specified, default version is 1.0.
Creating a new connection
When a new connection request is made, the server will create a job that will link user's financial institution with your app.
Fetching and iterating through transactions
In this example, the function returns a transactions list struct which is filtered by the connection->id property. You can iterate through transactions list by calling Next().
API
The API of the SDK is manipulated using Services and Entities. Different services return different entities, but the mapping is not one to one.
Errors
If an action encounters an error, you will receive an HTTPResponseException instance. The class contains all available data which you can use to act accordingly.
HTTPResponseException class fields
Check the docs for more information about relevant fields in the error object.
Filtering
Some of the methods support adding filters to them. The filters are created using the FilterBuilder class. After instantiating the class, you can invoke methods in the form of comparison(field, value).
Example:
This example filter for transactions will match all transactions for the connection with the id of "conn-id-213-id" and that are newer than "2018-01-01". All you have to do is pass the filter instance when you want to use it.