Completed
Pull Request — master (#18)
by ARCANEDEV
07:31
created

BankAccount::verify()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php namespace Arcanedev\Stripe\Resources;
2
3
use Arcanedev\Stripe\Bases\ExternalAccount;
4
use Arcanedev\Stripe\Contracts\Resources\BankAccountInterface;
5
6
/**
7
 * Class     BankAccount
8
 *
9
 * @package  Arcanedev\Stripe\Resources
10
 * @author   ARCANEDEV <[email protected]>
11
 * @link     https://stripe.com/docs/api/php#bank_accounts
12
 *
13
 * @property  string                            id
14
 * @property  string                            object                // "bank_account"
15
 * @property  string                            account
16
 * @property  string                            account_holder_name
17
 * @property  string                            account_holder_type   // "individual" or "company"
18
 * @property  string                            bank_name
19
 * @property  string                            country
20
 * @property  string                            currency
21
 * @property  bool                              default_for_currency
22
 * @property  string                            fingerprint
23
 * @property  string                            last4
24
 * @property  \Arcanedev\Stripe\AttachedObject  metadata
25
 * @property  string                            routing_number
26
 * @property  string                            status                // 'new', 'validated', 'verified', or 'errored'
27
 */
28
class BankAccount extends ExternalAccount implements BankAccountInterface
29
{
30
    /* ------------------------------------------------------------------------------------------------
31
     |  CRUD Functions
32
     | ------------------------------------------------------------------------------------------------
33
     */
34
    /**
35
     * Get the verified bank account.
36
     *
37
     * @param  array|null         $params
38
     * @param  array|string|null  $options
39
     *
40
     * @return self
41
     */
42 10
    public function verify($params = null, $options = null)
43 8
    {
44 10
        return $this->scopedPostCall(
45 10
            $this->instanceUrl() . '/verify', $params, $options
46 8
        );
47
    }
48
}
49