TomorrowIdeas / plaid-sdk-php

PHP bindings for the Plaid API
MIT License
111 stars 42 forks source link

Missing options argument for 'accounts/get' in Accounts.php #33

Closed dannyYassine closed 3 years ago

dannyYassine commented 3 years ago

Hi all!

As per the Plaid documentation for accounts/get, there is an optional options object we can pass in order to filter by account_ids.

This is missing from the php client. My code snippet below adds the missing function argument in Accounts.php:

/**
  * Get all Accounts.
  *
  * @param string $access_token
  * @param array $options
  * @return object
  */
public function list(string $access_token, array $options = []): object
{
        $params = [
            "access_token" => $access_token,
            "options" => (object) $options
        ];

        return $this->sendRequest(
            "post",
            "accounts/get",
            $this->paramsWithClientCredentials($params)
        );
}

I am currently integrating the Plaid API to our app, and this is needed to continue with our development.

Thank you for your time and thank you for this PHP client, it really helped us move forward with the Plaid integration.

Danny Y.

brentscheffler commented 3 years ago

This has been resolved in 1.0.4 release.