Exchange   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 9
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A exchange() 0 7 1
1
<?php
2
3
namespace JulianBustamante\Plaid\Resources;
4
5
/**
6
 * The /exchange endpoint allows developers to Exchange a Link public_token for
7
 * an API access_token. A public_token becomes invalidated once it has been
8
 * successfully exchanged for an access_token.
9
 */
10
class Exchange extends ResourceAbstract
11
{
12
    public function exchange($public_token)
13
    {
14
        return $this->handleRequest(function ($client) use ($public_token) {
15
            return $client->post('/item/public_token/exchange', [
16
                'json' => [
17
                        'public_token' => $public_token,
18
                    ] + $this->plaid->getAPIKeys()
19
            ]);
20
        });
21
    }
22
}
23