Auth::auth()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace JulianBustamante\Plaid\Resources;
4
5
use GuzzleHttp\ClientInterface;
6
7
/**
8
 * The /auth/get endpoint allows you to collect a user's bank account and
9
 * routing number, along with basic account data and balances. The product
10
 * performs two crucial functions—it translates bank access credentials
11
 * (username & password) into an accurate account and routing number. No input
12
 * of account or routing number is necessary. Secondly it validates that this
13
 * is the owner of this account number, in a NACHA compliant manner. No need for
14
 * micro-deposits or any other secondary authentication.
15
 *
16
 * https://plaid.com/docs/api/#auth
17
 */
18
class Auth extends ResourceAbstract
19
{
20
    public function auth($access_token, array $account_ids = [])
21
    {
22
        return $this->handleRequest(function (ClientInterface $client) use ($access_token, $account_ids) {
23
            $data = $this->getBaseDataWithAccounts($access_token, $account_ids);
24
25
            return $client->post('/auth/get', $data);
26
        });
27
    }
28
}
29